Skip to content
Search

Binary-parser

lastmod 2026-01-06created 2026-01-061 edits

A JavaScript parser builder for high-performance parsing of binary data

About

  • Designed for defining structured binary formats with a declarative chained API, greatly reducing the complexity of writing parsers by hand
  • Dynamically generates and compiles parsing code at runtime based on the parser definition, delivering execution performance close to a manual implementation
  • Broad support for the core types binary protocols need: integers, floating point, bit fields, strings, arrays, choice, pointer, etc. (user-defined types also possible)
  • Can directly express patterns common in network and file format parsing, such as endianness, bit-level fields, and variable-length arrays
  • Combining choice and array makes it natural to model TLV (Type-Length-Value) structures
  • Supports parsing offset-based formats such as ELF using pointer, seek, saveOffset, etc.
  • Recursive tree structures can be parsed via named parsers (namely)
    • However, a termination condition is needed to prevent infinite recursion
  • Supports both CommonJS and ESM, optimized for Buffer / Uint8Array-based parsing in Node.js environments
  • A library suited to low-level data interpretation tasks such as binary file analysis, network packet parsing, and handling custom binary formats

See also

Favorite site

author Zer0 sitemap