archive
Create, list, extract, compress, and decompress ZIP, TAR, TAR.GZ, or GZ files in-process across Windows, macOS, and Linux without external zip/tar tools.
Instructions
Create, list and extract archives: zip, tar, tar.gz (tgz) and plain gzip. Implemented in process, so it behaves the same on Windows, macOS and Linux with no zip/tar binary needed. create takes a directory or a file list (with glob filters); extract refuses paths that escape the destination.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | extract: destination directory. gzip/gunzip: output file. | |
| base | No | create: strip this leading path from stored names. Default: the "from" directory. | |
| from | No | create: directory (or single file) to pack. | |
| glob | No | create/extract: only these paths (globs). | |
| path | Yes | The archive file. For create, the archive to write. | |
| files | No | create: explicit file list instead of "from". | |
| level | No | create/gzip: compression level 0-9. Default 6; 0 stores without compressing. | |
| action | Yes | What to do. | |
| format | No | Override the format. Default: inferred from the file name, then the magic bytes. | |
| exclude | No | create/extract: skip these paths (globs). | |
| max_bytes | No | Byte cap on returned output. | |
| overwrite | No | extract: replace existing files. Default false (they are skipped). | |
| skip_dirs | No | create: directory names not to pack. | |
| show_hidden | No | create: include dotfiles. Default true. | |
| strip_components | No | extract: drop this many leading path segments, like tar --strip-components. |