Class Compressor

java.lang.Object
healpix.essentials.Compressor

public class Compressor extends 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
Author:
Martin Reinecke
Copyright:
2014 Max-Planck-Society
  • Constructor Details

    • Compressor

      public Compressor()
  • Method Details

    • interpol_encode

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

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