The blaze-builder package

[Tags: bsd3, library]

This library provides an abstraction of buffered output of byte streams and several convenience functions to exploit it. For example, it allows to efficiently serialize Haskell values to lazy bytestrings with a large average chunk size. The large average chunk size allows to make good use of cache prefetching in later processing steps (e.g. compression) and reduces the sytem call overhead when writing the resulting lazy bytestring to a file or sending it over the network.


[Skip to ReadMe]

Properties

Versions0.1, 0.2.0.0, 0.2.0.1, 0.2.0.2, 0.2.0.3, 0.2.1.0, 0.2.1.1, 0.2.1.2, 0.2.1.3, 0.2.1.4, 0.3.0.0, 0.3.0.1, 0.3.0.2, 0.3.1.0, 0.3.1.1, 0.3.2.0, 0.3.3.0, 0.3.3.1, 0.3.3.2, 0.3.3.3, 0.3.3.4, 0.4.0.0, 0.4.0.1
Change logCHANGES
Dependenciesbase (==4.*), bytestring (==0.9.*), text (==0.10.*) [details]
LicenseBSD3
AuthorJasper Van der Jeugt, Simon Meier
Maintainerjaspervdj@gmail.com, iridcode@gmail.com
StabilityExperimental
CategoryData
Home pagehttp://github.com/jaspervdj/blaze-builder
Bug trackerhttp://github.com/jaspervdj/blaze-builder/issues
UploadedTue Nov 30 18:15:01 UTC 2010 by SimonMeier
DistributionsDebian:0.4.0.1, Fedora:0.3.3.4, FreeBSD:0.3.3.2, LTSHaskell:0.4.0.1, NixOS:0.4.0.1, Stackage:0.4.0.1
Downloads189322 total (1015 in last 30 days)
Votes
0 []
StatusDocs uploaded by user
Build status unknown [no reports yet]

Modules

[Index]

Downloads

Maintainers' corner

For package maintainers and hackage trustees

Readme for blaze-builder-0.2.0.2

blaze-builder

This library allows to efficiently serialize Haskell values to lazy bytestrings with a large average chunk size. The large average chunk size allows to make good use of cache prefetching in later processing steps (e.g. compression) and reduces the sytem call overhead when writing the resulting lazy bytestring to a file or sending it over the network.

This library was inspired by the module Data.Binary.Builder provided by the binary package. It was originally developed with the specific needs of the blaze-html package in mind. Since then it has been restructured to serve as a drop-in replacement for Data.Binary.Builder, which it improves upon both in speed as well as expressivity.

To see the improvements in speed, run the throughput benchmark, which measures serialization speeds for writing Word8, Word16, Word32 and Word64 in different endian formats and different chunk sizes, using the command

make bench-throughput

or run the list serialization comparison benchmark

make bench-blaze-vs-binary

Checkout the combinators in the module "Blaze.ByteString.Builder.Write" to see the improvements in expressivity. This module allows to incorporate efficient primitive buffer manipulations as parts of a builder. We use this facility in the 'blaze-html' HTML templating library to allow for the efficient serialization of HTML escaped and UTF-8 encoded characters.