Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Stream related tools
Synopsis
- data StreamFilter
- knownFilters :: [StreamFilter]
- readStream :: InputStream ByteString -> Int64 -> IO Stream
- rawStreamContent :: Buffer -> Int -> Int64 -> IO (InputStream ByteString)
- decodedStreamContent :: Buffer -> [StreamFilter] -> (InputStream ByteString -> IO (InputStream ByteString)) -> Int -> Stream -> IO (InputStream ByteString)
- decodeStream :: [StreamFilter] -> Stream -> InputStream ByteString -> IO (InputStream ByteString)
Documentation
data StreamFilter Source #
Stream filter
knownFilters :: [StreamFilter] Source #
All stream filters implemented by the toolbox
Right now it contains only FlateDecode filter
readStream :: InputStream ByteString -> Int64 -> IO Stream Source #
Read Stream
from stream
We need to pass current position here to calculate stream data offset
:: Buffer | |
-> Int | stream length |
-> Int64 | stream offset The payload is offset of stream data |
-> IO (InputStream ByteString) |
Raw stream content. Filters are not applyed
The InputStream
returned is valid only until the next bufferSeek
Note: "Length" could be an indirect object, but we don't want to read indirect objects here. So we require length to be provided
:: Buffer | |
-> [StreamFilter] | |
-> (InputStream ByteString -> IO (InputStream ByteString)) | decryptor |
-> Int | stream length |
-> Stream | stream with offset |
-> IO (InputStream ByteString) |
Decoded stream content
The InputStream
is valid only until the next bufferSeek
Note: "Length" could be an indirect object, that is why we cann't read it ourself
decodeStream :: [StreamFilter] -> Stream -> InputStream ByteString -> IO (InputStream ByteString) Source #
Decode stream content
It should be already decrypted
The InputStream
is valid only until the next bufferSeek