Binary v0.0.1 Binary

Functions to operate on binaries.

Summary

Functions

Create a binary with the binary content repeated n times

Returns the first byte of the binary as an integer

Convert list of bytes into binary

Returns the last byte of the binary as an integer

Converts binary to a list of bytes

Functions

copy(bin, n)
copy(binary, number) :: binary

Create a binary with the binary content repeated n times.

first(bin)
first(binary) :: byte

Returns the first byte of the binary as an integer.

from_list(list)
from_list(list) :: binary

Convert list of bytes into binary.

last(bin)
last(binary) :: byte

Returns the last byte of the binary as an integer.

to_list(bin)
to_list(binary) :: list

Converts binary to a list of bytes.