Class
BZip2Archive
OfficeIMO.Archives
Reads and writes bzip2 streams in managed code.
Inheritance
- object
- BZip2Archive
Methods
public static void Compress(Stream source, Stream destination, CancellationToken cancellationToken = default) #Compresses the source from its current position through EOF as one deterministic bzip2 member. Both streams remain open. Cancellation or an I/O failure can leave incomplete output.
Parameters
- source System.IO.Stream
- destination System.IO.Stream
- cancellationToken System.Threading.CancellationToken = default
public static Stream CreateWriter(Stream destination, bool leaveOpen = false) #Creates a deterministic bzip2 stream writer. Dispose it to finish the member.
Parameters
- destination System.IO.Stream
- leaveOpen bool = false
Returns
Streampublic static long Decompress(Stream source, Stream destination, ArchiveReadOptions? options = null, CancellationToken cancellationToken = default) #Decompresses complete concatenated bzip2 members and checks their block and stream checksums. Returns the number of decoded bytes. Both streams remain open.
Parameters
- source System.IO.Stream
- destination System.IO.Stream
- options OfficeIMO.Archives.ArchiveReadOptions? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
long