C# Class Org.BouncyCastle.Bcpg.OpenPgp.PgpCompressedDataGenerator

Class for producing compressed data packets.
Inheritance: IStreamGenerator
Mostra file Open project: nonorganic/dssnet Class Usage Examples

Public Methods

Method Description
Close ( ) : void

Close the compressed object.

Open ( Stream outStr ) : Stream

Return an output stream which will save the data being written to the compressed object.

The stream created can be closed off by either calling Close() on the stream or Close() on the generator. Closing the returned stream does not close off the Stream parameter outStr.

Open ( Stream outStr, byte buffer ) : Stream

Return an output stream which will compress the data as it is written to it. The stream will be written out in chunks according to the size of the passed in buffer.

The stream created can be closed off by either calling Close() on the stream or Close() on the generator. Closing the returned stream does not close off the Stream parameter outStr.

Note: if the buffer is not a power of 2 in length only the largest power of 2 bytes worth of the buffer will be used.

Note: using this may break compatibility with RFC 1991 compliant tools. Only recent OpenPGP implementations are capable of accepting these streams.

PgpCompressedDataGenerator ( CompressionAlgorithmTag algorithm ) : System
PgpCompressedDataGenerator ( CompressionAlgorithmTag algorithm, int compression ) : System

Private Methods

Method Description
doOpen ( ) : void

Method Details

Close() public method

Close the compressed object.
public Close ( ) : void
return void

Open() public method

Return an output stream which will save the data being written to the compressed object.

The stream created can be closed off by either calling Close() on the stream or Close() on the generator. Closing the returned stream does not close off the Stream parameter outStr.

public Open ( Stream outStr ) : Stream
outStr Stream Stream to be used for output.
return Stream

Open() public method

Return an output stream which will compress the data as it is written to it. The stream will be written out in chunks according to the size of the passed in buffer.

The stream created can be closed off by either calling Close() on the stream or Close() on the generator. Closing the returned stream does not close off the Stream parameter outStr.

Note: if the buffer is not a power of 2 in length only the largest power of 2 bytes worth of the buffer will be used.

Note: using this may break compatibility with RFC 1991 compliant tools. Only recent OpenPGP implementations are capable of accepting these streams.

public Open ( Stream outStr, byte buffer ) : Stream
outStr Stream Stream to be used for output.
buffer byte The buffer to use.
return Stream

PgpCompressedDataGenerator() public method

public PgpCompressedDataGenerator ( CompressionAlgorithmTag algorithm ) : System
algorithm CompressionAlgorithmTag
return System

PgpCompressedDataGenerator() public method

public PgpCompressedDataGenerator ( CompressionAlgorithmTag algorithm, int compression ) : System
algorithm CompressionAlgorithmTag
compression int
return System