projects
/
SXSI
/
XMLTree.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
fixed small mistakes with text search functions in XMLtree.h
[SXSI/XMLTree.git]
/
libcds
/
src
/
coders
/
huffman_codes.h
1
2
#ifndef HUFFMAN_CODES_H
3
#define HUFFMAN_CODES_H
4
5
#include <basics.h>
6
#include <huff.h>
7
8
class huffman_codes {
9
10
public:
11
huffman_codes(uint * seq, uint n);
12
~huffman_codes();
13
14
ulong encode(uint symb, uint * stream, ulong pos);
15
ulong decode(uint * symb, uint * stream, ulong pos);
16
uint max_length();
17
uint size();
18
uint save(FILE *fp);
19
static huffman_codes * load(FILE *fp);
20
21
protected:
22
huffman_codes();
23
THuff huff_table;
24
};
25
26
#endif