~chiefnoah/pybare

ref: 94d53bc9e0150c10135007eb6c2c53e78d4537ec pybare/bare/encoder.py -rw-r--r-- 21.3 KiB
Adds some docs
Minor cleanup
Rename fields, add tests, fix bugs [see ext.]

Renames kwargs for Map to be keytype and valuetype instead of
overloading 'type', allowing it to be used to denote a wrapped value
like every other type

Adds some roundtrip tests for some of the more complex fields

Fixes bugs
- Optional fields were always encoded
- Optional fields did not encode the >0 value to indicate the following
  value is present
- Fixes to_dict for Struct types

Also renames some fields in Struct's pack to not overload 'type'
Remove dead code. Fix returning stream, not bytes
Fix native types not packing in arrays
Adds more tests, fixes some bugs
Implements all container and primitive types
Redo Field impl., add Map impl
More implementation
Initial commit