View Single Post
Old 02-20-2006, 05:40 AM   #21
Laurens
Jah Blessed
Laurens is no ebook tyro.Laurens is no ebook tyro.Laurens is no ebook tyro.Laurens is no ebook tyro.Laurens is no ebook tyro.Laurens is no ebook tyro.Laurens is no ebook tyro.Laurens is no ebook tyro.Laurens is no ebook tyro.Laurens is no ebook tyro.
 
Laurens's Avatar
 
Posts: 1,295
Karma: 1373
Join Date: Apr 2003
Location: The Netherlands
Device: iPod Touch
The most important requirement is that the format must have minimal runtime footprint, so as to run under memory-constrained devices. Putting everything in one giant XML stream as FB2 does is not the way to go here. The XML needs to be uncompressed and parsed into an intermediate binary format for the reader to have acceptable rendering performance. In practical terms, this immediately doubles the storage requirements. That alone is a reason not to go with XML. Also, the solution might work reasonably well for fiction-length text, but it scales extremely poorly to anything bigger. Suppose you'd want to access to access the last page of a huge document like an offline Wikipedia. This would mean you'd have to parse all the preceding hundreds or thousands of pages. Without some form of binary index to facilitate random access, this would become extremely slow. (And then you end up with a binary format.)

IMO, a better solution is to have a common XML-based format that can be converted on the desktop to a precompiled binary format optimized for a particular platform with regard to its file structure (PalmOS can only store databases in PDB format in RAM), endianness (PalmOS 68K is big-endian, while ARM-based devices are little-endian) and character encoding (Windows CE supports 16-bit Unicode, while PalmOS only does 8-bit encodings).
Laurens is offline   Reply With Quote