crystal-cbor/src/cbor.cr

46 lines
1.2 KiB
Crystal

require "big"
require "./cbor/**"
module CBOR
VERSION = "0.1.0"
# Represents CBOR Hash Keys: everything except Nil, hashs, arrays.
alias HashKeyType = Int8 | Int16 | Int32 | Int64 | Int128 |
UInt8 | UInt16 | UInt32 | UInt64 |
Float32 | Float64 |
String |
Bool |
Bytes
# Represents CBOR types
alias Type = Nil |
Bool |
String |
Bytes |
Array(Type) |
# Hash(Int8, Type) |
# Hash(Int16, Type) |
# Hash(Int32, Type) |
# Hash(Int64, Type) |
# Hash(UInt8, Type) |
# Hash(UInt16, Type) |
# Hash(UInt32, Type) |
# Hash(UInt64, Type) |
# Hash(Float32, Type) |
# Hash(Float64, Type) |
# Hash(String, Type) |
Hash(HashKeyType, Type) |
Int8 |
UInt8 |
Int16 |
UInt16 |
Int32 |
UInt32 |
Int64 |
UInt64 |
Int128 |
Float32 |
Float64
end