isobmff-0.14.0.0: A parser and generator for the ISO-14496-12/14 base media file format

Safe HaskellNone
LanguageHaskell2010

Data.Type.BitRecords.Writer.ByteStringBuilder

Contents

Synopsis

BitBuffer64 construction from 'Extends (Structure sizeType's)

bitBuilderWithSize :: forall (struct :: Extends (Structure sizeType)). HasFunctionBuilder BitBuilder (Proxy struct) => Proxy struct -> ToFunction BitBuilder (Proxy struct) BuilderWithSize Source #

Create a Builder from a ('Structur sizeTypee') and store it in a BuilderWithSize

wrapBitBuilderWithSize :: forall (struct :: Extends (Structure sizeType)) wrapped. HasFunctionBuilder BitBuilder (Proxy struct) => (BuilderWithSize -> wrapped) -> Proxy struct -> ToFunction BitBuilder (Proxy struct) wrapped Source #

Like bitBuilderWithSize, but toFunction the result and accept as an additional parameter a wrapper function to wrap the final result (the BuilderWithSize) and toFunction the whole machiner.

builderBoxConstructor :: forall (struct :: Extends (Structure sizeType)) r. HasFunctionBuilder BitBuilder (Proxy struct) => Proxy struct -> FunctionBuilder BuilderWithSize r (ToFunction BitBuilder (Proxy struct) r) Source #

Create a Builder from a 'Extends (Structure sizeType') and store it in a BuilderWithSize; return a FunctionBuilder monoid that does that on toFunction

Low-level interface to building 'Extends (Structure sizeType's) and other things

flushBitBuilder :: BitBuilderState -> BitBuilderState Source #

Write the partial buffer contents using any number of word8 The unwritten parts of the bittr buffer are at the top. If the

    63  ...  (63-off-1)(63-off)  ...  0
    ^^^^^^^^^^^^^^^^^^^
Relevant bits start to the top!

appendBitBuffer64 :: BitBuffer64 -> BitBuilder Source #

Write all the bits, in chunks, filling and writing the BitBuffer64 in the BitBuilderState as often as necessary.

appendStrictByteString :: ByteString -> BitBuilder Source #

Write all the bytes, into the BitBuilderState this allows general purposes non-byte aligned builders.

Tracing/Debug Printing

printBuilder :: Builder -> String Source #

Print a Builder to a space seperated series of hexa-decimal bytes.