bytestring-tree-builder-0.2.1.3: A very efficient ByteString builder implementation based on the binary tree

Safe HaskellNone
LanguageHaskell2010

ByteString.TreeBuilder

Contents

Synopsis

Documentation

data Builder Source

A binary-tree-based datastructure optimized for aggregation of bytestrings using the O(1) appending operation.

Instances

IsString Builder Source 
Monoid Builder Source

Implements mappend with O(1) complexity.

Declaration

byteString :: ByteString -> Builder Source

Lifts a bytestring into the builder.

byte :: Word8 -> Builder Source

Lifts a single byte into the builder.

Execution

toByteString :: Builder -> ByteString Source

O(n). Converts the builder into a strict bytestring.

toLazyByteString :: Builder -> ByteString Source

O(n). Converts the builder into a lazy bytestring.