I’m trying to write a program to generate CHM file without the use of any Microsoft tools.
The thing I’m stuck on is the LZX compression, and in particular generating compressed LZX output compatible with Microsoft so its standard CHM viewer can open it.
For testing purposes I also wrote a CHM extraction program which is already able to decompress the LZX stream from existing CHM files using unlzx as can be found for example at https://doxygen.reactos.org/d7/de2/itss_2lzx_8h_source.html
For LZX compression I have tried
- liblzxcomp from http://www.russotto.net/chm/
- wimlib from https://wimlib.net/
LZX output generated with liblzxcomp won’t decompress.
LZX output generated with wimlib compresses fine with wimlib’s LZX decompressor, but not with unlzx or the CHM viewer.
Any idea how to proceed?
Are there other LZX compression libraries out there?
Is wimlib generating something special (e.g. a header) that I need to modify or strip for compatibility?