Releases: astrogewgaw/pabo
v0.1.3
v0.1.2
This release has a critical fix for a bug when reading in arrays with fixed counts.
v0.1.1
As Einstein once said:
Everything should be made as simple as possible, but not simpler.
This minor release makes things simpler, by making the following changes:
-
The
Spec
class was trying to be a dictionary, but that was stopping it from being a goodConstruct
, and vice versa. So now it's just aConstruct
, with a dictionary inside (following the "composability instead of inheritance" principle, essentially). -
The C++ code and bindings now reside in a single file, thanks to a generous use of lambda functions, a feature available since C++11. This allows us to write the code right where we bind it, and reduces the number of files we need to keep track of.
-
Now there is a single
build
function, and a singleparse
function. That is, you no longer have to use a different function for parsing bytes directly and for parsing them from a stream. Now, theparse
function will just work, whether you are trying to parse data from:- A file, via its paths (either as a
str
or as aPath
), - A file object,
- An in-memory stream (like
BytesIO
), - A socket, or any other stream-like object,
or even just
bytes
! - A file, via its paths (either as a
v0.1.0
This is pabo
's first release: v0.1.0
.
The current set of features includes:
- Building and parsing:
- Floats,
- Integers,
- Numerical arrays,
- Strings, such as those:
- ending with
\r\n
, - ending with a null byte (
\x00
), - padded with null bytes (
\x00
), - prefixed by bytes encoding their length,
- ending with
- Sequences of binary constructs (via
Seq
), - Specifications for binary data (via
Spec
),
- Integration with
numpy
, - Support for low bit-width data,
- Support for parsing bits from a stream of bytes,
- Adding extra features to a
Construct
via wrappers,
with many more in development. Testing and documentation are still a work-in-progress, but will be added soon!