bytestring-strict-builder-0.4.5.5: An efficient strict bytestring builder
Safe HaskellNone
LanguageHaskell2010

ByteString.StrictBuilder

Synopsis

Documentation

data Builder Source #

Instances

Instances details
Show Builder Source # 
Instance details

Defined in ByteString.StrictBuilder

Methods

showsPrec :: Int -> Builder -> ShowS

show :: Builder -> String

showList :: [Builder] -> ShowS

IsString Builder Source # 
Instance details

Defined in ByteString.StrictBuilder

Methods

fromString :: String -> Builder

Semigroup Builder Source # 
Instance details

Defined in ByteString.StrictBuilder

Methods

(<>) :: Builder -> Builder -> Builder

sconcat :: NonEmpty Builder -> Builder

stimes :: Integral b => b -> Builder -> Builder

Monoid Builder Source # 
Instance details

Defined in ByteString.StrictBuilder

builderBytes :: Builder -> ByteString Source #

Efficiently constructs a strict bytestring.

builderChunksBuilder :: Builder -> Builder Source #

Converts into the standard lazy bytestring builder. Does so efficiently using the internal APIs of "bytestring", without producing any intermediate representation.

builderLength :: Builder -> Int Source #

O(1). Gets the size of the bytestring that is to be produced.

builderPtrFiller Source #

Arguments

:: Builder 
-> (Int -> (Ptr Word8 -> IO ()) -> result)

A continuation on the amount of bytes to be written and the action populating the pointer.

-> result 

Use the builder to populate a buffer. It is your responsibility to ensure that the bounds are not exceeded.

bytes :: ByteString -> Builder Source #

lazyBytes :: ByteString -> Builder Source #

asciiIntegral :: Integral a => a -> Builder Source #

storable :: Storable a => a -> Builder Source #

word8 :: Word8 -> Builder Source #

word16BE :: Word16 -> Builder Source #

word32BE :: Word32 -> Builder Source #

word64BE :: Word64 -> Builder Source #

int8 :: Int8 -> Builder Source #

int16BE :: Int16 -> Builder Source #

int32BE :: Int32 -> Builder Source #

int64BE :: Int64 -> Builder Source #