flat: Principled and efficient bit-oriented binary serialization.

[ bsd3, data, library, parsing, serialization ] [ Propose Tags ]

Reference implementation of flat, a principled and efficient binary serialization format.


[Skip to Readme]
Versions [RSS] [faq] 0.2, 0.2.2, 0.3, 0.3.2, 0.3.4, 0.4, 0.4.2, 0.4.4
Change log CHANGELOG
Dependencies array (>=0.5.1.0), base, bytestring (>=0.10.6), containers, deepseq (>=1.4), dlist, filepath (==1.4.1.1), ghc-prim, hashable, HUnit (==1.6.0.0), memory (>=0.14.10 && <=0.14.14), mono-traversable, pretty (>=1.1.2), primitive, QuickCheck (==2.10), semigroups, tasty (==1.1.0.3), text, unordered-containers, vector [details]
License BSD-3-Clause
Copyright Copyright: (c) 2016-2020 Pasqualino `Titto` Assini
Author Pasqualino `Titto` Assini
Maintainer tittoassini@gmail.com
Revised Revision 1 made by phadej at 2021-10-18T06:36:21Z
Category Data, Parsing, Serialization
Home page http://quid2.org
Source repo head: git clone https://github.com/Quid2/flat
Uploaded by PasqualinoAssini at 2020-05-24T22:31:13Z
Distributions LTSHaskell:0.4.4, NixOS:0.4.4, Stackage:0.4.4
Downloads 5046 total (94 in the last 30 days)
Rating 2.25 (votes: 2) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs available [build log]
Last success reported on 2020-05-24 [all 1 reports]

Modules

[Index] [Quick Jump]

Downloads

Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

Maintainer's Corner

For package maintainers and hackage trustees

Candidates


Readme for flat-0.4.4

[back to package description]

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.