buffer-builder-0.1.0.0: Library for efficiently building up buffers, one piece at a time

Safe HaskellNone
LanguageHaskell2010

Data.BufferBuilder

Synopsis

Documentation

data BufferBuilder a Source

BufferBuilder sequences actions that append to an implicit, growable buffer. Use runBufferBuilder to extract the resulting buffer as a ByteString

runBufferBuilder :: BufferBuilder () -> ByteString Source

Runs a BufferBuilder and extracts its resulting contents as a ByteString

appendByte Source

Arguments

:: Word8

byte to append to the buffer.

-> BufferBuilder () 

appendChar8 Source

Arguments

:: Char

character to append to the buffer

-> BufferBuilder () 

Appends a character to the buffer, truncating it to the bottom 8 bits.

appendBS Source

Arguments

:: ByteString

ByteString to append

-> BufferBuilder () 

Appends a ByteString to the buffer.