-
-
Notifications
You must be signed in to change notification settings - Fork 3
zlib.Inflate
Andrew Lambert edited this page Nov 26, 2022
·
13 revisions
zlib.Inflate
Protected Function Inflate(Source As FolderItem, Destination As FolderItem, Overwrite As Boolean = False, Dictionary As MemoryBlock = Nil, Encoding As Integer = zlib.DEFLATE_ENCODING) As Boolean
Protected Function Inflate(Source As FolderItem, Destination As Writeable, Dictionary As MemoryBlock = Nil, Encoding As Integer = zlib.DEFLATE_ENCODING) As Boolean
Protected Function Inflate(Source As MemoryBlock, Destination As FolderItem, Overwrite As Boolean = False, Dictionary As MemoryBlock = Nil, Encoding As Integer = zlib.DEFLATE_ENCODING) As Boolean
Protected Function Inflate(Source As MemoryBlock, Destination As Writeable, Dictionary As MemoryBlock = Nil, Encoding As Integer = zlib.DEFLATE_ENCODING) As Boolean
Protected Function Inflate(Source As Readable, Destination As FolderItem, Overwrite As Boolean = False, Dictionary As MemoryBlock = Nil, Encoding As Integer = zlib.DEFLATE_ENCODING) As Boolean
Protected Function Inflate(Source As Readable, Destination As Writeable, Dictionary As MemoryBlock = Nil, Encoding As Integer = zlib.DEFLATE_ENCODING) As Boolean
Protected Function Inflate(Source As FolderItem, Dictionary As MemoryBlock = Nil, Encoding As Integer = zlib.DEFLATE_ENCODING) As MemoryBlock
Protected Function Inflate(Source As MemoryBlock, Dictionary As MemoryBlock = Nil, Encoding As Integer = zlib.DEFLATE_ENCODING) As MemoryBlock
Protected Function Inflate(Source As Readable, Dictionary As MemoryBlock = Nil, Encoding As Integer = zlib.DEFLATE_ENCODING) As MemoryBlock
Name | Type | Comment |
---|---|---|
Source |
FolderItem , Readable , or MemoryBlock
|
The data to decompress |
Destination |
FolderItem or Writeable
|
The file or stream to which decompressed data should be written. Methods which return a MemoryBlock do not have this parameter |
Overwrite | Boolean |
If True , the Destination FolderItem will be overwritten if it exists. Only those methods with FolderItem destinations have this parameter |
Dictionary | MemoryBlock |
Optional. If specified, the dictionary used by the compressor |
Encoding | Integer |
Optional. If specified, the output encoding used by the compressor |
Returns True
if there were no errors writing to a Writeable
or FolderItem; or, a MemoryBlock
containing the decompressed data.
Decompresses data from the Source
argument into the Destination
argument; methods without a Destination
argument return the decompressed data instead.
Decompress a string into a string:
Dim data As String = zlib.Compress("hello, world!") ' some compressed data
Dim inflated As String = zlib.Inflate(data)
Decompress a string into a file:
Dim data As String = zlib.Compress("hello, world!") ' some compressed data
Dim inflated As FolderItem = SpecialFolder.Desktop.Child("example.bin")
If Not zlib.Inflate(data, inflated) Then
MsgBox("Inflate error!")
End If
Decompress a file into a string:
Dim data As FolderItem = SpecialFolder.Desktop.Child("example.bin") ' a compressed file
Dim inflated As String = zlib.Inflate(data)
Wiki home | Project page | Bugs | Become a sponsor
Text and code examples are Copyright ©2014-24 Andrew Lambert, offered under the CC BY-SA 3.0 License.