HuffmanCodec

data class HuffmanCodec(bits: IntArray, codewords: IntArray, lookupTree: IntArray)

Huffman codec implementation. This implementation was shared by Graham on Rune-Server. The below implementation has been converted to Kotlin and slightly cleaned up.

Constructors

Link copied to clipboard
constructor(bits: IntArray, codewords: IntArray, lookupTree: IntArray)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
fun decode(buf: ByteBuf): String
fun decode(buf: JagByteBuf): String
Link copied to clipboard
fun encode(buf: ByteBuf, text: String)
fun encode(buf: JagByteBuf, text: String)
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int