Quote:
Originally Posted by PeterT
Actually when I read through the Wiki I could find numerous statements on "reverse engineered" and "Unknown usage"; also the entire Wiki entry seems to concentrate on the structure of the binary Mobi file, but very little on the actual contents that the Mobi format delivers.
|
What's on the Mobileread wiki is essentially a duplicate of what Mobipocket published.
Mobipocket began on Palm OS devices, and the ebooks in Mobi format show vestiges of the legacy, like a 64K record size limit.
The only things that can be in memory on a Palm device are files in Palm database format, and those will have PDB or PRC extensions. A PDB file is a general Palm database file. It may contain any content. The first record of the database will specify what type of file it is and what Palm application owns it. Programs on Palm devices use the Creator ID in the record to determine which files they can open. PRC files are "resource" databases. Programs on Palm devices have a PRC extension, and the resources are the actual program code, but a PRC file does not have to be a program.
Mobi files for Palm devices have PRC extensions, and the original Mobi Creator app for Windows creates PRC files. There is no difference between a PRC file and a .mobi file, and you can rename it for use on other devices. (The Mobi viewer for Palm will recognize and open .mobi files stored in the /Palm/Launcher directory on an expansion card.)
Mobipocket files are an encapsulated subset of HTML 4, with limited CSS support, compressed with a form of RLE compression compatible with the compression used by Palm "doc" files to save space in memory, and wrapped with metadata describing the file. The support text, text attributes like bold and italic, inline images, fonts (depending upon the device) and hyperlinks.
Back before Amazon bought them, Mobi had the GUI creator app for Windows, and viewers for Palm OS, Windows, Blackberry, Symbian and several other things. They also had a beta command line creator app for Linux.
Amazon has expanded device support to things like Mac OS/X and Android, and the provides the creator app for both Windows and Linux as a command line tool. (It appears to be based on Mobi's early Linux creator app.) Amazon has also replaced the original Mobi viewer app for various devices (save for Palm - development of the Palm OS viewer stopped with release 5.3, though it's still available from the Mobi website.)
Mobi Creator can theoretically take Word docs, Text files, PDFs, and HTML as input. I've had best results starting with HTML, and PDFs are "take your chances". Mobi tries to rip the PDF to HTML, but how well it does varies. Simple one column PDFs with inline image convert reasonable. More complex documents don't.
Amazon has made some updates to the format to better compete with ePub. ePub is a container, and what it contains doesn't have to be just text and images. ePub files can include audio and video, and there have been an assortment of "enhanced" eBooks using those capabilities. I don't believe they've documented them with any sort of formal spec. It seems to be a case of "Create your source file, feed it to Kindlegen, and see where it fails".
Curiously, current Amazon Kindlegen efforts create files that include both ePub and Mobi formats, though the Mobi format is the one read by the Kindle and Kindle viewer apps. It's led to some questions about whether Amazon might switch to ePub at some point.
______
Dennis