packer
The PACKER binary format library implements a "little language" for C-style structures, along the lines of Perl's pack() or Python's struct module. It is similar in spirit to Binary-types, although much less general. Version 0.2 (packer.tar.gz) is a near-complete rewrite and offers portable packing and unpacking (of SINGLE-FLOAT and DOUBLE-FLOATs as well) and a more obviously extensible packing protocol. (See also: CL-PACK.)

Quick assessment (2023-02-23)

  • Compiles fine, but there are runtime problems.
  • Defines unpacking-error but then tries to signal an unpacker-error.
  • For example, round-tripping a few (unsigned-byte 16) values works:

? (pack "<4S" 1 710 8901 444)
#(1 0 198 2 197 34 188 1)
? (unpack "<4S" *)
(1 710 8901 444)

But when trying (signed-byte 16) it doesn't quite work:

? (pack "<4s" -1 -710 8901 444)
#(255 255 58 253 197 34 188 1)
? (unpack "<4s" *)
(-1 -710 NIL NIL)