Safe Haskell | None |
---|---|
Language | Haskell2010 |
Deals with content encoding (compression) of message bodies: detection, update and compression/decompression
- data ContentEncoding
- getContentEncoding :: [Header] -> ContentEncoding
- updateContentEncoding :: ContentEncoding -> [Header] -> [Header]
- decompress :: ContentEncoding -> ByteString -> Either EncodingError ByteString
- compress :: ContentEncoding -> ByteString -> Either EncodingError ByteString
Documentation
data ContentEncoding Source
Represents the content encoding, per the HTTP/1.1 standard.
getContentEncoding :: [Header] -> ContentEncoding Source
Determines the content encoding from a list of headers. Defaults
to IdentityCompression
updateContentEncoding :: ContentEncoding -> [Header] -> [Header] Source
Given the list of headers, updates content encoding to the specified.
decompress :: ContentEncoding -> ByteString -> Either EncodingError ByteString Source
Decompresses a Bytestring
assuming a given content encoding. The
Compress encoding (LZW algorithm) is not supported at this time.
compress :: ContentEncoding -> ByteString -> Either EncodingError ByteString Source
Compresses a Bytestring
assuming a given content encoding. The
Compress encoding (LZW algorithm) is not supported at this time.