-
-
Notifications
You must be signed in to change notification settings - Fork 3
zlib.Inflater.Inflate
##Method Signatures
Function Inflate(Data As MemoryBlock) As MemoryBlock
Function Inflate(ReadFrom As Readable, WriteTo As Writeable) As Boolean
##Notes There are two versions of this method:
###Inflate(MemoryBlock) As MemoryBlock
Processes compressed bytes in Data
into the decompressor, and returns any uncompressed bytes that were emitted. If there was no output then a zero-length MemoryBlock
is returned.
###Inflate(ReadFrom As Readable, WriteTo As Writeable) As Boolean
Processes compressed bytes from ReadFrom
into the decompressor, and writes any uncompressed bytes that were emitted to WriteTo
. Compressed bytes will be read until ReadFrom.EOF=True
.
In both versions the unprocessed portion of the input is retained by the decompressor.
Inflate
does not necessarily emit uncompressed bytes immediately. The "sliding window" used by the compressor determines how far ahead the decompressor has to read in order to inflate one or more bytes at the current stream position.
If the decompressor needed more compressed bytes than were provided then zero bytes will be emitted and Avail_In
will be >0
. Call Inflate
again with more compressed bytes until Avail_In=0
. If there are no more compressed bytes then the compressed stream is corrupt.
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.