|11-17-2011, 08:14 AM||#1|
Join Date: Nov 2011
Question about Header and Format
Hello dear Community,
I am new to this forum and also to e-books in general. It happend that I'm asked to build the mobi-format in Perl. I know already about MobiPerl, and I'm reading it's source code already. Currently I'm still trying to understand the mobi-format, and so my question is related to this issue.
To understand the mobi-format I read your helpful wiki-page: http://wiki.mobileread.com/wiki/MOBI
There it says that the first two bytes (from offset 0) are about "Compression", here is the chapter I'm talking about: http://wiki.mobileread.com/wiki/MOBI#PalmDOC_Header
So now I'm already confused! Because I created two mobi-binaries out from a simple HTML-file, once using Calibre and the other time using MobiPerl's html2mobi. The generated mobi file is viewable in "fbreader", so they seem to be valid (though the two files look a bit different, but that's not the issue right now). When I look at the bytes in this generated files I see that in both of them the first bytes are used for the title, which is not what the wiki-page is saying.
Here the binary output:
$ hexdump -C calibre_html.mobi | head -2 00000000 4d 65 64 69 75 6d 5f 54 65 73 74 5f 44 6f 63 75 |Medium_Test_Docu| 00000010 6d 65 6e 74 00 00 00 00 00 00 00 00 00 00 00 00 |ment............| $ hexdump -C mobiperl_html.mobi | head -2 00000000 4d 65 64 69 75 6d 20 54 65 73 74 20 44 6f 63 75 |Medium Test Docu| 00000010 6d 65 6e 74 00 00 00 00 00 00 00 00 00 00 00 00 |ment............|
Is the wiki-page still reliable? Is there another resource I can look at?
Am I doing something wrong?
Thank you very much.
|11-17-2011, 08:47 AM||#2|
Join Date: Nov 2011
Solved it myself
ok... after reading more carefully I found the solution myself:
The whole thing is encapsulated in the "Palm_Database_Format"
There the first 32 bytes are reserved for "name".
Hope the solution helps other people who like to overread thing ;-)
|11-17-2011, 09:16 AM||#3|
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
The details for the Palm Database Format can be found in the Palm Database Format wiki.
That info isn't duplicated in the MOBI wiki because it's the same.
EDIT: While I was typing away trying to explain it... you figured out yourself.
|byte, format, header, mobi|
|Thread Tools||Search this Thread|
|Thread||Thread Starter||Forum||Replies||Last Post|
|EXTH Header Question||RecQuery||Kindle Formats||1||06-07-2011 03:28 PM|
|Format Question||dkb||Sony Reader||2||10-20-2010 10:25 PM|
|LRF header question||=X=||Calibre||2||11-12-2009 09:06 PM|
|Question about the best format(s).||morajelly||Sony Reader||14||07-14-2009 11:44 PM|
|PRS-500 PDB header format||Avian||Sony Reader Dev Corner||14||10-03-2007 10:39 AM|