huffman.h

来自「eC++编译器源码」· C头文件 代码 · 共 20 行

H
20
字号
#pragma Huffman
/* Used to create educational examples of huffman codes.
   Call Add multiple times for letters in the code.
   The percentages should sum to 1.0.
   After calling Encode, the output will be a string of 0/1 characters.
*/

  typedef void *
    HuffType;

  void Open(HuffType &H, char ATTRIBUTES[]);

  void Close(HuffType &H);

  void Add(HuffType H, char LETTERADD[], float WEIGHT);

  void Encode(HuffType H, char &STRING[], char &OUTPUT[]);

  void Decode(HuffType H, char &STRINGDECODE[], char &OUTPUT[]);

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?