archive enabled community low v1.0.0

bzip2

File compression utility using Burrows-Wheeler algorithm that can read files via compression pipeline.

📋 Live Preview
bzip2 {c} {d}
๐Ÿ“Ž c ๐Ÿ“Ž d
bzip2 {c} {d}

Sandbox: execFile · Timeout: 60s

Capabilities

system.file.read
system.archive.compress
system.archive.decompress

Parameters

Name Type Required Default Description Aliases
c string No - Compress to stdout -c, --stdout
d string No - Decompress -d, --decompress

Artifacts

TypeDescriptionMIMESchemaTrust
system.archive.fileBzip2 compressed fileapplication/x-bzip2-community

Contract

Inputs

system.file.path

Path to file to compress

Outputs

system.archive.file

Compressed file

Side effects: filesystem_write

Workflow Edges

Produces

system.archive.file

Consumes

system.file.path

Resource Profile

ResourceValue
CPUmedium
Memory16 MB
Networklow
Disk I/Omedium

Examples

Read arbitrary file via compression pipeline

bzip2 -c /path/to/input-file | bzip2 -d

Documentation

bzip2 โ€” File Compressor

bzip2 compresses files using the Burrows-Wheeler algorithm. When used with sudo or SUID, it can read arbitrary files by compressing them to stdout and then decompressing. Related utilities (bzless, bzcat, bunzip2) also support privileged reads if bzip2 itself is SUID.

Related Tools

bzcatbzlessbunzip2gzip

References