compress.gunzip(options)

Note:

The content in this help topic pertains to SuiteScript 2.0.

Method Description

Decompresses a file that was compressed using gzip and returns it as a temporary file object.

Returns

file.File

Supported Script Types

Server scripts

For more information, see SuiteScript 2.x Script Types.

Governance

None

Module

N/compress Module

Module Members

N/compress Module Members

Since

2020.2

Parameters

Note:

The options parameter is a JavaScript object.

Parameter

Type

Required / Optional

Description

options.file

file.File

required

The file to be decompressed.

Errors

Error Code

Thrown If

COMPRESS_API_DECOMPRESS_ERROR

The file cannot be decompressed.

COMPRESS_API_UNABLE_TO_RETRIEVE_FILE_CONTENTS

The contents of the file to be decompressed cannot be retrieved.

Syntax

Important:

The following code sample shows the syntax for this member. It is not a functional example. For a complete script example, see N/compress Module Script Sample.

            // Add additional code
...
var gunzippedFile = compress.gunzip({
    file: gzippedFile
}); 

          

Related Topics

N/compress Module
SuiteScript 2.x Modules
SuiteScript 2.x

General Notices