Commit Graph

3 Commits

Author SHA1 Message Date
Jacek Sieka 0c379cf1d8
fix fromBytes call resolution (#140) 2022-09-12 14:29:03 +02:00
Jacek Sieka 9a3130eb5b
leb128: avoid shifts larger than type (#123) 2022-07-16 19:16:11 +02:00
Jacek Sieka 5cf4feabea
leb128 + bitops fixes (#66)
Leb128 is a variable-length encoding for unsigned integers that is used
in a number of contexts - in particular, wasm, dwarf and protobuf.

This is an optimized low-level implementation that unrolls the loop
reading/writing the buffer - it is suitable to use as base for a more
specific API - no memory allocations, no exceptions.

This PR also fixes bitops2 to not raise on certaing uint->int
conversions, adapting bitops to nim 1.0 conversion rules by using a cast
instead of raising on uint->int conversion
2020-12-15 17:07:20 +02:00