pelite 0.10.0

Lightweight, memory-safe, zero-allocation library for reading and navigating PE binaries.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12

#[cfg(test)]
pub(crate) fn test<'a, P: super::Pe<'a>>(pe: P) -> crate::Result<()> {
	let rich_structure = pe.rich_structure()?;
	let _checksum = rich_structure.checksum();

	let records: Vec<_> = rich_structure.records().collect();
	let mut encoded = vec![0u32; rich_structure.image().len()];
	let _ = rich_structure.encode(&records, &mut encoded);

	Ok(())
}