package irmin-pack
- Overview
- No Docs
You can search for identifiers within the package.
in-package search v0.2.0
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=6aa5ba4c6a0233747d4bd3ab396f2b3a33bb80f9d8ed4a178c83a035033c0e52
sha512=8a5506a57e8569a11c883ca25b3c60ae7a9a03c2da111668193d7b4296434c43f1a310e78f189e4b38c234da790259d2961c6a0ae481282c18bb97f618fccfb6
doc/irmin-pack.unix/Irmin_pack_unix/Dispatcher/Make/argument-1-Fm/Sparse/index.html
Module Fm.Sparse
module Io = Iomodule Errs : Io_errors.S with module Io = Ioval open_ro :
mapping_size:int ->
mapping:string ->
data:string ->
(t, [> open_error ]) resultopen_ro ~mapping_size ~mapping ~data returns a new read-only view of the sparse file, represented on disk by two files named mapping and data. The mapping file is expected to have size at least mapping_size (and the rest is ignored if the file is larger).
val close : t -> (unit, [> Io.close_error ]) resultClose the underlying files.
val read_exn : t -> off:Optint.Int63.t -> len:int -> bytes -> unitread_exn t ~off ~len buffer writes into buffer the bytes from off to off+len.
val read_range_exn :
t ->
off:Optint.Int63.t ->
min_len:int ->
max_len:int ->
bytes ->
intSame as read_exn, the amount read is max_len if possible or at least min_len if reading more would step over a hole in the sparse file.
Returns the actually read length.
val next_valid_offset : t -> off:Optint.Int63.t -> Optint.Int63.t optionnext_valid_offset t ~off returns Some off' such that off' is the smallest readable offset larger or equal to off. This enables jumping over a sparse hole to the next compact range of data.
val iter :
t ->
(off:Optint.Int63.t -> len:int -> unit) ->
(unit, Errs.t) resultiter t f calls f on each (off,len) pair in mapping. Only used for testing and debugging.
It is guaranteed for the offsets to be iterated in monotonic order.
It is guaranteed that entries don't overlap.
The exceptions raised by f are caught and returned (as long as they are known by Errs).
module Wo : sig ... endmodule Ao : sig ... end