package lz4

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Source file LZ4_generated.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
module CI = Cstubs_internals

external caml__1_LZ4_compressBound : int -> int = "caml__1_LZ4_compressBound" 

external caml__2_LZ4_compress_default
  : bytes CI.ocaml -> bytes CI.ocaml -> int -> int -> int
  = "caml__2_LZ4_compress_default" 

external caml__3_LZ4_compress_default
  : _ CI.fatptr -> _ CI.fatptr -> int -> int -> int
  = "caml__3_LZ4_compress_default" 

external caml__4_LZ4_decompress_safe
  : bytes CI.ocaml -> bytes CI.ocaml -> int -> int -> int
  = "caml__4_LZ4_decompress_safe" 

external caml__5_LZ4_decompress_safe
  : _ CI.fatptr -> _ CI.fatptr -> int -> int -> int
  = "caml__5_LZ4_decompress_safe" 

external caml__6_LZ4_versionNumber : unit -> int
  = "caml__6_LZ4_versionNumber" 

type 'a result = 'a
type 'a return = 'a
type 'a fn =
 | Returns  : 'a CI.typ   -> 'a return fn
 | Function : 'a CI.typ * 'b fn  -> ('a -> 'b) fn
let map_result f x = f x
let returning t = Returns t
let (@->) f p = Function (f, p)
let foreign : type a b. string -> (a -> b) fn -> (a -> b) =
  fun name t -> match t, name with
| Function (CI.Void, Returns (CI.Primitive CI.Int)), "LZ4_versionNumber" ->
  caml__6_LZ4_versionNumber
| Function
    (CI.Pointer _,
     Function
       (CI.Pointer _,
        Function
          (CI.Primitive CI.Int,
           Function (CI.Primitive CI.Int, Returns (CI.Primitive CI.Int))))),
  "LZ4_decompress_safe" ->
  (fun x2 x4 x6 x7 ->
    let CI.CPointer x5 = x4 in
    let CI.CPointer x3 = x2 in caml__5_LZ4_decompress_safe x3 x5 x6 x7)
| Function
    (CI.OCaml CI.Bytes,
     Function
       (CI.OCaml CI.Bytes,
        Function
          (CI.Primitive CI.Int,
           Function (CI.Primitive CI.Int, Returns (CI.Primitive CI.Int))))),
  "LZ4_decompress_safe" -> caml__4_LZ4_decompress_safe
| Function
    (CI.Pointer _,
     Function
       (CI.Pointer _,
        Function
          (CI.Primitive CI.Int,
           Function (CI.Primitive CI.Int, Returns (CI.Primitive CI.Int))))),
  "LZ4_compress_default" ->
  (fun x12 x14 x16 x17 ->
    let CI.CPointer x15 = x14 in
    let CI.CPointer x13 = x12 in caml__3_LZ4_compress_default x13 x15 x16 x17)
| Function
    (CI.OCaml CI.Bytes,
     Function
       (CI.OCaml CI.Bytes,
        Function
          (CI.Primitive CI.Int,
           Function (CI.Primitive CI.Int, Returns (CI.Primitive CI.Int))))),
  "LZ4_compress_default" -> caml__2_LZ4_compress_default
| Function (CI.Primitive CI.Int, Returns (CI.Primitive CI.Int)),
  "LZ4_compressBound" -> caml__1_LZ4_compressBound
| _, s ->  Printf.ksprintf failwith "No match for %s" s


let foreign_value : type a. string -> a Ctypes.typ -> a Ctypes.ptr =
  fun name t -> match t, name with
| _, s ->  Printf.ksprintf failwith "No match for %s" s
OCaml

Innovation. Community. Security.