pub struct BulletproofReader { /* private fields */ }Use SSTableReader instead. This reader is EXPERIMENTAL and not suitable for production. See Issue #190.
Expand description
Bulletproof SSTable reader with automatic format detection
§Deprecated
This reader is DEPRECATED for production use (Issue #190).
Use crate::storage::sstable::reader::SSTableReader instead.
Implementations§
Source§impl BulletproofReader
impl BulletproofReader
Sourcepub fn open<P: AsRef<Path>>(sstable_path: P) -> Result<Self>
pub fn open<P: AsRef<Path>>(sstable_path: P) -> Result<Self>
Create a new bulletproof reader from any SSTable file path
This will automatically detect the format version and set up proper compression handling if needed.
Sourcepub fn read_raw_data(&mut self, offset: u64, length: usize) -> Result<Vec<u8>>
pub fn read_raw_data(&mut self, offset: u64, length: usize) -> Result<Vec<u8>>
Read raw data from the SSTable at specified offset and length
This automatically handles compression if present
Sourcepub fn read_all_data(&mut self) -> Result<Vec<u8>>
pub fn read_all_data(&mut self) -> Result<Vec<u8>>
Read the entire SSTable data (for debugging)
Sourcepub fn parse_sstable_data(&mut self) -> Result<Vec<SSTableEntry>>
pub fn parse_sstable_data(&mut self) -> Result<Vec<SSTableEntry>>
Parse SSTable data using format-specific parser
This is where we’ll implement the actual SSTable parsing based on the detected format version
Sourcepub fn parse_oa_header(&self, data: &[u8]) -> Result<OaFormatHeader>
pub fn parse_oa_header(&self, data: &[u8]) -> Result<OaFormatHeader>
Parse Cassandra ‘oa’ format header (EXPERIMENTAL)
⚠️ EXPERIMENTAL: This header parsing implementation is based on reverse engineering and may not match the official Cassandra Big format specification. The magic number check and field interpretations should be verified against CEP-25 specification.
This function strictly parses only the 32-byte header portion as per the Cassandra SSTable format specification, handling oversized input by reading only the first 32 bytes.
Sourcepub fn read_vint(&self, data: &[u8]) -> Result<(u64, usize)>
pub fn read_vint(&self, data: &[u8]) -> Result<(u64, usize)>
Read Variable Length Integer (VInt) from data using Cassandra format
Sourcepub fn info(&self) -> &SSTableInfo
pub fn info(&self) -> &SSTableInfo
Get information about the SSTable
Sourcepub fn compression_info(&self) -> Option<&CompressionInfo>
pub fn compression_info(&self) -> Option<&CompressionInfo>
Get compression information if available
Sourcepub fn cache_stats(&self) -> Option<(usize, usize)>
pub fn cache_stats(&self) -> Option<(usize, usize)>
Get cache statistics if compression is enabled
Sourcepub async fn get_header(&self) -> Result<SSTableHeader>
pub async fn get_header(&self) -> Result<SSTableHeader>
Get header information (for compatibility)
Sourcepub async fn stream_entries(&self) -> Result<SSTableEntryStream>
pub async fn stream_entries(&self) -> Result<SSTableEntryStream>
Stream entries from the SSTable (for compatibility)
Sourcepub fn get_file_path(&self) -> &Path
pub fn get_file_path(&self) -> &Path
Get file path for the SSTable
Sourcepub async fn verify_integrity(&self) -> Result<bool>
pub async fn verify_integrity(&self) -> Result<bool>
Verify integrity of the SSTable