Sha256: 16f499b57c219031b7074bbb51916b46d3402b876958cc6238d39156336bc059

Contents?: true

Size: 372 Bytes

Versions: 24

Compression:

Stored size: 372 Bytes

Contents

require 'protobuf/field/uint32_field'

module Protobuf
  module Field
    class Fixed32Field < Uint32Field

      ##
      # Public Instance Methods
      #

      def decode(bytes)
        bytes.unpack('V').first
      end

      def encode(value)
        [value].pack('V')
      end

      def wire_type
       ::Protobuf::WireType::FIXED32
      end

    end
  end
end

Version data entries

24 entries across 24 versions & 2 rubygems

Version Path
protobuffy-3.6.0 lib/protobuf/field/fixed32_field.rb
protobuffy-3.5.1 lib/protobuf/field/fixed32_field.rb
protobuffy-3.4.0 lib/protobuf/field/fixed32_field.rb
protobuffy-3.3.0 lib/protobuf/field/fixed32_field.rb
protobuffy-3.2.0 lib/protobuf/field/fixed32_field.rb
protobuffy-3.1.0 lib/protobuf/field/fixed32_field.rb
protobuf-3.3.6 lib/protobuf/field/fixed32_field.rb
protobuf-3.3.5 lib/protobuf/field/fixed32_field.rb
protobuf-3.3.4 lib/protobuf/field/fixed32_field.rb
protobuf-3.3.3 lib/protobuf/field/fixed32_field.rb
protobuf-3.3.2 lib/protobuf/field/fixed32_field.rb
protobuf-3.3.1 lib/protobuf/field/fixed32_field.rb
protobuf-3.3.0 lib/protobuf/field/fixed32_field.rb
protobuf-3.2.1 lib/protobuf/field/fixed32_field.rb
protobuf-3.2.0 lib/protobuf/field/fixed32_field.rb
protobuf-3.1.0 lib/protobuf/field/fixed32_field.rb
protobuf-3.0.5 lib/protobuf/field/fixed32_field.rb
protobuf-3.0.4 lib/protobuf/field/fixed32_field.rb
protobuf-3.0.3 lib/protobuf/field/fixed32_field.rb
protobuf-3.0.2 lib/protobuf/field/fixed32_field.rb