Skip to content

mikedlr/binary-serialise-cbor

 
 

Repository files navigation

Fast binary serialization for Haskell

Linux Build Status Windows Build Status Hackage version Stackage version BSD3 Haskell

This package provides pure, efficient serialization of Haskell values directly into ByteStrings for storage or transmission purposes. By providing a set of type class instances, you can also serialise any custom data type you have as well.

The underlying binary format used is the 'Concise Binary Object Representation', or CBOR, specified in RFC 7049. As a result, serialised Haskell values have implicit structure outside of the Haskell program itself, meaning they can be inspected or analyzed with custom tools.

This package is eventually intended to essentially replace the venerable binary library. Aside from having a more concise format that has an explicit structure, it's multiple times faster than competing libraries as well in both the encode and decode paths. However, the current API only provides CBOR serialization; it does not provide an independent notion of parsing arbitrary binary data. This has yet to be designed or implemented.

NOTE: Currently this library has not been released to the public Hackage server, although it has seen real production use (with good results). Experimentation is encouraged, with a healthy dose of careful inspection and analysis.

Installation

It's just a cabal install away on Hackage, or through Stackage:

$ cabal install binary-serialise-cbor
$ stack install binary-serialise-cbor

NOTE: The above currently WILL NOT WORK, as this package is not publicly released.

Join in

Be sure to read the contributing guidelines. File bugs in the GitHub issue tracker.

Master git repository:

  • git clone https://github.com/well-typed/binary-serialise-cbor.git

Once you've done that, you can build it and run the tests:

$ cabal test
$ stack test

Note: the stack.yaml file is currently synchronized to LTS-6.1. Further compilers and other LTS releases are currently not supported with Stack at the moment, but the build is tested with older compilers and Cabal libraries (through Travis CI).

Authors

See AUTHORS.txt.

License

BSD3. See LICENSE.txt for the exact terms of copyright and redistribution.

About

Binary serialisation in the CBOR format

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Haskell 99.1%
  • Other 0.9%