Fast binary serialisation and CBOR implementation for Haskell
This repo contains two libraries (plus associated tools):
serialise library is for serialising Haskell values and deserialising
cborg library provides a fast, standards-compliant implementation of the
'Concise Binary Object Representation' (specified in
RFC 7049) for Haskell.
serialise library uses the CBOR format, via the
cborg library, which
gives it the following benefits:
- fast serialisation and deserialisation
- compact binary format
- stable format across platforms (32/64bit, big/little endian)
- support for backwards compatible deserialisation with migrations
- the ability to inspect binary values with generic tools, e.g. for debugging or recovery, including generic conversion into JSON text
- potential to read the serialised format from other languages
- incremental or streaming (de)serialisation
- internal message framing (for use in network application)
- suitable to use with untrusted input (resistance to asymmetric resource consumption attacks)
They are just a
cabal install away on Hackage:
$ cabal install cborg serialise
There are also a few related packages that you may be interested in:
cborg-jsonimplements the bijection between JSON and CBOR specified in the RFC.
cbor-toolis a handy command-line utility for working with CBOR data.
Master git repository:
git clone https://github.com/well-typed/cborg.git
The tests for the
cborg package are currently included in the
$ cabal test serialise
BSD3. See LICENSE.txt for the exact terms of copyright and redistribution.