307da9658d | ||
---|---|---|
spec | ||
src | ||
.build.yml | ||
.editorconfig | ||
.gitignore | ||
LICENSE | ||
README.md | ||
shard.yml |
README.md
CBOR
This library implements the RFC7049: Concise Binary Object Representation (CBOR) in Crystal.
Features
- Full support for diagnostic notation
- Assign a field to a type base on the CBOR tag
- Support for a wide range of IANA CBOR Tags
Limitations
Half-precision floating point is not supported
Crystal doesn't have a Float16
type, so half-precision floating point numbers
are not supported for the time being.
If you know of a way to solve handle half-precision float, a contribution would be really appreciated.
Maximum Array/String array/Bytes array length
The spec allows for the maximum length of arrays, string arrays and bytes array
to be a UInt64
.
While this library supports lengths expressed as a UInt64
, it must not exceed
Int32::MAX
.
Installation
-
Add the dependency to your
shard.yml
:dependencies: cbor: git: https://git.sr.ht/~arestifo/crystal-cbor
-
Run
shards install
Usage
require "cbor"
TODO: Write usage instructions here
Development
TODO: Write development instructions here
Contributing
- Fork it (https://github.com/your-github-user/cbor/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
Contributors
- Alberto Restifo - creator and maintainer