binary

binary subcommand ?arg ...?

Packs values into bytes and reads values from bytes, with a template of letters such as c (8 bits), s (16 bits, little endian), S (big endian), i and I (32 bits), w and W (64 bits), f and d (floats), a (bytes), and H (hexadecimal). A count or * follows a letter.

Subcommands

Synopsis What it does
binary format TEMPLATE ?VALUE ...? Gives the bytes.
binary scan BYTES TEMPLATE ?VAR ...? Sets the variables and gives the count of values that it read.
binary encode FORMAT ?-option value ...? DATA base64, hex, or uuencode text of the bytes.
binary decode FORMAT ?-option value ...? DATA The bytes of the text.

Examples

A click on an example runs it in the shell of the page.

Facts