Documentation ¶
Index ¶
Constants ¶
View Source
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.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.