Class RunLengthCompressionStrategy

java.lang.Object
com.itextpdf.kernel.pdf.RunLengthCompressionStrategy
All Implemented Interfaces:
IStreamCompressionStrategy

public class RunLengthCompressionStrategy extends Object implements IStreamCompressionStrategy
A compression strategy that uses the RunLengthDecode filter for PDF streams.

This strategy implements the IStreamCompressionStrategy interface and provides RunLengthDecode encoding.

Run-length encoding works best, when input data has long sequences of identical bytes. This is, usually, not the case for PDF content streams, so using this strategy will often cause a marginal size increase instead.