libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
Main features
- Complete RFC conformance
- Robust portable C99 implementation
- Layered architecture offers both control and convenience
- Flexible memory management
- Proper handling of UTF-8
- Full support for streams & incremental processing
- Extensive documentation and test suite
- No runtime dependencies, small footprint
- Tested across architectures and operating systems
A taste of the API
Distribution
OS X
brew tap pjk/libcbor
brew install libcbor
Linux
Please refer to the documentation on how to build libcbor.
deb and RPM packages can be built effortlessly using CPack. libcbor also comes with pkg-config support.
Windows
Windows are supported and tested for. CMake can target both MSVC and Cygwin toolchains. Please refer to the documentation on how to do so.
Other platforms
As long as CMake and a C99 compiler are available, libcbor will work. Read more here.
Resources & documentation
- User documentation is available online from http://libcbor.readthedocs.org/en/latest/
- Detailed build instructions are a part of the documentation
- API reference is available either online or as a part of the release
- Bug tracker
- Changelog
- Older releases
Ruby bindings
If you write Ruby, you might be interested in the Ruby bindings for libcbor.
Licensing
libcbor is distributed under the terms of the MIT license, as found in the source code.
Copyright (c) Pavel Kalvoda, 2014 - <%= Time.now.year %>