X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=src%2Fcompress.h;h=88c55f26b3fa9a2afad9b74e6ff2f40b9d5eaff6;hp=37ab23d315763b471ca7c442cf4ac39ba05bf1e6;hb=36fae332ff07defaf465c363c56bc0274550b86c;hpb=40beb80283a2df7af88c8359ca41adb814585e9a diff --git a/src/compress.h b/src/compress.h index 37ab23d3..88c55f26 100644 --- a/src/compress.h +++ b/src/compress.h @@ -12,6 +12,10 @@ typedef u16 output_bitbuf_t; +/* Assuming that WIM chunks are at most 32768 bytes, 16 bits is enough for any + * symbol frequency. */ +typedef u16 freq_t; + /* Structure to keep track of the current position in the compressed output. */ struct output_bitstream { @@ -88,7 +92,7 @@ extern int flush_output_bitstream(struct output_bitstream *ostream); extern void make_canonical_huffman_code(unsigned num_syms, unsigned max_codeword_len, - const u32 freq_tab[], + const freq_t freq_tab[], u8 lens[], u16 codewords[]);