tiny_httpd/tiny_httpd_camlzip/Tiny_httpd_camlzip/index.html
2023-08-08 16:50:07 -04:00

2 lines
No EOL
2.4 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Tiny_httpd_camlzip (tiny_httpd_camlzip.Tiny_httpd_camlzip)</title><link rel="stylesheet" href="../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 1.5.3"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div class="content"><header><nav><a href="../index.html">Up</a> <a href="../index.html">tiny_httpd_camlzip</a> &#x00BB; Tiny_httpd_camlzip</nav><h1>Module <code>Tiny_httpd_camlzip</code></h1><p>Middleware for compression.</p><p>This uses camlzip to provide deflate compression/decompression. If installed, the middleware will compress responses' bodies when they are streams or fixed-size above a given limit (but it will not compress small, fixed-size bodies).</p></header><dl><dt class="spec value" id="val-middleware"><a href="#val-middleware" class="anchor"></a><code><span class="keyword">val</span> middleware : <span>?&#8288;compress_above:int</span> <span>&#45;&gt;</span> <span>?&#8288;buf_size:int</span> <span>&#45;&gt;</span> unit <span>&#45;&gt;</span> <a href="../../tiny_httpd/Tiny_httpd_server/Middleware/index.html#type-t">Tiny_httpd_server.Middleware.t</a></code></dt><dd><p>Middleware responsible for deflate compression/decompression.</p><dl><dt>parameter compress_above</dt><dd><p>threshold, in bytes, above which a response body that has a known content-length is compressed. Stream bodies are always compressed.</p></dd></dl><dl><dt>parameter buf_size</dt><dd><p>size of the underlying buffer for compression/decompression</p></dd></dl><dl><dt>since</dt><dd>0.11</dd></dl></dd></dl><dl><dt class="spec value" id="val-setup"><a href="#val-setup" class="anchor"></a><code><span class="keyword">val</span> setup : <span>?&#8288;compress_above:int</span> <span>&#45;&gt;</span> <span>?&#8288;buf_size:int</span> <span>&#45;&gt;</span> <a href="../../tiny_httpd/Tiny_httpd_server/index.html#type-t">Tiny_httpd_server.t</a> <span>&#45;&gt;</span> unit</code></dt><dd><p>Install middleware for tiny_httpd to be able to encode/decode compressed streams</p><dl><dt>parameter compress_above</dt><dd><p>threshold above with string responses are compressed</p></dd></dl><dl><dt>parameter buf_size</dt><dd><p>size of the underlying buffer for compression/decompression</p></dd></dl></dd></dl></div></body></html>