lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From uschind...@apache.org
Subject svn commit: r1379940 [4/13] - in /lucene/dev/branches/lucene3312: ./ dev-tools/ dev-tools/maven/solr/core/ dev-tools/maven/solr/solrj/ lucene/ lucene/analysis/ lucene/analysis/common/ lucene/analysis/common/src/java/org/apache/lucene/analysis/util/ luc...
Date Sun, 02 Sep 2012 11:21:05 GMT
Modified: lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked15.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked15.java?rev=1379940&r1=1379939&r2=1379940&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked15.java (original)
+++ lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked15.java Sun Sep  2 11:21:01 2012
@@ -24,568 +24,238 @@ package org.apache.lucene.util.packed;
  */
 final class BulkOperationPacked15 extends BulkOperationPacked {
 
-    public BulkOperationPacked15() {
-      super(15);
-      assert blockCount() == 15;
-      assert valueCount() == 64;
+  public BulkOperationPacked15() {
+    super(15);
+    assert blockCount() == 15;
+    assert valueCount() == 64;
+  }
+
+  @Override
+  public void decode(long[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) {
+    for (int i = 0; i < iterations; ++i) {
+      final long block0 = blocks[blocksOffset++];
+      values[valuesOffset++] = (int) (block0 >>> 49);
+      values[valuesOffset++] = (int) ((block0 >>> 34) & 32767L);
+      values[valuesOffset++] = (int) ((block0 >>> 19) & 32767L);
+      values[valuesOffset++] = (int) ((block0 >>> 4) & 32767L);
+      final long block1 = blocks[blocksOffset++];
+      values[valuesOffset++] = (int) (((block0 & 15L) << 11) | (block1 >>> 53));
+      values[valuesOffset++] = (int) ((block1 >>> 38) & 32767L);
+      values[valuesOffset++] = (int) ((block1 >>> 23) & 32767L);
+      values[valuesOffset++] = (int) ((block1 >>> 8) & 32767L);
+      final long block2 = blocks[blocksOffset++];
+      values[valuesOffset++] = (int) (((block1 & 255L) << 7) | (block2 >>> 57));
+      values[valuesOffset++] = (int) ((block2 >>> 42) & 32767L);
+      values[valuesOffset++] = (int) ((block2 >>> 27) & 32767L);
+      values[valuesOffset++] = (int) ((block2 >>> 12) & 32767L);
+      final long block3 = blocks[blocksOffset++];
+      values[valuesOffset++] = (int) (((block2 & 4095L) << 3) | (block3 >>> 61));
+      values[valuesOffset++] = (int) ((block3 >>> 46) & 32767L);
+      values[valuesOffset++] = (int) ((block3 >>> 31) & 32767L);
+      values[valuesOffset++] = (int) ((block3 >>> 16) & 32767L);
+      values[valuesOffset++] = (int) ((block3 >>> 1) & 32767L);
+      final long block4 = blocks[blocksOffset++];
+      values[valuesOffset++] = (int) (((block3 & 1L) << 14) | (block4 >>> 50));
+      values[valuesOffset++] = (int) ((block4 >>> 35) & 32767L);
+      values[valuesOffset++] = (int) ((block4 >>> 20) & 32767L);
+      values[valuesOffset++] = (int) ((block4 >>> 5) & 32767L);
+      final long block5 = blocks[blocksOffset++];
+      values[valuesOffset++] = (int) (((block4 & 31L) << 10) | (block5 >>> 54));
+      values[valuesOffset++] = (int) ((block5 >>> 39) & 32767L);
+      values[valuesOffset++] = (int) ((block5 >>> 24) & 32767L);
+      values[valuesOffset++] = (int) ((block5 >>> 9) & 32767L);
+      final long block6 = blocks[blocksOffset++];
+      values[valuesOffset++] = (int) (((block5 & 511L) << 6) | (block6 >>> 58));
+      values[valuesOffset++] = (int) ((block6 >>> 43) & 32767L);
+      values[valuesOffset++] = (int) ((block6 >>> 28) & 32767L);
+      values[valuesOffset++] = (int) ((block6 >>> 13) & 32767L);
+      final long block7 = blocks[blocksOffset++];
+      values[valuesOffset++] = (int) (((block6 & 8191L) << 2) | (block7 >>> 62));
+      values[valuesOffset++] = (int) ((block7 >>> 47) & 32767L);
+      values[valuesOffset++] = (int) ((block7 >>> 32) & 32767L);
+      values[valuesOffset++] = (int) ((block7 >>> 17) & 32767L);
+      values[valuesOffset++] = (int) ((block7 >>> 2) & 32767L);
+      final long block8 = blocks[blocksOffset++];
+      values[valuesOffset++] = (int) (((block7 & 3L) << 13) | (block8 >>> 51));
+      values[valuesOffset++] = (int) ((block8 >>> 36) & 32767L);
+      values[valuesOffset++] = (int) ((block8 >>> 21) & 32767L);
+      values[valuesOffset++] = (int) ((block8 >>> 6) & 32767L);
+      final long block9 = blocks[blocksOffset++];
+      values[valuesOffset++] = (int) (((block8 & 63L) << 9) | (block9 >>> 55));
+      values[valuesOffset++] = (int) ((block9 >>> 40) & 32767L);
+      values[valuesOffset++] = (int) ((block9 >>> 25) & 32767L);
+      values[valuesOffset++] = (int) ((block9 >>> 10) & 32767L);
+      final long block10 = blocks[blocksOffset++];
+      values[valuesOffset++] = (int) (((block9 & 1023L) << 5) | (block10 >>> 59));
+      values[valuesOffset++] = (int) ((block10 >>> 44) & 32767L);
+      values[valuesOffset++] = (int) ((block10 >>> 29) & 32767L);
+      values[valuesOffset++] = (int) ((block10 >>> 14) & 32767L);
+      final long block11 = blocks[blocksOffset++];
+      values[valuesOffset++] = (int) (((block10 & 16383L) << 1) | (block11 >>> 63));
+      values[valuesOffset++] = (int) ((block11 >>> 48) & 32767L);
+      values[valuesOffset++] = (int) ((block11 >>> 33) & 32767L);
+      values[valuesOffset++] = (int) ((block11 >>> 18) & 32767L);
+      values[valuesOffset++] = (int) ((block11 >>> 3) & 32767L);
+      final long block12 = blocks[blocksOffset++];
+      values[valuesOffset++] = (int) (((block11 & 7L) << 12) | (block12 >>> 52));
+      values[valuesOffset++] = (int) ((block12 >>> 37) & 32767L);
+      values[valuesOffset++] = (int) ((block12 >>> 22) & 32767L);
+      values[valuesOffset++] = (int) ((block12 >>> 7) & 32767L);
+      final long block13 = blocks[blocksOffset++];
+      values[valuesOffset++] = (int) (((block12 & 127L) << 8) | (block13 >>> 56));
+      values[valuesOffset++] = (int) ((block13 >>> 41) & 32767L);
+      values[valuesOffset++] = (int) ((block13 >>> 26) & 32767L);
+      values[valuesOffset++] = (int) ((block13 >>> 11) & 32767L);
+      final long block14 = blocks[blocksOffset++];
+      values[valuesOffset++] = (int) (((block13 & 2047L) << 4) | (block14 >>> 60));
+      values[valuesOffset++] = (int) ((block14 >>> 45) & 32767L);
+      values[valuesOffset++] = (int) ((block14 >>> 30) & 32767L);
+      values[valuesOffset++] = (int) ((block14 >>> 15) & 32767L);
+      values[valuesOffset++] = (int) (block14 & 32767L);
     }
+  }
 
-    @Override
-    public void decode(long[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) {
-      assert blocksOffset + iterations * blockCount() <= blocks.length;
-      assert valuesOffset + iterations * valueCount() <= values.length;
-      for (int i = 0; i < iterations; ++i) {
-        final long block0 = blocks[blocksOffset++];
-        values[valuesOffset++] = (int) (block0 >>> 49);
-        values[valuesOffset++] = (int) ((block0 >>> 34) & 32767L);
-        values[valuesOffset++] = (int) ((block0 >>> 19) & 32767L);
-        values[valuesOffset++] = (int) ((block0 >>> 4) & 32767L);
-        final long block1 = blocks[blocksOffset++];
-        values[valuesOffset++] = (int) (((block0 & 15L) << 11) | (block1 >>> 53));
-        values[valuesOffset++] = (int) ((block1 >>> 38) & 32767L);
-        values[valuesOffset++] = (int) ((block1 >>> 23) & 32767L);
-        values[valuesOffset++] = (int) ((block1 >>> 8) & 32767L);
-        final long block2 = blocks[blocksOffset++];
-        values[valuesOffset++] = (int) (((block1 & 255L) << 7) | (block2 >>> 57));
-        values[valuesOffset++] = (int) ((block2 >>> 42) & 32767L);
-        values[valuesOffset++] = (int) ((block2 >>> 27) & 32767L);
-        values[valuesOffset++] = (int) ((block2 >>> 12) & 32767L);
-        final long block3 = blocks[blocksOffset++];
-        values[valuesOffset++] = (int) (((block2 & 4095L) << 3) | (block3 >>> 61));
-        values[valuesOffset++] = (int) ((block3 >>> 46) & 32767L);
-        values[valuesOffset++] = (int) ((block3 >>> 31) & 32767L);
-        values[valuesOffset++] = (int) ((block3 >>> 16) & 32767L);
-        values[valuesOffset++] = (int) ((block3 >>> 1) & 32767L);
-        final long block4 = blocks[blocksOffset++];
-        values[valuesOffset++] = (int) (((block3 & 1L) << 14) | (block4 >>> 50));
-        values[valuesOffset++] = (int) ((block4 >>> 35) & 32767L);
-        values[valuesOffset++] = (int) ((block4 >>> 20) & 32767L);
-        values[valuesOffset++] = (int) ((block4 >>> 5) & 32767L);
-        final long block5 = blocks[blocksOffset++];
-        values[valuesOffset++] = (int) (((block4 & 31L) << 10) | (block5 >>> 54));
-        values[valuesOffset++] = (int) ((block5 >>> 39) & 32767L);
-        values[valuesOffset++] = (int) ((block5 >>> 24) & 32767L);
-        values[valuesOffset++] = (int) ((block5 >>> 9) & 32767L);
-        final long block6 = blocks[blocksOffset++];
-        values[valuesOffset++] = (int) (((block5 & 511L) << 6) | (block6 >>> 58));
-        values[valuesOffset++] = (int) ((block6 >>> 43) & 32767L);
-        values[valuesOffset++] = (int) ((block6 >>> 28) & 32767L);
-        values[valuesOffset++] = (int) ((block6 >>> 13) & 32767L);
-        final long block7 = blocks[blocksOffset++];
-        values[valuesOffset++] = (int) (((block6 & 8191L) << 2) | (block7 >>> 62));
-        values[valuesOffset++] = (int) ((block7 >>> 47) & 32767L);
-        values[valuesOffset++] = (int) ((block7 >>> 32) & 32767L);
-        values[valuesOffset++] = (int) ((block7 >>> 17) & 32767L);
-        values[valuesOffset++] = (int) ((block7 >>> 2) & 32767L);
-        final long block8 = blocks[blocksOffset++];
-        values[valuesOffset++] = (int) (((block7 & 3L) << 13) | (block8 >>> 51));
-        values[valuesOffset++] = (int) ((block8 >>> 36) & 32767L);
-        values[valuesOffset++] = (int) ((block8 >>> 21) & 32767L);
-        values[valuesOffset++] = (int) ((block8 >>> 6) & 32767L);
-        final long block9 = blocks[blocksOffset++];
-        values[valuesOffset++] = (int) (((block8 & 63L) << 9) | (block9 >>> 55));
-        values[valuesOffset++] = (int) ((block9 >>> 40) & 32767L);
-        values[valuesOffset++] = (int) ((block9 >>> 25) & 32767L);
-        values[valuesOffset++] = (int) ((block9 >>> 10) & 32767L);
-        final long block10 = blocks[blocksOffset++];
-        values[valuesOffset++] = (int) (((block9 & 1023L) << 5) | (block10 >>> 59));
-        values[valuesOffset++] = (int) ((block10 >>> 44) & 32767L);
-        values[valuesOffset++] = (int) ((block10 >>> 29) & 32767L);
-        values[valuesOffset++] = (int) ((block10 >>> 14) & 32767L);
-        final long block11 = blocks[blocksOffset++];
-        values[valuesOffset++] = (int) (((block10 & 16383L) << 1) | (block11 >>> 63));
-        values[valuesOffset++] = (int) ((block11 >>> 48) & 32767L);
-        values[valuesOffset++] = (int) ((block11 >>> 33) & 32767L);
-        values[valuesOffset++] = (int) ((block11 >>> 18) & 32767L);
-        values[valuesOffset++] = (int) ((block11 >>> 3) & 32767L);
-        final long block12 = blocks[blocksOffset++];
-        values[valuesOffset++] = (int) (((block11 & 7L) << 12) | (block12 >>> 52));
-        values[valuesOffset++] = (int) ((block12 >>> 37) & 32767L);
-        values[valuesOffset++] = (int) ((block12 >>> 22) & 32767L);
-        values[valuesOffset++] = (int) ((block12 >>> 7) & 32767L);
-        final long block13 = blocks[blocksOffset++];
-        values[valuesOffset++] = (int) (((block12 & 127L) << 8) | (block13 >>> 56));
-        values[valuesOffset++] = (int) ((block13 >>> 41) & 32767L);
-        values[valuesOffset++] = (int) ((block13 >>> 26) & 32767L);
-        values[valuesOffset++] = (int) ((block13 >>> 11) & 32767L);
-        final long block14 = blocks[blocksOffset++];
-        values[valuesOffset++] = (int) (((block13 & 2047L) << 4) | (block14 >>> 60));
-        values[valuesOffset++] = (int) ((block14 >>> 45) & 32767L);
-        values[valuesOffset++] = (int) ((block14 >>> 30) & 32767L);
-        values[valuesOffset++] = (int) ((block14 >>> 15) & 32767L);
-        values[valuesOffset++] = (int) (block14 & 32767L);
-      }
+  @Override
+  public void decode(byte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) {
+    for (int i = 0; i < 8 * iterations; ++i) {
+      final int byte0 = blocks[blocksOffset++] & 0xFF;
+      final int byte1 = blocks[blocksOffset++] & 0xFF;
+      values[valuesOffset++] = (byte0 << 7) | (byte1 >>> 1);
+      final int byte2 = blocks[blocksOffset++] & 0xFF;
+      final int byte3 = blocks[blocksOffset++] & 0xFF;
+      values[valuesOffset++] = ((byte1 & 1) << 14) | (byte2 << 6) | (byte3 >>> 2);
+      final int byte4 = blocks[blocksOffset++] & 0xFF;
+      final int byte5 = blocks[blocksOffset++] & 0xFF;
+      values[valuesOffset++] = ((byte3 & 3) << 13) | (byte4 << 5) | (byte5 >>> 3);
+      final int byte6 = blocks[blocksOffset++] & 0xFF;
+      final int byte7 = blocks[blocksOffset++] & 0xFF;
+      values[valuesOffset++] = ((byte5 & 7) << 12) | (byte6 << 4) | (byte7 >>> 4);
+      final int byte8 = blocks[blocksOffset++] & 0xFF;
+      final int byte9 = blocks[blocksOffset++] & 0xFF;
+      values[valuesOffset++] = ((byte7 & 15) << 11) | (byte8 << 3) | (byte9 >>> 5);
+      final int byte10 = blocks[blocksOffset++] & 0xFF;
+      final int byte11 = blocks[blocksOffset++] & 0xFF;
+      values[valuesOffset++] = ((byte9 & 31) << 10) | (byte10 << 2) | (byte11 >>> 6);
+      final int byte12 = blocks[blocksOffset++] & 0xFF;
+      final int byte13 = blocks[blocksOffset++] & 0xFF;
+      values[valuesOffset++] = ((byte11 & 63) << 9) | (byte12 << 1) | (byte13 >>> 7);
+      final int byte14 = blocks[blocksOffset++] & 0xFF;
+      values[valuesOffset++] = ((byte13 & 127) << 8) | byte14;
     }
+  }
 
-    @Override
-    public void decode(byte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) {
-      assert blocksOffset + 8 * iterations * blockCount() <= blocks.length;
-      assert valuesOffset + iterations * valueCount() <= values.length;
-      for (int i = 0; i < iterations; ++i) {
-        final int byte0 = blocks[blocksOffset++] & 0xFF;
-        final int byte1 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = (byte0 << 7) | (byte1 >>> 1);
-        final int byte2 = blocks[blocksOffset++] & 0xFF;
-        final int byte3 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte1 & 1) << 14) | (byte2 << 6) | (byte3 >>> 2);
-        final int byte4 = blocks[blocksOffset++] & 0xFF;
-        final int byte5 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte3 & 3) << 13) | (byte4 << 5) | (byte5 >>> 3);
-        final int byte6 = blocks[blocksOffset++] & 0xFF;
-        final int byte7 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte5 & 7) << 12) | (byte6 << 4) | (byte7 >>> 4);
-        final int byte8 = blocks[blocksOffset++] & 0xFF;
-        final int byte9 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte7 & 15) << 11) | (byte8 << 3) | (byte9 >>> 5);
-        final int byte10 = blocks[blocksOffset++] & 0xFF;
-        final int byte11 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte9 & 31) << 10) | (byte10 << 2) | (byte11 >>> 6);
-        final int byte12 = blocks[blocksOffset++] & 0xFF;
-        final int byte13 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte11 & 63) << 9) | (byte12 << 1) | (byte13 >>> 7);
-        final int byte14 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte13 & 127) << 8) | byte14;
-        final int byte15 = blocks[blocksOffset++] & 0xFF;
-        final int byte16 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = (byte15 << 7) | (byte16 >>> 1);
-        final int byte17 = blocks[blocksOffset++] & 0xFF;
-        final int byte18 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte16 & 1) << 14) | (byte17 << 6) | (byte18 >>> 2);
-        final int byte19 = blocks[blocksOffset++] & 0xFF;
-        final int byte20 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte18 & 3) << 13) | (byte19 << 5) | (byte20 >>> 3);
-        final int byte21 = blocks[blocksOffset++] & 0xFF;
-        final int byte22 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte20 & 7) << 12) | (byte21 << 4) | (byte22 >>> 4);
-        final int byte23 = blocks[blocksOffset++] & 0xFF;
-        final int byte24 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte22 & 15) << 11) | (byte23 << 3) | (byte24 >>> 5);
-        final int byte25 = blocks[blocksOffset++] & 0xFF;
-        final int byte26 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte24 & 31) << 10) | (byte25 << 2) | (byte26 >>> 6);
-        final int byte27 = blocks[blocksOffset++] & 0xFF;
-        final int byte28 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte26 & 63) << 9) | (byte27 << 1) | (byte28 >>> 7);
-        final int byte29 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte28 & 127) << 8) | byte29;
-        final int byte30 = blocks[blocksOffset++] & 0xFF;
-        final int byte31 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = (byte30 << 7) | (byte31 >>> 1);
-        final int byte32 = blocks[blocksOffset++] & 0xFF;
-        final int byte33 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte31 & 1) << 14) | (byte32 << 6) | (byte33 >>> 2);
-        final int byte34 = blocks[blocksOffset++] & 0xFF;
-        final int byte35 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte33 & 3) << 13) | (byte34 << 5) | (byte35 >>> 3);
-        final int byte36 = blocks[blocksOffset++] & 0xFF;
-        final int byte37 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte35 & 7) << 12) | (byte36 << 4) | (byte37 >>> 4);
-        final int byte38 = blocks[blocksOffset++] & 0xFF;
-        final int byte39 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte37 & 15) << 11) | (byte38 << 3) | (byte39 >>> 5);
-        final int byte40 = blocks[blocksOffset++] & 0xFF;
-        final int byte41 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte39 & 31) << 10) | (byte40 << 2) | (byte41 >>> 6);
-        final int byte42 = blocks[blocksOffset++] & 0xFF;
-        final int byte43 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte41 & 63) << 9) | (byte42 << 1) | (byte43 >>> 7);
-        final int byte44 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte43 & 127) << 8) | byte44;
-        final int byte45 = blocks[blocksOffset++] & 0xFF;
-        final int byte46 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = (byte45 << 7) | (byte46 >>> 1);
-        final int byte47 = blocks[blocksOffset++] & 0xFF;
-        final int byte48 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte46 & 1) << 14) | (byte47 << 6) | (byte48 >>> 2);
-        final int byte49 = blocks[blocksOffset++] & 0xFF;
-        final int byte50 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte48 & 3) << 13) | (byte49 << 5) | (byte50 >>> 3);
-        final int byte51 = blocks[blocksOffset++] & 0xFF;
-        final int byte52 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte50 & 7) << 12) | (byte51 << 4) | (byte52 >>> 4);
-        final int byte53 = blocks[blocksOffset++] & 0xFF;
-        final int byte54 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte52 & 15) << 11) | (byte53 << 3) | (byte54 >>> 5);
-        final int byte55 = blocks[blocksOffset++] & 0xFF;
-        final int byte56 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte54 & 31) << 10) | (byte55 << 2) | (byte56 >>> 6);
-        final int byte57 = blocks[blocksOffset++] & 0xFF;
-        final int byte58 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte56 & 63) << 9) | (byte57 << 1) | (byte58 >>> 7);
-        final int byte59 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte58 & 127) << 8) | byte59;
-        final int byte60 = blocks[blocksOffset++] & 0xFF;
-        final int byte61 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = (byte60 << 7) | (byte61 >>> 1);
-        final int byte62 = blocks[blocksOffset++] & 0xFF;
-        final int byte63 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte61 & 1) << 14) | (byte62 << 6) | (byte63 >>> 2);
-        final int byte64 = blocks[blocksOffset++] & 0xFF;
-        final int byte65 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte63 & 3) << 13) | (byte64 << 5) | (byte65 >>> 3);
-        final int byte66 = blocks[blocksOffset++] & 0xFF;
-        final int byte67 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte65 & 7) << 12) | (byte66 << 4) | (byte67 >>> 4);
-        final int byte68 = blocks[blocksOffset++] & 0xFF;
-        final int byte69 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte67 & 15) << 11) | (byte68 << 3) | (byte69 >>> 5);
-        final int byte70 = blocks[blocksOffset++] & 0xFF;
-        final int byte71 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte69 & 31) << 10) | (byte70 << 2) | (byte71 >>> 6);
-        final int byte72 = blocks[blocksOffset++] & 0xFF;
-        final int byte73 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte71 & 63) << 9) | (byte72 << 1) | (byte73 >>> 7);
-        final int byte74 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte73 & 127) << 8) | byte74;
-        final int byte75 = blocks[blocksOffset++] & 0xFF;
-        final int byte76 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = (byte75 << 7) | (byte76 >>> 1);
-        final int byte77 = blocks[blocksOffset++] & 0xFF;
-        final int byte78 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte76 & 1) << 14) | (byte77 << 6) | (byte78 >>> 2);
-        final int byte79 = blocks[blocksOffset++] & 0xFF;
-        final int byte80 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte78 & 3) << 13) | (byte79 << 5) | (byte80 >>> 3);
-        final int byte81 = blocks[blocksOffset++] & 0xFF;
-        final int byte82 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte80 & 7) << 12) | (byte81 << 4) | (byte82 >>> 4);
-        final int byte83 = blocks[blocksOffset++] & 0xFF;
-        final int byte84 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte82 & 15) << 11) | (byte83 << 3) | (byte84 >>> 5);
-        final int byte85 = blocks[blocksOffset++] & 0xFF;
-        final int byte86 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte84 & 31) << 10) | (byte85 << 2) | (byte86 >>> 6);
-        final int byte87 = blocks[blocksOffset++] & 0xFF;
-        final int byte88 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte86 & 63) << 9) | (byte87 << 1) | (byte88 >>> 7);
-        final int byte89 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte88 & 127) << 8) | byte89;
-        final int byte90 = blocks[blocksOffset++] & 0xFF;
-        final int byte91 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = (byte90 << 7) | (byte91 >>> 1);
-        final int byte92 = blocks[blocksOffset++] & 0xFF;
-        final int byte93 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte91 & 1) << 14) | (byte92 << 6) | (byte93 >>> 2);
-        final int byte94 = blocks[blocksOffset++] & 0xFF;
-        final int byte95 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte93 & 3) << 13) | (byte94 << 5) | (byte95 >>> 3);
-        final int byte96 = blocks[blocksOffset++] & 0xFF;
-        final int byte97 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte95 & 7) << 12) | (byte96 << 4) | (byte97 >>> 4);
-        final int byte98 = blocks[blocksOffset++] & 0xFF;
-        final int byte99 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte97 & 15) << 11) | (byte98 << 3) | (byte99 >>> 5);
-        final int byte100 = blocks[blocksOffset++] & 0xFF;
-        final int byte101 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte99 & 31) << 10) | (byte100 << 2) | (byte101 >>> 6);
-        final int byte102 = blocks[blocksOffset++] & 0xFF;
-        final int byte103 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte101 & 63) << 9) | (byte102 << 1) | (byte103 >>> 7);
-        final int byte104 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte103 & 127) << 8) | byte104;
-        final int byte105 = blocks[blocksOffset++] & 0xFF;
-        final int byte106 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = (byte105 << 7) | (byte106 >>> 1);
-        final int byte107 = blocks[blocksOffset++] & 0xFF;
-        final int byte108 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte106 & 1) << 14) | (byte107 << 6) | (byte108 >>> 2);
-        final int byte109 = blocks[blocksOffset++] & 0xFF;
-        final int byte110 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte108 & 3) << 13) | (byte109 << 5) | (byte110 >>> 3);
-        final int byte111 = blocks[blocksOffset++] & 0xFF;
-        final int byte112 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte110 & 7) << 12) | (byte111 << 4) | (byte112 >>> 4);
-        final int byte113 = blocks[blocksOffset++] & 0xFF;
-        final int byte114 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte112 & 15) << 11) | (byte113 << 3) | (byte114 >>> 5);
-        final int byte115 = blocks[blocksOffset++] & 0xFF;
-        final int byte116 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte114 & 31) << 10) | (byte115 << 2) | (byte116 >>> 6);
-        final int byte117 = blocks[blocksOffset++] & 0xFF;
-        final int byte118 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte116 & 63) << 9) | (byte117 << 1) | (byte118 >>> 7);
-        final int byte119 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte118 & 127) << 8) | byte119;
-      }
+  @Override
+  public void decode(long[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations) {
+    for (int i = 0; i < iterations; ++i) {
+      final long block0 = blocks[blocksOffset++];
+      values[valuesOffset++] = block0 >>> 49;
+      values[valuesOffset++] = (block0 >>> 34) & 32767L;
+      values[valuesOffset++] = (block0 >>> 19) & 32767L;
+      values[valuesOffset++] = (block0 >>> 4) & 32767L;
+      final long block1 = blocks[blocksOffset++];
+      values[valuesOffset++] = ((block0 & 15L) << 11) | (block1 >>> 53);
+      values[valuesOffset++] = (block1 >>> 38) & 32767L;
+      values[valuesOffset++] = (block1 >>> 23) & 32767L;
+      values[valuesOffset++] = (block1 >>> 8) & 32767L;
+      final long block2 = blocks[blocksOffset++];
+      values[valuesOffset++] = ((block1 & 255L) << 7) | (block2 >>> 57);
+      values[valuesOffset++] = (block2 >>> 42) & 32767L;
+      values[valuesOffset++] = (block2 >>> 27) & 32767L;
+      values[valuesOffset++] = (block2 >>> 12) & 32767L;
+      final long block3 = blocks[blocksOffset++];
+      values[valuesOffset++] = ((block2 & 4095L) << 3) | (block3 >>> 61);
+      values[valuesOffset++] = (block3 >>> 46) & 32767L;
+      values[valuesOffset++] = (block3 >>> 31) & 32767L;
+      values[valuesOffset++] = (block3 >>> 16) & 32767L;
+      values[valuesOffset++] = (block3 >>> 1) & 32767L;
+      final long block4 = blocks[blocksOffset++];
+      values[valuesOffset++] = ((block3 & 1L) << 14) | (block4 >>> 50);
+      values[valuesOffset++] = (block4 >>> 35) & 32767L;
+      values[valuesOffset++] = (block4 >>> 20) & 32767L;
+      values[valuesOffset++] = (block4 >>> 5) & 32767L;
+      final long block5 = blocks[blocksOffset++];
+      values[valuesOffset++] = ((block4 & 31L) << 10) | (block5 >>> 54);
+      values[valuesOffset++] = (block5 >>> 39) & 32767L;
+      values[valuesOffset++] = (block5 >>> 24) & 32767L;
+      values[valuesOffset++] = (block5 >>> 9) & 32767L;
+      final long block6 = blocks[blocksOffset++];
+      values[valuesOffset++] = ((block5 & 511L) << 6) | (block6 >>> 58);
+      values[valuesOffset++] = (block6 >>> 43) & 32767L;
+      values[valuesOffset++] = (block6 >>> 28) & 32767L;
+      values[valuesOffset++] = (block6 >>> 13) & 32767L;
+      final long block7 = blocks[blocksOffset++];
+      values[valuesOffset++] = ((block6 & 8191L) << 2) | (block7 >>> 62);
+      values[valuesOffset++] = (block7 >>> 47) & 32767L;
+      values[valuesOffset++] = (block7 >>> 32) & 32767L;
+      values[valuesOffset++] = (block7 >>> 17) & 32767L;
+      values[valuesOffset++] = (block7 >>> 2) & 32767L;
+      final long block8 = blocks[blocksOffset++];
+      values[valuesOffset++] = ((block7 & 3L) << 13) | (block8 >>> 51);
+      values[valuesOffset++] = (block8 >>> 36) & 32767L;
+      values[valuesOffset++] = (block8 >>> 21) & 32767L;
+      values[valuesOffset++] = (block8 >>> 6) & 32767L;
+      final long block9 = blocks[blocksOffset++];
+      values[valuesOffset++] = ((block8 & 63L) << 9) | (block9 >>> 55);
+      values[valuesOffset++] = (block9 >>> 40) & 32767L;
+      values[valuesOffset++] = (block9 >>> 25) & 32767L;
+      values[valuesOffset++] = (block9 >>> 10) & 32767L;
+      final long block10 = blocks[blocksOffset++];
+      values[valuesOffset++] = ((block9 & 1023L) << 5) | (block10 >>> 59);
+      values[valuesOffset++] = (block10 >>> 44) & 32767L;
+      values[valuesOffset++] = (block10 >>> 29) & 32767L;
+      values[valuesOffset++] = (block10 >>> 14) & 32767L;
+      final long block11 = blocks[blocksOffset++];
+      values[valuesOffset++] = ((block10 & 16383L) << 1) | (block11 >>> 63);
+      values[valuesOffset++] = (block11 >>> 48) & 32767L;
+      values[valuesOffset++] = (block11 >>> 33) & 32767L;
+      values[valuesOffset++] = (block11 >>> 18) & 32767L;
+      values[valuesOffset++] = (block11 >>> 3) & 32767L;
+      final long block12 = blocks[blocksOffset++];
+      values[valuesOffset++] = ((block11 & 7L) << 12) | (block12 >>> 52);
+      values[valuesOffset++] = (block12 >>> 37) & 32767L;
+      values[valuesOffset++] = (block12 >>> 22) & 32767L;
+      values[valuesOffset++] = (block12 >>> 7) & 32767L;
+      final long block13 = blocks[blocksOffset++];
+      values[valuesOffset++] = ((block12 & 127L) << 8) | (block13 >>> 56);
+      values[valuesOffset++] = (block13 >>> 41) & 32767L;
+      values[valuesOffset++] = (block13 >>> 26) & 32767L;
+      values[valuesOffset++] = (block13 >>> 11) & 32767L;
+      final long block14 = blocks[blocksOffset++];
+      values[valuesOffset++] = ((block13 & 2047L) << 4) | (block14 >>> 60);
+      values[valuesOffset++] = (block14 >>> 45) & 32767L;
+      values[valuesOffset++] = (block14 >>> 30) & 32767L;
+      values[valuesOffset++] = (block14 >>> 15) & 32767L;
+      values[valuesOffset++] = block14 & 32767L;
     }
+  }
 
-    @Override
-    public void decode(long[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations) {
-      assert blocksOffset + iterations * blockCount() <= blocks.length;
-      assert valuesOffset + iterations * valueCount() <= values.length;
-      for (int i = 0; i < iterations; ++i) {
-        final long block0 = blocks[blocksOffset++];
-        values[valuesOffset++] = block0 >>> 49;
-        values[valuesOffset++] = (block0 >>> 34) & 32767L;
-        values[valuesOffset++] = (block0 >>> 19) & 32767L;
-        values[valuesOffset++] = (block0 >>> 4) & 32767L;
-        final long block1 = blocks[blocksOffset++];
-        values[valuesOffset++] = ((block0 & 15L) << 11) | (block1 >>> 53);
-        values[valuesOffset++] = (block1 >>> 38) & 32767L;
-        values[valuesOffset++] = (block1 >>> 23) & 32767L;
-        values[valuesOffset++] = (block1 >>> 8) & 32767L;
-        final long block2 = blocks[blocksOffset++];
-        values[valuesOffset++] = ((block1 & 255L) << 7) | (block2 >>> 57);
-        values[valuesOffset++] = (block2 >>> 42) & 32767L;
-        values[valuesOffset++] = (block2 >>> 27) & 32767L;
-        values[valuesOffset++] = (block2 >>> 12) & 32767L;
-        final long block3 = blocks[blocksOffset++];
-        values[valuesOffset++] = ((block2 & 4095L) << 3) | (block3 >>> 61);
-        values[valuesOffset++] = (block3 >>> 46) & 32767L;
-        values[valuesOffset++] = (block3 >>> 31) & 32767L;
-        values[valuesOffset++] = (block3 >>> 16) & 32767L;
-        values[valuesOffset++] = (block3 >>> 1) & 32767L;
-        final long block4 = blocks[blocksOffset++];
-        values[valuesOffset++] = ((block3 & 1L) << 14) | (block4 >>> 50);
-        values[valuesOffset++] = (block4 >>> 35) & 32767L;
-        values[valuesOffset++] = (block4 >>> 20) & 32767L;
-        values[valuesOffset++] = (block4 >>> 5) & 32767L;
-        final long block5 = blocks[blocksOffset++];
-        values[valuesOffset++] = ((block4 & 31L) << 10) | (block5 >>> 54);
-        values[valuesOffset++] = (block5 >>> 39) & 32767L;
-        values[valuesOffset++] = (block5 >>> 24) & 32767L;
-        values[valuesOffset++] = (block5 >>> 9) & 32767L;
-        final long block6 = blocks[blocksOffset++];
-        values[valuesOffset++] = ((block5 & 511L) << 6) | (block6 >>> 58);
-        values[valuesOffset++] = (block6 >>> 43) & 32767L;
-        values[valuesOffset++] = (block6 >>> 28) & 32767L;
-        values[valuesOffset++] = (block6 >>> 13) & 32767L;
-        final long block7 = blocks[blocksOffset++];
-        values[valuesOffset++] = ((block6 & 8191L) << 2) | (block7 >>> 62);
-        values[valuesOffset++] = (block7 >>> 47) & 32767L;
-        values[valuesOffset++] = (block7 >>> 32) & 32767L;
-        values[valuesOffset++] = (block7 >>> 17) & 32767L;
-        values[valuesOffset++] = (block7 >>> 2) & 32767L;
-        final long block8 = blocks[blocksOffset++];
-        values[valuesOffset++] = ((block7 & 3L) << 13) | (block8 >>> 51);
-        values[valuesOffset++] = (block8 >>> 36) & 32767L;
-        values[valuesOffset++] = (block8 >>> 21) & 32767L;
-        values[valuesOffset++] = (block8 >>> 6) & 32767L;
-        final long block9 = blocks[blocksOffset++];
-        values[valuesOffset++] = ((block8 & 63L) << 9) | (block9 >>> 55);
-        values[valuesOffset++] = (block9 >>> 40) & 32767L;
-        values[valuesOffset++] = (block9 >>> 25) & 32767L;
-        values[valuesOffset++] = (block9 >>> 10) & 32767L;
-        final long block10 = blocks[blocksOffset++];
-        values[valuesOffset++] = ((block9 & 1023L) << 5) | (block10 >>> 59);
-        values[valuesOffset++] = (block10 >>> 44) & 32767L;
-        values[valuesOffset++] = (block10 >>> 29) & 32767L;
-        values[valuesOffset++] = (block10 >>> 14) & 32767L;
-        final long block11 = blocks[blocksOffset++];
-        values[valuesOffset++] = ((block10 & 16383L) << 1) | (block11 >>> 63);
-        values[valuesOffset++] = (block11 >>> 48) & 32767L;
-        values[valuesOffset++] = (block11 >>> 33) & 32767L;
-        values[valuesOffset++] = (block11 >>> 18) & 32767L;
-        values[valuesOffset++] = (block11 >>> 3) & 32767L;
-        final long block12 = blocks[blocksOffset++];
-        values[valuesOffset++] = ((block11 & 7L) << 12) | (block12 >>> 52);
-        values[valuesOffset++] = (block12 >>> 37) & 32767L;
-        values[valuesOffset++] = (block12 >>> 22) & 32767L;
-        values[valuesOffset++] = (block12 >>> 7) & 32767L;
-        final long block13 = blocks[blocksOffset++];
-        values[valuesOffset++] = ((block12 & 127L) << 8) | (block13 >>> 56);
-        values[valuesOffset++] = (block13 >>> 41) & 32767L;
-        values[valuesOffset++] = (block13 >>> 26) & 32767L;
-        values[valuesOffset++] = (block13 >>> 11) & 32767L;
-        final long block14 = blocks[blocksOffset++];
-        values[valuesOffset++] = ((block13 & 2047L) << 4) | (block14 >>> 60);
-        values[valuesOffset++] = (block14 >>> 45) & 32767L;
-        values[valuesOffset++] = (block14 >>> 30) & 32767L;
-        values[valuesOffset++] = (block14 >>> 15) & 32767L;
-        values[valuesOffset++] = block14 & 32767L;
-      }
-    }
-
-    @Override
-    public void decode(byte[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations) {
-      assert blocksOffset + 8 * iterations * blockCount() <= blocks.length;
-      assert valuesOffset + iterations * valueCount() <= values.length;
-      for (int i = 0; i < iterations; ++i) {
-        final long byte0 = blocks[blocksOffset++] & 0xFF;
-        final long byte1 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = (byte0 << 7) | (byte1 >>> 1);
-        final long byte2 = blocks[blocksOffset++] & 0xFF;
-        final long byte3 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte1 & 1) << 14) | (byte2 << 6) | (byte3 >>> 2);
-        final long byte4 = blocks[blocksOffset++] & 0xFF;
-        final long byte5 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte3 & 3) << 13) | (byte4 << 5) | (byte5 >>> 3);
-        final long byte6 = blocks[blocksOffset++] & 0xFF;
-        final long byte7 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte5 & 7) << 12) | (byte6 << 4) | (byte7 >>> 4);
-        final long byte8 = blocks[blocksOffset++] & 0xFF;
-        final long byte9 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte7 & 15) << 11) | (byte8 << 3) | (byte9 >>> 5);
-        final long byte10 = blocks[blocksOffset++] & 0xFF;
-        final long byte11 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte9 & 31) << 10) | (byte10 << 2) | (byte11 >>> 6);
-        final long byte12 = blocks[blocksOffset++] & 0xFF;
-        final long byte13 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte11 & 63) << 9) | (byte12 << 1) | (byte13 >>> 7);
-        final long byte14 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte13 & 127) << 8) | byte14;
-        final long byte15 = blocks[blocksOffset++] & 0xFF;
-        final long byte16 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = (byte15 << 7) | (byte16 >>> 1);
-        final long byte17 = blocks[blocksOffset++] & 0xFF;
-        final long byte18 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte16 & 1) << 14) | (byte17 << 6) | (byte18 >>> 2);
-        final long byte19 = blocks[blocksOffset++] & 0xFF;
-        final long byte20 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte18 & 3) << 13) | (byte19 << 5) | (byte20 >>> 3);
-        final long byte21 = blocks[blocksOffset++] & 0xFF;
-        final long byte22 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte20 & 7) << 12) | (byte21 << 4) | (byte22 >>> 4);
-        final long byte23 = blocks[blocksOffset++] & 0xFF;
-        final long byte24 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte22 & 15) << 11) | (byte23 << 3) | (byte24 >>> 5);
-        final long byte25 = blocks[blocksOffset++] & 0xFF;
-        final long byte26 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte24 & 31) << 10) | (byte25 << 2) | (byte26 >>> 6);
-        final long byte27 = blocks[blocksOffset++] & 0xFF;
-        final long byte28 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte26 & 63) << 9) | (byte27 << 1) | (byte28 >>> 7);
-        final long byte29 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte28 & 127) << 8) | byte29;
-        final long byte30 = blocks[blocksOffset++] & 0xFF;
-        final long byte31 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = (byte30 << 7) | (byte31 >>> 1);
-        final long byte32 = blocks[blocksOffset++] & 0xFF;
-        final long byte33 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte31 & 1) << 14) | (byte32 << 6) | (byte33 >>> 2);
-        final long byte34 = blocks[blocksOffset++] & 0xFF;
-        final long byte35 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte33 & 3) << 13) | (byte34 << 5) | (byte35 >>> 3);
-        final long byte36 = blocks[blocksOffset++] & 0xFF;
-        final long byte37 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte35 & 7) << 12) | (byte36 << 4) | (byte37 >>> 4);
-        final long byte38 = blocks[blocksOffset++] & 0xFF;
-        final long byte39 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte37 & 15) << 11) | (byte38 << 3) | (byte39 >>> 5);
-        final long byte40 = blocks[blocksOffset++] & 0xFF;
-        final long byte41 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte39 & 31) << 10) | (byte40 << 2) | (byte41 >>> 6);
-        final long byte42 = blocks[blocksOffset++] & 0xFF;
-        final long byte43 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte41 & 63) << 9) | (byte42 << 1) | (byte43 >>> 7);
-        final long byte44 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte43 & 127) << 8) | byte44;
-        final long byte45 = blocks[blocksOffset++] & 0xFF;
-        final long byte46 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = (byte45 << 7) | (byte46 >>> 1);
-        final long byte47 = blocks[blocksOffset++] & 0xFF;
-        final long byte48 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte46 & 1) << 14) | (byte47 << 6) | (byte48 >>> 2);
-        final long byte49 = blocks[blocksOffset++] & 0xFF;
-        final long byte50 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte48 & 3) << 13) | (byte49 << 5) | (byte50 >>> 3);
-        final long byte51 = blocks[blocksOffset++] & 0xFF;
-        final long byte52 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte50 & 7) << 12) | (byte51 << 4) | (byte52 >>> 4);
-        final long byte53 = blocks[blocksOffset++] & 0xFF;
-        final long byte54 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte52 & 15) << 11) | (byte53 << 3) | (byte54 >>> 5);
-        final long byte55 = blocks[blocksOffset++] & 0xFF;
-        final long byte56 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte54 & 31) << 10) | (byte55 << 2) | (byte56 >>> 6);
-        final long byte57 = blocks[blocksOffset++] & 0xFF;
-        final long byte58 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte56 & 63) << 9) | (byte57 << 1) | (byte58 >>> 7);
-        final long byte59 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte58 & 127) << 8) | byte59;
-        final long byte60 = blocks[blocksOffset++] & 0xFF;
-        final long byte61 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = (byte60 << 7) | (byte61 >>> 1);
-        final long byte62 = blocks[blocksOffset++] & 0xFF;
-        final long byte63 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte61 & 1) << 14) | (byte62 << 6) | (byte63 >>> 2);
-        final long byte64 = blocks[blocksOffset++] & 0xFF;
-        final long byte65 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte63 & 3) << 13) | (byte64 << 5) | (byte65 >>> 3);
-        final long byte66 = blocks[blocksOffset++] & 0xFF;
-        final long byte67 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte65 & 7) << 12) | (byte66 << 4) | (byte67 >>> 4);
-        final long byte68 = blocks[blocksOffset++] & 0xFF;
-        final long byte69 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte67 & 15) << 11) | (byte68 << 3) | (byte69 >>> 5);
-        final long byte70 = blocks[blocksOffset++] & 0xFF;
-        final long byte71 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte69 & 31) << 10) | (byte70 << 2) | (byte71 >>> 6);
-        final long byte72 = blocks[blocksOffset++] & 0xFF;
-        final long byte73 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte71 & 63) << 9) | (byte72 << 1) | (byte73 >>> 7);
-        final long byte74 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte73 & 127) << 8) | byte74;
-        final long byte75 = blocks[blocksOffset++] & 0xFF;
-        final long byte76 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = (byte75 << 7) | (byte76 >>> 1);
-        final long byte77 = blocks[blocksOffset++] & 0xFF;
-        final long byte78 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte76 & 1) << 14) | (byte77 << 6) | (byte78 >>> 2);
-        final long byte79 = blocks[blocksOffset++] & 0xFF;
-        final long byte80 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte78 & 3) << 13) | (byte79 << 5) | (byte80 >>> 3);
-        final long byte81 = blocks[blocksOffset++] & 0xFF;
-        final long byte82 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte80 & 7) << 12) | (byte81 << 4) | (byte82 >>> 4);
-        final long byte83 = blocks[blocksOffset++] & 0xFF;
-        final long byte84 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte82 & 15) << 11) | (byte83 << 3) | (byte84 >>> 5);
-        final long byte85 = blocks[blocksOffset++] & 0xFF;
-        final long byte86 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte84 & 31) << 10) | (byte85 << 2) | (byte86 >>> 6);
-        final long byte87 = blocks[blocksOffset++] & 0xFF;
-        final long byte88 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte86 & 63) << 9) | (byte87 << 1) | (byte88 >>> 7);
-        final long byte89 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte88 & 127) << 8) | byte89;
-        final long byte90 = blocks[blocksOffset++] & 0xFF;
-        final long byte91 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = (byte90 << 7) | (byte91 >>> 1);
-        final long byte92 = blocks[blocksOffset++] & 0xFF;
-        final long byte93 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte91 & 1) << 14) | (byte92 << 6) | (byte93 >>> 2);
-        final long byte94 = blocks[blocksOffset++] & 0xFF;
-        final long byte95 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte93 & 3) << 13) | (byte94 << 5) | (byte95 >>> 3);
-        final long byte96 = blocks[blocksOffset++] & 0xFF;
-        final long byte97 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte95 & 7) << 12) | (byte96 << 4) | (byte97 >>> 4);
-        final long byte98 = blocks[blocksOffset++] & 0xFF;
-        final long byte99 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte97 & 15) << 11) | (byte98 << 3) | (byte99 >>> 5);
-        final long byte100 = blocks[blocksOffset++] & 0xFF;
-        final long byte101 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte99 & 31) << 10) | (byte100 << 2) | (byte101 >>> 6);
-        final long byte102 = blocks[blocksOffset++] & 0xFF;
-        final long byte103 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte101 & 63) << 9) | (byte102 << 1) | (byte103 >>> 7);
-        final long byte104 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte103 & 127) << 8) | byte104;
-        final long byte105 = blocks[blocksOffset++] & 0xFF;
-        final long byte106 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = (byte105 << 7) | (byte106 >>> 1);
-        final long byte107 = blocks[blocksOffset++] & 0xFF;
-        final long byte108 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte106 & 1) << 14) | (byte107 << 6) | (byte108 >>> 2);
-        final long byte109 = blocks[blocksOffset++] & 0xFF;
-        final long byte110 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte108 & 3) << 13) | (byte109 << 5) | (byte110 >>> 3);
-        final long byte111 = blocks[blocksOffset++] & 0xFF;
-        final long byte112 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte110 & 7) << 12) | (byte111 << 4) | (byte112 >>> 4);
-        final long byte113 = blocks[blocksOffset++] & 0xFF;
-        final long byte114 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte112 & 15) << 11) | (byte113 << 3) | (byte114 >>> 5);
-        final long byte115 = blocks[blocksOffset++] & 0xFF;
-        final long byte116 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte114 & 31) << 10) | (byte115 << 2) | (byte116 >>> 6);
-        final long byte117 = blocks[blocksOffset++] & 0xFF;
-        final long byte118 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte116 & 63) << 9) | (byte117 << 1) | (byte118 >>> 7);
-        final long byte119 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = ((byte118 & 127) << 8) | byte119;
-      }
+  @Override
+  public void decode(byte[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations) {
+    for (int i = 0; i < 8 * iterations; ++i) {
+      final long byte0 = blocks[blocksOffset++] & 0xFF;
+      final long byte1 = blocks[blocksOffset++] & 0xFF;
+      values[valuesOffset++] = (byte0 << 7) | (byte1 >>> 1);
+      final long byte2 = blocks[blocksOffset++] & 0xFF;
+      final long byte3 = blocks[blocksOffset++] & 0xFF;
+      values[valuesOffset++] = ((byte1 & 1) << 14) | (byte2 << 6) | (byte3 >>> 2);
+      final long byte4 = blocks[blocksOffset++] & 0xFF;
+      final long byte5 = blocks[blocksOffset++] & 0xFF;
+      values[valuesOffset++] = ((byte3 & 3) << 13) | (byte4 << 5) | (byte5 >>> 3);
+      final long byte6 = blocks[blocksOffset++] & 0xFF;
+      final long byte7 = blocks[blocksOffset++] & 0xFF;
+      values[valuesOffset++] = ((byte5 & 7) << 12) | (byte6 << 4) | (byte7 >>> 4);
+      final long byte8 = blocks[blocksOffset++] & 0xFF;
+      final long byte9 = blocks[blocksOffset++] & 0xFF;
+      values[valuesOffset++] = ((byte7 & 15) << 11) | (byte8 << 3) | (byte9 >>> 5);
+      final long byte10 = blocks[blocksOffset++] & 0xFF;
+      final long byte11 = blocks[blocksOffset++] & 0xFF;
+      values[valuesOffset++] = ((byte9 & 31) << 10) | (byte10 << 2) | (byte11 >>> 6);
+      final long byte12 = blocks[blocksOffset++] & 0xFF;
+      final long byte13 = blocks[blocksOffset++] & 0xFF;
+      values[valuesOffset++] = ((byte11 & 63) << 9) | (byte12 << 1) | (byte13 >>> 7);
+      final long byte14 = blocks[blocksOffset++] & 0xFF;
+      values[valuesOffset++] = ((byte13 & 127) << 8) | byte14;
     }
+  }
 
 }

Modified: lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked16.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked16.java?rev=1379940&r1=1379939&r2=1379940&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked16.java (original)
+++ lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked16.java Sun Sep  2 11:21:01 2012
@@ -24,76 +24,44 @@ package org.apache.lucene.util.packed;
  */
 final class BulkOperationPacked16 extends BulkOperationPacked {
 
-    public BulkOperationPacked16() {
-      super(16);
-      assert blockCount() == 1;
-      assert valueCount() == 4;
-    }
-
-    @Override
-    public void decode(long[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) {
-      assert blocksOffset + iterations * blockCount() <= blocks.length;
-      assert valuesOffset + iterations * valueCount() <= values.length;
-      for (int i = 0; i < iterations; ++i) {
-        final long block0 = blocks[blocksOffset++];
-        values[valuesOffset++] = (int) (block0 >>> 48);
-        values[valuesOffset++] = (int) ((block0 >>> 32) & 65535L);
-        values[valuesOffset++] = (int) ((block0 >>> 16) & 65535L);
-        values[valuesOffset++] = (int) (block0 & 65535L);
+  public BulkOperationPacked16() {
+    super(16);
+    assert blockCount() == 1;
+    assert valueCount() == 4;
+  }
+
+  @Override
+  public void decode(long[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) {
+    for (int i = 0; i < iterations; ++i) {
+      final long block = blocks[blocksOffset++];
+      for (int shift = 48; shift >= 0; shift -= 16) {
+        values[valuesOffset++] = (int) ((block >>> shift) & 65535);
       }
     }
+  }
 
-    @Override
-    public void decode(byte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) {
-      assert blocksOffset + 8 * iterations * blockCount() <= blocks.length;
-      assert valuesOffset + iterations * valueCount() <= values.length;
-      for (int i = 0; i < iterations; ++i) {
-        final int byte0 = blocks[blocksOffset++] & 0xFF;
-        final int byte1 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = (byte0 << 8) | byte1;
-        final int byte2 = blocks[blocksOffset++] & 0xFF;
-        final int byte3 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = (byte2 << 8) | byte3;
-        final int byte4 = blocks[blocksOffset++] & 0xFF;
-        final int byte5 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = (byte4 << 8) | byte5;
-        final int byte6 = blocks[blocksOffset++] & 0xFF;
-        final int byte7 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = (byte6 << 8) | byte7;
-      }
+  @Override
+  public void decode(byte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) {
+    for (int j = 0; j < 4 * iterations; ++j) {
+      values[valuesOffset++] = ((blocks[blocksOffset++] & 0xFF) << 8) | (blocks[blocksOffset++] & 0xFF);
     }
+  }
 
-    @Override
-    public void decode(long[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations) {
-      assert blocksOffset + iterations * blockCount() <= blocks.length;
-      assert valuesOffset + iterations * valueCount() <= values.length;
-      for (int i = 0; i < iterations; ++i) {
-        final long block0 = blocks[blocksOffset++];
-        values[valuesOffset++] = block0 >>> 48;
-        values[valuesOffset++] = (block0 >>> 32) & 65535L;
-        values[valuesOffset++] = (block0 >>> 16) & 65535L;
-        values[valuesOffset++] = block0 & 65535L;
+  @Override
+  public void decode(long[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations) {
+    for (int i = 0; i < iterations; ++i) {
+      final long block = blocks[blocksOffset++];
+      for (int shift = 48; shift >= 0; shift -= 16) {
+        values[valuesOffset++] = (block >>> shift) & 65535;
       }
     }
+  }
 
-    @Override
-    public void decode(byte[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations) {
-      assert blocksOffset + 8 * iterations * blockCount() <= blocks.length;
-      assert valuesOffset + iterations * valueCount() <= values.length;
-      for (int i = 0; i < iterations; ++i) {
-        final long byte0 = blocks[blocksOffset++] & 0xFF;
-        final long byte1 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = (byte0 << 8) | byte1;
-        final long byte2 = blocks[blocksOffset++] & 0xFF;
-        final long byte3 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = (byte2 << 8) | byte3;
-        final long byte4 = blocks[blocksOffset++] & 0xFF;
-        final long byte5 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = (byte4 << 8) | byte5;
-        final long byte6 = blocks[blocksOffset++] & 0xFF;
-        final long byte7 = blocks[blocksOffset++] & 0xFF;
-        values[valuesOffset++] = (byte6 << 8) | byte7;
-      }
+  @Override
+  public void decode(byte[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations) {
+    for (int j = 0; j < 4 * iterations; ++j) {
+      values[valuesOffset++] = ((blocks[blocksOffset++] & 0xFFL) << 8) | (blocks[blocksOffset++] & 0xFFL);
     }
+  }
 
 }



Mime
View raw message