package carton-miou

  1. Overview
  2. Docs
Implementation of PACK file in OCaml for Miou

Install

dune-project
 Dependency

Authors

Maintainers

Sources

carton-1.4.0.tbz
sha256=431e7df0e1c25209e502bec2125218921ce2652390d82c4fbd973655814ac247
sha512=f0dafcb8b175605164f2b177f3e4cb22485abdfadb2c36178c81e838c76e28d3a038d63ecbe2c649bbd70c1520ea81db954b9af0bd531b11a8ec08c25a60e95a

doc/carton-miou.unix/Carton_miou_unix/index.html

Module Carton_miou_unixSource

Sourcetype file_descr = Unix.file_descr * int
Sourceval map : file_descr -> pos:int -> int -> Bstr.t
Sourceval index : ?pagesize:int -> ?cachesize:int -> hash_length:int -> ref_length:int -> Fpath.t -> file_descr Classeur.t
Sourceval make : ?pagesize:int -> ?cachesize:int -> ?z:De.bigstring -> ref_length:int -> ?index:(Carton.Uid.t -> Carton.location) -> Fpath.t -> file_descr Carton.t
Sourcetype entry = {
  1. offset : int;
  2. crc : Optint.t;
  3. consumed : int;
  4. size : int;
}
Sourcetype config = {
  1. threads : int option;
  2. pagesize : int option;
  3. cachesize : int option;
  4. ref_length : int;
  5. identify : Carton.identify;
  6. on_entry : max:int -> entry -> unit;
  7. on_object : cursor:int -> Carton.Value.t -> Carton.Uid.t -> unit;
}
Sourceval config : ?threads:int -> ?pagesize:int -> ?cachesize:int -> ?on_entry:(max:int -> entry -> unit) -> ?on_object:(cursor:int -> Carton.Value.t -> Carton.Uid.t -> unit) -> ref_length:int -> Carton.identify -> config
Sourceval compile_on_seq : ?on:(max:int -> entry -> unit) -> identify:Carton.identify -> digest_length:int -> [ `Entry of Carton.First_pass.entry | `Hash of string | `Inflate of (Carton.Kind.t * int) option * string | `Number of int ] Seq.t -> Carton.oracle
Sourceval verify_from_pack : cfg:config -> digest:Carton.First_pass.digest -> Fpath.t -> Carton.status array * string
Sourceval verify_from_idx : cfg:config -> digest:Carton.First_pass.digest -> Fpath.t -> Carton.status array * string
Sourcemodule Window : sig ... end
Sourceval delta : ref_length:int -> load:(Carton.Uid.t -> 'meta -> Carton.Value.t) -> 'meta Cartonnage.Entry.t Seq.t -> 'meta Cartonnage.Target.t Seq.t
Sourceval to_pack : ?with_header:int -> ?with_signature:Carton.First_pass.digest -> ?cursor:int -> ?level:int -> load:(Carton.Uid.t -> 'meta -> Carton.Value.t) -> 'meta Cartonnage.Target.t Seq.t -> string Seq.t
Sourcetype delta = {
  1. source : Carton.Uid.t;
  2. depth : int;
  3. raw : Cachet.Bstr.t;
}
Sourceval entries_of_pack : cfg:config -> digest:Carton.First_pass.digest -> Fpath.t -> (file_descr Carton.t * delta option) Cartonnage.Entry.t array
Sourceval delta_from_pack : ref_length:int -> windows:('fd Carton.t * delta option) Window.t array -> ('fd Carton.t * delta option) Cartonnage.Entry.t Seq.t -> ('fd Carton.t * delta option) Cartonnage.Target.t Seq.t
Sourcetype sort = {
  1. sort : 'a. 'a Cartonnage.Entry.t array list -> int * 'a Cartonnage.Entry.t Seq.t;
}
Sourceval merge : cfg:config -> digest:Carton.First_pass.digest -> sort:sort -> ?level:int -> Fpath.t list -> string Seq.t
Sourceval delete_in_place : cfg:config -> digest:Carton.First_pass.digest -> pack:Fpath.t -> ?level:int -> Carton.Uid.t list -> unit

delete_in_place ~cfg ~digest ~pack uids modifies the PACK file pack in place. Entries whose UID is in uids, together with the old versions of their transitive delta-descendants, become ghost entries: their bytes remain in the file (so the PACK stays structurally parseable) but they are no longer referenced by the IDX. Fresh copies of every descendant are appended at the end of the PACK (direct children as bases, deeper descendants as carbon-copied deltas with recomputed ofs-delta headers). The header object count and trailer hash are updated accordingly. This operation does not reclaim disk space for the removed/replaced entries.

/

Sourceval seq_of_filename : Fpath.t -> string Seq.t