pub struct EsePage {
pub page_number: u32,
pub data: Vec<u8>,
}Expand description
A single ESE database page.
Fields§
§page_number: u32Page number (1-based).
data: Vec<u8>Raw page data. Parse flags via EsePage::parse_header.
Implementations§
Source§impl EsePage
impl EsePage
Sourcepub const HEADER_SIZE: usize = 40
pub const HEADER_SIZE: usize = 40
Minimum size of the Vista+ page header.
Sourcepub fn parse_header(&self) -> Result<EsePageHeader, EseError>
pub fn parse_header(&self) -> Result<EsePageHeader, EseError>
Parse the Vista+ 40-byte page header from self.data.
Layout (all little-endian):
- 0x00 (4): XOR checksum
- 0x04 (4): ECC checksum (Vista+ addition)
- 0x08 (8): database time (JET_DBTIME)
- 0x10 (4): previous page number
- 0x14 (4): next page number
- 0x18 (4): FDP object ID
- 0x1C (2): available data size
- 0x1E (2): available uncommitted data
- 0x20 (2): available data offset
- 0x22 (2): available page tag count
- 0x24 (4): page flags
§Errors
Returns EseError::Corrupt if self.data is shorter than 40 bytes.
Return the tag entries from the end of the page.
Tags are stored at the END of the page, growing downward. Each tag is 4 bytes: bits 0-14 = value offset, bit 15 = flag, bits 16-30 = value size, bit 31 = flag.
Returns Vec<(offset, size)> for each tag.
§Errors
Returns EseError::TagArrayOverflow if the page is too short to hold the
declared tag count.
Sourcepub fn raw_data_area(&self) -> Result<&[u8], EseError>
pub fn raw_data_area(&self) -> Result<&[u8], EseError>
Return the raw data area of the page: bytes from the end of the 40-byte page header to the start of the tag array at the page end.
This span contains ALL record bytes laid out sequentially, including bytes that may fall before the smallest tag offset (common in ESE’s cumulative key-prefix-compression format). Scanning this area directly (rather than individual tags) is the correct way to read real ESE catalog pages.
§Errors
Returns EseError::Corrupt if the header cannot be parsed.
Sourcepub fn record_data(&self, index: usize) -> Result<&[u8], EseError>
pub fn record_data(&self, index: usize) -> Result<&[u8], EseError>
Return the raw record data slice for tag at index.
Tag 0 is the page header tag. Data records start at tag 1.
§Errors
Returns EseError::Corrupt if index is beyond the tag count, or
EseError::RecordTooShort if the tag’s data range is out of bounds.