Skip to main content

vhdx/
lib.rs

1//! Pure-Rust read-only VHDX container reader.
2//!
3//! Decodes the MS-VHDX outer container format and exposes a `Read + Seek`
4//! interface over the virtual sector stream.
5//!
6//! # Supported formats
7//! - VHDX Version 1 (Windows 8+ / Server 2012+)
8//! - Dynamic disks
9//! - Fixed disks
10//!
11//! # Layer
12//! CONTAINER — equivalent role to `ewf` for E01 images.
13#![cfg_attr(test, allow(clippy::unwrap_used, clippy::expect_used))]
14
15mod backing;
16mod bat;
17mod bytes;
18mod error;
19pub mod header;
20mod log;
21pub mod metadata;
22mod reader;
23pub mod region;
24#[cfg(feature = "vfs")]
25mod vfs;
26
27pub use backing::{Backing, ReadSeekSend};
28pub use error::{Result, VhdxError};
29pub use reader::VhdxReader;
30#[cfg(feature = "vfs")]
31pub use vfs::VhdxSource;
32
33/// Well-known VHDX file magic (first 8 bytes of every VHDX file).
34pub const FILE_MAGIC: &[u8; 8] = b"vhdxfile";