Skip to content

File Compress

Compresses files and directories into a single archive.

Compresses files and directories into a data stream on-the-fly, using a minimal memory footprint regardless of the size or number of files. This allows for efficient handling of large datasets without writing to temporary disk storage.

Path Handling#

Paths inside the generated archive are always relative and use forward slashes (/) for maximum compatibility. Any drive letters (e.g., C:) and leading slashes are removed to ensure a clean, portable archive structure.

Inputs#

Port Description
Starts the compression process.
Format
Base Path
A common directory path to remove from the start of file paths, creating a relative structure inside the archive. Relative paths are resolved from the current working directory.
Level
Compression level from 0 (none) to 9 (best). Levels outside this range will be clamped. Ignored by the tar format.
Paths
A list of file or directory paths to include in the archive. Directories are scanned recursively. Symbolic links are ignored.

Outputs#

Port Description
Success
Triggered when compression is successful.
Error
Triggered if an error occurs during compression.
Suffix
The file extension of the archive (e.g., .zip, .tar, .tar.gz).
Data
The binary data stream of the compressed archive.

ID: core/file-compress@v1