nbt v0.2.0 NBT.Parser

Parsing functions that turn an NBT binary into native elixir types.

Link to this section Summary

Functions

Given a partial NBT binary, returns the next TAG and the rest of the binary.

Link to this section Types

Specs

next() :: nil | {:end, binary()} | {{atom(), binary(), binary()}, binary()}

Link to this section Functions

Link to this function

take_next(arg1)

Specs

take_next(binary()) :: nil | {next(), binary()}

Given a partial NBT binary, returns the next TAG and the rest of the binary.

Example

iex> Parser.take_next(<< 1, 5::2*8, "votes", 26, "more data" >>)
{{:byte, "votes", 26}, "more data"}