commit 374aae3b64c953b2c8964f7948b830cebe977864 Author: Infendro Date: Sat Dec 13 19:40:53 2025 +0000 Add Home diff --git a/Home.md b/Home.md new file mode 100644 index 0000000..d4e1eac --- /dev/null +++ b/Home.md @@ -0,0 +1,51 @@ +# 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`. + +```kotlin +repositories { + maven("https://git.infendro.com/api/packages/Infendro/maven") +} + +dependencies { + implementation("com.infendro:encoding:1.2.0") +} +``` + +## Usage + +```kotlin +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 +} +```