4 Commits

Author SHA1 Message Date
Steven Allen
8af58b283a fix: minimal varint decoding
* Enforce minimal varint encoding when decoding multiaddrs.
* Ensure codecs fit in 32bit integers for compatibility. We can increase the
size, but we'd need to change the `Protocol.Codec` type from `int` to `uint64`.
2019-09-19 14:43:22 -07:00
Hector Sanjuan
0aa80854ab Let Multiaddr implement marshalers: binary, text, json 2019-02-25 22:48:24 +00:00
Steven Allen
c8d6befb43 add more split tools and a bunch of tests 2018-10-02 14:26:34 -07:00
Steven Allen
58bcbc8e51 add component/foreach helpers
This adds a `Component` helper type and a `ForEach` helper method.

The first attempt used an interface but interfaces imply allocation. We really
can't afford to allocate here.
2018-10-01 21:18:11 -07:00