Bolt.Sips v0.1.8 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.

Summary

Functions

Decodes a binary stream recursively into Elixir data types

Encodes a list of items into their binary representation

Functions

decode(arg1)

Decodes a binary stream recursively into Elixir data types

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>>