implement Base8 encoding, rename Binary and Hex encodings
This commit is contained in:
15
src/commonMain/kotlin/com/infendro/encoding/Base2.kt
Normal file
15
src/commonMain/kotlin/com/infendro/encoding/Base2.kt
Normal file
@@ -0,0 +1,15 @@
|
||||
package com.infendro.encoding
|
||||
|
||||
object Base2 : Encoding() {
|
||||
private val CHARACTERS = ubyteArrayOf(
|
||||
0x30U, 0x31U,
|
||||
)
|
||||
|
||||
override fun encode(
|
||||
bytes: UByteArray,
|
||||
) = encode(bytes, CHARACTERS)
|
||||
|
||||
override fun decode(
|
||||
bytes: UByteArray,
|
||||
) = decode(bytes, CHARACTERS)
|
||||
}
|
||||
Reference in New Issue
Block a user