Class LZ4.HighCompressionHashTable

  • Enclosing class:
    LZ4

    public static final class LZ4.HighCompressionHashTable
    extends LZ4.HashTable
    A higher-precision LZ4.HashTable. It stores up to 256 occurrences of 4-bytes sequences in the last 2^16 bytes, which makes it much more likely to find matches than LZ4.FastCompressionHashTable.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private void addHash​(int off)  
      (package private) boolean assertReset()  
      (package private) int get​(int off)
      Advance the cursor to and return an index that stored the same 4 bytes as b[o:o+4).
      (package private) 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 Detail

      • bytes

        private byte[] bytes
      • base

        private int base
      • next

        private int next
      • end

        private int end
      • hashTable

        private final int[] hashTable
      • chainTable

        private final short[] chainTable
      • attempts

        private int attempts
    • Constructor Detail

      • HighCompressionHashTable

        public HighCompressionHashTable()
        Sole constructor
    • Method Detail

      • 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
      • get

        int get​(int off)
        Description copied from class: LZ4.HashTable
        Advance the cursor to 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
      • addHash

        private void addHash​(int off)
      • previous

        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