Skip to content

Repository files navigation

cozip_reader

DuckDB extension for reading cozip archives.

Install

INSTALL cozip FROM community;
LOAD cozip;

Linux, macOS and Windows. WebAssembly is not supported.

Flat archives

SELECT *
FROM read_flat('dataset.zip');

The result contains name, offset, size, any user metadata, and a cozip:location path for each file.

read_cozip() is a deprecated alias of read_flat().

TACO archives

SELECT *
FROM read_taco('dataset.zip');

By default, read_taco() returns one row per sample and one column per file in the contract. File columns contain locations.

It accepts the three TACO containers:

SELECT * FROM read_taco('dataset.zip');  -- ZIP
SELECT * FROM read_taco('dataset/');     -- FOLDER
SELECT * FROM read_taco('.tacocat/');    -- TACOCAT

Common options:

SELECT *
FROM read_taco(
  'dataset.zip',
  idx := [0, 100],
  files := ['before/B02.tif', 'after/B02.tif']
);

SELECT * FROM read_taco('dataset.zip', pivoted := false);
SELECT * FROM read_taco('dataset.zip', level := 'children/before');
SELECT * FROM read_taco('dataset.zip', location := false);

Contract helpers:

SELECT cozip_profile('dataset.zip');
SELECT taco_structure('dataset.zip');
SELECT taco_levels('dataset.zip');
SELECT taco_derived('dataset.zip');
SELECT taco_collection('dataset.zip');
SELECT * FROM taco_contract('dataset.zip');

Build

git clone --recurse-submodules https://github.com/asterisk-labs/cozip_reader
cd cozip_reader
make
make test

License

MIT


Made with ♥ by

Asterisk Labs

About

Read Cloud-Optimized ZIP files

Resources

Stars

8 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages