@hackage binary-typed0.2.0.1
Type-safe binary serialization
Deprecated
Dependencies (4)
- base >=4.6 && <4.10
- binary >=0.7
- bytestring >=0.9
- murmur-hash >=0.1 Show all…
Dependents (1)
@hackage/acme-everything
Binary serialization tagged with type information, allowing for
typechecking and useful error messages at the receiving site.
This package serves the same purpose as tagged-binary, with a couple of key differences:
Support of different kinds of serialized type annotations, each with specific strengths and weaknesses.
Error messages can provide details on type errors at the cost of longer message lengths to include the necessary information.
Serialization computationally almost as efficient as
Data.Binarywhen precaching type representations; decoding however is slower. These values obviously depend a lot on the involved data and its type; an example benchmark is shown in the picture below.No depencency on
Internalmodules of other libraries, and a very small dependency footprint in general.
For information about usage, see the Data.Binary.Typed.Tutorial module.
Performance-wise, here is a value Right (Left <100 chars lipsum>) of
type Either (Char, Int) (Either String (Maybe Integer)) benchmarked
using the Hashed64 type representation: