Copyright | (c) 2017 Red Hat Inc. |
---|---|
License | LGPL |
Maintainer | https://github.com/weldr |
Stability | alpha |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
Utilities for working with Conduit
s when importing.
- getFromURI :: MonadResource m => URI -> Producer m ByteString
- ungzipIfCompressed :: MonadResource m => Conduit ByteString m ByteString
Documentation
getFromURI :: MonadResource m => URI -> Producer m ByteString Source #
Load data from a given file: or http: URI
into a ByteString
.
ungzipIfCompressed :: MonadResource m => Conduit ByteString m ByteString Source #
If the ByteString
in a Conduit
is compressed, pass it through ungzip to
uncompress it. Otherwise, pass it through without doing anything. We determine
whether a stream is compressed by looking for the gzip magic bytes at the start
of the stream.