1063{
1066 int block_type;
1067 long uncomp_bits;
1068 long comp_bits;
1069 long comp_bits_ovh;
1070 long uncomp_length;
1071
1076 }
1078
1084
1088 do {
1092
1095
1096
1098
1099
1100 if (uncomp_length == 0)
1101 continue;
1103#ifdef DEBUG_ENTROPY
1105#endif
1107 }
1108
1110
1111
1114 }
1115
1116
1117 uncomp_bits = comp_bits = 0;
1122 }
1124 if (comp_bits_ovh < uncomp_bits)
1126 else
1128
1129#ifdef DEBUG_EXTRA_BITS
1130 fprintf(
stderr,
"Extra bits uncompressed: %5d compressed: %5d compressed w/overhead %5d gain/loss %5d\n", uncomp_bits, comp_bits, comp_bits_ovh, uncomp_bits - comp_bits_ovh);
1131#endif
1132
1133
1135
1137
1139
1140
1144 }
1145 }
1146
1151
1152
1153
1154
1156
1157
1161
1162
1165
1166
1168
1169
1172 }
1175 }
1179
1183 }
1184 }
1186 return 0;
1187}
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
_Check_return_opt_ _CRTIMP int __cdecl fprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format,...)
static DWORD block_size(DWORD block)
int lz_compress(lz_info *lzi, int nchars)
int lz_left_to_process(lz_info *lzi)
#define LZX_MAX_CODE_LENGTH
#define LZX_ALIGNED_OFFSET_BLOCK
#define LZX_VERBATIM_BLOCK
#define NUM_SECONDARY_LENGTHS
static void lzx_write_compressed_literals(lzx_data *lzxd, int block_type)
static void lzx_write_bits(lzx_data *lzxd, int nbits, uint32_t bits)
static void build_huffman_tree(int nelem, int max_code_length, int *freq, huff_entry *tree)
static int lzx_write_compressed_tree(struct lzx_data *lzxd, struct huff_entry *tree, uint8_t *prevlengths, int treesize)
int length_freq_table[NUM_SECONDARY_LENGTHS]
huff_entry aligned_tree[LZX_ALIGNED_SIZE]
uint8_t * prev_main_treelengths
huff_entry length_tree[NUM_SECONDARY_LENGTHS]
int aligned_freq_table[LZX_ALIGNED_SIZE]
uint8_t prev_length_treelengths[NUM_SECONDARY_LENGTHS]