public static decompress(source as Path, destination as Path, maxBytes as ULong = 268435456ul, expectedBytes as Long = -1l) as Void
Validates and decompresses one GZIP member into a file. A temporary sibling is atomically installed only after CRC, size and stream validation. An existing destination remains untouched on failure. Parents are created when necessary. Header filenames are never used.
| Parameter | Description |
|---|---|
source | Compressed input file, left unchanged. |
destination | Output path; an existing file is replaced on success. |
maxBytes | Maximum decoded size; defaults to 256 MiB, at most 4 GiB - 1. |
expectedBytes | Exact decoded size, or -1 to use the GZIP trailer size. |
Gzip.decompress(Path("data.gz"), Path("data"), maxBytes=50000000ul)