Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Efficient serialization of Haskell values to lazy bytestrings with a large average chunk size.

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 Blaze
Octocat-spinner-32 Criterion
Octocat-spinner-32 benchmarks
Octocat-spinner-32 tests
Octocat-spinner-32 .ghci added serialization of integers September 29, 2010
Octocat-spinner-32 .gitignore
Octocat-spinner-32 CHANGES
Octocat-spinner-32 LICENSE
Octocat-spinner-32 Makefile
Octocat-spinner-32 README.markdown
Octocat-spinner-32 Setup.hs Clean repo with builder code August 04, 2010
Octocat-spinner-32 TODO
Octocat-spinner-32 blaze-builder.cabal
README.markdown

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.

Something went wrong with that request. Please try again.