|Copyright||Lennart Kolmodin, Ross Paterson|
|License||BSD3-style (see LICENSE)|
|Maintainer||Lennart Kolmodin <[email protected]>|
|Portability||portable to Hugs and GHC|
Efficient construction of lazy bytestrings.
Builder is an efficient way to build lazy
ByteStrings. There are several functions for constructing
Builders, but only one to inspect them: to extract any data, you have to turn them into lazy
Builder constructs a lazy
Bytestring by filling byte arrays piece by piece. As each buffer is filled, it is 'popped' off, to become a new chunk of the resulting lazy
ByteString. All this is hidden from the user of the
O(1). The empty Builder, satisfying
O(1). A Builder taking a single byte, satisfying
O(1). The concatenation of two Builders, an associative operation with identity
O(1). A Builder taking a
O(1). A Builder taking a lazy
Write a Word16 in big endian format
Write a Word32 in big endian format
Write a Word64 in big endian format
Write a Word16 in little endian format
Write a Word32 in little endian format
Write a Word64 in little endian format
O(1). A Builder taking a single native machine word. The word is written in host order, host endian form, for the machine you're on. On a 64 bit machine the Word is an 8 byte value, on a 32 bit machine, 4 bytes. Values written this way are not portable to different endian or word sized machines, without conversion.
Write a Word16 in native host order and host endianness. 2 bytes will be written, unaligned.
Write a Word32 in native host order and host endianness. 4 bytes will be written, unaligned.
Write a Word64 in native host order. On a 32 bit machine we write two host order Word32s, in big endian form. 8 bytes will be written, unaligned.
Write a character using UTF-8 encoding.
© The University of Glasgow and others
Licensed under a BSD-style license (see top of the page).