8 // A function to read bytes from some input source. The bytes should be
9 // already unstuffed (and thus without markers).
10 // A return value of -1 indicates error, a return value of 0 indicates EOF.
11 typedef ssize_t (raw_input_func_t)(void*, uint8_t*, size_t);
13 struct huffman_table {
14 unsigned num_codes[17]; // BITS
15 unsigned char codes[256]; // HUFFVAL
18 unsigned huffsize[256];
19 unsigned huffcode[256];
25 enum coefficient_class {
30 typedef struct huffman_table huffman_tables_t[NUM_COEFF_CLASSES][4];
32 void read_huffman_tables(huffman_tables_t* dst, raw_input_func_t* input_func, void* userdata);
34 #endif /* !defined(_DEHUFF_H) */