Skip to content

v0.20.0: feat: Enable partially/lazily decoding Protobuf messages (#97)

Compare
Choose a tag to compare
@dylan-bourque dylan-bourque released this 19 Jan 00:22
· 62 commits to main since this release
ca51658
* first pass of partial decode

* cleaned up partial decode logic
fixed a bug in `decodeVarint()` that lead to incorrect results for 10-byte encoded values
added encoder unit test for negative values

* moved partial decoding logic to a new `lazyproto` sub-package

* code cleanup after refactors

* added new Def type to obfuscate map[int]any

* moved detailed example for DecodeResult.FieldData to an example test

* renamed Def methods for clarity
added type constraint for generic FieldData helper functions

* refactored `Def` to not use an unexported field
updated `NewDef()` to pre-alloc the map based on the number of tags specified
added logic to validate `Def` values
cleaned up doc comments

* add ability to run specific benchmarks with `make bench`

* fix intermittent test failures when generating consecutive test messages results in the same timestamp value

* feat(lazyproto): add support for negative tag mapping for retrieving raw bytes of nested messages

also added internal resource pooling to cut down on repeated small allocs of maps