boltex v0.4.1 Boltex.PackStream
The PackStream implementation for Bolt.
This module defines a decode function, that will take a binary stream of data and recursively turn it into a list of Elixir data types.
It further defines a function for encoding Elixir data types into a binary stream, using the Boltex.PackStream.Encoder protocol.
Link to this section Summary
Functions
Decodes a binary stream recursively into Elixir data types
Encodes a list of items into their binary representation
Link to this section Functions
Link to this function
decode(arg1)
Decodes a binary stream recursively into Elixir data types
Link to this function
encode(item)
Encodes a list of items into their binary representation.
As developers tend to be lazy, single objects may be passed.
Examples
iex> Boltex.PackStream.encode "hello world"
<<0x8B, 0x68, 0x65, 0x6C, 0x6C, 0x6F, 0x20, 0x77, 0x6F, 0x72, 0x6C, 0x64>>