Compression(3) OCaml library Compression(3)

# [NAME](#NAME)

Compression - no description

# [Module](#Module)

Module Compression

# [Documentation](#Documentation)

Module **Compression**  
: **sig end**

*val output\_value* : **out\_channel -&gt; 'a -&gt; unit**

**Compression.output\_value chan v** writes the representation of **v** on channel **chan** . If compression is supported, the marshaled data representing value **v** is compressed before being written to channel **chan** . If compression is not supported, this function behaves like **output\_value** .

*val input\_value* : **in\_channel -&gt; 'a**

**Compression.input\_value chan** reads from channel **chan** the byte representation of a structured value, as produced by **Compression.output\_value** , and reconstructs and returns the corresponding value. If compression is not supported, this function behaves like **input\_value** .

*val compression\_supported* : **bool**

Reports whether compression is supported.

2026-09-04 OCamldoc

---

Document: Compression(3o) from ocaml 5.5.1-r0 (Chainguard OS)
Source: https://github.com/ocaml/ocaml
