2025-12-13 20:44:03 +01:00
2025-12-13 01:54:16 +01:00
2025-12-13 01:49:22 +01:00
2025-11-18 11:24:28 +01:00
2025-07-12 18:16:33 +02:00
2025-12-13 01:49:22 +01:00
2025-10-03 11:49:38 +02:00
2025-10-03 11:49:38 +02:00
2025-07-12 18:16:33 +02:00
2025-12-13 20:44:03 +01:00
2025-12-13 01:49:22 +01:00

encoding-kt

encoding-kt is a Kotlin Multiplatform library that provides common ByteArray encodings.

Supported encodings:

  • Base2 (binary)
  • Base8 (octal)
  • Base16 (hexadecimal)
  • Base32
  • Base64

Targets

Target Status
JVM Supported
JavaScript Supported
Native (Linux) Supported
Native (Windows) Not Supported

Installation

Add the following to your build.gradle.kts.

repositories {
    maven("https://git.infendro.com/api/packages/Infendro/maven")
}

dependencies {
    implementation("com.infendro:encoding:1.2.0")
}

Usage

import com.infendro.encoding.Base16

fun main() {
    // the string to encode
    val test = "Hello World!"
        .encodeToByteArray().asUByteArray()

    // encode the string with the desired encoding
    val encoded = Base16.encode(test)
        .asByteArray().decodeToString()

    println(encoded) // 48656c6c6f20576f726c6421
}
Description
No description provided
Readme 214 KiB
Languages
Kotlin 100%