http-encodings-0.9.3: A library for encoding and decoding bodies of HTTP messages

Safe HaskellNone

Network.HTTP.Encoding.Content

Description

Deals with content encoding (compression) of message bodies: detection, update and compression/decompression

Synopsis

Documentation

data ContentEncoding Source

Represents the content encoding, per the HTTP/1.1 standard.

getContentEncoding :: [Header] -> ContentEncodingSource

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 ByteStringSource

Decompresses a Bytestring assuming a given content encoding. The Compress encoding (LZW algorithm) is not supported at this time.

compress :: ContentEncoding -> ByteString -> Either EncodingError ByteStringSource

Compresses a Bytestring assuming a given content encoding. The Compress encoding (LZW algorithm) is not supported at this time.