Method | Description | |
---|---|---|
Close ( ) : void |
Close the stream. You must call Close on the stream to guarantee that all of the data written in has been compressed, and the compressed data has been written out. |
|
Dispose ( ) : void |
Dispose the object Because ParallelDeflateOutputStream is IDisposable, the application must call this method when finished using the instance. This method is generally called implicitly upon exit from a |
|
Flush ( ) : void |
Flush the stream.
|
|
ParallelDeflateOutputStream ( System stream ) : System |
Create a ParallelDeflateOutputStream. This stream compresses data written into it via the DEFLATE algorithm (see RFC 1951), and writes out the compressed byte stream. The instance will use the default compression level, the default buffer sizes and the default number of threads and buffers per thread. This class is similar to Ionic.Zlib.DeflateStream, except that 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. |
|
ParallelDeflateOutputStream ( System stream, CompressionLevel level ) : System |
Create a ParallelDeflateOutputStream using the specified CompressionLevel. See the ParallelDeflateOutputStream(System.IO.Stream) constructor for example code. |
|
ParallelDeflateOutputStream ( System stream, CompressionLevel level, CompressionStrategy strategy, bool leaveOpen ) : System |
Create a ParallelDeflateOutputStream using the specified CompressionLevel and CompressionStrategy, and specifying whether to leave the captive stream open when the ParallelDeflateOutputStream is closed. See the ParallelDeflateOutputStream(System.IO.Stream) constructor for example code. |
|
ParallelDeflateOutputStream ( System stream, CompressionLevel level, bool leaveOpen ) : System |
Create a ParallelDeflateOutputStream and specify whether to leave the captive stream open when the ParallelDeflateOutputStream is closed. See the ParallelDeflateOutputStream(System.IO.Stream) constructor for example code. |
|
ParallelDeflateOutputStream ( System stream, bool leaveOpen ) : System |
Create a ParallelDeflateOutputStream and specify whether to leave the captive stream open when the ParallelDeflateOutputStream is closed. See the ParallelDeflateOutputStream(System.IO.Stream) constructor for example code. |
|
Read ( byte buffer, int offset, int count ) : int |
This method always throws a NotSupportedException.
|
|
Reset ( Stream stream ) : void |
Resets the stream for use with another stream. Because the ParallelDeflateOutputStream is expensive to create, it has been designed so that it can be recycled and re-used. You have to call Close() on the stream first, then you can call Reset() on it, to use it again on another stream. |
|
Seek ( long offset, System origin ) : long |
This method always throws a NotSupportedException.
|
|
SetLength ( long value ) : void |
This method always throws a NotSupportedException.
|
|
Write ( byte buffer, int offset, int count ) : void |
Write data to the stream. To use the ParallelDeflateOutputStream to compress data, create a ParallelDeflateOutputStream with CompressionMode.Compress, passing a writable output stream. Then call Write() on that ParallelDeflateOutputStream, providing uncompressed data as input. The data sent to the output stream will be the compressed form of the data written. To decompress data, use the Ionic.Zlib.DeflateStream class. |
Method | Description | |
---|---|---|
Dispose ( bool disposing ) : void |
The Dispose method
|
Method | Description | |
---|---|---|
DeflateOneSegment ( WorkItem workitem ) : bool | ||
EmitPendingBuffers ( bool doAll, bool mustWait ) : void | ||
InnerClose ( ) : void | ||
TraceOutput ( TraceBits bits, string format ) : void | ||
_DeflateOne ( Object wi ) : void | ||
_Flush ( bool lastInput ) : void | ||
_FlushFinish ( ) : void | ||
_InitializePoolOfWorkItems ( ) : void | ||
_PerpetualWriterMethod ( object state ) : void |
protected Dispose ( bool disposing ) : void | ||
disposing | bool | /// indicates whether the Dispose method was invoked by user code. /// |
return | void |
public ParallelDeflateOutputStream ( System stream ) : System | ||
stream | System | The stream to which compressed data will be written. |
return | System |
public ParallelDeflateOutputStream ( System stream, CompressionLevel level ) : System | ||
stream | System | The stream to which compressed data will be written. |
level | CompressionLevel | A tuning knob to trade speed for effectiveness. |
return | System |
public ParallelDeflateOutputStream ( System stream, CompressionLevel level, CompressionStrategy strategy, bool leaveOpen ) : System | ||
stream | System | The stream to which compressed data will be written. |
level | CompressionLevel | A tuning knob to trade speed for effectiveness. |
strategy | CompressionStrategy | /// By tweaking this parameter, you may be able to optimize the compression for /// data with particular characteristics. /// |
leaveOpen | bool | /// true if the application would like the stream to remain open after inflation/deflation. /// |
return | System |
public ParallelDeflateOutputStream ( System stream, CompressionLevel level, bool leaveOpen ) : System | ||
stream | System | The stream to which compressed data will be written. |
level | CompressionLevel | A tuning knob to trade speed for effectiveness. |
leaveOpen | bool | /// true if the application would like the stream to remain open after inflation/deflation. /// |
return | System |
public ParallelDeflateOutputStream ( System stream, bool leaveOpen ) : System | ||
stream | System | The stream to which compressed data will be written. |
leaveOpen | bool | /// true if the application would like the stream to remain open after inflation/deflation. /// |
return | System |
public Read ( byte buffer, int offset, int count ) : int | ||
buffer | byte | /// The buffer into which data would be read, IF THIS METHOD /// ACTUALLY DID ANYTHING. /// |
offset | int | /// The offset within that data array at which to insert the /// data that is read, IF THIS METHOD ACTUALLY DID /// ANYTHING. /// |
count | int | /// The number of bytes to write, IF THIS METHOD ACTUALLY DID /// ANYTHING. /// |
return | int |
public Reset ( Stream stream ) : void | ||
stream | Stream | /// The new output stream for this era. /// |
return | void |
public Seek ( long offset, System origin ) : long | ||
offset | long | /// The offset to seek to.... /// IF THIS METHOD ACTUALLY DID ANYTHING. /// |
origin | System | /// The reference specifying how to apply the offset.... IF /// THIS METHOD ACTUALLY DID ANYTHING. /// |
return | long |
public SetLength ( long value ) : void | ||
value | long | /// The new value for the stream length.... IF /// THIS METHOD ACTUALLY DID ANYTHING. /// |
return | void |
public Write ( byte buffer, int offset, int count ) : void | ||
buffer | byte | The buffer holding data to write to the stream. |
offset | int | the offset within that data array to find the first byte to write. |
count | int | the number of bytes to write. |
return | void |