package qcow-stream

  1. Overview
  2. Docs
Library offering QCOW streaming capabilities

Install

dune-project
 Dependency

Authors

Maintainers

Sources

qcow-0.15.0.tbz
sha256=da9c7d259e2d7067b7eccd3fecbed79bf339af7bac223766451a5f3d5303e32b
sha512=629bafa73a69b460a521eb7aa46a3ca5b0aa29445df49eaecdac3f2cfca78684ba7d5db1b20b0af731e3830561d77d844983ee51f0eff17c4fa8941023920e8f

doc/qcow-stream/Qcow_stream/index.html

Module Qcow_streamSource

Sourcemodule Header = Qcow_header
Sourcemodule Cache = Qcow_cache
Sourceexception Reference_outside_file of int64 * int64
Sourceval start_stream_decode : Lwt_unix.file_descr -> (int64 * int32 * int64 ref * Qcow_mapping.t) Lwt.t

Decodes QCOW header and tables from the beginning of the stream, constructing a map of data clusters. Returns (virtual_size, cluster_bits, last_read_cluster, data_cluster_map)

Sourceval copy_data : progress_cb:(int -> unit) -> int64 ref -> int32 -> Lwt_unix.file_descr -> Lwt_unix.file_descr -> Qcow_mapping.t -> unit Lwt.t

copy_data last_read_cluster cluster_bits input_fd output_fd data_cluster_map Copies data cluster-by-cluster concurrently

Sourceval stream_decode : ?progress_cb:(int -> unit) -> ?header_info:(int64 * int32 * int64 ref * Qcow_mapping.t) -> Unix.file_descr -> string -> unit

stream_decode ?progress_cb ?header_info fd output_path decodes the input QCOW stream from fd, writing out the raw file to output_path.

Accepts header_info returned by start_stream_decode if the header has already been parsed separately (to determine the virtual size, for example).

If provided, progress_cb is a callback that will be called with integer percentage values representing copying progress.