Actions
Feature #21785
openAdd signed and unsigned LEB128 support to pack / unpack
Feature #21785:
Add signed and unsigned LEB128 support to pack / unpack
Status:
Open
Assignee:
-
Target version:
-
Description
Hi,
I'd like to add signed and unsigned LEB128 support to the pack and unpack methods. LEB128 is a variable length encoding scheme for integers. You can read the wikipedia entry about it here: https://en.wikipedia.org/wiki/LEB128
LEB128 is used in DWARF, WebAssembly, MQTT, and Protobuf. I'm sure there are other formats, but these are the ones I'm familiar with.
I sent a pull request here: https://github.com/ruby/ruby/pull/15589
I'm proposing K for the unsigned version and k for the signed version. I just picked k because it was available, I'm open to other format strings.
Thanks for consideration!
Actions