-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add support for variable ints #26
Comments
I assume different data format use different VARINT formats/specifications. Do you know which are used by sqlite and leveldb? Also Python is not the most efficient when doing many bit operations |
From what I can tell sqlite3 supports 64-bit big endian signed (two's complement) varints [0] whilst leveldb uses unsigned LE varints of size 32-bit [1] and 64-bit [2]. [0] https://sqlite.org/fileformat2.html [1] https://github.com/google/leveldb/blob/c5d5174a66f02e66d8e30c21ff4761214d8e4d6d/util/coding.cc#L21 |
Furthermore, note ZigZag encoding for signed varints in protobufs: https://developers.google.com/protocol-buffers/docs/encoding#signed_integers |
Would need to think a bit on how to best integrate these into the definitions. |
Some data formats such as sqlite and leveldb use varints to efficiently serialise integer values.
The text was updated successfully, but these errors were encountered: