Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bench
src/System/IO/Streams
test
.travis.yml
CHANGELOG
LICENSE
README.md
Setup.hs
cereal-io-streams.cabal
stack-lts-2.yaml
stack.yaml

README.md

cereal-io-streams - io-streams support for the cereal binary serialization library

Build Status

Functions

putToStream :: Put -> IO (InputStream ByteString)
putEachStream :: Putter r -> InputStream r -> IO (InputStream ByteString)
getFromStream :: Get r -> InputStream ByteString -> IO r
getEachStream :: Get r -> InputStream ByteString -> IO (InputStream r)
contramapPut :: Putter r -> OutputStream ByteString -> IO (OutputStream r)

Examples

>>> getFromStream (get :: Get String) =<< putToStream (put "serialize me")
"serialize me"
>>> getFromStream (get :: Get String) =<< Streams.fromByteString (Data.ByteString.drop 1 $ runPut $ put ("serialize me" :: String))
*** Exception: Get exception: too few bytes
From:	demandInput
You can’t perform that action at this time.