RefSerialize

Write to and read from ByteStrings maintaining internal memory references

LTS Haskell 23.1:0.4.0
Stackage Nightly 2024-12-23:0.4.0
Latest on Hackage:0.4.0

See all snapshots RefSerialize appears in

BSD-3-Clause licensed by Alberto Gómez Corona
Maintained by [email protected]
This version can be pinned in stack with:RefSerialize-0.4.0@sha256:737485e162605317027b036f3f3c43abfb38c43d3ce610fc1b2a4214f4990bd0,1763

Module documentation for 0.4.0

Read, Show and Binary instances do not check for internal data references to the same address. As a result, the data is duplicated when serialized. This is a waste of space in the filesystem and also a waste of serialization time. but the worst consequence is that, when the serialized data is read, it allocates multiple copies for the same object when referenced multiple times. Because multiple referenced data is very typical in a pure language such is Haskell, this means that the resulting data loose the beatiful economy of space and processing time that referential transparency permits.

In this release:

Compatibility with older versions of bytestring that have no toStrict call

deserialization is much, much faster by using the stringsearch package

See Data.RefSerialize for details