ecl-nibbles 0.14 Common Lisp library for accessing octet-addressed blocks of data
When dealing with network protocols and file formats, it's common to have to read or write 16-, 32-, or 64-bit datatypes in signed or unsigned flavors. Common Lisp sort of supports this by specifying :element-type for streams, but that facility is underspecified and there's nothing similar for read/write from octet vectors. What most people wind up doing is rolling their own small facility for their particular needs and calling it a day.
This library attempts to be comprehensive and centralize such facilities. Functions to read 16-, 32-, and 64-bit quantities from octet vectors in signed or unsigned flavors are provided; these functions are also SETFable. Since it's sometimes desirable to read/write directly from streams, functions for doing so are also provided. On some implementations, reading/writing IEEE singles/doubles (i.e. single-float and double-float) will also be supported.