go-sqlite / sqlite3

pure-Go sqlite3 file reader
BSD 3-Clause "New" or "Revised" License
140 stars 19 forks source link

fix uvarint helper: sqlite uvarints are big-endian #8

Closed zellyn closed 6 years ago

zellyn commented 6 years ago

The existing code uses encoding/binary's Uvarint function, which mimics protobuf varints, which are little-endian. Sqlite uses big-endian varints, and uses all 8 bits of the ninth byte.

sbinet commented 6 years ago

nice catch!

LGTM modulo a few nitpicks:

This CL fixes foo because bar. Some more context.


- could you add another commit where you add yourself to the AUTHORS and/or CONTRIBUTORS files ?

sqlite3: add Zellyn Hunter to A+C



thanks a lot!

(I am preparing the move to a proper `go-sqlite` organization)
sbinet commented 6 years ago

(also, probably add a Fixes #4. at the end of the first commit message)

zellyn commented 6 years ago

ptal. Not sure on the normal rules for A vs C, so just added to C for now.

sbinet commented 6 years ago

thanks. usually, (but IANAL) for individuals, it's the A+C. (I am just piggy backing on what the Go and Gonum projects do.)

Let me know if you want to also sign the A, or want to keep it as is. (and I'll merge and migrate to go-sqlite/sqlite3)

zellyn commented 6 years ago

Added to both.

sbinet commented 6 years ago

thanks again!