bvarint 0.1.0

Varint encoding that preserves memcmp order
Documentation
  • Coverage
  • 100%
    3 out of 3 items documented0 out of 2 items with examples
  • Size
  • Source code size: 11.74 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.08 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 10s Average build duration of successful builds.
  • all releases: 10s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • quark-zju/bvarint
    2 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • quark-zju

bvarint

A Better Varint encoding that preserves memcmp order.

Based on "A Better Varint..." slide from D. Richard Hipp's talk:

We use variable length integers.

[snip: how traditional VLQ works]

This was a mistake. If you need variable length integers, don't do them this way. Instead, do them like this where the first byte tells you the magnitude of the integer.

This is very important for efficiency in parsing. The other thing is that you can actually compare two integers using memcmp without having to decode them.