Skip to content

Archive

Create and extract ZIP, TAR, and gzip archives.

6 modules

ModuleDescription
Gunzip DecompressDecompress a gzip-compressed file
Gzip CompressCompress a single file using gzip
Create TAR ArchiveCreate a TAR archive with optional gzip/bz2/xz compression
Extract TAR ArchiveExtract files from a TAR archive (auto-detects compression)
Create ZIP ArchiveCreate a ZIP archive from a list of files
Extract ZIP ArchiveExtract files from a ZIP archive

Modules

Gunzip Decompress

archive.gunzip

Decompress a gzip-compressed file

Parameters:

NameTypeRequiredDefaultDescription
input_pathstringYes-Path to the gzip-compressed file
output_pathstringNo-Path for the decompressed file (defaults to input without .gz extension)

Output:

FieldTypeDescription
pathstringPath to the decompressed file
sizenumberDecompressed file size in bytes

Example: Decompress a gzip file

yaml
input_path: /tmp/data.txt.gz

Gzip Compress

archive.gzip

Compress a single file using gzip

Parameters:

NameTypeRequiredDefaultDescription
input_pathstringYes-Path to the file to compress
output_pathstringNo-Path for the compressed file (defaults to input_path + .gz)

Output:

FieldTypeDescription
pathstringPath to the compressed file
original_sizenumberOriginal file size in bytes
compressed_sizenumberCompressed file size in bytes
rationumberCompression ratio (compressed / original)

Example: Compress a file with gzip

yaml
input_path: /tmp/data.txt

Create TAR Archive

archive.tar_create

Create a TAR archive with optional gzip/bz2/xz compression

Parameters:

NameTypeRequiredDefaultDescription
output_pathstringYes-Path for the output TAR file
filesarrayYes-List of file paths to include in the archive
compressionselect (none, gzip, bz2, xz)NogzipCompression method

Output:

FieldTypeDescription
pathstringPath to the created TAR file
sizenumberArchive size in bytes
file_countnumberNumber of files in the archive

Example: Create gzipped TAR archive

yaml
output_path: /tmp/archive.tar.gz
files: ["/tmp/file1.txt", "/tmp/file2.txt"]
compression: gzip

Extract TAR Archive

archive.tar_extract

Extract files from a TAR archive (auto-detects compression)

Parameters:

NameTypeRequiredDefaultDescription
archive_pathstringYes-Path to the TAR archive to extract
output_dirstringYes-Directory to extract files into

Output:

FieldTypeDescription
extracted_filesarrayList of extracted file paths
total_sizenumberTotal size of extracted files in bytes

Example: Extract TAR.GZ archive

yaml
archive_path: /tmp/archive.tar.gz
output_dir: /tmp/extracted/

Create ZIP Archive

archive.zip_create

Create a ZIP archive from a list of files

Parameters:

NameTypeRequiredDefaultDescription
output_pathstringYes-Path for the output ZIP file
filesarrayYes-List of file paths to include in the archive
compressionselect (stored, deflated, bzip2, lzma)NodeflatedCompression method
passwordstringNo-Optional password to protect the archive (extraction only, limited support)

Output:

FieldTypeDescription
pathstringPath to the created ZIP file
sizenumberArchive size in bytes
file_countnumberNumber of files in the archive

Example: Create ZIP from files

yaml
output_path: /tmp/archive.zip
files: ["/tmp/file1.txt", "/tmp/file2.txt"]
compression: deflated

Extract ZIP Archive

archive.zip_extract

Extract files from a ZIP archive

Parameters:

NameTypeRequiredDefaultDescription
archive_pathstringYes-Path to the ZIP archive to extract
output_dirstringYes-Directory to extract files into
passwordstringNo-Password for encrypted archives

Output:

FieldTypeDescription
extracted_filesarrayList of extracted file paths
total_sizenumberTotal size of extracted files in bytes

Example: Extract ZIP archive

yaml
archive_path: /tmp/archive.zip
output_dir: /tmp/extracted/

Released under the Apache 2.0 License.