package clz

  1. Overview
  2. Docs
Compression support for cohttp-lwt client using decompress

Install

Dune Dependency

Authors

Maintainers

Sources

clz-0.1.0.tbz
sha256=98e87ae5b0283d866e5a888db59b5d63311c0c683faa0d3bea181cf28ac3c622
sha512=0fcf11ca574c387102ea642dd124236823eb3f751f93637059ee6ceddb431dda05177d78a467d78b8e7a9210797d97b34322fd941cd7a677d1ac65d1da5068a2

doc/clz.cohttp/Clz_cohttp/index.html

Module Clz_cohttpSource

Sourceexception ClzError of string
Sourceval decompress : (Cohttp_lwt.Response.t * Cohttp_lwt.Body.t) -> string Lwt.t

decompress (resp, body) returns the contents of body, decompressed using the information from the "content-encoding" header or fails with ClzError msg if there are decompression issues or an unknown algorithm is required.

Sourceval update_header : ?force:bool -> Cohttp.Header.t option -> Cohttp.Header.t

update_header h returns a new header including "accept-encoding: gzip,deflate" if h=None or force=true. When force=false (default) it adds the header only if was not already present.

OCaml

Innovation. Community. Security.