class YARP::Serialize::Loader

def load_varint

This is also what protobuf uses: https://protobuf.dev/programming-guides/encoding/#varints
variable-length integer using https://en.wikipedia.org/wiki/LEB128
def load_varint
  n = io.getbyte
  if n < 128
    n
  else
    n -= 128
    shift = 0
    while (b = io.getbyte) >= 128
      n += (b - 128) << (shift += 7)
    end
    n + (b << (shift + 7))
  end
end