A Common Lisp library for declaratively reading and writing complex binary file formats and network protocols.
LISP-BINARY is a Common Lisp library for declaratively reading and writing complex binary formats such as file structures and network protocols. It solves the problem of tedious, error-prone manual binary parsing by allowing developers to define data structures with a macro, which automatically generates code to serialize and deserialize binary data.
Common Lisp developers working with binary file formats, network protocols, or low-level data serialization, such as those implementing parsers for media files, game assets, or custom network protocols.
Developers choose LISP-BINARY for its declarative approach, extensive type support, and flexibility in handling dynamic byte orders and custom formats, reducing boilerplate and errors compared to manual bit-level coding.
A library to easily read and write complex binary formats.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
The DEFBINARY macro automatically generates structs and read/write methods, eliminating manual bit-twiddling boilerplate, as shown in the compressed-text demo.
Handles signed/unsigned integers (including non-byte-aligned), various float precisions, strings, arrays, and bit fields, enabling parsing of nearly any binary format.
Supports both static and dynamic byte order switching, essential for formats like TIFF, as highlighted in the README.
Allows fields with types chosen at runtime or custom reader/writer functions, providing adaptability for obscure or evolving formats.
Exclusively tied to the Common Lisp ecosystem, making it impractical for multi-language projects or teams not invested in Lisp.
DEFBINARY and its advanced features require proficiency with Lisp macros, which can be daunting for developers unfamiliar with meta-programming.
Relies on a wiki for full documentation, which may be less maintained or comprehensive compared to mainstream libraries with active communities.
lisp-binary is an open-source alternative to the following products: