Initial Version

Adam Selene
I reimplemented huff/cdic compression in Python, and did a few other things while I was at it. The new script:

* decompresses about 25x faster than mobihuff.py
* uses much less memory (about 16x on my largest test file)
* implements conversion of uncompressed and Palmdoc-compressed files
* handles trailing data correctly in all cases

Check it out: http://www.mit.edu/afs/athena/user/m/y/mycroft/mobiunpack.py

Authors: Adam Selene
added ability to output images, and all into one folder

Authors: pdurrant
various fixes

added back in optional output dir for those who don't want it based on infile
Authors: pdurrant

auto flush stdout and wrapped in main, added proper return codes
Authors: KevinH
added support for metadata

Authors: KevinH
metadata now starting to be output as an opf file

Authors: pdurrant
Additional metadata read and output, rawml tweaked to input html for Mobipocket Creator

Authors: pdurrant
removed raw mobi file completely but kept _meta.html file for ease of conversion

Authors: KevinH
added in metadata for ASIN, Updated Title and Rights to the opf

Added in standard (OPF 1.01) metadata Rights. Added in non-standard items ASIN
and Updated Title. If we can find out where they should really go in an OPF to
get put into a compiled Mobipocket file, we should move them. Mobipocket Creator
ignores them where they are.
Authors: pdurrant
remove _meta.html since no longer needed

Authors: KevinH
Fixed typos in the opf, updated handling of test for trailing data/multibyte characters

Authors: pdurrant
Fixed problem with > 9 images

Authors: pdurrant
Now output Start guide item support to opf

Authors: pdurrant
Set firstaddl value for 'TEXtREAd'

Authors: pdurrant
v025 2011-05-18 and V026 2011-06-27

Now added character set metadata to html file for utf-8 files.
Authors: pdurrant

Dictionary support added. Image handling speed improved.
For huge files create temp files to speed up decoding.
Language decoding fixed. Metadata is now converted to utf-8 when written to opf file.
Authors: siebert
Add idx:entry attribute "scriptable" if dictionary contains entry length tags.

Don't save non-image sections as images. Extract and save source zip file
included by kindlegen as kindlegensrc.zip.
Authors: siebert
Added back correct image filename extensions, created FastConcat class to simplify and clean up

Authors: KevinH
Metadata handling reworked, multiple entries of the same type are now supported.

Several missing types added.
FastConcat class has been removed as in-memory handling with lists is faster, even for huge files.
Authors: siebert
Add support for outputting **all** metadata values

- Cover ThumbNail Image
- Text to Speech Disabled Flag
- Font Signature encoded as hex
- Tamper Proof Keys encoded as hex
- All unknown metadata keys as hex strings
Authors: KevinH
Now supports Print Replica ebooks, outputting PDF and mysterious data sections

Authors: pdurrant
Now supports NCX file extraction/building.

Overhauled the structure of mobiunpack to be more class oriented.
Authors: fandrieu, siebert, KevinH, DiapDealer