Class IntegratedIntCompressor

java.lang.Object
me.lemire.integercompression.differential.IntegratedIntCompressor

public class IntegratedIntCompressor extends Object
This is a convenience class that wraps a codec to provide a "friendly" API. It is useful to compress sorted integers. If your integers are not sorted (not even nearly so), please consider the IntCompressor class instead.
  • Constructor Details

    • IntegratedIntCompressor

      public IntegratedIntCompressor(SkippableIntegratedIntegerCODEC c)
      Constructor wrapping a codec.
      Parameters:
      c - the underlying codec
    • IntegratedIntCompressor

      public IntegratedIntCompressor()
      Constructor with default codec.
  • Method Details

    • compress

      public int[] compress(int[] input)
      Compress an array and returns the compressed result as a new array.
      Parameters:
      input - array to be compressed
      Returns:
      compressed array
    • uncompress

      public int[] uncompress(int[] compressed)
      Uncompress an array and returns the uncompressed result as a new array.
      Parameters:
      compressed - compressed array
      Returns:
      uncompressed array