The function gzip.zip allows to compress a file in GZIP format.
1 gzip.zip
Compress the data stream indicated in the call argument.
<gzip.zip>
<object2Stream /> !
</gzip.zip>
Arguments | |||||
---|---|---|---|---|---|
Name | Type | Required | Unique | Nullable | Description |
Eobject2Stream | File|Blob| Byte[]|InputStream | String of bytes uncompressed from which a compressed string according to the GZIP format is generated. |
Returns | |
---|---|
Type | Description |
File|byte[] | Returns a temporary file with the resulting decompression if the entry is a File or a Blob. Returns a byte[] if the entry is another type. |
Example
Compress the file [sample_gzip.txt] and store the content of the file [sample_gzip.gz].
Copy
<xsql-script name='gzip_zip'> <body> <file.bytes.write> <file name='C:/tmp/sample_gzip.gz' type='absolute' /> <gzip.zip> <file name='C:/tmp/sample_gzip.txt' type='absolute' /> </gzip.zip> </file.bytes.write> </body> </xsql-script>