ByteLength

A LengthPrefix where the size is always encoded as a single UByte

Functions

Link copied to clipboard
open override fun copyEncodedSizeInto(array: ByteArray, size: UInt, order: ByteOrder, offset: Int): ByteArray

Encodes the length of the String as a prefix and copies it into a ByteArray at a given offset.

Link copied to clipboard
fun encodeSize(size: UInt, order: ByteOrder): ByteArray

Encodes the length of the String as a prefix.

Link copied to clipboard
open override fun expectedByteSize(size: UInt): Int

The expected number of Bytes required to encode the length of the String.