kencode

CompactZeros

Replaces leading zero bytes with a 0x00 sentinel and a varint count, which pays off from three zeros. Payloads starting with a non-zero byte pass through unchanged. At most 65,536 zeros are stripped.

Functions

decode

open override fun decode(data: ByteArray): ByteArray(source)

Inverse of encode.

encode

open override fun encode(data: ByteArray): ByteArray(source)

Transforms data before text encoding.

Link copied to clipboard

Runs this then next on encode, and the reverse on decode.