module CBOR
Constants
- BREAK
- Sequence
- Simple
- TAG_BIGNUM_BASE
- Tagged
Public Class Methods
Source
# File lib/cbor-pure.rb, line 86 def self.decode(s) Buffer.new(s).decode_item_final end
Source
# File lib/cbor-pure.rb, line 92 def self.decode_seq(s) Buffer.new(s).decode_items end
Source
# File lib/cbor-pure.rb, line 89 def self.decode_with_rest(s) Buffer.new(s).decode_item_with_rest end
Source
# File lib/cbor-pure.rb, line 79 def self.encode_seq(ds) out = Buffer.new ds.each do |d| out.add(d) end out.buffer end
Source
# File lib/cbor-pretty.rb, line 24 def self.pretty(s, indent = 0, max_target = 40) Buffer.new(s).pretty_item_final(indent, max_target) end
Source
# File lib/cbor-pretty.rb, line 28 def self.pretty_seq(s, indent = 0, max_target = 40) b = Buffer.new(s) res = '' # XXX: not all indented the same while !b.empty? res << b.pretty_item_final(indent, max_target, true) end res end