Haskell implementation of Flat, a principled, language-independent and efficient binary data format.
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):
flatis usually faster for all but the highest network speeds - Size:
flatproduces significantly smaller binaries than all other libraries (3/4 times usually) - Serialization:
store,persistandflatare faster - Deserialization:
store,flat,persistandcerealare faster
Get the latest stable version from hackage.
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.
TypeScript-JavaScript and Purescript ports are under development.
Get in touch if you would like to help porting flat to other languages.