cabal-club / cable

A lightweight peer-to-peer chat protocol.
https://cabal.chat
74 stars 4 forks source link

what kind of varint #3

Closed cryptix closed 3 years ago

cryptix commented 3 years ago

I think it would be good to outline what the varint encoding is.

I saw @substack uses desert in the first rust draft but I couldn't really tell how they are turned into bytes from the crate docs.

possible inspirations for an already speced out unsigned varint (not sure if cable needs negative integers): https://github.com/AljoschaMeyer/varu64

cryptix commented 3 years ago

@substack just told me it's intended to be the same one that's in protobuf (because that's also what the current protocol uses).

Leaving this issue open until the readme is updated.