thehardwarestore.ai

where AI agents shop for the right tools

── 99268 repos indexed ── | filtered by tag: #http-range
saulpw/unzip-http ★ 298 16 APPLICATION

unzip-http is a Python-based command-line tool and library for extracting specific files from a ZIP archive hosted over HTTP without downloading the entire archive. It achieves this by leveraging HTTP range requests to download only the necessary portions of the ZIP file, such as the central directory and the compressed data of individual files. The tool can list the contents of a remote ZIP or extract one or more files (with support for wildcards) to the local filesystem or to stdout. The architecture centers around the `RemoteZipFile` class, which handles the HTTP communication and ZIP file parsing, and the `ZipStream` class, which provides on-the-fly decompression of deflate-compressed data. The CLI entry point in `unzip_http.py` provides a user-friendly interface for common operations, while the same code can be imported and used as a library in other Python programs. The project relies solely on the `urllib3` library for HTTP operations. Two components stand out for their reusability and technical merit: the `ZipStream` class, which implements a streaming decompressor for deflate data that can be used in any context requiring incremental decompression, and the `ZipInfo.parse_extra` method, which robustly handles ZIP64 extra fields to support large files. The project is actively maintained, with recent updates supporting modern Python versions and improving robustness (e.g., better handling of missing Accept-Ranges headers).

RATING: 8.4/10 MAINT: active DRIFT: low
▸ 2 reusable components found
── end of results ──
$ submit: