Module Snappy

module Snappy: sig .. end

Snappy compression/uncompression


exception Error of string

This exception is raised on malformed input

Easy interface

val compress : string -> string
val is_valid : string -> bool
val get_uncompressed_size : string -> int
val uncompress : string -> string

Substring interface

function_sub input offset length is equivalent to function but operates on the substring of the given input string, defined by offset and length, raising Invalid_argument when offset and length do not represent a valid substring of input

val compress_sub : string -> int -> int -> string
val is_valid_sub : string -> int -> int -> bool
val get_uncompressed_size_sub : string -> int -> int -> int
val uncompress_sub : string -> int -> int -> string

Unsafe interface

Substring interface without bounds checking

val unsafe_compress : string -> int -> int -> string
val unsafe_is_valid : string -> int -> int -> bool
val unsafe_get_uncompressed_size : string -> int -> int -> int
val unsafe_uncompress : string -> int -> int -> string