-
Notifications
You must be signed in to change notification settings - Fork 201
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
Is this codec in unsigned-varint format? #224
Comments
The table lists the un-encoded numbers. So in this case 0x81 would mean that if it is e.g. used in a CID, the unsigned varint of it would be |
May I suggest adding (or just replacing with) the actual unsigned varint encoded code? Because in the real life uses, we are using and seeing encoded numbers. Just like UTF-8 which uses similar technique, we only care about the actual encoded bytes. |
I'm not sure I can think of a case where I've had to manually type out the encoded form, much more typically I'm using the integer form, e.g. https://github.com/ipld/js-dag-json/blob/328eda133620a0aff8cb19a314b5622f0054a6d3/index.js#L198 and I'm regularly copy and pasting from this table so it'd be a massive loss to ditch the human-readable forms for computer-redable ones. You might be able to make a case for tacking an additional column with the bytes, but we're not dealing with a very extensible format with our CSV and haven't made any progress on a more extensible form unfortunately. |
Hey, @Stebalien I am currently working on some implementations and would appreciate some clarification about this issue. For the example @keepsimple1 raised ( Are the entries then in big endian notation? (So |
|
I must have missed something obvious. For example, this item in the current table:
The code
0x81
is binary10000001
, and in my understanding of unsigned varint, should indicate there is a 2nd byte. Why isn't there 2nd byte in the table for this codec?The text was updated successfully, but these errors were encountered: