src/slz.c
/* not thread-safe, must be called exactly once */
not thread-safe, must be called exactly once
not thread - safe must be called exactly once
void slz_prepare_dist_table()
{
	uint32_t dist;
	uint32_t code;
	uint32_t bits;
	for (dist = 0; dist < sizeof(fh_dist_table) / sizeof(*fh_dist_table); dist++) {
		code = dist_to_code(dist + 1);
		bits = code >> 1;
		if (bits)
			bits--;
		code = dist_codes[code];
		code += (dist & ((1 << bits) - 1)) << 5;
		fh_dist_table[dist] = (code << 5) + bits + 5;
	}
}
void slz_prepare_dist_table ( ) { uint32_t dist ; uint32_t code ; uint32_t bits ; for ( dist = 0 ; dist < sizeof ( fh_dist_table ) / sizeof ( * fh_dist_table ) ; dist ++ ) { code = dist_to_code ( dist + 1 ) ; bits = code >> 1 ; if ( bits ) bits -- ; code = dist_codes [ code ] ; code += ( dist & ( ( 1 << bits ) - 1 ) ) << 5 ; fh_dist_table [ dist ] = ( code << 5 ) + bits + 5 ; } }
not thread-safe, must be called exactly once
not thread - safe must be called exactly once