package qcow-stream

  1. Overview
  2. Docs
Library offering QCOW streaming capabilities

Install

dune-project
 Dependency

Authors

Maintainers

Sources

qcow-0.12.2.tbz
sha256=bb12f9f37ad69b54af000e64add460034ea09102687aacb4f748488afe83c868
sha512=883fc7a1d98ee1c272408829050a0b56c785664bc16c0820440d638039e08e55c458813728c2f8c8ac49ceea582a79c3d93142664d5134f87e6bb6618a6b8f66

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 * int64 Qcow_types.Cluster.Map.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 -> int64 Qcow_types.Cluster.Map.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 * int64 Qcow_types.Cluster.Map.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.