Sha256: ecc340cd07001695d9992c0aa72368b5d8a2dc11d1c79ba1fd569663f407d8be
Contents?: true
Size: 460 Bytes
Versions: 73
Compression:
Stored size: 460 Bytes
Contents
require 'protobuf/field/int32_field' module Protobuf module Field class Sfixed32Field < Int32Field ## # Public Instance Methods # def decode(bytes) value = bytes.unpack('V').first value -= 0x1_0000_0000 if (value & 0x8000_0000).nonzero? value end def encode(value) [value].pack('V') end def wire_type ::Protobuf::WireType::FIXED32 end end end end
Version data entries
73 entries across 73 versions & 6 rubygems