X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=include%2Fwimlib%2Fdecompress_common.h;h=d20085db61736fdb5b0dfddf1f87619215115525;hp=945a5e9fabf469b78154ded723e2723770424410;hb=4ee103c6e2a2988e1fb358bfa2dc38dcb621505a;hpb=ff4f09a9848beab16d3d72f38a158848f24315ea diff --git a/include/wimlib/decompress_common.h b/include/wimlib/decompress_common.h index 945a5e9f..d20085db 100644 --- a/include/wimlib/decompress_common.h +++ b/include/wimlib/decompress_common.h @@ -398,10 +398,17 @@ read_huffsym(struct input_bitstream *is, const u16 decode_table[], (max_codeword_len))] \ _aligned_attribute(DECODE_TABLE_ALIGNMENT) +/* + * Declare the temporary "working_space" array needed for building the decode + * table for a Huffman code. + */ +#define DECODE_TABLE_WORKING_SPACE(name, num_syms, max_codeword_len) \ + u16 name[2 * ((max_codeword_len) + 1) + (num_syms)]; + extern int make_huffman_decode_table(u16 decode_table[], unsigned num_syms, unsigned table_bits, const u8 lens[], - unsigned max_codeword_len); + unsigned max_codeword_len, u16 working_space[]); /******************************************************************************/ /* LZ match copying */