public interface IStreamCompressionStrategy
This interface defines the contract for compression strategies that can be applied to PDF streams. Different compression algorithms can be implemented by providing concrete implementations of this interface.
| Modifier and Type | Method and Description |
|---|---|
OutputStream |
createNewOutputStream(OutputStream original,
PdfStream stream)
Creates a new output stream that wraps the original stream and applies compression.
|
PdfObject |
getDecodeParams()
Gets the decode parameters required for decompressing the stream.
|
PdfName |
getFilterName()
Gets the PDF filter name that identifies this compression algorithm.
|
PdfName getFilterName()
PdfObject getDecodeParams()
Decode parameters provide additional information needed to correctly
decompress the stream data. This may include predictor settings,
color information, or other algorithm-specific parameters.
The returned object is typically a PdfDictionary or PdfArray,
or null if no special parameters are required.
null if not neededOutputStream createNewOutputStream(OutputStream original, PdfStream stream)
This method wraps the provided output stream with a compression implementation. Data written to the returned stream will be compressed before being written to the original stream.
If the stream requires finalization (e.g., to flush buffers or write end markers),
the returned output stream should also implement the IFinishable interface,
original - the original output stream to wrapstream - the PDF stream being compressed (may be used for context or configuration)Copyright © 1998–2026 Apryse Group NV. All rights reserved.