Skip to content

LZMA.LZMAStream.Read

Andrew Lambert edited this page Nov 26, 2022 · 5 revisions

Method Signature

 Function Read(Count As Integer, encoding As TextEncoding = Nil) As String Implements Readable.Read

Parameters

Name Type Comment
Count Integer The number of bytes to read (see remarks)
encoding TextEncoding Optional. The encoding of the decompressed data

Return value

The decompressed data.

Remarks

This method reads from the compressed stream.

If BufferedReading is True (the default) then this method will read as many compressed bytes as are necessary to produce at least Count decompressed bytes (or until EOF). Exactly Count decompressed bytes are returned (unless EOF) and any extra bytes are buffered until the next call to this method.

If BufferedReading is False then exactly Count compressed bytes are read and fed into the decompressor. All decompressed output is returned: depending on the size of the read request and the state of the decompressor this method might return zero bytes. A zero-length return value does not indicate an error or the end of the stream; continue to Read from the stream until EOF=True.

Clone this wiki locally