All Members | Constructors | Methods | Properties | ||
|
|
|
Icon | Member | Description |
---|---|---|
ParallelDeflateOutputStream(Stream) |
Create a ParallelDeflateOutputStream.
|
|
ParallelDeflateOutputStream(Stream, CompressionLevel) |
Create a ParallelDeflateOutputStream using the specified CompressionLevel.
|
|
ParallelDeflateOutputStream(Stream, Boolean) |
Create a ParallelDeflateOutputStream and specify whether to leave the captive stream open
when the ParallelDeflateOutputStream is closed.
|
|
ParallelDeflateOutputStream(Stream, CompressionLevel, Boolean) |
Create a ParallelDeflateOutputStream and specify whether to leave the captive stream open
when the ParallelDeflateOutputStream is closed.
|
|
ParallelDeflateOutputStream(Stream, CompressionLevel, CompressionStrategy, Boolean) |
Create a ParallelDeflateOutputStream using the specified
CompressionLevel and CompressionStrategy, and specifying whether to
leave the captive stream open when the ParallelDeflateOutputStream is
closed.
|
|
BeginRead(array<Byte>[]()[][], Int32, Int32, AsyncCallback, Object) | HostProtectionAttribute. Begins an asynchronous read operation. (Inherited from Stream.) |
|
BeginWrite(array<Byte>[]()[][], Int32, Int32, AsyncCallback, Object) | HostProtectionAttribute. Begins an asynchronous write operation. (Inherited from Stream.) |
|
BufferSize |
The size of the buffers used by the compressor threads.
|
|
BytesProcessed |
The total number of uncompressed bytes processed by the ParallelDeflateOutputStream.
|
|
CanRead |
Indicates whether the stream supports Read operations.
(Overrides Stream.CanRead.) |
|
CanSeek |
Indicates whether the stream supports Seek operations.
(Overrides Stream.CanSeek.) |
|
CanTimeout | Gets a value that determines whether the current stream can time out. (Inherited from Stream.) |
|
CanWrite |
Indicates whether the stream supports Write operations.
(Overrides Stream.CanWrite.) |
|
Close()()()() |
Close the stream.
(Overrides Stream.Close()()()().) |
|
Crc32 |
The CRC32 for the data that was written out, prior to compression.
|
|
CreateObjRef(Type) | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.) |
|
CreateWaitHandle()()()() | Obsolete. Allocates a WaitHandle object. (Inherited from Stream.) |
|
Dispose()()()() |
Dispose the object
|
|
Dispose(Boolean) | The Dispose method (Overrides Stream.Dispose(Boolean).) |
|
EndRead(IAsyncResult) | Waits for the pending asynchronous read to complete. (Inherited from Stream.) |
|
EndWrite(IAsyncResult) | Ends an asynchronous write operation. (Inherited from Stream.) |
|
Equals(Object) | (Inherited from Object.) |
|
Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.) |
|
Flush()()()() |
Flush the stream.
(Overrides Stream.Flush()()()().) |
|
GetHashCode()()()() | Serves as a hash function for a particular type. (Inherited from Object.) |
|
GetLifetimeService()()()() | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.) |
|
GetType()()()() | Gets the Type of the current instance. (Inherited from Object.) |
|
InitializeLifetimeService()()()() | Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.) |
|
Length |
Reading this property always throws a NotSupportedException.
(Overrides Stream.Length.) |
|
MaxBufferPairs |
The maximum number of buffer pairs to use.
|
|
MemberwiseClone(Boolean) | Creates a shallow copy of the current MarshalByRefObject object. (Inherited from MarshalByRefObject.) |
|
MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.) |
|
Position |
Returns the current position of the output stream.
(Overrides Stream.Position.) |
|
Read(array<Byte>[]()[][], Int32, Int32) |
This method always throws a NotSupportedException.
(Overrides Stream.Read(array<Byte>[]()[][], Int32, Int32).) |
|
ReadByte()()()() | Reads a byte from the stream and advances the position within the stream by one byte, or returns -1 if at the end of the stream. (Inherited from Stream.) |
|
ReadTimeout | Gets or sets a value, in miliseconds, that determines how long the stream will attempt to read before timing out. (Inherited from Stream.) |
|
Reset(Stream) |
Resets the stream for use with another stream.
|
|
Seek(Int64, SeekOrigin) |
This method always throws a NotSupportedException.
(Overrides Stream.Seek(Int64, SeekOrigin).) |
|
SetLength(Int64) |
This method always throws a NotSupportedException.
(Overrides Stream.SetLength(Int64).) |
|
Strategy |
The ZLIB strategy to be used during compression.
|
|
ToString()()()() | (Inherited from Object.) |
|
Write(array<Byte>[]()[][], Int32, Int32) |
Write data to the stream.
(Overrides Stream.Write(array<Byte>[]()[][], Int32, Int32).) |
|
WriteByte(Byte) | Writes a byte to the current position in the stream and advances the position within the stream by one byte. (Inherited from Stream.) |
|
WriteTimeout | Gets or sets a value, in miliseconds, that determines how long the stream will attempt to write before timing out. (Inherited from Stream.) |
This class performs DEFLATE compression through writing. For more information on the Deflate algorithm, see IETF RFC 1951, "DEFLATE Compressed Data Format Specification version 1.3."
This class is similar to DeflateStream, except that this class is for compression only, and this implementation uses an approach that employs multiple worker threads to perform the DEFLATE. On a multi-cpu or multi-core computer, the performance of this class can be significantly higher than the single-threaded DeflateStream, particularly for larger streams. How large? Anything over 10mb is a good candidate for parallel compression.
The tradeoff is that this class uses more memory and more CPU than the vanilla DeflateStream, and also is less efficient as a compressor. For large files the size of the compressed data stream can be less than 1% larger than the size of a compressed data stream from the vanialla DeflateStream. For smaller files the difference can be larger. The difference will also be larger if you set the BufferSize to be lower than the default value. Your mileage may vary. Finally, for small files, the ParallelDeflateOutputStream can be much slower than the vanilla DeflateStream, because of the overhead associated to using the thread pool.
Object | |||
MarshalByRefObject | |||
Stream | |||
ParallelDeflateOutputStream |