public PRStream(PdfReader reader, byte[] conts, int compressionLevel)
{
this.reader = reader;
this.offset = -1;
if (Document.Compress) {
MemoryStream stream = new MemoryStream();
ZDeflaterOutputStream zip = new ZDeflaterOutputStream(stream, compressionLevel);
zip.Write(conts, 0, conts.Length);
zip.Close();
bytes = stream.ToArray();
Put(PdfName.FILTER, PdfName.FLATEDECODE);
}
else
bytes = conts;
Length = bytes.Length;
}