Module: Aws::Cbor::CborEngine Private

Defined in:
lib/aws-sdk-core/cbor/cbor_engine.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Pure Ruby implementation of CBOR encode and decode

Class Method Summary collapse

Class Method Details

.decode(bytes) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



14
15
16
# File 'lib/aws-sdk-core/cbor/cbor_engine.rb', line 14

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

.encode(data) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



10
11
12
# File 'lib/aws-sdk-core/cbor/cbor_engine.rb', line 10

def self.encode(data)
  Encoder.new.add(data).bytes
end