You can clone with
Cannot retrieve contributors at this time
When dealing with network protocols and file formats, it's common tohave to read or write 16-, 32-, or 64-bit datatypes in signed orunsigned flavors. Common Lisp sort of supports this by specifying:ELEMENT-TYPE for streams, but that facility is underspecified andthere's nothing similar for read/write from octet vectors. What mostpeople wind up doing is rolling their own small facility for theirparticular needs and calling it a day.This library attempts to be comprehensive and centralize suchfacilities. Functions to read 16-, 32-, and 64-bit quantities fromoctet vectors in signed or unsigned flavors are provided; thesefunctions are also SETFable. Since it's sometimes desirable toread/write directly from streams, functions for doing so are alsoprovided. On some implementations, reading/writing IEEE singles/doubles(i.e. SINGLE-FLOAT and DOUBLE-FLOAT) will also be supported.In addition to centralizing such facilities, NIBBLES also aspires tobecome a place where compiler optimizations can be written once and usedeverywhere. The intention is that (eventually): (nibbles:sb32ref/le vector index)will compile (with any necessary safety checks) to a MOVSX instructionon an x86oid processor in SBCL (or other implementations) if VECTOR andINDEX are of appropriate types.I remember reading a post on comp.lang.lisp that suggested the designersof Common Lisp ignored the realities of octets and endianness and soforth. This library is a small step towards remedying that deficiency.