package qcow-stream

  1. Overview
  2. Docs
Library offering QCOW streaming capabilities

Install

Dune Dependency

Authors

Maintainers

Sources

qcow-0.12.1.tbz
sha256=c799f3c2eda00b345d37ccd759bcd7b8be8744216b77a38883ff4cd99727ae37
sha512=2160598f460240f9580991e7f7d69e3ef83a2e6ec62268b711840d359cd303d4e14a5d65d89ceb82a6f77b434d06a01af9daa7780808a885f3307909c11dcfd8

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.

OCaml

Innovation. Community. Security.