05nelsonm / encoding

A Kotlin Multiplatform library for configurable, streamable, efficient and extensible Encoding/Decoding with support for base16/32/64.
Apache License 2.0
33 stars 5 forks source link

Rework `INSTANCE` variable to use delegate #121

Closed 05nelsonm closed 1 year ago

05nelsonm commented 1 year ago

API is a little wonky with the static INSTANCE variables...

"Hello World!".encodeToByteArray().encodeToString(Base64.Default.INSTANCE)

Would be much cleaner to just be able to do

"Hello World!".encodeToByteArray().encodeToString(Base64.Default)

Where by Base64.Default.Companion extends EncoderDecoder<Base64.Config>