HashTable

abstract class HashTable

A record of previous occurrences of sequences of 4 bytes.

Inheritors

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
abstract fun assertReset(): Boolean
Link copied to clipboard
abstract 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
abstract fun initDictionary(dictLen: Int)

Init dictLen bytes to be used as a dictionary.

Link copied to clipboard
abstract 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
abstract fun reset(b: ByteArray, off: Int, len: Int)

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