package SZXX

  1. Overview
  2. Docs
type 'a t =
  1. | Skip
    (*

    Skip the compressed bytes but still validate the file's integrity

    *)
  2. | Fast_skip
    (*

    Skip over the compressed bytes without attempting to decompress or validate them

    *)
  3. | String
    (*

    Collect the whole decompressed file into a single string

    *)
  4. | Bigstring
    (*

    Collect the whole decompressed file into a single bigstring

    *)
  5. | Fold_string of {
    1. init : 'a;
    2. f : entry -> Base.string -> 'a -> 'a;
    }
    (*

    Fold the file into a final state, in string chunks of ~8192 bytes

    *)
  6. | Fold_bigstring of {
    1. init : 'a;
    2. f : entry -> Bigstringaf.t -> 'a -> 'a;
    }
    (*

    Fold the file into a final state, in bigstring chunks of ~8192 bytes. IMPORTANT: this Bigstringaf.t is volatile! It's only safe to read from it until the end of function f. If you need to access the data again later, copy it in some way before the end of function f.

    *)
  7. | Parse of 'a Angstrom.t
    (*

    Apply an Angstrom.t parser to the file while it is being decompressed without having to fully decompress it first. Parse expects the parser to consume all bytes and leave no trailing junk bytes after a successful parse.

    *)
  8. | Parse_many of {
    1. parser : 'a Angstrom.t;
    2. on_parse : 'a -> Base.unit;
    }
    (*

    Repeatedly apply an Angstrom.t parser to the file while it is being decompressed without having to fully decompress it first. Call on_parse on each parsed value. Parse_many expects the file to end with a complete parse, without trailing junk bytes.

    *)
  9. | Terminate
    (*

    Abruptly terminate processing of the ZIP archive. SZXX stops reading from the Feed.t immediately, without even skipping over the bytes of that entry.

    *)
OCaml

Innovation. Community. Security.