Skip to main content

General binary file parser

Project description

This library provides general binary file parsing by interpreting documentation of a file structure and data types. By default, it supports basic data types like big-endian and little-endian integers, floats and doubles, variable length (delimited) strings, maps and bit fields (flags) and it can iterate over sub structures. Other data types are easily added.

The file structure and the types are stored in nested dictionaries. The structure is separated from the types, this way multiple file formats using the same types (within one project for example) can be easily supported without much duplication.

The design of the library is such that all operations can be reversed. This means that fully functional binary editing is possible using this implementation; first use the reader to convert a binary file to a serialised dictionary representation, this representation is easily edited using a text editor, and then use the writer to convert back to binary.

This idea is implemented in two languages; Python and JavaScript. All main development is done in Python. We chose YAML as our preferred serialised dictionary format, but other serialisation formats (JSON for example) can be used too.

Please see ReadTheDocs for the latest documentation.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bin-parser-0.0.16.tar.gz (10.7 kB view details)

Uploaded Source

File details

Details for the file bin-parser-0.0.16.tar.gz.

File metadata

  • Download URL: bin-parser-0.0.16.tar.gz
  • Upload date:
  • Size: 10.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for bin-parser-0.0.16.tar.gz
Algorithm Hash digest
SHA256 30c579f669f38ac52fcbfbe32f2c8b6b277752bb14d6f4e36df90569d106fa6a
MD5 f8831d677f9e634b1dfc0e2f5df0af7e
BLAKE2b-256 dd57426549933966ef373a8fd9e60bdfb6bd3e524af918c744a73b8e35a2484b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page