|
| 1 | +<p align="center"> |
| 2 | + <img src="https://raw.githubusercontent.com/Eignex/.github/refs/heads/main/profile/banner.svg" style="max-width: 100%; width: 22em" /> |
| 3 | +</p> |
| 4 | + |
1 | 5 | # KEncode |
2 | 6 |
|
| 7 | +**Compact, ASCII-safe encodings and ultra-small binary serialization for Kotlin.** |
| 8 | + |
3 | 9 |  |
4 | 10 |  |
5 | 11 |  |
6 | 12 |  |
7 | 13 |
|
8 | | -**Compact, efficient binary–text codecs and bit-packed serialization for |
9 | | -Kotlin.** |
10 | | -Provides high-performance Radix Base encoders, Base64 variants, ASCII85, |
11 | | -checksummed string formats, and a minimal-size binary serializer. |
| 14 | +> KEncode produces short, predictable text payloads that fit into environments with strict character or length limits such as URLs, file names, Kubernetes labels, and log keys. |
| 15 | +
|
| 16 | +> It provides high-performance radix and base encoders, efficient integer coding, optional checksums, and a compact bit-packed serializer for flat data models. |
12 | 17 |
|
13 | 18 | --- |
14 | 19 |
|
15 | 20 | ## Overview |
16 | 21 |
|
17 | | -KEncode supplies: |
18 | | - |
19 | | -* Alpha-numeric radix based encoders: Base36, Base62 |
20 | | -* Other more compact encoders: Base64, Base85 (ASCII85-style) |
21 | | -* Compact bit-packed serialization using `kotlinx.serialization` |
22 | | -* Optional CRC-16 / CRC-32 checksums |
23 | | -* Varint/varuint and zig-zag encoding |
24 | | -* Minimal-allocation encoding/decoding and predictable output lengths |
| 22 | +KEncode brings together several compact encoding tools: radix formats like Base36 and Base62, dense ASCII-safe formats such as Base64 and ASCII85-style Base85, varint and zig-zag integer coding, CRC-16 and CRC-32 checksums, and a minimal-allocation bit-packed serializer built on `kotlinx.serialization`. |
25 | 23 |
|
26 | | -It is intended for transferring structured payloads across |
27 | | -**character-restricted environments**, such as: |
| 24 | +These features help you move structured data through **channels with tight ASCII or size constraints**, including: |
28 | 25 |
|
29 | | -* URLs and URL parameters |
| 26 | +* URLs and query parameters |
30 | 27 | * File names |
31 | | -* k8s pod names, labels, and annotations |
| 28 | +* Kubernetes pod names, labels, and annotations |
32 | 29 | * HTTP headers and cookies |
33 | 30 | * Message queue identifiers |
34 | | -* Log keys and structured logging metadata |
35 | | -* Any other system that requires ASCII-safe, short, reversible text encodings |
| 31 | +* Log keys and structured logging fields |
36 | 32 |
|
37 | | -If you transfer secret data you still need to encrypt your payload. |
| 33 | +⚠️ Encrypt any payload that contains sensitive information. |
38 | 34 |
|
39 | | -The bit-packed serialization package does not handle arbitrary structures. It's |
40 | | -designed for "flat" structures, so no maps or nested types. You can use |
41 | | -`ProtoBuf` from `kotlinx.serialization` instead of the provided `PackedFormat` |
42 | | -in those cases. |
| 35 | +The bit-packed serializer supports only flat structures. Use `ProtoBuf` from `kotlinx.serialization` when you need maps, nested types, or more complex layouts. |
43 | 36 |
|
44 | 37 | --- |
45 | 38 |
|
|
0 commit comments