mobi-rs icon indicating copy to clipboard operation
mobi-rs copied to clipboard

huff/cdic support

Open clee opened this issue 4 years ago • 6 comments

LZ77 is great, but the majority of my purchased Mobi/AZW3 files are huff/cdic compressed.

I have some documentation on the format I managed to put together.

clee avatar Feb 24 '21 16:02 clee

I’m definitely interested in seeing this implemented in this crate. I will dig into the topic once I have some free time.

vv9k avatar Feb 24 '21 19:02 vv9k

~~Do you by any chance have some samples of eBooks that are huff compressed and you could share with me? It would definitely make the testing easier.~~

Thanks for the sample!

vv9k avatar Feb 24 '21 19:02 vv9k

For reference implementation: https://github.com/kovidgoyal/calibre/blob/master/src/calibre/ebooks/mobi/huffcdic.py

vv9k avatar Feb 25 '21 03:02 vv9k

Also: https://github.com/bfabiszewski/libmobi/blob/public/src/compression.c

clee avatar Feb 25 '21 03:02 clee

Nice, C implementation will be much closer to what we are looking for.

vv9k avatar Feb 25 '21 03:02 vv9k

This is currently in the making thanks to a PR from @philippeitis - #29. Will have to work some issues out but there is light on the horizon :)

vv9k avatar Nov 02 '21 05:11 vv9k