Cloud-Optimized ZIP reader for DuckDB
Compatibility Matrix
This table covers all DuckDB releases that have not reached end-of-life, including LTS releases, and shows the 2 most recent patch releases of each. Older patch releases are not listed, but the extension may be available for them as well.
| Platform | 1.4.4 | 1.4.5 | 1.5.5 | 1.5.6 | 2.0.0 |
|---|---|---|---|---|---|
| Linux AMD64 | |||||
| Linux ARM64 | |||||
| macOS AMD64 | |||||
| macOS ARM64 | |||||
| Windows AMD64 | |||||
| Windows ARM64 | |||||
| WebAssembly |
Installing and Loading
INSTALL cozip FROM community;
LOAD cozip;
Example
INSTALL cozip FROM community;
LOAD cozip;
SELECT name, "cozip:location"
FROM read_flat('https://data.source.coop/asterisk-labs/cozip-api-fixtures/data/cities.zip')
LIMIT 10;
About cozip
cozip puts an index at byte 0 of a ZIP archive, so a reader can locate a file without scanning the Central Directory. This extension reads the Flat profile (profile 1) from local files or remote storage, including HTTPS, S3, GCS, Azure, and Hugging Face.
read_flat(path) returns the Flat-profile manifest: one row per entry with name, offset, size and whatever columns the writer added.
The cozip:location column contains a GDAL /vsisubfile/ path for each stored file. DuckDB readers can open those paths directly, fetching only the needed byte ranges. The extension also accepts cozip-subfile:// paths.
Version 3.0 removes the TACO-specific read_taco and taco_* functions. TACO ZIP ::location paths remain readable through the subfile filesystem.
Added Functions
| function_name | function_type | description | comment | examples |
|---|---|---|---|---|
| cozip_offset_size | scalar | NULL | NULL | |
| cozip_profile | scalar | NULL | NULL | |
| cozip_vsi_base | scalar | NULL | NULL | |
| read_cozip | table_macro | NULL | NULL | |
| read_flat | table_macro | NULL | NULL |
Overloaded Functions
This extension does not add any function overloads.
Added Types
This extension does not add any types.
Added Settings
| name | description | input_type | scope | aliases | typed_value |
|---|---|---|---|---|---|
| temp_directory | Set the directory to which temporary files are written. | VARCHAR | GLOBAL | [] | post.db.tmp |