示例#1
0
 private static byte[] compactTable(final int[] table) {
   byte[] ret = new byte[4 * table.length];
   for (int i = 0, off = 0; i < table.length; i++, off += 4) {
     BinConverter.intToByteArray(table[i], ret, off);
   }
   return RLL.compress((byte) 0, ret);
 }
示例#2
0
 private static int[] expandTable(final byte[] source) {
   byte[] t = RLL.expand(source);
   int[] ret = new int[t.length >> 2];
   for (int i = 0, off = 0; i < ret.length; i++, off += 4) {
     ret[i] = BinConverter.byteArrayToInt(t, off);
   }
   return ret;
 }