bzip2File.php
Table of Contents
Functions
- bzip2File() : string
- Compresses a single file with bzip2, streaming it in chunks.
Functions
bzip2File()
Compresses a single file with bzip2, streaming it in chunks.
bzip2File(string $source[, string|null $destination = null ][, bool $overwrite = true ]) : string
Standalone bzip2 compression outside of tar archives, using the bz2
extension — no subprocess, and the file is never fully loaded into memory.
Unlike gzipFile(), no compression level is exposed: bzopen() does not
accept one in streaming mode.
Parameters
- $source : string
-
Path to the file to compress.
- $destination : string|null = null
-
Output path. Defaults to
$source+.bz2. - $overwrite : bool = true
-
Whether to overwrite an existing destination (default:
true).
Tags
Return values
string —The destination path.