vhd-format

Pure OCaml library to read/write VHD format data
Library vhd-format
Module Vhd_format . F . Header
type t = {
table_offset : int64;(*

absolute byte offset of the BAT

*)
max_table_entries : int;(*

the maximum number of blocks

*)
block_size_sectors_shift : int;(*

each block is 2 ** block_size_sectors_shift sectors in size

*)
checksum : int32;(*

ones-complement checksum of the header

*)
parent_unique_id : Uuidm.t;(*

if a differencing disk, this is the 128-bit UUID of the parent

*)
parent_time_stamp : int32;(*

modification time stamp of the parent disk, as seconds since midnight Jan 1 2000

*)
parent_unicode_name : int array;(*

parent disk filename

*)
parent_locators : Parent_locator.t array;(*

up to 8 different pointers to the parent disk image

*)
}
val create : table_offset:int64 -> current_size:int64 -> ?block_size_sectors_shift:int -> ?checksum:int32 -> ?parent_unique_id:Uuidm.t -> ?parent_time_stamp:int32 -> ?parent_unicode_name:int array -> ?parent_locators:Parent_locator.t array -> unit -> t
val equal : t -> t -> bool
val to_string : t -> string
val set_parent : t -> string -> t

set_parent t new_parent updates the parent locators and unicode name

val compute_checksum : t -> int32

compute the expected checksum value

val sizeof_bitmap : t -> int
val default_block_size : int
val default_block_size_sectors_shift : int
val sizeof : int
val marshal : Cstruct.t -> t -> t
val unmarshal : Cstruct.t -> ( t, exn ) result