Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
module Version : sig ... end
module CryptMethod : sig ... end
val sexp_of_extension : extension -> Ppx_sexp_conv_lib.Sexp.t
val extension_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> extension
val __extension_of_sexp__ : Ppx_sexp_conv_lib.Sexp.t -> extension
type additional = {
dirty : bool;
corrupt : bool;
lazy_refcounts : bool;
autoclear_features : int64;
refcount_order : int32;
}
Version 3 and above have additional header fields
val sexp_of_additional : additional -> Ppx_sexp_conv_lib.Sexp.t
val additional_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> additional
type t = {
version : Version.t;
backing_file_offset : offset;
offset of the backing file path
*)backing_file_size : int32;
length of the backing file path
*)cluster_bits : int32;
a cluster is 2 ** cluster_bits in size
*)size : int64;
virtual size of the image
*)crypt_method : CryptMethod.t;
l1_size : int32;
number of 8-byte entries in the L1 table
*)l1_table_offset : offset;
offset of the L1 table
*)refcount_table_offset : offset;
offset of the refcount table
*)refcount_table_clusters : int32;
size of the refcount table in clusters
*)nb_snapshots : int32;
the number of internal snapshots
*)snapshots_offset : offset;
offset of the snapshot header
*)additional : additional option;
for version 3 or higher
*)extensions : extension list;
for version 3 or higher
*)}
The qcow2 header
val refcounts_per_cluster : t -> int64
The number of 16-bit reference counts per cluster
val max_refcount_table_size : t -> int64
Compute the maximum size of the refcount table
Compute the number of L2 tables required for this size of image
include Qcow_s.SERIALISABLE with type t := t
val sizeof : t -> int
The size of a buffer needed to hold t
val read : Cstruct.t -> (t * Cstruct.t, [ `Msg of string ]) Result.result
Read a t
from the given buffer and return it, along with the unused remainder of the buffer. If the buffer cannot be parsed then return an error.
val write : t -> Cstruct.t -> (Cstruct.t, [ `Msg of string ]) Result.result
Write a t
into the given buffer. If the buffer is too small, then return an error. Return the unused remainder of the buffer.
include Qcow_s.PRINTABLE with type t := t
val to_string : t -> string
Produce a pretty human-readable string from a value