ref: c0eee1a8c6d521dca808c80dcc266892623eb6a9 pybare/bare/encoder.py -rw-r--r-- 21.9 KiB
Adds more docstrings
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