Class Compressor


  • public class Compressor
    extends java.lang.Object
    Class for compressing/uncompressing monotonous integer sequences. Implementation inspired by Moffat and Stuiver 2000: "Binary Interpolative Coding for Effective Index Compression", Information Retrieval 3, 25
    • Constructor Summary

      Constructors 
      Constructor Description
      Compressor()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static long[] interpol_decode​(byte[] data)
      Return an array containing the number sequence decompressed from data.
      static byte[] interpol_encode​(long[] data, int begin, int end)
      Return a byte array representing the compressed sequence [data[begin]; data[end-1]]
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Compressor

        public Compressor()
    • Method Detail

      • interpol_encode

        public static byte[] interpol_encode​(long[] data,
                                             int begin,
                                             int end)
                                      throws java.lang.Exception
        Return a byte array representing the compressed sequence [data[begin]; data[end-1]]
        Throws:
        java.lang.Exception
      • interpol_decode

        public static long[] interpol_decode​(byte[] data)
                                      throws java.lang.Exception
        Return an array containing the number sequence decompressed from data.
        Throws:
        java.lang.Exception