Atom

binary module

Work with byte buffers, packed layouts, byte order, and encodings.

Import it with 'use binary'.

Atom
use binary
print(binary.hex('A'))
Output
41

Packed spans are contiguous native bytes. pack and unpack accept the order strings native (default), little and big. Byte order is applied per scalar and preserves the layout's padding positions. When reading raw packed bytes, the span may come from any valid packed representation. Base64 exports require ATOM_WITH_TLS.

Functions