HuffmanEncode.h 386 B

123456789101112131415161718
  1. /* Compress/HuffmanEncode.h */
  2. #ifndef __COMPRESS_HUFFMANENCODE_H
  3. #define __COMPRESS_HUFFMANENCODE_H
  4. #include "../../Types.h"
  5. /*
  6. Conditions:
  7. num <= 1024 = 2 ^ NUM_BITS
  8. Sum(freqs) < 4M = 2 ^ (32 - NUM_BITS)
  9. maxLen <= 16 = kMaxLen
  10. Num_Items(p) >= HUFFMAN_TEMP_SIZE(num)
  11. */
  12. void Huffman_Generate(const UInt32 *freqs, UInt32 *p, Byte *lens, UInt32 num, UInt32 maxLen);
  13. #endif