package qcow-types

  1. Overview
  2. Docs
Minimal set of dependencies for qcow-stream, shared with qcow

Install

dune-project
 Dependency

Authors

Maintainers

Sources

qcow-0.15.0.tbz
sha256=da9c7d259e2d7067b7eccd3fecbed79bf339af7bac223766451a5f3d5303e32b
sha512=629bafa73a69b460a521eb7aa46a3ca5b0aa29445df49eaecdac3f2cfca78684ba7d5db1b20b0af731e3830561d77d844983ee51f0eff17c4fa8941023920e8f

doc/qcow-types/Qcow_virtual/index.html

Module Qcow_virtualSource

Sourcetype t = {
  1. l1_index : int64;
  2. l2_index : int64;
  3. 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 Sexplib0.Sexpable.S with type t := t
Sourceval t_of_sexp : Sexplib0.Sexp.t -> t
Sourceval sexp_of_t : t -> Sexplib0.Sexp.t
Sourceval make : cluster_bits:int -> int64 -> t

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

Sourceval 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
Sourceval to_string : t -> string

Produce a pretty human-readable string from a value