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

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

@Stebalien

Description

@Stebalien

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions