marshal v0.9.0 Marshal.Decode.Helper
Helper functions for pulling apart Marshal binary
Summary
Functions
Retrieve fixnum from Marshal binary
Retrieve string binary representation from Marshal binary
Retrieve key-value pairs of variables from Marshal binary
Retrieve variable list from Marshal binary
Functions
Retrieve fixnum from Marshal binary.
Examples
iex> Marshal.Decode.Helper.decode_fixnum(<<0>>)
{0, <<>>}
iex> Marshal.Decode.Helper.decode_fixnum(<<3, 64, 226, 1>>)
{123456, <<>>}
iex> Marshal.Decode.Helper.decode_fixnum(<<253, 192, 29, 254>>)
{-123456, <<>>}
Retrieve string binary representation from Marshal binary.
Examples
iex> Marshal.Decode.Helper.decode_string(" test")
{"test", ""}
Retrieve key-value pairs of variables from Marshal binary.
Examples
iex> Marshal.Decode.Helper.get_tuples(":ET:@zi", {%{}, %{}})
{[E: true, "@z": 1], "", {%{0 => :E, 1 => :"@z"}, %{}}}