Sha256: 86c793c01458fd25565abb33f25766d526d5c68c750afbb2b319292c505c19a7

Contents?: true

Size: 375 Bytes

Versions: 8

Compression:

Stored size: 375 Bytes

Contents

# frozen_string_literal: true

require_relative '../cbor'

module Aws
  module RpcV2
    # Pure Ruby implementation of CBOR encode and decode
    module CborEngine
      def self.encode(data)
        Cbor::Encoder.new.add(data).bytes
      end

      def self.decode(bytes)
        Cbor::Decoder.new(bytes.force_encoding(Encoding::BINARY)).decode
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
aws-sdk-core-3.216.0 lib/aws-sdk-core/rpc_v2/cbor_engine.rb
aws-sdk-core-3.215.1 lib/aws-sdk-core/rpc_v2/cbor_engine.rb
aws-sdk-core-3.215.0 lib/aws-sdk-core/rpc_v2/cbor_engine.rb
aws-sdk-core-3.214.1 lib/aws-sdk-core/rpc_v2/cbor_engine.rb
aws-sdk-core-3.214.0 lib/aws-sdk-core/rpc_v2/cbor_engine.rb
aws-sdk-core-3.213.0 lib/aws-sdk-core/rpc_v2/cbor_engine.rb
aws-sdk-core-3.212.0 lib/aws-sdk-core/rpc_v2/cbor_engine.rb
aws-sdk-core-3.211.0 lib/aws-sdk-core/rpc_v2/cbor_engine.rb