Class LZ4.FastCompressionHashTable

java.lang.Object
org.apache.lucene.util.compress.LZ4.HashTable
org.apache.lucene.util.compress.LZ4.FastCompressionHashTable
Enclosing class:
LZ4

public static final class LZ4.FastCompressionHashTable extends LZ4.HashTable
Simple lossy LZ4.HashTable that only stores the last ocurrence for each hash on 2^14 bytes of memory.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private int
     
    private byte[]
     
    private int
     
    private int
     
    private LZ4.Table
     
    private int
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Sole constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    (package private) boolean
     
    (package private) int
    get(int off)
    Advance the cursor to off and return an index that stored the same 4 bytes as b[o:o+4).
    (package private) void
    initDictionary(int dictLen)
    Init dictLen bytes to be used as a dictionary.
    int
    previous(int off)
    Return an index that less than off and stores the same 4 bytes.
    (package private) void
    reset(byte[] bytes, int off, int len)
    Reset this hash table in order to compress the given content.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • bytes

      private byte[] bytes
    • base

      private int base
    • lastOff

      private int lastOff
    • end

      private int end
    • hashLog

      private int hashLog
    • hashTable

      private LZ4.Table hashTable
  • Constructor Details

    • FastCompressionHashTable

      public FastCompressionHashTable()
      Sole constructor
  • Method Details

    • reset

      void reset(byte[] bytes, int off, int len)
      Description copied from class: LZ4.HashTable
      Reset this hash table in order to compress the given content.
      Specified by:
      reset in class LZ4.HashTable
    • initDictionary

      void initDictionary(int dictLen)
      Description copied from class: LZ4.HashTable
      Init dictLen bytes to be used as a dictionary.
      Specified by:
      initDictionary in class LZ4.HashTable
    • get

      int get(int off)
      Description copied from class: LZ4.HashTable
      Advance the cursor to off and return an index that stored the same 4 bytes as b[o:o+4). This may only be called on strictly increasing sequences of offsets. A return value of -1 indicates that no other index could be found.
      Specified by:
      get in class LZ4.HashTable
    • previous

      public int previous(int off)
      Description copied from class: LZ4.HashTable
      Return an index that less than off and stores the same 4 bytes. Unlike LZ4.HashTable.get(int), it doesn't need to be called on increasing offsets. A return value of -1 indicates that no other index could be found.
      Specified by:
      previous in class LZ4.HashTable
    • assertReset

      boolean assertReset()
      Specified by:
      assertReset in class LZ4.HashTable