Write a single signed byte.
Moduleblaze-builder-0.4.4.1Haskell98
Blaze.ByteString.Builder.Int
Writes and Builders for serializing integers.
See Blaze.ByteString.Builder.Word for information about how to best write several integers at once.
- 33 values
- Packageblaze-builder-0.4.4.1
- Exports33
- LanguageHaskell98
- LicenceBSD-3-Clause
- SourceInt.hs
Writing integers to a buffer
1 declarationBig-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 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
2 declarationsWe 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.