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.

Namespace: Org.BouncyCastle.Bcpg.OpenPgp
Assembly: ITextSharp (in ITextSharp.dll) Version: 4.1.6.0

Syntax

C#
public Stream Open(
	Stream outStr,
	byte[] buffer
)
Visual Basic
Public Function Open ( _
	outStr As Stream, _
	buffer As Byte() _
) As Stream
Visual C++
public:
Stream^ Open(
	Stream^ outStr, 
	array<unsigned char>^ buffer
)

Parameters

outStr
Type: System.IO..::..Stream
Stream to be used for output.
buffer
Type: array<System..::..Byte>[]()[][]
The buffer to use.

Return Value

A Stream for output of the compressed data.

Exceptions

See Also