module ObjectFramework::Protobuf::Wire
Public Class Methods
Source
# File lib/object_framework/protobuf.rb, line 18 def self.varint(value) raise InvalidInput, "Varint is out of range" unless value.is_a?(Integer) && value.between?(0, 2**64 - 1) bytes = +"".b while value >= 128 bytes << ((value & 127) | 128) value >>= 7 end bytes << value end