implement Base8 encoding, rename Binary and Hex encodings

This commit is contained in:
2025-11-18 11:21:46 +01:00
parent 52a1ca6553
commit 12344283f7
7 changed files with 38 additions and 67 deletions

View File

@@ -0,0 +1,15 @@
package com.infendro.encoding
object Base8 : Encoding() {
private val CHARACTERS = ubyteArrayOf(
0x30U, 0x31U, 0x32U, 0x33U, 0x34U, 0x35U, 0x36U, 0x37U,
)
override fun encode(
bytes: UByteArray,
) = encode(bytes, CHARACTERS)
override fun decode(
bytes: UByteArray,
) = decode(bytes, CHARACTERS)
}