kodec
0.2.2indexedOffers high-performance binary and text processing primitives with zero-copy array-like abstraction. Features allocation-free encoding/decoding, modular structure, and inline function templates for efficiency.
Offers high-performance binary and text processing primitives with zero-copy array-like abstraction. Features allocation-free encoding/decoding, modular structure, and inline function templates for efficiency.
Collection of binary and text processing primitives with focus on high performance and simplicity.
Why not okio / kotlinx-io?
Because both of them does not provide a zero-copy array-like abstraction that allows you to wrap anything other than ByteArray.
Other notable differences:
Float/Double encoding/decoding with fewer allocationsTextReader abstraction allows you to implement allocation-free decoding for any text formatkodec-buffers-coreSimple array-like structure implementation.
Separated into read-only and mutable interfaces. The module is compact and intended to be used as a basic memory IO integration layer between different libraries and frameworks.
kodec-buffers-datakodec-buffers-core extensions for encoding/decoding strings and numbers.
kodec-java-ioBridge between kodec-buffers-core and standard Java IO abstractions: OutputStream, InputStream, ByteBuffer.
kodec-strings-streamTextReader - streaming decoder for strings, numbers, characters. Supported inputs: Buffer, String.TextWriter - streaming encoder for strings, chars, numbers. Supported outputs: MutableBuffer, StringBuilder.kodec-strings-numberConvert numbers to string and back (for both stream and random access structures).
Int,Long encoding/decodingFloat,Double encoding/decoding. 100% Kotlin. Port of Java standard library implementation with fewer allocations.kodec-struct (experimental)Type-safe way to encode/decode flat binary structures.
By "template" we mean a module mostly consists of inline functions. Template module does not depend on anything and can be applied to any byte stream or byte buffer.
kodec-binary-numTemplates for binary encoding/decoding of numbers in plain BE/LE and variable-length format
kodec-strings-commonA tiny module with common string encoding utilities
kodec-strings-utfTemplates for encoding/decoding UTF-8 strings
Surfaced from shared tags and platforms — no rankings paid for.