DataBuffer in binaryninja::data_buffer - Rust

pub struct DataBuffer(/* private fields */);

Implementations§

Source§

impl DataBuffer

Source

pub fn new(data: &[u8]) -> Self

Source

pub fn get_data(&self) -> &[u8]

Source

pub fn get_data_at(&self, offset: usize) -> &[u8]

Source

pub fn get_slice(&self, start: usize, len: usize) -> Option<Self>

Create a copy of a especified part of the data

Source

pub unsafe fn set_len(&mut self, len: usize)

change the size of the allocated data, if new size is bigger data is need to be initialized

Source

pub fn clear(&self)

set the size to 0

Source

pub fn assign(dst: &mut Self, src: &Self)

Copy the contents of src into dst

Source

pub fn append(dst: &mut Self, src: &Self)

Concat the contents of src into dst

Source

pub fn append_data(&self, data: &[u8])

concat the contents of data into self

Source

pub unsafe fn byte_at(&self, offset: usize) -> u8

Return the byte at offset

Source

pub unsafe fn set_byte_at(&mut self, offset: usize, byte: u8)

Set the value of the byte at offset

Source

pub fn set_data(&mut self, data: &[u8])

Source

pub fn to_escaped_string( &self, null_terminates: bool, escape_printable: bool, ) -> String

Source

pub fn from_escaped_string(value: &str) -> Self

Source

pub fn to_base64(&self) -> String

Source

pub fn from_base64(value: &str) -> Self

Source

pub fn zlib_compress(&self) -> Self

Source

pub fn zlib_decompress(&self) -> Self

Source

pub fn lzma_decompress(&self) -> Self

Source

pub fn lzma2_decompress(&self) -> Self

Source

pub fn xz_decompress(&self) -> Self

Source

pub fn len(&self) -> usize

Source

pub fn is_empty(&self) -> bool

Trait Implementations§

Auto Trait Implementations§

§

impl Freeze for DataBuffer

§

impl RefUnwindSafe for DataBuffer

§

impl !Send for DataBuffer

§

impl !Sync for DataBuffer

§

impl Unpin for DataBuffer

§

impl UnwindSafe for DataBuffer

Blanket Implementations§