-
Notifications
You must be signed in to change notification settings - Fork 1
BZip2.Decompress
Andrew Lambert edited this page Nov 27, 2022
·
2 revisions
BZip2.Decompress
Protected Function Decompress(Source As FolderItem, Destination As FolderItem, Overwrite As Boolean = False) As Boolean
Protected Function Decompress(Source As FolderItem, Destination As Writeable) As Boolean
Protected Function Decompress(Source As MemoryBlock, Destination As FolderItem, Overwrite As Boolean = False) As Boolean
Protected Function Decompress(Source As MemoryBlock, Destination As Writeable) As Boolean
Protected Function Decompress(Source As Readable, Destination As FolderItem, Overwrite As Boolean = False) As Boolean
Protected Function Decompress(Source As Readable, Destination As Writeable) As Boolean
Protected Function Decompress(Source As FolderItem) As MemoryBlock
Protected Function Decompress(Source As MemoryBlock) As MemoryBlock
Protected Function Decompress(Source As Readable) 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 |
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 = BZip2.Compress("hello, world!") ' some compressed data
Dim Decompressd As String = BZip2.Decompress(data)
Decompress a string into a file:
Dim data As String = BZip2.Compress("hello, world!") ' some compressed data
Dim Decompressd As FolderItem = SpecialFolder.Desktop.Child("example.bin")
If Not BZip2.Decompress(data, Decompressd) Then
MsgBox("Decompress error!")
End If
Decompress a file into a string:
Dim data As FolderItem = SpecialFolder.Desktop.Child("example.bin") ' a compressed file
Dim Decompressd As String = BZip2.Decompress(data)
Wiki home | Project page | Bugs | Become a sponsor
Text and code examples are Copyright ©2018-24 Andrew Lambert, offered under the CC BY-SA 3.0 License.