public class ASCIIHexCompressionStrategy extends Object implements IStreamCompressionStrategy
ASCIIHexDecode filter for PDF
streams.
This strategy implements the IStreamCompressionStrategy interface
and provides ASCIIHexDecode encoding.
The strategy ensures, that streams are saved using just 7-bit ASCII characters, but it doubles the sizes of streams compared to just saving them as-is. So calling this a "compression strategy" is a misnomer.
| Constructor and Description |
|---|
ASCIIHexCompressionStrategy()
Constructs a new
ASCIIHexCompressionStrategy instance. |
| Modifier and Type | Method and Description |
|---|---|
OutputStream |
createNewOutputStream(OutputStream original,
PdfStream stream)
Creates a new output stream with ASCIIHex compression applied.
|
PdfObject |
getDecodeParams()
Returns the decode parameters for the
ASCIIHexDecode filter. |
PdfName |
getFilterName()
Returns the name of the compression filter.
|
public ASCIIHexCompressionStrategy()
ASCIIHexCompressionStrategy instance.public PdfName getFilterName()
getFilterName in interface IStreamCompressionStrategyPdfName.ASCIIHexDecode representing the ASCIIHexDecode filterpublic PdfObject getDecodeParams()
ASCIIHexDecode filter.
This implementation returns null as no special decode parameters
are required for standard ASCIIHex compression.
getDecodeParams in interface IStreamCompressionStrategynull as no decode parameters are neededpublic OutputStream createNewOutputStream(OutputStream original, PdfStream stream)
This method wraps the original output stream in a ASCIIHexOutputStream
that applies ASCIIHex compression.
createNewOutputStream in interface IStreamCompressionStrategyoriginal - the original output stream to wrapstream - the PDF stream containing compression configurationASCIIHexOutputStream that compresses data using the ASCIIHex algorithmCopyright © 1998–2026 Apryse Group NV. All rights reserved.