Namespace: compression

$.util. compression

Namespace: compression

Methods

<static> gunzip(source, maxUncompressedSizeInBytes) → {ArrayBuffer}

Uncompresses the given source data with gunzip.
Parameters:
Name Type Argument Description
source ArrayBuffer | $.web.Body Argument used to specify the data to be uncompressed with gunzip; the source can be either ArrayBuffer or $.web.Body.
maxUncompressedSizeInBytes number | ctypes.Int64 <optional>
A global restriction applies to the amount of uncompressed data that can be extracted with gunzip. You can use the property maxUncompressedSizeInBytes to override the global setting and reduce even further the amount of uncompressed data allowed. Note that maxUncompressedSizeInBytes cannot be used to increase the amount of uncompressed data allowed beyond the value specified in the global setting.
Throws:
Throws an error if the parameters are not valid, for example, the source content cannot be uncompressed or the size of the uncompressed content exceeds the allowed maximum.
Returns:
ArrayBuffer containing the data uncompressed with gunzip.
Type
ArrayBuffer

<static> gzip(source) → {ArrayBuffer}

Compresses the given source data with gzip.
Parameters:
Name Type Description
source ArrayBuffer | String | $.web.Body Argument used to specify the data to be compressed with gzip; the source can be either ArrayBuffer, String or $.web.Body.
Returns:
ArrayBuffer containing the compressed data.
Type
ArrayBuffer