Local cache directory for downloaded files, e.g.
~/Library/Caches/commonmeta/{namespace} on macOS,
~/.cache/commonmeta/{namespace} on Linux. Falls back to the system temp
dir if no cache dir is available.
Like download_file, but checks a local cache first and populates it
on a miss. namespace/cache_key locate the cached file under
cache_dir; ttl is how long a cached copy stays valid before being
treated as a miss and re-downloaded. Returns (bytes, true) on a cache
hit, (bytes, false) after a fresh download.
Stream-download url directly into a file at path, bypassing an
in-memory buffer. Suitable for files that are too large to hold in RAM
(e.g. the pidbox dump). Parent directories are created if needed.
Returns the number of bytes written.
Like download_file_cached but the cached copy is a file on disk rather
than a Vec<u8> in memory, making it suitable for very large downloads.
Returns (path, was_cache_hit). The file at path is always valid on
Ok; a partial write from a previous interrupted download is replaced.
Read each entry of a ZIP archive separately (in archive order), as
opposed to unzip_content, which concatenates every entry’s bytes
together — not useful when entries are independently-encoded blobs (e.g.
each a separate zstd-compressed Parquet batch) rather than plain text.