The example they purport to give even proves it: " For example, a 100 TB file in IPFS may have as many as 400 million subobjects, which would mean 400 million hashes.
400,000,000 hashes * (7 - 2) bytes = 2 GB"
Right, so uh, that's 0.002% of that 100tb. (IE who cares)
(This already appears to be the difference between what it would normally take, at 7 bytes, and what it takes with varint, which is ~17 bits per int)
But assume we go crazy, and use 8 bytes per hash.
we have 3.2 gigabytes there. vs 800 megabytes for your varint encoding. Or, for our 100 terabyte file, approximately, "who cares" vs "who cares".
if you could transfer at a gigabyte per second, the version with varint would take ~28 hours. The version with fixed-size 8 bytes would take ... 2 seconds longer.
Remind me again how this is showing it's a good idea?
Also, if you really wanted to use variable size integers, variable byte encoding is pretty much the slowest way to do it.
See, e.g, https://arxiv.org/pdf/1209.2137.pdf
Using variable sized integers here doesn't save space, precisely because th , but it does make it more annoying to splat these in and out of memory.