Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

MOTIVATION:

Data is often serialized by packing it into an array of bytes with no field names or identifiers. Most languages have means to do this: typecasting structures in C, the struct module in Python, similar functions in Perl, the bit syntax in Erlang, etc. The result can be saved to disk, or a database, or sent over a network.

Parsing such data, when the specifications have been lost or aren't available, is a bitch.

Especially if:
-data is not aligned on byte/word boundaries
-data is bit-packed, many fields are <8 bits in width
-future structure depends on past values
-your format definition may not be complete

This worst case scenario can come up reasonably often when dealing with legacy systems, or systems you're trying to reverse engineer. Dealing with it is a pain, but good tools make hard problems easy.

GOALS:

The goal is to write a tool that:
-elegantly describes bit-packed structures (Erlang is a big inspiration here)
-keeps that elegance when faced with polymorphic, looping, and recursive structures
-can define sanity checks for all fields, to catch incorrectly parsed data
-can tighten the sanity checks for certain data sets, for fast debugging
-optimizes for fast development and debugging, but also runs very quickly

The end result should be a highly usable Haskell library.

CURRENT STAGE: Pre-Alpha

Concept proven, need to get the guts to work.

About

Haskell library for unpacking unaligned, bit-packed, polymorphic data with only partially known structure.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages