KiwiCodec.Wire.VarFloat (kiwi_codec v0.2.1)

Copy Markdown View Source

Kiwi variable-length 32-bit float wire encoding.

Kiwi stores IEEE-754 single-precision floats with the exponent byte rotated to the front so common small values can use a compact one-byte zero encoding.

Summary

Types

value()

@type value() :: float() | :infinity | :negative_infinity | :nan

Functions

decode(arg1)

@spec decode(binary()) :: {value(), binary()}

encode(value)

@spec encode(float() | integer() | :infinity | :negative_infinity | :nan) :: binary()