-
-
Notifications
You must be signed in to change notification settings - Fork 1
BZip2.BZ2Stream
BZip2.BZ2Stream
Protected Class BZ2Stream
Implements Readable,Writeable
This represents a data stream that was/will be compressed using BZip2.
A BZ2Stream has a reference to a Writeable
object to which all compressed output is ultimately written; this is the "output stream". A corresponding Readable
object is the ultimate source for all compressed input; this is the "input stream".
Typically, when compressing you only specify the output stream and when decompressing only the input stream. However both may be used simultaneously. This can be useful if you need to read and write both compressed and uncompressed bytes from a single stream (e.g. a zip stream), or to create one end of a (de)compressed "pipe" by using two distinct streams.
This class implements the Readable and Writeable class interfaces.
- Close
- Constructor
- EOF
- Flush
- IsReadable
- IsWriteable
- LastError
- Lookahead
- Read
- ReadLine
- ReadError
- Write
- WriteLine
- WriteError
This example creates an in-memory compression stream by calling Constructor(MemoryBlock), and writes some data to be compressed:
Dim output As New MemoryBlock(0)
Dim compressor As New BZip2.BZ2Stream(output)
compressor.Write("Hello, world!")
compressor.Close
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.