Skip to content
This repository has been archived by the owner on Apr 19, 2024. It is now read-only.

Use protobuf (sqlite, v8, etc.) varints #7

Open
Stebalien opened this issue Sep 28, 2018 · 0 comments
Open

Use protobuf (sqlite, v8, etc.) varints #7

Stebalien opened this issue Sep 28, 2018 · 0 comments

Comments

@Stebalien
Copy link

Multihash uses protobuf varints to encode both the multicodec and the hash length. This doesn't matter for codec < 0x80 and lengths < 128 bytes. However, this library should still either assert that (and refuse to operate over other codecs/lengths) or encode these numbers.

I can't vouch for this library but the varint implementation looks correct at first glance: https://github.com/fmoo/python-varint

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant