Add support for signed and unsigned LEB128 to pack/unpack.#15589
Add support for signed and unsigned LEB128 to pack/unpack.#15589tenderlove merged 1 commit intoruby:masterfrom
Conversation
nobu
left a comment
There was a problem hiding this comment.
K and k cases have pretty duplicate code.
Yes, I wasn't sure if the feature would be accepted. Matz seems positive about the feature so I will try to refactor the code a bit. 😄 |
This comment has been minimized.
This comment has been minimized.
bfdf2a3 to
78f52be
Compare
60815b2 to
b37e605
Compare
This commit adds a new pack format command `R` and `r` for unsigned and signed LEB128 encoding. The "r" mnemonic is because this is a "vaRiable" length encoding scheme. LEB128 is used in various formats including DWARF, WebAssembly, MQTT, and Protobuf. [Feature #21785]
It would be great to have ruby/spec specs for this too, it will make it far easier to support on other Ruby implementations, and the specs for pack/unpack are in general pretty extensive. Re add/move it's fine to add only to ruby/spec (since CRuby CI also runs that), but since you already have it in test-all then I think having it in both makes sense. |
This commit adds a new pack format command
Randrfor unsigned and signed LEB128 encoding. The "r" mnemonic is because this is a "vaRiable" length encoding scheme.LEB128 is used in various formats including DWARF, WebAssembly, MQTT, and Protobuf.