Think struct
, but on steroids.
Note: I have now abandoned this project in favor of construct
.
Note: This version supercedes the original cstruct package. This is my first attempt at a test driven development cycle, so I apologize in advance if the things that I do don't make sense. If you have any opinions, feature requests, bugs, or questions, please feel free to open an issue.
Table of Contents
python -m pip install --user -U cstructs
- Serializing
- Deserializing
- Inheritance between datastructs
- Sequences
- Allow other datastructs to be members
- Callbacks for reading/writing
- Individual class metadata
- Variable length data by depending on the value of another member
- String decoding using specified encoding format
- Lazy sequence loading
- Fallback(default) value for missing values
- Handling of various types of data alignment
- Is type checker friendly
cstructs
is distributed under the terms of the GNU GPL v3 license.