compress

Function

ArgDescriptionType
pathA path to compressstring (required)
outputA path to write the output - default is the path with a .gz extensionstring (required)

Required permissions:FILESYSTEM_WRITE FILESYSTEM_READ

Description

Compress a file using GZip.

The file is compressed using gzip. You can change the location of the output using the output parameter.

Note that output is a required parameter - you can consult how paths are handled in Velociraptor to correctly manipulate paths

https://docs.velociraptor.app/docs/forensic/filesystem/paths/

Example

SELECT OSPath, compress(path=OSPath, output=OSPath.Dirname + ( OSPath.Basename + ".gz")) AS Compressed
FROM glob(globs="C:/Windows/*.exe")

Unlike the common gzip utility the file is not removed after compression.