|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.h2.dev.util.AnsCompression
public class AnsCompression
An ANS (Asymmetric Numeral Systems) compression tool. It uses the range variant.
| Method Summary | |
|---|---|
static void |
countFrequencies(int[] freq,
byte[] data)
Count the frequencies of codes in the data, and increment the target frequency table. |
static byte[] |
decode(int[] freq,
byte[] data,
int length)
Decode the data. |
static byte[] |
encode(int[] freq,
byte[] data)
Encode the data. |
static void |
scaleFrequencies(int[] freq,
int total)
Scale the frequencies to a new total. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static void countFrequencies(int[] freq,
byte[] data)
freq - the target frequency tabledata - the data
public static void scaleFrequencies(int[] freq,
int total)
freq - the (source and target) frequency tabletotal - the target total (sum of all frequencies)
public static byte[] encode(int[] freq,
byte[] data)
freq - the frequency table (will be scaled)data - the source data (uncompressed)
public static byte[] decode(int[] freq,
byte[] data,
int length)
freq - the frequency table (will be scaled)data - the compressed datalength - the target length
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||