Build Status Hackage version Stackage Nightly Stackage LTS

Haskell implementation of Flat, a principled, language-independent and efficient binary data format.

Performance

For some hard data, see this comparison of the major haskell serialisation libraries.

Briefly:

  • Transfer time (serialisation time + transport time on the network + deserialisation at the receiving end): flat is usually faster for all but the highest network speeds
  • Size: flat produces significantly smaller binaries than all other libraries (3/4 times usually)
  • Serialization: store, persist and flat are faster
  • Deserialization: store, flat, persist and cereal are faster

Documentation

Installation

Get the latest stable version from hackage.

Other Stuff You Might Like

ZM - Language independent, reproducible, absolute types

To decode flat encoded data you need to know the type of the serialised data.

This is ok for applications that do not require long-term storage and that do not operate in open distributed systems.

For those who do, you might want to supplement flat with something like ZM.

Ports for other languages

TypeScript-JavaScript and Purescript ports are under development.

Get in touch if you would like to help porting flat to other languages.