1 comments

  • monom 9 hours ago

    Hi HN, I wanted to avoid database lookups by embedding small state directly into URLs and K8s labels. While Kotlin has excellent serialization libraries, they aren't built for this, often leaving you to rely on manually doing it.

    To solve this, I built kencode as an extension for kotlinx.serialization. It automatically packs booleans and nullability into a single bit-header and uses ZigZag encoding to generate tight Base62 tokens. I wrote up a technical breakdown of the implementation.