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

Class for producing compressed data packets.
Inheritance: IStreamGenerator
Afficher le fichier Open project: nonorganic/dssnet Class Usage Examples

Méthodes publiques

Méthode 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

Méthode Description
doOpen ( ) : void

Method Details

Close() public méthode

Close the compressed object.
public Close ( ) : void
Résultat void

Open() public méthode

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.
Résultat Stream

Open() public méthode

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.
Résultat Stream

PgpCompressedDataGenerator() public méthode

public PgpCompressedDataGenerator ( CompressionAlgorithmTag algorithm ) : System
algorithm CompressionAlgorithmTag
Résultat System

PgpCompressedDataGenerator() public méthode

public PgpCompressedDataGenerator ( CompressionAlgorithmTag algorithm, int compression ) : System
algorithm CompressionAlgorithmTag
compression int
Résultat System