FlatCodec
Java-facing facade over the flat codec, and the home of the scalar helper implementations — the top-level functions of this package (zigZag, word7Bytes, ...) delegate here.
A plain object without a companion class gets static forwarders in its mirror class, so Java calls FlatCodec.encodeLong(v) directly on every platform — no MODULE$, no summon. Signatures use only byte[]/primitive/String types plus explicit Flat instances (see Flats) so Java never has to name a Scala collection or summon a given.
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
FlatCodec.type
Members list
Value members
Concrete methods
Renders a byte as its 8-character binary string, e.g. 0x0b → "00001011". Debug aid for EncoderState.toString/DecoderState.toString.
Renders a byte as its 8-character binary string, e.g. 0x0b → "00001011". Debug aid for EncoderState.toString/DecoderState.toString.
Attributes
Encodes n (treated as an unsigned 64-bit value) as a variable-length byte array: 7 payload bits per byte, least-significant group first, high bit set on every byte except the last. This is the byte layout of flat's data NonEmptyList = Elem Word7 | Cons Word7 NonEmptyList.
Encodes n (treated as an unsigned 64-bit value) as a variable-length byte array: 7 payload bits per byte, least-significant group first, high bit set on every byte except the last. This is the byte layout of flat's data NonEmptyList = Elem Word7 | Cons Word7 NonEmptyList.
Attributes
Number of bytes in the variable-length 7-bit encoding of n, treating n as an unsigned 64-bit value.
Number of bytes in the variable-length 7-bit encoding of n, treating n as an unsigned 64-bit value.
Attributes
Inverse of zigZag(x:Int)*.
Inverse of zigZag(x:Long)*.
ZigZag encoding: maps signed values to unsigned so small magnitudes of either sign get short varint encodings (0 → 0, -1 → 1, 1 → 2, -2 → 3, 2 → 4, ...). Total over the whole Int/Long range: the doubling overflow is intentional and is inverted by zagZig. https://gist.github.com/mfuerstenau/ba870a29e16536fdbaba
ZigZag encoding: maps signed values to unsigned so small magnitudes of either sign get short varint encodings (0 → 0, -1 → 1, 1 → 2, -2 → 3, 2 → 4, ...). Total over the whole Int/Long range: the doubling overflow is intentional and is inverted by zagZig. https://gist.github.com/mfuerstenau/ba870a29e16536fdbaba
Attributes
See zigZag(x:Int)*.