This is a DuckDB extension that adds support for reading files from within zip archives.
Load from the community extensions repository:
INSTALL zipfs FROM community;
LOAD zipfs;
To read a file:
SELECT * FROM 'zip://examples/a.zip/a.csv';
File names passed into the zip://
URL scheme are expected to end with .zip
, which indicates the end of the zip file name. The path after
that is taken to be the file path within the zip archive.
Globbing within the zip archive is supported, but see below for performance limitations. A glob query looks like:
SELECT * FROM 'zip://examples/a.zip/*.csv';
This extension is intended more for convience than high performance. It does not implement a file metadata cache as tarfs
(on which this
extension is based) does. As such, operations which require the central directory (index) of the zip file, such as globbing files, must
reread the central directory multiple times, once for the glob and once for each file to open.
duckdb-zipfs Copyright 2025 Isaac Brodsky. Licensed under the MIT License.
DuckDB Copyright 2018-2022 Stichting DuckDB Foundation (MIT License)
miniz Copyright 2013-2014 RAD Game Tools and Valve Software Copyright 2010-2014 Rich Geldreich and Tenacious Software LLC (MIT License)
DuckDB extension-template Copyright 2018-2022 DuckDB Labs BV (MIT License)
duckdb_tarfs (MIT license)