package clz
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=98e87ae5b0283d866e5a888db59b5d63311c0c683faa0d3bea181cf28ac3c622
sha512=0fcf11ca574c387102ea642dd124236823eb3f751f93637059ee6ceddb431dda05177d78a467d78b8e7a9210797d97b34322fd941cd7a677d1ac65d1da5068a2
doc/clz/Clz/index.html
Module ClzSource
The clz.cohttp library contains the module Clz_cohttp, which provides some helpers to add the necessary accept headers and to decompress the response bodies. It is possible to make the implementation seamlessly work with streamed response bodies and direct output to file, PRs are always welcome.
val inflate_string :
algorithm:[< `Deflate | `Gzip ] ->
string ->
(string, [> `Msg of string ]) resultinflate_string ~algorithm body returns body compressed using algorithm or the respective error message.
val deflate_string :
algorithm:[< `Deflate | `Gzip ] ->
cfg:unit Gz.Higher.configuration ->
?level:int ->
string ->
stringdeflate_string ~algorithm ~cfg ?level body extract the content of body using algorithm or the respective error message. If the algorithm is gzip, it will use cfg and level for the decompression.
deflate_string requires an external configuration to make the library compatible with mirage and js_of_ocaml. If you don't mind linking against unix you can use Clz_cfg.cfg, part of the clz.cfg sub-library.