pub(crate) fn parse_records(
        content: &[u8],
        record_info: &[PdbRecord],
        _extra_bytes: u32,
        compression_type: Compression,
    ) -> io::Result<Vec<Record>> {
        let mut new_records = vec![];
        for records in record_info.windows(2) {
            let curr_offset = records[0].offset;
            let id = records[0].id;
            let next_offset = records[1].offset;
            let record_data = if _extra_bytes < next_offset {
                match Record::record_data(curr_offset, next_offset, _extra_bytes, &compression_type, content) {
                    Ok(record) => record,
                    Err(_) => Vec::new(),
                }
            } else {
                Vec::new()
            };

            let record = Record {
                record_data_offset: curr_offset,
                id,
                length: record_data.len(),
                record_data,
            };

            new_records.push(record);
        }

        if let Some(PdbRecord { offset, id }) = record_info.last() {
            new_records.push(Record {
                record_data_offset: *offset,
                id: *id,
                record_data: vec![],
                length: 0,
            });
        }

        Ok(new_records)
    }
/// Gets all records in the specified content
Gets all records in the specified content
Gets all records in the specified content
pub(crate) fn parse_records(
        content: &[u8],
        record_info: &[PdbRecord],
        _extra_bytes: u32,
        compression_type: Compression,
    ) -> io::Result<Vec<Record>> {
        let mut new_records = vec![];
        for records in record_info.windows(2) {
            let curr_offset = records[0].offset;
            let id = records[0].id;
            let next_offset = records[1].offset;
            let record_data = if _extra_bytes < next_offset {
                match Record::record_data(curr_offset, next_offset, _extra_bytes, &compression_type, content) {
                    Ok(record) => record,
                    Err(_) => Vec::new(),
                }
            } else {
                Vec::new()
            };
            let record = Record {
                record_data_offset: curr_offset,
                id,
                length: record_data.len(),
                record_data,
            };
            new_records.push(record);
        }
        if let Some(PdbRecord { offset, id }) = record_info.last() {
            new_records.push(Record {
                record_data_offset: *offset,
                id: *id,
                record_data: vec![],
                length: 0,
            });
        }
        Ok(new_records)
    }
pub ( crate ) fn parse_records ( content : & [ u8 ] , record_info : & [ PdbRecord ] , _extra_bytes : u32 , compression_type : Compression , ) -> io :: Result < Vec < Record > > { let mut new_records = vec ! [ ] ; for records in record_info . windows ( 2 ) { let curr_offset = records [ 0 ] . offset ; let id = records [ 0 ] . id ; let next_offset = records [ 1 ] . offset ; let record_data = if _extra_bytes < next_offset { match Record :: record_data ( curr_offset , next_offset , _extra_bytes , & compression_type , content ) { Ok ( record ) => record , Err ( _ ) => Vec :: new ( ) , } } else { Vec :: new ( ) } ; let record = Record { record_data_offset : curr_offset , id , length : record_data . len ( ) , record_data , } ; new_records . push ( record ) ; } if let Some ( PdbRecord { offset , id } ) = record_info . last ( ) { new_records . push ( Record { record_data_offset : * offset , id : * id , record_data : vec ! [ ] , length : 0 , } ) ; } Ok ( new_records ) }
Gets all records in the specified content
Gets all records in the specified content
content
&[u8]
record_info
&[PdbRecord]
_extra_bytes
u32
compression_type
Compression
content
&[u8]
record_info
&[PdbRecord]
_extra_bytes
u32
compression_type
Compression