KiwiCodec.Wire.Float (kiwi_codec v0.1.1)

Copy Markdown View Source

Kiwi variable-length 32-bit float 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_varfloat(arg1)

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

encode_varfloat(value)

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