15 *buffer++ = fb_lzw_entry[code].
value;
16 code = fb_lzw_entry[code].
prefix;
26 const unsigned char *in_buffer,
28 unsigned char *out_buffer,
32 unsigned short new_code, old_code, next_code = 256;
33 unsigned char *limit, decode_stack[
MAX_CODE], *string, byte, bit = 0;
37 *out_buffer++ = old_code;
38 limit = out_buffer + *out_size;
44 if (new_code >= next_code) {
53 while (
string >= decode_stack) {
54 if (out_buffer >= limit)
56 *out_buffer++ = *
string--;
60 fb_lzw_entry[next_code].
prefix = old_code;
61 fb_lzw_entry[next_code].
value = byte;