Module Qcow_virtual

type t = {
l1_index : int64;
l2_index : int64;
cluster : int64;
}

A virtual address in a qcow image is broken into 3 levels:

  • an index in the L1 table, pointing to
  • an index in the L2 table, pointing to
  • a cluster within which we need an offset
include Ppx_sexp_conv_lib.Sexpable.S with type Qcow_virtual.t := t
val t_of_sexp : Sexplib0.Sexp.t -> t
val sexp_of_t : t -> Sexplib0.Sexp.t
val make : cluster_bits:int -> int64 -> t

make cluster_bits byte computes the address within the file of the virtual byte offset

val to_offset : cluster_bits:int -> t -> int64

to_offset cluster_bits address computes the virtual byte offset of the virtual address

include Qcow_s.PRINTABLE with type t := t
type t

Instances of this type can be pretty-printed

val to_string : t -> string

Produce a pretty human-readable string from a value