type BufferWriter = Ptr Word8 -> Int -> IO (Int, Next)
bytestring Data.ByteString.Builder.Extra
A BufferWriter represents the result of running a Builder. It unfolds as a sequence of chunks of data. These chunks come in two forms: * an IO action for writing the Builder's data into a user-supplied memory buffer. * a pre-existing chunks of data represented by a strict ByteString While this is rather low level, it provides you with full flexibility in how the data is written out. The BufferWriter itself is an IO action: you supply it with a buffer (as a pointer and length) and it will write data into the buffer. It returns a number indicating how many bytes were actually written (which can be 0). It also returns a Next which describes what comes next.