pub struct Reader { /* private fields */ }Implementations§
Source§impl Reader
impl Reader
pub fn open(path: &Path) -> Result<Self>
pub fn superblock(&self) -> &Superblock
pub fn sections(&self) -> &[SectionEntry]
pub fn tracks(&self) -> &[TrackRecord]
pub fn dict(&self) -> &[u32]
pub fn chunks(&self) -> &[ChunkRecord]
pub fn segments(&self) -> &[SegmentRecord]
pub fn meta(&self) -> &[(String, String)]
pub fn integrity(&self) -> &Integrity
pub fn track(&self, track_id: u32) -> Result<&TrackRecord>
Sourcepub fn segments_for_track(&self, track_id: u32) -> Vec<&SegmentRecord>
pub fn segments_for_track(&self, track_id: u32) -> Vec<&SegmentRecord>
Segments of one track, ordered by presentation time.
Sourcepub fn read_chunk_stored(&mut self, index: u32) -> Result<(Vec<u8>, u32, u32)>
pub fn read_chunk_stored(&mut self, index: u32) -> Result<(Vec<u8>, u32, u32)>
Read one chunk payload exactly as stored (possibly zstd-compressed), without decompressing or verifying. Returns (stored bytes, flags, len_raw). Intended for wire passthrough: the receiver decompresses and verifies the BLAKE3 identity against the raw bytes.
Sourcepub fn read_chunk(&mut self, index: u32) -> Result<Vec<u8>>
pub fn read_chunk(&mut self, index: u32) -> Result<Vec<u8>>
Read, decompress and verify one chunk payload.
Sourcepub fn segment_bytes(&mut self, segment: &SegmentRecord) -> Result<Vec<u8>>
pub fn segment_bytes(&mut self, segment: &SegmentRecord) -> Result<Vec<u8>>
Reconstruct a segment payload: ordered concatenation of its chunks.
Sourcepub fn track_init_bytes(&mut self, track_id: u32) -> Result<Vec<u8>>
pub fn track_init_bytes(&mut self, track_id: u32) -> Result<Vec<u8>>
Reconstruct a track’s init payload (e.g. CMAF init segment).
Sourcepub fn embedded_signature(&self) -> Option<([u8; 64], [u8; 32])>
pub fn embedded_signature(&self) -> Option<([u8; 64], [u8; 32])>
Embedded content signature (sig, pubkey) if present, parsed from meta.
Sourcepub fn verify_signature(&self) -> Result<SignatureStatus>
pub fn verify_signature(&self) -> Result<SignatureStatus>
Check the embedded Ed25519 content signature, if any. Returns
Unsigned when absent, Valid(pubkey) when it verifies, and an error
when present but invalid. Callers decide whether the returned pubkey
is trusted.
Sourcepub fn verify(&mut self) -> Result<VerifyReport>
pub fn verify(&mut self) -> Result<VerifyReport>
Full verification: every chunk hash, the Merkle root against the integrity section, and the DATA section hash from the directory.