kencode

Base85

open class Base85(alphabet: CharArray) : ByteEncoding(source)

Generic Base85 encoder/decoder supporting both ASCII85 and ZeroMQ Z85. 4 input bytes -> 5 output chars. Allows final partial group (1–3 bytes -> 2–4 chars).

Inheritors

Constructors

Link copied to clipboard
constructor(alphabet: CharArray)

Types

Link copied to clipboard
object Default : Base85

Default Base85 instance using the standard ASCII85 alphabet.

Functions

Link copied to clipboard
open override fun decode(input: CharSequence): ByteArray

Decode an encoded string back into the original bytes.

Link copied to clipboard
open override fun encode(input: ByteArray, offset: Int = 0, length: Int = input.size - offset): String

Encode the given byte range into a text representation.

Base85

constructor(alphabet: CharArray)(source)

decode

open override fun decode(input: CharSequence): ByteArray(source)

Decode an encoded string back into the original bytes.

encode

open override fun encode(input: ByteArray, offset: Int = 0, length: Int = input.size - offset): String(source)

Encode the given byte range into a text representation.