|
| Blaze.ByteString.Builder.Int | | Portability | tested on GHC only | | Stability | experimental | | Maintainer | Simon Meier <iridcode@gmail.com> |
|
|
|
|
|
| Description |
Writes and Builders for serializing integers.
See Blaze.ByteString.Builder.Word for information about how to best write several
integers at once.
|
|
| Synopsis |
|
|
|
|
| Writing integers to a buffer
|
|
|
| Write a single signed byte.
|
|
| Big-endian writes
|
|
|
| Write an Int16 in big endian format.
|
|
|
| Write an Int32 in big endian format.
|
|
|
| Write an Int64 in big endian format.
|
|
| Little-endian writes
|
|
|
| Write an Int16 in little endian format.
|
|
|
| Write an Int32 in little endian format.
|
|
|
| Write an Int64 in little endian format.
|
|
| Host-endian writes
|
|
|
| Write a single native machine Int. The Int is written in host order,
host endian form, for the machine you're on. On a 64 bit machine the Int
is an 8 byte value, on a 32 bit machine, 4 bytes. Values written this way
are not portable to different endian or integer sized machines, without
conversion.
|
|
|
| Write an Int16 in native host order and host endianness.
|
|
|
| Write an Int32 in native host order and host endianness.
|
|
|
| Write an Int64 in native host order and host endianness.
|
|
| Creating builders from integers
|
|
| We provide serialization functions both for singleton integers as well as
for lists of integers. Using these list serialization functions is much faster
than using mconcat . map fromInt<n>, as the list serialization
functions use a tighter inner loop.
|
|
|
| Serialize a single byte.
|
|
|
| Serialize a list of bytes.
|
|
| Big-endian serialization
|
|
|
| Serialize an Int16 in big endian format.
|
|
|
| Serialize an Int32 in big endian format.
|
|
|
| Serialize an Int64 in big endian format.
|
|
|
| Serialize a list of Int32s in big endian format.
|
|
|
| Serialize a list of Int16s in big endian format.
|
|
|
| Serialize a list of Int64s in big endian format.
|
|
| Little-endian serialization
|
|
|
| Serialize an Int16 in little endian format.
|
|
|
| Serialize an Int32 in little endian format.
|
|
|
| Serialize an Int64 in little endian format.
|
|
|
| Serialize a list of Int16s in little endian format.
|
|
|
| Serialize a list of Int32s in little endian format.
|
|
|
| Serialize a list of Int64s in little endian format.
|
|
| Host-endian serialization
|
|
|
| Serialize a single native machine Int. The Int is serialized in host
order, host endian form, for the machine you're on. On a 64 bit machine the
Int is an 8 byte value, on a 32 bit machine, 4 bytes. Values written this
way are not portable to different endian or integer sized machines, without
conversion.
|
|
|
| Write an Int16 in native host order and host endianness.
|
|
|
| Write an Int32 in native host order and host endianness.
|
|
|
| Write an Int64 in native host order and host endianness.
|
|
|
| Serialize a list of Ints.
See fromInthost for usage considerations.
|
|
|
| Write a list of Int16s in native host order and host endianness.
|
|
|
| Write a list of Int32s in native host order and host endianness.
|
|
|
| Write a list of Int64s in native host order and host endianness.
|
|
| Produced by Haddock version 2.6.1 |