tendermint / go-amino

Protobuf3 with Interface support - Designed for blockchains (deterministic, upgradeable, fast, and compact)
Other
260 stars 78 forks source link

Reintroduce zigzag encoding via tag #239

Open liamsi opened 5 years ago

liamsi commented 5 years ago

As per #238 ints, int32s, and int64s aren't zigzag encoded by default. Add a tag such that developers can still zigzag encode. If they need to encode ints which often contain negative numbers this is more efficient.

TODOs:

Zigzag encoding is used in proto3 for encoding sint(32|64). References:

liamsi commented 5 years ago

removed from the proto milestone: My understanding is, we require everything amino encodes can be represented as a protobuf message and not that amino supports every proto feature.