Class LZ77Compressor.AbstractReference

java.lang.Object
org.apache.commons.compress.compressors.lz77support.LZ77Compressor.Block
org.apache.commons.compress.compressors.lz77support.LZ77Compressor.AbstractReference
Direct Known Subclasses:
LZ77Compressor.BackReference, LZ77Compressor.LiteralBlock
Enclosing class:
LZ77Compressor

public abstract static class LZ77Compressor.AbstractReference extends LZ77Compressor.Block
Represents a back-reference.
  • Field Details

    • offset

      private final int offset
    • length

      private final int length
  • Constructor Details

    • AbstractReference

      public AbstractReference(LZ77Compressor.Block.BlockType blockType, int offset, int length)
      Constructs a new instance.
      Parameters:
      blockType - The block type.
      offset - the offset of the reference.
      length - the offset of the reference.
  • Method Details

    • getLength

      public int getLength()
      Gets the offset of the reference.
      Returns:
      the length
    • getOffset

      public int getOffset()
      Gets the offset of the reference.
      Returns:
      the offset
    • toString

      public String toString()
      Overrides:
      toString in class LZ77Compressor.Block