pub struct ZipExtractor<R: Read + Seek> { /* private fields */ }Expand description
A ULS ZIP archive that can stream DAT files.
Implementations§
Source§impl ZipExtractor<BufReader<File>>
impl ZipExtractor<BufReader<File>>
Sourcepub fn stats(&mut self) -> Result<ArchiveStats, ZipError>
pub fn stats(&mut self) -> Result<ArchiveStats, ZipError>
Get statistics about the archive.
Sourcepub fn count_all_records(
&mut self,
) -> Result<HashMap<String, usize>, ParseError>
pub fn count_all_records( &mut self, ) -> Result<HashMap<String, usize>, ParseError>
Count records in all DAT files in the archive.
Source§impl<R: Read + Seek> ZipExtractor<R>
impl<R: Read + Seek> ZipExtractor<R>
Sourcepub fn new(archive: ZipArchive<R>) -> Self
pub fn new(archive: ZipArchive<R>) -> Self
Create from an existing archive reader.
Sourcepub fn list_dat_files(&mut self) -> Vec<String>
pub fn list_dat_files(&mut self) -> Vec<String>
List all DAT files in the archive.
Sourcepub fn list_files(&mut self) -> Vec<String>
pub fn list_files(&mut self) -> Vec<String>
List all files in the archive.
Sourcepub fn file_size(&mut self, name: &str) -> Result<u64, ZipError>
pub fn file_size(&mut self, name: &str) -> Result<u64, ZipError>
Get the size of a file in the archive.
Sourcepub fn stream_dat(&mut self, name: &str) -> Result<impl Read + '_, ZipError>
pub fn stream_dat(&mut self, name: &str) -> Result<impl Read + '_, ZipError>
Stream a DAT file from the archive without extracting to disk. Returns a reader that can be used with DatReader.
Sourcepub fn process_dat_streaming<F>(
&mut self,
dat_name: &str,
callback: F,
) -> Result<usize, ParseError>
pub fn process_dat_streaming<F>( &mut self, dat_name: &str, callback: F, ) -> Result<usize, ParseError>
Process a DAT file streaming from the archive, calling a callback for each record. This is the most memory-efficient way to process large ULS archives.
Sourcepub fn get_file_creation_date(&mut self) -> Option<String>
pub fn get_file_creation_date(&mut self) -> Option<String>
Extract the canonical file creation date from the counts file in the archive.
FCC data files contain a counts file with a line like:
File Creation Date: Sun Jan 18 12:01:25 EST 2026
This is the authoritative date for when the FCC generated the data file. Returns None if the counts file doesn’t exist or can’t be parsed.