Package healpix.essentials

# 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

## Constructor Summary

Constructors
Constructor
Description
`Compressor()`

## Method Summary

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 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`