diff --git a/src/pe/mod.rs b/src/pe/mod.rs index 2336fddc..712d9f3b 100644 --- a/src/pe/mod.rs +++ b/src/pe/mod.rs @@ -76,6 +76,11 @@ pub struct PE<'a> { } impl<'a> PE<'a> { + /// Returns a view in the raw bytes of this PE binary + pub fn bytes(&self) -> &'a [u8] { + self.bytes + } + /// Reads a PE binary from the underlying `bytes` pub fn parse(bytes: &'a [u8]) -> error::Result { Self::parse_with_opts(bytes, &options::ParseOptions::default())