N/compress Module
Use the N/compress module to compress and decompress files. You can also use this module to archive multiple files in a single file archive such as TAR or ZIP file.
You can compress and decompress individual files by using compress.gzip(options) and compress.gunzip(options).
You can create an archive by using compress.createArchiver() and add multiple files to the archive.
In This Help Topic
N/compress Module Members
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
---|---|---|---|---|
Object |
Object |
Server scripts |
The functionality for creating archive files. Use compress.createArchiver() to create this object. |
|
Method |
Server scripts |
Creates a compress.Archiver object. |
||
Server scripts |
Decompresses a file and returns it as a temporary file object. |
|||
Server scripts |
Compresses a file and returns it as a temporary file object. |
|||
Enum |
enum |
Server scripts |
Holds the string values for the archive types. |
Archiver Object Members
The following members are called on the compress.Archiver object.
Member Type |
Name |
Return Type/Value Type |
Supported Script Types |
Description |
---|---|---|---|---|
Method |
void |
Server scripts |
Adds a file to be archived. |
|
Server scripts |
Creates an archive with the added files and returns it as a temporary file object. |