Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Variable-Length Quantity encoding that preserves memcmp order.

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages