hashBitsForLevel

private fnuint hashBitsForLevel(int level)

Compute the number of hash bits to use for a given compression level.

Levels map to table sizes roughly as follows:

  • Levels 1..3: 4 KiB, 8 KiB, 16 KiB (12, 13, 14 bits)
  • Levels 4..9: 64 KiB (16 bits)

Parameters

levelCompression level in the 0..9 range. Values outside the range are clamped.

Returns

Number of bits used to index the hash table.