ExBin v0.1.0 ExBin View Source

Documentation for ExBin.

Link to this section Summary

Functions

Retrives the byte at index index (zero-based) from binary

Creates a stream for fetching bytes within a binary. Ideal for large volumes of bytes, or large binaries

Link to this section Functions

Retrives the byte at index index (zero-based) from binary.

If the binary is empty, or already exhausted, byte_at will return {:error, :index_out_of_bounds}.

Creates a stream for fetching bytes within a binary. Ideal for large volumes of bytes, or large binaries.

Examples

iex> ExBin.byte_stream(<<0x01, 0x02, 0x03>>) |> Enum.take(2)
[1, 2]