HighCompressionHashTable

A higher-precision HashTable. It stores up to 256 occurrences of 4-bytes sequences in the last 2^16 bytes, which makes it much more likely to find matches than [ ].

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open override fun assertReset(): Boolean
Link copied to clipboard
open override fun get(off: Int): Int

Advance the cursor to off and return an index that stored the same 4 bytes as b[o:o+4). This may only be called on strictly increasing sequences of offsets. A return value of -1 indicates that no other index could be found.

Link copied to clipboard
open override fun initDictionary(dictLen: Int)

Init dictLen bytes to be used as a dictionary.

Link copied to clipboard
open override fun previous(off: Int): Int

Return an index that less than off and stores the same 4 bytes. Unlike .get, it doesn't need to be called on increasing offsets. A return value of -1 indicates that no other index could be found.

Link copied to clipboard
open override fun reset(bytes: ByteArray, off: Int, len: Int)

Reset this hash table in order to compress the given content.