Skip to content

vasi/qcow2-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

qcow2

This crate can parse and read qcow2 virtual disks, as used by qemu and other emulators.

Qcow2 is a flexible format for disk images, that only allocates space as needed. It has many other interesting features.

Build Status Crates.io

Example

extern crate positioned_io;
extern crate qcow2;

use positioned_io::ReadAt;
use qcow2::Qcow2;

// Open a qcow2 file.
let file = File::open("image.qcow2")?;
let qcow = Qcow2::open(file)?;

// Read some data from the middle.
let reader = qcow.reader()?;
let mut buf = vec![0, 4096];
reader.read_exact_at(5 * 1024 * 1024, &mut buf)?;

Documentation

http://vasi.github.io/qcow2-rs/qcow2/

Usage

This crate works with Cargo and is on crates.io. Add it to your Cargo.toml like so:

[dependencies]
qcow2 = "0.1.0"

About

Rust support for qcow2 virtual disk images.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages