java.lang.Object
org.apache.commons.compress.compressors.lz4.XXHash32
All Implemented Interfaces:
Checksum

public class XXHash32 extends Object implements Checksum
Implementation of the xxhash32 hash algorithm.
Since:
1.14
See Also:
  • Field Details

  • Constructor Details

    • XXHash32

      public XXHash32()
      Creates an XXHash32 instance with a seed of 0.
    • XXHash32

      public XXHash32(int seed)
      Creates an XXHash32 instance.
      Parameters:
      seed - the seed to use
  • Method Details

    • reset

      public void reset()
      Specified by:
      reset in interface Checksum
    • update

      public void update(int b)
      Specified by:
      update in interface Checksum
    • update

      public void update(byte[] b, int off, int len)
      Specified by:
      update in interface Checksum
    • getValue

      public long getValue()
      Specified by:
      getValue in interface Checksum
    • getInt

      private static int getInt(byte[] buffer, int idx)
    • initializeState

      private void initializeState()
    • process

      private void process(byte[] b, int offset)