Currently, the LocalZipStorageHandler reopens the ZIP file for each WARC record lookup and when fetching the index. This approach is inefficient and should therefore be optimized.
Proposed Changes
Use a context manager or an initialization process to open the ZIP file once and keep it open for subsequent operations.
Ensure the file is properly closed when the LocalZipStorageHandler instance is no longer needed (e.g., implement __enter__ and __exit__ methods).
Tasks