Documentation ¶
Index ¶
Constants ¶
const DefaultMaxDecompressSize = 100 * 1024 * 1024 * 1024 // 100 GB
Variables ¶
This section is empty.
Functions ¶
func Compress ¶ added in v1.4.0
Compress compresses the sourcePath (which can be a file or a directory) into a gzip archive written to targetFile. It uses relative paths for the file headers within the archive to preserve the directory structure.
func Decompress ¶
Decompress takes the path to a .tar.gz file and decompresses it into the specified directory.
func DecompressInPlace ¶
DecompressInPlace takes the path to a .tar.gz file and decompresses it into the same directory.
func DecompressWithMaxBytes ¶
DecompressWithMaxBytes takes the path to a .tar.gz file and decompresses it into the specified directory. It enforces a maximum decompressed file size (per file) to prevent decompression bombs. TODO: Ignore linting issue for now. Fixing this is a task by itself
Types ¶
This section is empty.