22#ifndef MADE_REDREADER_H
23#define MADE_REDREADER_H
25#include "common/scummsys.h"
28class SeekableReadStream;
40 uint32 compSize, origSize;
42 bool seekFile(
Common::File &fd, FileEntry &fileEntry,
const char *filename);
45const uint BITBUFSIZ = 16;
46const uint DICBIT = 13;
47const uint DICSIZ = 1 << DICBIT;
48const uint MATCHBIT = 8;
49const uint MAXMATCH = 256;
50const uint THRESHOLD = 3;
51const uint NC = 255 + MAXMATCH + 2 - THRESHOLD;
53const uint CODE_BIT = 16;
54const uint NP = DICBIT + 1;
55const int NT = CODE_BIT + 3;
67 uint32 _compSize, _blockPos;
72 uint16 _left[2 * NC - 1], _right[2 * NC - 1];
73 byte _c_len[NC], _pt_len[NPT];
75 uint16 _c_table[4096], _pt_table[256];
78 uint16 *freq, *sortptr, len_cnt[17];
81 int decode_i, decode_j;
86 void fillbuf(
int count);
87 uint getbits(
int count);
90 void decode(uint count,
byte text[]);
91 void huf_decode_start();
92 unsigned int decode_c();
93 unsigned int decode_p();
94 void read_pt_len(
int nn,
int nbit,
int i_special);
96 void count_len(
int i);
97 void make_len(
int root);
99 void make_code(
int n,
byte len[], uint16 code[]);
100 void make_table(uint nchar,
byte bitlen[], uint tablebits, uint16 table[]);
101 int make_tree(
int nparm, uint16 freqparm[],
byte lenparm[], uint16 codeparm[]);
Definition: redreader.h:60
Definition: redreader.h:34
Definition: algorithm.h:29