You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Binn is a computer data serialization format used mainly for application data transfer. It stores primitive data types and data structures in a binary form. For the full spec see https://github.com/liteserver/binn
Elixir Types
Binn
1 # integer
integer
1.0 # float
floating point numbers (IEEE single and double precision)
true # boolean
boolean (true and false)
:atom # atom / symbol
string
"elixir" # string
string
[1, 2, 3] # list
list
{1, 2, 3} # tuple
list
%{:a => 1, :b => 2} # map
object, where all keys are cast to string
%{1 => :a, 2 => :b} # map
map, if the Elixir map's keys are all integer
%{:a => 1, 2 => :b} # map
object, where all keys are cast to string
The Binn format is designed to be compact and fast on readings. The elements are stored with their sizes to increase the read performance. The strings are null terminated so when read the library returns a pointer to them inside the buffer, avoiding memory allocation and data copying, an operation known as zero-copy.
Installation
If available in Hex, the package can be installed
by adding binn to your list of dependencies in mix.exs: