module Aws::RpcV2::CborEngine

Pure Ruby implementation of CBOR encode and decode

Public Class Methods

decode(bytes) click to toggle source
# File lib/aws-sdk-core/rpc_v2/cbor_engine.rb, line 13
def self.decode(bytes)
  Cbor::Decoder.new(bytes.force_encoding(Encoding::BINARY)).decode
end
encode(data) click to toggle source
# File lib/aws-sdk-core/rpc_v2/cbor_engine.rb, line 9
def self.encode(data)
  Cbor::Encoder.new.add(data).bytes
end