11-17-2011, 07:14 AM | #1 |
Junior Member
Posts: 7
Karma: 10
Join Date: Nov 2011
Device: none
|
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: https://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: https://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: Code:
$ 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. Boris |
11-17-2011, 07:47 AM | #2 |
Junior Member
Posts: 7
Karma: 10
Join Date: Nov 2011
Device: none
|
Solved it myself
ok... after reading more carefully I found the solution myself:
The whole thing is encapsulated in the "Palm_Database_Format" https://wiki.mobileread.com/wiki/PDB#...atabase_Format There the first 32 bytes are reserved for "name". Hope the solution helps other people who like to overread thing ;-) |
Advert | |
|
11-17-2011, 08:16 AM | #3 | ||
Grand Sorcerer
Posts: 27,546
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
Quote:
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. |
||
Tags |
byte, format, header, mobi |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
EXTH Header Question | RecQuery | Kindle Formats | 1 | 06-07-2011 02:28 PM |
Format Question | dkb | Sony Reader | 2 | 10-20-2010 09:25 PM |
LRF header question | =X= | Calibre | 2 | 11-12-2009 08:06 PM |
Question about the best format(s). | morajelly | Sony Reader | 14 | 07-14-2009 10:44 PM |
PRS-500 PDB header format | Avian | Sony Reader Dev Corner | 14 | 10-03-2007 09:39 AM |