Module Qcow_header
module Version : sig ... endmodule CryptMethod : sig ... endmodule Feature : sig ... endtype extension=[|`Unknown of int32 * string|`Backing_file of string|`Feature_name_table of Feature.t list]
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.tval 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 : Qcow_physical.t;offset of the L1 table
refcount_table_offset : Qcow_physical.t;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
include Ppx_sexp_conv_lib.Sexpable.S with type Qcow_header.t := t
val refcounts_per_cluster : t -> int64The number of 16-bit reference counts per cluster
val max_refcount_table_size : t -> int64Compute the maximum size of the refcount table
val l2_tables_required : cluster_bits:int -> int64 -> int64Compute the number of L2 tables required for this size of image
include Qcow_s.SERIALISABLE with type t := t
val sizeof : t -> intThe size of a buffer needed to hold
t
val read : Cstruct.t -> (t * Cstruct.t, [ `Msg of string ]) Result.resultRead a
tfrom 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.resultWrite a
tinto 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 -> stringProduce a pretty human-readable string from a value