Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- getInt8 :: Integral a => Get a
- getInt16 :: Integral a => Get a
- getInt32 :: Integral a => Get a
- parseString :: Get ByteString
- parseStrings :: Get [ByteString]
- parseLongString :: Get ByteString
- parseKV :: Get (ByteString, ByteString)
- parseMap :: Get (Map ByteString ByteString)
- putByteStringLen :: ByteString -> PutM ()
- putByteStrings :: Foldable t => t ByteString -> PutM ()
- putLongByteStringLen :: ByteString -> PutM ()
- putKV :: (ByteString, ByteString) -> PutM ()
- putMap :: Map ByteString ByteString -> PutM ()
- data Get a
- runGet :: Get a -> ByteString -> Either String a
- getByteString :: Int -> Get ByteString
- type Put = PutM ()
- data PutM a
- runPut :: Put -> ByteString
- putInt8 :: Int8 -> Put
- putWord8 :: Word8 -> Put
- putByteString :: ByteString -> Put
- putWord16be :: Word16 -> Put
- putWord32be :: Word32 -> Put
- putInt16be :: Int16 -> Put
- putInt32be :: Int32 -> Put
Documentation
parseStrings :: Get [ByteString] Source #
parseKV :: Get (ByteString, ByteString) Source #
parseMap :: Get (Map ByteString ByteString) Source #
putByteStringLen :: ByteString -> PutM () Source #
putByteStrings :: Foldable t => t ByteString -> PutM () Source #
putLongByteStringLen :: ByteString -> PutM () Source #
putKV :: (ByteString, ByteString) -> PutM () Source #
putMap :: Map ByteString ByteString -> PutM () Source #
Instances
MonadFail Get | |
Defined in Data.Binary.Get.Internal | |
Alternative Get | Since: binary-0.7.0.0 |
Applicative Get | |
Functor Get | |
Monad Get | |
MonadPlus Get | Since: binary-0.7.1.0 |
getByteString :: Int -> Get ByteString #
An efficient get method for strict ByteStrings. Fails if fewer than n
bytes are left in the input. If n <= 0
then the empty string is returned.
The PutM type. A Writer monad over the efficient Builder monoid.
runPut :: Put -> ByteString Source #
putByteString :: ByteString -> Put #
An efficient primitive to write a strict ByteString into the output buffer. It flushes the current buffer, and writes the argument into a new chunk.
putWord16be :: Word16 -> Put #
Write a Word16 in big endian format
putWord32be :: Word32 -> Put #
Write a Word32 in big endian format
putInt16be :: Int16 -> Put #
Write an Int16 in big endian format
putInt32be :: Int32 -> Put #
Write an Int32 in big endian format