22 #ifndef NUVIE_FILES_U6_LZW_H 23 #define NUVIE_FILES_U6_LZW_H 25 #include "ultima/shared/std/string.h" 30 class NuvieIOFileRead;
34 #define STACK_SIZE 10000 38 unsigned char stack[STACK_SIZE];
47 void push(
unsigned char element);
48 unsigned char pop(
void);
49 unsigned char gettop(
void);
54 #define DICT_SIZE 10000 71 void add(
unsigned char root,
int codeword);
72 unsigned char get_root(
int codeword)
const;
73 int get_codeword(
int codeword)
const;
85 unsigned char *decompress_buffer(
unsigned char *source, uint32 source_length, uint32 &destination_length);
86 bool decompress_buffer(
unsigned char *source, uint32 source_length,
unsigned char *destination, uint32 destination_length);
87 unsigned char *decompress_file(
const Common::Path &filename, uint32 &destination_length);
88 unsigned char *compress_buffer(
unsigned char *src, uint32 src_len,
90 const char *strerror()
const {
96 bool is_valid_lzw_buffer(
unsigned char *buf, uint32 length);
99 long get_uncompressed_buffer_size(
unsigned char *buf, uint32 length);
101 int get_next_codeword(
long *bits_read,
unsigned char *source,
103 void output_root(
unsigned char root,
unsigned char *destination,
105 void get_string(
int codeword);
Definition: detection.h:27
Definition: nuvie_io_file.h:44