Skip to content
Andrew Lambert edited this page Nov 26, 2022 · 19 revisions

zlib.GZip

Method Signatures

 Protected Function GZip(Source As FolderItem,  Destination As FolderItem, CompressionLevel As Integer = zlib.Z_DEFAULT_COMPRESSION, Overwrite As Boolean = False) As Boolean
 Protected Function GZip(Source As FolderItem,  Destination As Writeable,  CompressionLevel As Integer = zlib.Z_DEFAULT_COMPRESSION) As Boolean
 Protected Function GZip(Source As MemoryBlock, Destination As FolderItem, CompressionLevel As Integer = zlib.Z_DEFAULT_COMPRESSION, Overwrite As Boolean = False) As Boolean
 Protected Function GZip(Source As MemoryBlock, Destination As Writeable,  CompressionLevel As Integer = zlib.Z_DEFAULT_COMPRESSION) As Boolean
 Protected Function GZip(Source As Readable,    Destination As FolderItem, CompressionLevel As Integer = zlib.Z_DEFAULT_COMPRESSION, Overwrite As Boolean = False) As Boolean
 Protected Function GZip(Source As Readable,    Destination As Writeable,  CompressionLevel As Integer = zlib.Z_DEFAULT_COMPRESSION) As Boolean
 Protected Function GZip(Source As FolderItem,  CompressionLevel As Integer = zlib.Z_DEFAULT_COMPRESSION) As MemoryBlock
 Protected Function GZip(Source As MemoryBlock, CompressionLevel As Integer = zlib.Z_DEFAULT_COMPRESSION) As MemoryBlock
 Protected Function GZip(Source As Readable,    CompressionLevel As Integer = zlib.Z_DEFAULT_COMPRESSION) As MemoryBlock

Parameters

Name Type Comment
Source FolderItem, Readable, or MemoryBlock The data to compress
Destination FolderItem or Writeable The file or stream to which compressed data should be written. Methods which return a MemoryBlock do not have this parameter
CompressionLevel Integer Optional. If specified, the compression level to use (0=none, 1=fast, 9=best)
Overwrite Boolean Optional. If True, the Destination FolderItem will be overwritten if it exists. Only those methods with FolderItem destinations have this parameter

Return value

Returns True if there were no errors writing to a Writeable or FolderItem; or, a MemoryBlock containing the compressed data.

Remarks

Compresses data from the Source argument into the Destination argument using GZip; methods without a Destination argument return the compressed data instead.

See also

Entry-level points of interest denoted by "☜"



Clone this wiki locally