Introduce `EncodeAppend` and `CompactLen` (#69)
* Introduce `EncodeAppend` and `CompactLen`
`CompactLen` is implemented by `Compact` to return the encoded length of
a given value.
`EncodeAppend` is a trait that can be implemented by types that support
appending without decoding all previously encoded items. Currently it is
implemented by `Vec<T>` and the benchmark shows a speed-up of factor
800x when appending items.
* Change `EncodeAppend` signature
* Apply suggestions from code review
Co-Authored-By:
bkchr <bkchr@users.noreply.github.com>
Please register or sign in to comment