package decompress

  1. Overview
  2. Docs
Implementation of Zlib in OCaml

Install

dune-project
 Dependency

Authors

Maintainers

Sources

decompress-v0.8.1.tbz
sha256=903b0926fe2380caf156fcdefa38bc48794f7fcf7d6befd1719aab3f8c0f1188
md5=6c600b0188516d405510cd95d8d82481

doc/src/decompress.impl/decompress_safe.ml.html

Source file decompress_safe.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
module B = Decompress_b

type ro = [`Rd]
type wo = [`Wr]
type ('a, 'i) t = 'i constraint 'a = [< `Rd | `Wr]

let rw : 'i B.t -> 'i -> ([ro | wo], 'i) t = fun _p v -> v
let ro : 'i B.t -> 'i -> (ro, 'i) t = fun _p v -> v
let wo : 'i B.t -> 'i -> (wo, 'i) t = fun _p v -> v
let length = B.length
let get = B.get
let set = B.set
let get_16 = B.get_16
let get_32 = B.get_32
let get_64 = B.get_64
let sub_ro = B.sub
let sub_rw = B.sub
let fill = B.fill
let blit = B.blit
let blit2 = B.blit2
let pp = B.pp
let to_string = B.to_string

let adler32 : type a.
    a B.t -> a -> int -> int -> Checkseum.Adler32.t -> Checkseum.Adler32.t =
  function
  | B.Bytes -> Checkseum.Adler32.digest_bytes
  | B.Bigstring -> Checkseum.Adler32.digest_bigstring

external unsafe : ('a, 'i) t -> 'i = "%identity"