binflux
The binflux
codec is a binary representation of the influx line protocol.
It exhibits significantly faster serialization performance, taking less space on the wire.
The format does not include framing and SHOULD be used with size-prefix
processors.
For all numerics network byte order is used (big endian).
Data Representation
- 2 byte (u16) length of the
measurement
in bytes - n byte (utf8) the measurement (utf8 encoded string)
- 8 byte (u64) the timestamp
- 2 byte (u16) number of tags (key value pairs) repetitions of:
- 2 byte (u16) length of the tag name in bytes
- n byte (utf8) tag name (utf8 encoded string)
- 2 byte (u16) length of tag value in bytes
- n byte (utf8) tag value (utf8 encoded string)
- 2 byte (u16) number of fiends (key value pairs) repetition of:
- 2 byte (u16) length of the tag name in bytes
- n byte (utf8) tag name (utf8 encoded string)
- 1 byte (tag) type of the field value can be one of:
TYPE_I64 = 0
followed by 8 byte (i64)TYPE_F64 = 1
followed by 8 byte (f64)TYPE_TRUE = 2
no following dataTYPE_FALSE = 3
no following dataTYPE_STRING = 4
followed by 2 byte (u16) length of the string in bytes and n byte string value (utf8 encoded string)
Origins
The format originated with tremor as an efficient alternative to the influx codec.