1 /* 2 * lzx.h: LZX encoder for Windows CHM files. 3 */ 4 5 struct LZXEncodedFile { 6 unsigned char *data; 7 size_t data_len; 8 9 size_t *reset_byte_offsets; 10 size_t n_resets; 11 }; 12 13 /* 14 * Produce an LZX-compressed encoding of an input data block. Return 15 * it, along with a list of byte offsets where the data stream is 16 * realigned to a 16-bit boundary because one of realign_interval and 17 * reset_interval has run out. 18 * 19 * The output structure and its fields 'data' and 'reset_byte_offsets' 20 * are all dynamically allocated, and need freeing by the receiver 21 * when finished with. 22 */ 23 struct LZXEncodedFile *lzx(const void *data, int len, 24 int realign_interval, int reset_interval); 25