package camlpdf

  1. Overview
  2. Docs
Read, write and modify PDF files

Install

Dune Dependency

Authors

Maintainers

Sources

v2.7.1.tar.gz
md5=5ec4c14006769e68be97a3ed70d46bc7
sha512=2480a282a6ce09444ed14a3f41561375ecf7e3c57f7559a48ad9791d9f824e59820bfd39aa36910ff6bdc9b160cef76ab90dbbfe628c836c3f5c5081dfd5e452

doc/camlpdf/Pdfflate/index.html

Module Pdfflate

Interface to miniz.c via Zlib-like functions

This is very slightly modified from Leroy's CamlZip.

exception Error of string * string

Raised on an error in either compression or decompression.

val compress : ?level:int -> ?header:bool -> (bytes -> int) -> (bytes -> int -> unit) -> unit

Compress data. The string -> int function is an input: given a buffer, it writes some data to it, returning the number of bytes written. The string -> int -> unit function is an output: giving a buffer and a number of compressed bytes written. The optional argument level gives the zlib compression level (the default is 6). The optional argument header will, if true, output a zlib header (the default is true).

val uncompress : ?header:bool -> (bytes -> int) -> (bytes -> int -> unit) -> unit

Uncompress data. The input and output functions are as described for compress. If header is true, a zlib header is expected (the default is true).

OCaml

Innovation. Community. Security.