+ This release fixes support for union structures
+ Use `union=True` for default Union generation and `union=(1 or "foo")` to reference a context variable within the union ("parsefrom" parameter)
python
dataclass
class Blob:
width: int = csfield(Int8ub)
height: int = csfield(Int8ub)
dc = DataclassStruct(Blob, union=True)
blob = dc.parse(b"\x01\x02\x03\x03\x03")
print(blob) Blob(width=1, height=1)
**Full Changelog**: https://github.com/MatrixEditor/construct-dataclasses/compare/v1.1.7...v1.1.8