lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r1376305 [15/37] - /lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/
Date Wed, 22 Aug 2012 23:13:42 GMT
Added: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked31.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked31.java?rev=1376305&view=auto
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked31.java (added)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked31.java Wed Aug 22 23:13:40 2012
@@ -0,0 +1,952 @@
+// This file has been automatically generated, DO NOT EDIT
+
+package org.apache.lucene.util.packed;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Efficient sequential read/write of packed integers.
+ */
+final class BulkOperationPacked31 extends BulkOperation {
+    public int blockCount() {
+      return 31;
+    }
+
+    public int valueCount() {
+      return 64;
+    }
+
+    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 >>> 33);
+        values[valuesOffset++] = (int) ((block0 >>> 2) & 2147483647L);
+        final long block1 = blocks[blocksOffset++];
+        values[valuesOffset++] = (int) (((block0 & 3L) << 29) | (block1 >>> 35));
+        values[valuesOffset++] = (int) ((block1 >>> 4) & 2147483647L);
+        final long block2 = blocks[blocksOffset++];
+        values[valuesOffset++] = (int) (((block1 & 15L) << 27) | (block2 >>> 37));
+        values[valuesOffset++] = (int) ((block2 >>> 6) & 2147483647L);
+        final long block3 = blocks[blocksOffset++];
+        values[valuesOffset++] = (int) (((block2 & 63L) << 25) | (block3 >>> 39));
+        values[valuesOffset++] = (int) ((block3 >>> 8) & 2147483647L);
+        final long block4 = blocks[blocksOffset++];
+        values[valuesOffset++] = (int) (((block3 & 255L) << 23) | (block4 >>> 41));
+        values[valuesOffset++] = (int) ((block4 >>> 10) & 2147483647L);
+        final long block5 = blocks[blocksOffset++];
+        values[valuesOffset++] = (int) (((block4 & 1023L) << 21) | (block5 >>> 43));
+        values[valuesOffset++] = (int) ((block5 >>> 12) & 2147483647L);
+        final long block6 = blocks[blocksOffset++];
+        values[valuesOffset++] = (int) (((block5 & 4095L) << 19) | (block6 >>> 45));
+        values[valuesOffset++] = (int) ((block6 >>> 14) & 2147483647L);
+        final long block7 = blocks[blocksOffset++];
+        values[valuesOffset++] = (int) (((block6 & 16383L) << 17) | (block7 >>> 47));
+        values[valuesOffset++] = (int) ((block7 >>> 16) & 2147483647L);
+        final long block8 = blocks[blocksOffset++];
+        values[valuesOffset++] = (int) (((block7 & 65535L) << 15) | (block8 >>> 49));
+        values[valuesOffset++] = (int) ((block8 >>> 18) & 2147483647L);
+        final long block9 = blocks[blocksOffset++];
+        values[valuesOffset++] = (int) (((block8 & 262143L) << 13) | (block9 >>> 51));
+        values[valuesOffset++] = (int) ((block9 >>> 20) & 2147483647L);
+        final long block10 = blocks[blocksOffset++];
+        values[valuesOffset++] = (int) (((block9 & 1048575L) << 11) | (block10 >>> 53));
+        values[valuesOffset++] = (int) ((block10 >>> 22) & 2147483647L);
+        final long block11 = blocks[blocksOffset++];
+        values[valuesOffset++] = (int) (((block10 & 4194303L) << 9) | (block11 >>> 55));
+        values[valuesOffset++] = (int) ((block11 >>> 24) & 2147483647L);
+        final long block12 = blocks[blocksOffset++];
+        values[valuesOffset++] = (int) (((block11 & 16777215L) << 7) | (block12 >>> 57));
+        values[valuesOffset++] = (int) ((block12 >>> 26) & 2147483647L);
+        final long block13 = blocks[blocksOffset++];
+        values[valuesOffset++] = (int) (((block12 & 67108863L) << 5) | (block13 >>> 59));
+        values[valuesOffset++] = (int) ((block13 >>> 28) & 2147483647L);
+        final long block14 = blocks[blocksOffset++];
+        values[valuesOffset++] = (int) (((block13 & 268435455L) << 3) | (block14 >>> 61));
+        values[valuesOffset++] = (int) ((block14 >>> 30) & 2147483647L);
+        final long block15 = blocks[blocksOffset++];
+        values[valuesOffset++] = (int) (((block14 & 1073741823L) << 1) | (block15 >>> 63));
+        values[valuesOffset++] = (int) ((block15 >>> 32) & 2147483647L);
+        values[valuesOffset++] = (int) ((block15 >>> 1) & 2147483647L);
+        final long block16 = blocks[blocksOffset++];
+        values[valuesOffset++] = (int) (((block15 & 1L) << 30) | (block16 >>> 34));
+        values[valuesOffset++] = (int) ((block16 >>> 3) & 2147483647L);
+        final long block17 = blocks[blocksOffset++];
+        values[valuesOffset++] = (int) (((block16 & 7L) << 28) | (block17 >>> 36));
+        values[valuesOffset++] = (int) ((block17 >>> 5) & 2147483647L);
+        final long block18 = blocks[blocksOffset++];
+        values[valuesOffset++] = (int) (((block17 & 31L) << 26) | (block18 >>> 38));
+        values[valuesOffset++] = (int) ((block18 >>> 7) & 2147483647L);
+        final long block19 = blocks[blocksOffset++];
+        values[valuesOffset++] = (int) (((block18 & 127L) << 24) | (block19 >>> 40));
+        values[valuesOffset++] = (int) ((block19 >>> 9) & 2147483647L);
+        final long block20 = blocks[blocksOffset++];
+        values[valuesOffset++] = (int) (((block19 & 511L) << 22) | (block20 >>> 42));
+        values[valuesOffset++] = (int) ((block20 >>> 11) & 2147483647L);
+        final long block21 = blocks[blocksOffset++];
+        values[valuesOffset++] = (int) (((block20 & 2047L) << 20) | (block21 >>> 44));
+        values[valuesOffset++] = (int) ((block21 >>> 13) & 2147483647L);
+        final long block22 = blocks[blocksOffset++];
+        values[valuesOffset++] = (int) (((block21 & 8191L) << 18) | (block22 >>> 46));
+        values[valuesOffset++] = (int) ((block22 >>> 15) & 2147483647L);
+        final long block23 = blocks[blocksOffset++];
+        values[valuesOffset++] = (int) (((block22 & 32767L) << 16) | (block23 >>> 48));
+        values[valuesOffset++] = (int) ((block23 >>> 17) & 2147483647L);
+        final long block24 = blocks[blocksOffset++];
+        values[valuesOffset++] = (int) (((block23 & 131071L) << 14) | (block24 >>> 50));
+        values[valuesOffset++] = (int) ((block24 >>> 19) & 2147483647L);
+        final long block25 = blocks[blocksOffset++];
+        values[valuesOffset++] = (int) (((block24 & 524287L) << 12) | (block25 >>> 52));
+        values[valuesOffset++] = (int) ((block25 >>> 21) & 2147483647L);
+        final long block26 = blocks[blocksOffset++];
+        values[valuesOffset++] = (int) (((block25 & 2097151L) << 10) | (block26 >>> 54));
+        values[valuesOffset++] = (int) ((block26 >>> 23) & 2147483647L);
+        final long block27 = blocks[blocksOffset++];
+        values[valuesOffset++] = (int) (((block26 & 8388607L) << 8) | (block27 >>> 56));
+        values[valuesOffset++] = (int) ((block27 >>> 25) & 2147483647L);
+        final long block28 = blocks[blocksOffset++];
+        values[valuesOffset++] = (int) (((block27 & 33554431L) << 6) | (block28 >>> 58));
+        values[valuesOffset++] = (int) ((block28 >>> 27) & 2147483647L);
+        final long block29 = blocks[blocksOffset++];
+        values[valuesOffset++] = (int) (((block28 & 134217727L) << 4) | (block29 >>> 60));
+        values[valuesOffset++] = (int) ((block29 >>> 29) & 2147483647L);
+        final long block30 = blocks[blocksOffset++];
+        values[valuesOffset++] = (int) (((block29 & 536870911L) << 2) | (block30 >>> 62));
+        values[valuesOffset++] = (int) ((block30 >>> 31) & 2147483647L);
+        values[valuesOffset++] = (int) (block30 & 2147483647L);
+      }
+    }
+
+    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;
+        final int byte2 = blocks[blocksOffset++] & 0xFF;
+        final int byte3 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = (byte0 << 23) | (byte1 << 15) | (byte2 << 7) | (byte3 >>> 1);
+        final int byte4 = blocks[blocksOffset++] & 0xFF;
+        final int byte5 = blocks[blocksOffset++] & 0xFF;
+        final int byte6 = blocks[blocksOffset++] & 0xFF;
+        final int byte7 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte3 & 1) << 30) | (byte4 << 22) | (byte5 << 14) | (byte6 << 6) | (byte7 >>> 2);
+        final int byte8 = blocks[blocksOffset++] & 0xFF;
+        final int byte9 = blocks[blocksOffset++] & 0xFF;
+        final int byte10 = blocks[blocksOffset++] & 0xFF;
+        final int byte11 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte7 & 3) << 29) | (byte8 << 21) | (byte9 << 13) | (byte10 << 5) | (byte11 >>> 3);
+        final int byte12 = blocks[blocksOffset++] & 0xFF;
+        final int byte13 = blocks[blocksOffset++] & 0xFF;
+        final int byte14 = blocks[blocksOffset++] & 0xFF;
+        final int byte15 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte11 & 7) << 28) | (byte12 << 20) | (byte13 << 12) | (byte14 << 4) | (byte15 >>> 4);
+        final int byte16 = blocks[blocksOffset++] & 0xFF;
+        final int byte17 = blocks[blocksOffset++] & 0xFF;
+        final int byte18 = blocks[blocksOffset++] & 0xFF;
+        final int byte19 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte15 & 15) << 27) | (byte16 << 19) | (byte17 << 11) | (byte18 << 3) | (byte19 >>> 5);
+        final int byte20 = blocks[blocksOffset++] & 0xFF;
+        final int byte21 = blocks[blocksOffset++] & 0xFF;
+        final int byte22 = blocks[blocksOffset++] & 0xFF;
+        final int byte23 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte19 & 31) << 26) | (byte20 << 18) | (byte21 << 10) | (byte22 << 2) | (byte23 >>> 6);
+        final int byte24 = blocks[blocksOffset++] & 0xFF;
+        final int byte25 = blocks[blocksOffset++] & 0xFF;
+        final int byte26 = blocks[blocksOffset++] & 0xFF;
+        final int byte27 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte23 & 63) << 25) | (byte24 << 17) | (byte25 << 9) | (byte26 << 1) | (byte27 >>> 7);
+        final int byte28 = blocks[blocksOffset++] & 0xFF;
+        final int byte29 = blocks[blocksOffset++] & 0xFF;
+        final int byte30 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte27 & 127) << 24) | (byte28 << 16) | (byte29 << 8) | byte30;
+        final int byte31 = blocks[blocksOffset++] & 0xFF;
+        final int byte32 = blocks[blocksOffset++] & 0xFF;
+        final int byte33 = blocks[blocksOffset++] & 0xFF;
+        final int byte34 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = (byte31 << 23) | (byte32 << 15) | (byte33 << 7) | (byte34 >>> 1);
+        final int byte35 = blocks[blocksOffset++] & 0xFF;
+        final int byte36 = blocks[blocksOffset++] & 0xFF;
+        final int byte37 = blocks[blocksOffset++] & 0xFF;
+        final int byte38 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte34 & 1) << 30) | (byte35 << 22) | (byte36 << 14) | (byte37 << 6) | (byte38 >>> 2);
+        final int byte39 = blocks[blocksOffset++] & 0xFF;
+        final int byte40 = blocks[blocksOffset++] & 0xFF;
+        final int byte41 = blocks[blocksOffset++] & 0xFF;
+        final int byte42 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte38 & 3) << 29) | (byte39 << 21) | (byte40 << 13) | (byte41 << 5) | (byte42 >>> 3);
+        final int byte43 = blocks[blocksOffset++] & 0xFF;
+        final int byte44 = blocks[blocksOffset++] & 0xFF;
+        final int byte45 = blocks[blocksOffset++] & 0xFF;
+        final int byte46 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte42 & 7) << 28) | (byte43 << 20) | (byte44 << 12) | (byte45 << 4) | (byte46 >>> 4);
+        final int byte47 = blocks[blocksOffset++] & 0xFF;
+        final int byte48 = blocks[blocksOffset++] & 0xFF;
+        final int byte49 = blocks[blocksOffset++] & 0xFF;
+        final int byte50 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte46 & 15) << 27) | (byte47 << 19) | (byte48 << 11) | (byte49 << 3) | (byte50 >>> 5);
+        final int byte51 = blocks[blocksOffset++] & 0xFF;
+        final int byte52 = blocks[blocksOffset++] & 0xFF;
+        final int byte53 = blocks[blocksOffset++] & 0xFF;
+        final int byte54 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte50 & 31) << 26) | (byte51 << 18) | (byte52 << 10) | (byte53 << 2) | (byte54 >>> 6);
+        final int byte55 = blocks[blocksOffset++] & 0xFF;
+        final int byte56 = blocks[blocksOffset++] & 0xFF;
+        final int byte57 = blocks[blocksOffset++] & 0xFF;
+        final int byte58 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte54 & 63) << 25) | (byte55 << 17) | (byte56 << 9) | (byte57 << 1) | (byte58 >>> 7);
+        final int byte59 = blocks[blocksOffset++] & 0xFF;
+        final int byte60 = blocks[blocksOffset++] & 0xFF;
+        final int byte61 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte58 & 127) << 24) | (byte59 << 16) | (byte60 << 8) | byte61;
+        final int byte62 = blocks[blocksOffset++] & 0xFF;
+        final int byte63 = blocks[blocksOffset++] & 0xFF;
+        final int byte64 = blocks[blocksOffset++] & 0xFF;
+        final int byte65 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = (byte62 << 23) | (byte63 << 15) | (byte64 << 7) | (byte65 >>> 1);
+        final int byte66 = blocks[blocksOffset++] & 0xFF;
+        final int byte67 = blocks[blocksOffset++] & 0xFF;
+        final int byte68 = blocks[blocksOffset++] & 0xFF;
+        final int byte69 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte65 & 1) << 30) | (byte66 << 22) | (byte67 << 14) | (byte68 << 6) | (byte69 >>> 2);
+        final int byte70 = blocks[blocksOffset++] & 0xFF;
+        final int byte71 = blocks[blocksOffset++] & 0xFF;
+        final int byte72 = blocks[blocksOffset++] & 0xFF;
+        final int byte73 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte69 & 3) << 29) | (byte70 << 21) | (byte71 << 13) | (byte72 << 5) | (byte73 >>> 3);
+        final int byte74 = blocks[blocksOffset++] & 0xFF;
+        final int byte75 = blocks[blocksOffset++] & 0xFF;
+        final int byte76 = blocks[blocksOffset++] & 0xFF;
+        final int byte77 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte73 & 7) << 28) | (byte74 << 20) | (byte75 << 12) | (byte76 << 4) | (byte77 >>> 4);
+        final int byte78 = blocks[blocksOffset++] & 0xFF;
+        final int byte79 = blocks[blocksOffset++] & 0xFF;
+        final int byte80 = blocks[blocksOffset++] & 0xFF;
+        final int byte81 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte77 & 15) << 27) | (byte78 << 19) | (byte79 << 11) | (byte80 << 3) | (byte81 >>> 5);
+        final int byte82 = blocks[blocksOffset++] & 0xFF;
+        final int byte83 = blocks[blocksOffset++] & 0xFF;
+        final int byte84 = blocks[blocksOffset++] & 0xFF;
+        final int byte85 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte81 & 31) << 26) | (byte82 << 18) | (byte83 << 10) | (byte84 << 2) | (byte85 >>> 6);
+        final int byte86 = blocks[blocksOffset++] & 0xFF;
+        final int byte87 = blocks[blocksOffset++] & 0xFF;
+        final int byte88 = blocks[blocksOffset++] & 0xFF;
+        final int byte89 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte85 & 63) << 25) | (byte86 << 17) | (byte87 << 9) | (byte88 << 1) | (byte89 >>> 7);
+        final int byte90 = blocks[blocksOffset++] & 0xFF;
+        final int byte91 = blocks[blocksOffset++] & 0xFF;
+        final int byte92 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte89 & 127) << 24) | (byte90 << 16) | (byte91 << 8) | byte92;
+        final int byte93 = blocks[blocksOffset++] & 0xFF;
+        final int byte94 = blocks[blocksOffset++] & 0xFF;
+        final int byte95 = blocks[blocksOffset++] & 0xFF;
+        final int byte96 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = (byte93 << 23) | (byte94 << 15) | (byte95 << 7) | (byte96 >>> 1);
+        final int byte97 = blocks[blocksOffset++] & 0xFF;
+        final int byte98 = blocks[blocksOffset++] & 0xFF;
+        final int byte99 = blocks[blocksOffset++] & 0xFF;
+        final int byte100 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte96 & 1) << 30) | (byte97 << 22) | (byte98 << 14) | (byte99 << 6) | (byte100 >>> 2);
+        final int byte101 = blocks[blocksOffset++] & 0xFF;
+        final int byte102 = blocks[blocksOffset++] & 0xFF;
+        final int byte103 = blocks[blocksOffset++] & 0xFF;
+        final int byte104 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte100 & 3) << 29) | (byte101 << 21) | (byte102 << 13) | (byte103 << 5) | (byte104 >>> 3);
+        final int byte105 = blocks[blocksOffset++] & 0xFF;
+        final int byte106 = blocks[blocksOffset++] & 0xFF;
+        final int byte107 = blocks[blocksOffset++] & 0xFF;
+        final int byte108 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte104 & 7) << 28) | (byte105 << 20) | (byte106 << 12) | (byte107 << 4) | (byte108 >>> 4);
+        final int byte109 = blocks[blocksOffset++] & 0xFF;
+        final int byte110 = blocks[blocksOffset++] & 0xFF;
+        final int byte111 = blocks[blocksOffset++] & 0xFF;
+        final int byte112 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte108 & 15) << 27) | (byte109 << 19) | (byte110 << 11) | (byte111 << 3) | (byte112 >>> 5);
+        final int byte113 = blocks[blocksOffset++] & 0xFF;
+        final int byte114 = blocks[blocksOffset++] & 0xFF;
+        final int byte115 = blocks[blocksOffset++] & 0xFF;
+        final int byte116 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte112 & 31) << 26) | (byte113 << 18) | (byte114 << 10) | (byte115 << 2) | (byte116 >>> 6);
+        final int byte117 = blocks[blocksOffset++] & 0xFF;
+        final int byte118 = blocks[blocksOffset++] & 0xFF;
+        final int byte119 = blocks[blocksOffset++] & 0xFF;
+        final int byte120 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte116 & 63) << 25) | (byte117 << 17) | (byte118 << 9) | (byte119 << 1) | (byte120 >>> 7);
+        final int byte121 = blocks[blocksOffset++] & 0xFF;
+        final int byte122 = blocks[blocksOffset++] & 0xFF;
+        final int byte123 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte120 & 127) << 24) | (byte121 << 16) | (byte122 << 8) | byte123;
+        final int byte124 = blocks[blocksOffset++] & 0xFF;
+        final int byte125 = blocks[blocksOffset++] & 0xFF;
+        final int byte126 = blocks[blocksOffset++] & 0xFF;
+        final int byte127 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = (byte124 << 23) | (byte125 << 15) | (byte126 << 7) | (byte127 >>> 1);
+        final int byte128 = blocks[blocksOffset++] & 0xFF;
+        final int byte129 = blocks[blocksOffset++] & 0xFF;
+        final int byte130 = blocks[blocksOffset++] & 0xFF;
+        final int byte131 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte127 & 1) << 30) | (byte128 << 22) | (byte129 << 14) | (byte130 << 6) | (byte131 >>> 2);
+        final int byte132 = blocks[blocksOffset++] & 0xFF;
+        final int byte133 = blocks[blocksOffset++] & 0xFF;
+        final int byte134 = blocks[blocksOffset++] & 0xFF;
+        final int byte135 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte131 & 3) << 29) | (byte132 << 21) | (byte133 << 13) | (byte134 << 5) | (byte135 >>> 3);
+        final int byte136 = blocks[blocksOffset++] & 0xFF;
+        final int byte137 = blocks[blocksOffset++] & 0xFF;
+        final int byte138 = blocks[blocksOffset++] & 0xFF;
+        final int byte139 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte135 & 7) << 28) | (byte136 << 20) | (byte137 << 12) | (byte138 << 4) | (byte139 >>> 4);
+        final int byte140 = blocks[blocksOffset++] & 0xFF;
+        final int byte141 = blocks[blocksOffset++] & 0xFF;
+        final int byte142 = blocks[blocksOffset++] & 0xFF;
+        final int byte143 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte139 & 15) << 27) | (byte140 << 19) | (byte141 << 11) | (byte142 << 3) | (byte143 >>> 5);
+        final int byte144 = blocks[blocksOffset++] & 0xFF;
+        final int byte145 = blocks[blocksOffset++] & 0xFF;
+        final int byte146 = blocks[blocksOffset++] & 0xFF;
+        final int byte147 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte143 & 31) << 26) | (byte144 << 18) | (byte145 << 10) | (byte146 << 2) | (byte147 >>> 6);
+        final int byte148 = blocks[blocksOffset++] & 0xFF;
+        final int byte149 = blocks[blocksOffset++] & 0xFF;
+        final int byte150 = blocks[blocksOffset++] & 0xFF;
+        final int byte151 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte147 & 63) << 25) | (byte148 << 17) | (byte149 << 9) | (byte150 << 1) | (byte151 >>> 7);
+        final int byte152 = blocks[blocksOffset++] & 0xFF;
+        final int byte153 = blocks[blocksOffset++] & 0xFF;
+        final int byte154 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte151 & 127) << 24) | (byte152 << 16) | (byte153 << 8) | byte154;
+        final int byte155 = blocks[blocksOffset++] & 0xFF;
+        final int byte156 = blocks[blocksOffset++] & 0xFF;
+        final int byte157 = blocks[blocksOffset++] & 0xFF;
+        final int byte158 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = (byte155 << 23) | (byte156 << 15) | (byte157 << 7) | (byte158 >>> 1);
+        final int byte159 = blocks[blocksOffset++] & 0xFF;
+        final int byte160 = blocks[blocksOffset++] & 0xFF;
+        final int byte161 = blocks[blocksOffset++] & 0xFF;
+        final int byte162 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte158 & 1) << 30) | (byte159 << 22) | (byte160 << 14) | (byte161 << 6) | (byte162 >>> 2);
+        final int byte163 = blocks[blocksOffset++] & 0xFF;
+        final int byte164 = blocks[blocksOffset++] & 0xFF;
+        final int byte165 = blocks[blocksOffset++] & 0xFF;
+        final int byte166 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte162 & 3) << 29) | (byte163 << 21) | (byte164 << 13) | (byte165 << 5) | (byte166 >>> 3);
+        final int byte167 = blocks[blocksOffset++] & 0xFF;
+        final int byte168 = blocks[blocksOffset++] & 0xFF;
+        final int byte169 = blocks[blocksOffset++] & 0xFF;
+        final int byte170 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte166 & 7) << 28) | (byte167 << 20) | (byte168 << 12) | (byte169 << 4) | (byte170 >>> 4);
+        final int byte171 = blocks[blocksOffset++] & 0xFF;
+        final int byte172 = blocks[blocksOffset++] & 0xFF;
+        final int byte173 = blocks[blocksOffset++] & 0xFF;
+        final int byte174 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte170 & 15) << 27) | (byte171 << 19) | (byte172 << 11) | (byte173 << 3) | (byte174 >>> 5);
+        final int byte175 = blocks[blocksOffset++] & 0xFF;
+        final int byte176 = blocks[blocksOffset++] & 0xFF;
+        final int byte177 = blocks[blocksOffset++] & 0xFF;
+        final int byte178 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte174 & 31) << 26) | (byte175 << 18) | (byte176 << 10) | (byte177 << 2) | (byte178 >>> 6);
+        final int byte179 = blocks[blocksOffset++] & 0xFF;
+        final int byte180 = blocks[blocksOffset++] & 0xFF;
+        final int byte181 = blocks[blocksOffset++] & 0xFF;
+        final int byte182 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte178 & 63) << 25) | (byte179 << 17) | (byte180 << 9) | (byte181 << 1) | (byte182 >>> 7);
+        final int byte183 = blocks[blocksOffset++] & 0xFF;
+        final int byte184 = blocks[blocksOffset++] & 0xFF;
+        final int byte185 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte182 & 127) << 24) | (byte183 << 16) | (byte184 << 8) | byte185;
+        final int byte186 = blocks[blocksOffset++] & 0xFF;
+        final int byte187 = blocks[blocksOffset++] & 0xFF;
+        final int byte188 = blocks[blocksOffset++] & 0xFF;
+        final int byte189 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = (byte186 << 23) | (byte187 << 15) | (byte188 << 7) | (byte189 >>> 1);
+        final int byte190 = blocks[blocksOffset++] & 0xFF;
+        final int byte191 = blocks[blocksOffset++] & 0xFF;
+        final int byte192 = blocks[blocksOffset++] & 0xFF;
+        final int byte193 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte189 & 1) << 30) | (byte190 << 22) | (byte191 << 14) | (byte192 << 6) | (byte193 >>> 2);
+        final int byte194 = blocks[blocksOffset++] & 0xFF;
+        final int byte195 = blocks[blocksOffset++] & 0xFF;
+        final int byte196 = blocks[blocksOffset++] & 0xFF;
+        final int byte197 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte193 & 3) << 29) | (byte194 << 21) | (byte195 << 13) | (byte196 << 5) | (byte197 >>> 3);
+        final int byte198 = blocks[blocksOffset++] & 0xFF;
+        final int byte199 = blocks[blocksOffset++] & 0xFF;
+        final int byte200 = blocks[blocksOffset++] & 0xFF;
+        final int byte201 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte197 & 7) << 28) | (byte198 << 20) | (byte199 << 12) | (byte200 << 4) | (byte201 >>> 4);
+        final int byte202 = blocks[blocksOffset++] & 0xFF;
+        final int byte203 = blocks[blocksOffset++] & 0xFF;
+        final int byte204 = blocks[blocksOffset++] & 0xFF;
+        final int byte205 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte201 & 15) << 27) | (byte202 << 19) | (byte203 << 11) | (byte204 << 3) | (byte205 >>> 5);
+        final int byte206 = blocks[blocksOffset++] & 0xFF;
+        final int byte207 = blocks[blocksOffset++] & 0xFF;
+        final int byte208 = blocks[blocksOffset++] & 0xFF;
+        final int byte209 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte205 & 31) << 26) | (byte206 << 18) | (byte207 << 10) | (byte208 << 2) | (byte209 >>> 6);
+        final int byte210 = blocks[blocksOffset++] & 0xFF;
+        final int byte211 = blocks[blocksOffset++] & 0xFF;
+        final int byte212 = blocks[blocksOffset++] & 0xFF;
+        final int byte213 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte209 & 63) << 25) | (byte210 << 17) | (byte211 << 9) | (byte212 << 1) | (byte213 >>> 7);
+        final int byte214 = blocks[blocksOffset++] & 0xFF;
+        final int byte215 = blocks[blocksOffset++] & 0xFF;
+        final int byte216 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte213 & 127) << 24) | (byte214 << 16) | (byte215 << 8) | byte216;
+        final int byte217 = blocks[blocksOffset++] & 0xFF;
+        final int byte218 = blocks[blocksOffset++] & 0xFF;
+        final int byte219 = blocks[blocksOffset++] & 0xFF;
+        final int byte220 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = (byte217 << 23) | (byte218 << 15) | (byte219 << 7) | (byte220 >>> 1);
+        final int byte221 = blocks[blocksOffset++] & 0xFF;
+        final int byte222 = blocks[blocksOffset++] & 0xFF;
+        final int byte223 = blocks[blocksOffset++] & 0xFF;
+        final int byte224 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte220 & 1) << 30) | (byte221 << 22) | (byte222 << 14) | (byte223 << 6) | (byte224 >>> 2);
+        final int byte225 = blocks[blocksOffset++] & 0xFF;
+        final int byte226 = blocks[blocksOffset++] & 0xFF;
+        final int byte227 = blocks[blocksOffset++] & 0xFF;
+        final int byte228 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte224 & 3) << 29) | (byte225 << 21) | (byte226 << 13) | (byte227 << 5) | (byte228 >>> 3);
+        final int byte229 = blocks[blocksOffset++] & 0xFF;
+        final int byte230 = blocks[blocksOffset++] & 0xFF;
+        final int byte231 = blocks[blocksOffset++] & 0xFF;
+        final int byte232 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte228 & 7) << 28) | (byte229 << 20) | (byte230 << 12) | (byte231 << 4) | (byte232 >>> 4);
+        final int byte233 = blocks[blocksOffset++] & 0xFF;
+        final int byte234 = blocks[blocksOffset++] & 0xFF;
+        final int byte235 = blocks[blocksOffset++] & 0xFF;
+        final int byte236 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte232 & 15) << 27) | (byte233 << 19) | (byte234 << 11) | (byte235 << 3) | (byte236 >>> 5);
+        final int byte237 = blocks[blocksOffset++] & 0xFF;
+        final int byte238 = blocks[blocksOffset++] & 0xFF;
+        final int byte239 = blocks[blocksOffset++] & 0xFF;
+        final int byte240 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte236 & 31) << 26) | (byte237 << 18) | (byte238 << 10) | (byte239 << 2) | (byte240 >>> 6);
+        final int byte241 = blocks[blocksOffset++] & 0xFF;
+        final int byte242 = blocks[blocksOffset++] & 0xFF;
+        final int byte243 = blocks[blocksOffset++] & 0xFF;
+        final int byte244 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte240 & 63) << 25) | (byte241 << 17) | (byte242 << 9) | (byte243 << 1) | (byte244 >>> 7);
+        final int byte245 = blocks[blocksOffset++] & 0xFF;
+        final int byte246 = blocks[blocksOffset++] & 0xFF;
+        final int byte247 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte244 & 127) << 24) | (byte245 << 16) | (byte246 << 8) | byte247;
+      }
+    }
+
+    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 >>> 33;
+        values[valuesOffset++] = (block0 >>> 2) & 2147483647L;
+        final long block1 = blocks[blocksOffset++];
+        values[valuesOffset++] = ((block0 & 3L) << 29) | (block1 >>> 35);
+        values[valuesOffset++] = (block1 >>> 4) & 2147483647L;
+        final long block2 = blocks[blocksOffset++];
+        values[valuesOffset++] = ((block1 & 15L) << 27) | (block2 >>> 37);
+        values[valuesOffset++] = (block2 >>> 6) & 2147483647L;
+        final long block3 = blocks[blocksOffset++];
+        values[valuesOffset++] = ((block2 & 63L) << 25) | (block3 >>> 39);
+        values[valuesOffset++] = (block3 >>> 8) & 2147483647L;
+        final long block4 = blocks[blocksOffset++];
+        values[valuesOffset++] = ((block3 & 255L) << 23) | (block4 >>> 41);
+        values[valuesOffset++] = (block4 >>> 10) & 2147483647L;
+        final long block5 = blocks[blocksOffset++];
+        values[valuesOffset++] = ((block4 & 1023L) << 21) | (block5 >>> 43);
+        values[valuesOffset++] = (block5 >>> 12) & 2147483647L;
+        final long block6 = blocks[blocksOffset++];
+        values[valuesOffset++] = ((block5 & 4095L) << 19) | (block6 >>> 45);
+        values[valuesOffset++] = (block6 >>> 14) & 2147483647L;
+        final long block7 = blocks[blocksOffset++];
+        values[valuesOffset++] = ((block6 & 16383L) << 17) | (block7 >>> 47);
+        values[valuesOffset++] = (block7 >>> 16) & 2147483647L;
+        final long block8 = blocks[blocksOffset++];
+        values[valuesOffset++] = ((block7 & 65535L) << 15) | (block8 >>> 49);
+        values[valuesOffset++] = (block8 >>> 18) & 2147483647L;
+        final long block9 = blocks[blocksOffset++];
+        values[valuesOffset++] = ((block8 & 262143L) << 13) | (block9 >>> 51);
+        values[valuesOffset++] = (block9 >>> 20) & 2147483647L;
+        final long block10 = blocks[blocksOffset++];
+        values[valuesOffset++] = ((block9 & 1048575L) << 11) | (block10 >>> 53);
+        values[valuesOffset++] = (block10 >>> 22) & 2147483647L;
+        final long block11 = blocks[blocksOffset++];
+        values[valuesOffset++] = ((block10 & 4194303L) << 9) | (block11 >>> 55);
+        values[valuesOffset++] = (block11 >>> 24) & 2147483647L;
+        final long block12 = blocks[blocksOffset++];
+        values[valuesOffset++] = ((block11 & 16777215L) << 7) | (block12 >>> 57);
+        values[valuesOffset++] = (block12 >>> 26) & 2147483647L;
+        final long block13 = blocks[blocksOffset++];
+        values[valuesOffset++] = ((block12 & 67108863L) << 5) | (block13 >>> 59);
+        values[valuesOffset++] = (block13 >>> 28) & 2147483647L;
+        final long block14 = blocks[blocksOffset++];
+        values[valuesOffset++] = ((block13 & 268435455L) << 3) | (block14 >>> 61);
+        values[valuesOffset++] = (block14 >>> 30) & 2147483647L;
+        final long block15 = blocks[blocksOffset++];
+        values[valuesOffset++] = ((block14 & 1073741823L) << 1) | (block15 >>> 63);
+        values[valuesOffset++] = (block15 >>> 32) & 2147483647L;
+        values[valuesOffset++] = (block15 >>> 1) & 2147483647L;
+        final long block16 = blocks[blocksOffset++];
+        values[valuesOffset++] = ((block15 & 1L) << 30) | (block16 >>> 34);
+        values[valuesOffset++] = (block16 >>> 3) & 2147483647L;
+        final long block17 = blocks[blocksOffset++];
+        values[valuesOffset++] = ((block16 & 7L) << 28) | (block17 >>> 36);
+        values[valuesOffset++] = (block17 >>> 5) & 2147483647L;
+        final long block18 = blocks[blocksOffset++];
+        values[valuesOffset++] = ((block17 & 31L) << 26) | (block18 >>> 38);
+        values[valuesOffset++] = (block18 >>> 7) & 2147483647L;
+        final long block19 = blocks[blocksOffset++];
+        values[valuesOffset++] = ((block18 & 127L) << 24) | (block19 >>> 40);
+        values[valuesOffset++] = (block19 >>> 9) & 2147483647L;
+        final long block20 = blocks[blocksOffset++];
+        values[valuesOffset++] = ((block19 & 511L) << 22) | (block20 >>> 42);
+        values[valuesOffset++] = (block20 >>> 11) & 2147483647L;
+        final long block21 = blocks[blocksOffset++];
+        values[valuesOffset++] = ((block20 & 2047L) << 20) | (block21 >>> 44);
+        values[valuesOffset++] = (block21 >>> 13) & 2147483647L;
+        final long block22 = blocks[blocksOffset++];
+        values[valuesOffset++] = ((block21 & 8191L) << 18) | (block22 >>> 46);
+        values[valuesOffset++] = (block22 >>> 15) & 2147483647L;
+        final long block23 = blocks[blocksOffset++];
+        values[valuesOffset++] = ((block22 & 32767L) << 16) | (block23 >>> 48);
+        values[valuesOffset++] = (block23 >>> 17) & 2147483647L;
+        final long block24 = blocks[blocksOffset++];
+        values[valuesOffset++] = ((block23 & 131071L) << 14) | (block24 >>> 50);
+        values[valuesOffset++] = (block24 >>> 19) & 2147483647L;
+        final long block25 = blocks[blocksOffset++];
+        values[valuesOffset++] = ((block24 & 524287L) << 12) | (block25 >>> 52);
+        values[valuesOffset++] = (block25 >>> 21) & 2147483647L;
+        final long block26 = blocks[blocksOffset++];
+        values[valuesOffset++] = ((block25 & 2097151L) << 10) | (block26 >>> 54);
+        values[valuesOffset++] = (block26 >>> 23) & 2147483647L;
+        final long block27 = blocks[blocksOffset++];
+        values[valuesOffset++] = ((block26 & 8388607L) << 8) | (block27 >>> 56);
+        values[valuesOffset++] = (block27 >>> 25) & 2147483647L;
+        final long block28 = blocks[blocksOffset++];
+        values[valuesOffset++] = ((block27 & 33554431L) << 6) | (block28 >>> 58);
+        values[valuesOffset++] = (block28 >>> 27) & 2147483647L;
+        final long block29 = blocks[blocksOffset++];
+        values[valuesOffset++] = ((block28 & 134217727L) << 4) | (block29 >>> 60);
+        values[valuesOffset++] = (block29 >>> 29) & 2147483647L;
+        final long block30 = blocks[blocksOffset++];
+        values[valuesOffset++] = ((block29 & 536870911L) << 2) | (block30 >>> 62);
+        values[valuesOffset++] = (block30 >>> 31) & 2147483647L;
+        values[valuesOffset++] = block30 & 2147483647L;
+      }
+    }
+
+    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;
+        final long byte2 = blocks[blocksOffset++] & 0xFF;
+        final long byte3 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = (byte0 << 23) | (byte1 << 15) | (byte2 << 7) | (byte3 >>> 1);
+        final long byte4 = blocks[blocksOffset++] & 0xFF;
+        final long byte5 = blocks[blocksOffset++] & 0xFF;
+        final long byte6 = blocks[blocksOffset++] & 0xFF;
+        final long byte7 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte3 & 1) << 30) | (byte4 << 22) | (byte5 << 14) | (byte6 << 6) | (byte7 >>> 2);
+        final long byte8 = blocks[blocksOffset++] & 0xFF;
+        final long byte9 = blocks[blocksOffset++] & 0xFF;
+        final long byte10 = blocks[blocksOffset++] & 0xFF;
+        final long byte11 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte7 & 3) << 29) | (byte8 << 21) | (byte9 << 13) | (byte10 << 5) | (byte11 >>> 3);
+        final long byte12 = blocks[blocksOffset++] & 0xFF;
+        final long byte13 = blocks[blocksOffset++] & 0xFF;
+        final long byte14 = blocks[blocksOffset++] & 0xFF;
+        final long byte15 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte11 & 7) << 28) | (byte12 << 20) | (byte13 << 12) | (byte14 << 4) | (byte15 >>> 4);
+        final long byte16 = blocks[blocksOffset++] & 0xFF;
+        final long byte17 = blocks[blocksOffset++] & 0xFF;
+        final long byte18 = blocks[blocksOffset++] & 0xFF;
+        final long byte19 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte15 & 15) << 27) | (byte16 << 19) | (byte17 << 11) | (byte18 << 3) | (byte19 >>> 5);
+        final long byte20 = blocks[blocksOffset++] & 0xFF;
+        final long byte21 = blocks[blocksOffset++] & 0xFF;
+        final long byte22 = blocks[blocksOffset++] & 0xFF;
+        final long byte23 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte19 & 31) << 26) | (byte20 << 18) | (byte21 << 10) | (byte22 << 2) | (byte23 >>> 6);
+        final long byte24 = blocks[blocksOffset++] & 0xFF;
+        final long byte25 = blocks[blocksOffset++] & 0xFF;
+        final long byte26 = blocks[blocksOffset++] & 0xFF;
+        final long byte27 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte23 & 63) << 25) | (byte24 << 17) | (byte25 << 9) | (byte26 << 1) | (byte27 >>> 7);
+        final long byte28 = blocks[blocksOffset++] & 0xFF;
+        final long byte29 = blocks[blocksOffset++] & 0xFF;
+        final long byte30 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte27 & 127) << 24) | (byte28 << 16) | (byte29 << 8) | byte30;
+        final long byte31 = blocks[blocksOffset++] & 0xFF;
+        final long byte32 = blocks[blocksOffset++] & 0xFF;
+        final long byte33 = blocks[blocksOffset++] & 0xFF;
+        final long byte34 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = (byte31 << 23) | (byte32 << 15) | (byte33 << 7) | (byte34 >>> 1);
+        final long byte35 = blocks[blocksOffset++] & 0xFF;
+        final long byte36 = blocks[blocksOffset++] & 0xFF;
+        final long byte37 = blocks[blocksOffset++] & 0xFF;
+        final long byte38 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte34 & 1) << 30) | (byte35 << 22) | (byte36 << 14) | (byte37 << 6) | (byte38 >>> 2);
+        final long byte39 = blocks[blocksOffset++] & 0xFF;
+        final long byte40 = blocks[blocksOffset++] & 0xFF;
+        final long byte41 = blocks[blocksOffset++] & 0xFF;
+        final long byte42 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte38 & 3) << 29) | (byte39 << 21) | (byte40 << 13) | (byte41 << 5) | (byte42 >>> 3);
+        final long byte43 = blocks[blocksOffset++] & 0xFF;
+        final long byte44 = blocks[blocksOffset++] & 0xFF;
+        final long byte45 = blocks[blocksOffset++] & 0xFF;
+        final long byte46 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte42 & 7) << 28) | (byte43 << 20) | (byte44 << 12) | (byte45 << 4) | (byte46 >>> 4);
+        final long byte47 = blocks[blocksOffset++] & 0xFF;
+        final long byte48 = blocks[blocksOffset++] & 0xFF;
+        final long byte49 = blocks[blocksOffset++] & 0xFF;
+        final long byte50 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte46 & 15) << 27) | (byte47 << 19) | (byte48 << 11) | (byte49 << 3) | (byte50 >>> 5);
+        final long byte51 = blocks[blocksOffset++] & 0xFF;
+        final long byte52 = blocks[blocksOffset++] & 0xFF;
+        final long byte53 = blocks[blocksOffset++] & 0xFF;
+        final long byte54 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte50 & 31) << 26) | (byte51 << 18) | (byte52 << 10) | (byte53 << 2) | (byte54 >>> 6);
+        final long byte55 = blocks[blocksOffset++] & 0xFF;
+        final long byte56 = blocks[blocksOffset++] & 0xFF;
+        final long byte57 = blocks[blocksOffset++] & 0xFF;
+        final long byte58 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte54 & 63) << 25) | (byte55 << 17) | (byte56 << 9) | (byte57 << 1) | (byte58 >>> 7);
+        final long byte59 = blocks[blocksOffset++] & 0xFF;
+        final long byte60 = blocks[blocksOffset++] & 0xFF;
+        final long byte61 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte58 & 127) << 24) | (byte59 << 16) | (byte60 << 8) | byte61;
+        final long byte62 = blocks[blocksOffset++] & 0xFF;
+        final long byte63 = blocks[blocksOffset++] & 0xFF;
+        final long byte64 = blocks[blocksOffset++] & 0xFF;
+        final long byte65 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = (byte62 << 23) | (byte63 << 15) | (byte64 << 7) | (byte65 >>> 1);
+        final long byte66 = blocks[blocksOffset++] & 0xFF;
+        final long byte67 = blocks[blocksOffset++] & 0xFF;
+        final long byte68 = blocks[blocksOffset++] & 0xFF;
+        final long byte69 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte65 & 1) << 30) | (byte66 << 22) | (byte67 << 14) | (byte68 << 6) | (byte69 >>> 2);
+        final long byte70 = blocks[blocksOffset++] & 0xFF;
+        final long byte71 = blocks[blocksOffset++] & 0xFF;
+        final long byte72 = blocks[blocksOffset++] & 0xFF;
+        final long byte73 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte69 & 3) << 29) | (byte70 << 21) | (byte71 << 13) | (byte72 << 5) | (byte73 >>> 3);
+        final long byte74 = blocks[blocksOffset++] & 0xFF;
+        final long byte75 = blocks[blocksOffset++] & 0xFF;
+        final long byte76 = blocks[blocksOffset++] & 0xFF;
+        final long byte77 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte73 & 7) << 28) | (byte74 << 20) | (byte75 << 12) | (byte76 << 4) | (byte77 >>> 4);
+        final long byte78 = blocks[blocksOffset++] & 0xFF;
+        final long byte79 = blocks[blocksOffset++] & 0xFF;
+        final long byte80 = blocks[blocksOffset++] & 0xFF;
+        final long byte81 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte77 & 15) << 27) | (byte78 << 19) | (byte79 << 11) | (byte80 << 3) | (byte81 >>> 5);
+        final long byte82 = blocks[blocksOffset++] & 0xFF;
+        final long byte83 = blocks[blocksOffset++] & 0xFF;
+        final long byte84 = blocks[blocksOffset++] & 0xFF;
+        final long byte85 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte81 & 31) << 26) | (byte82 << 18) | (byte83 << 10) | (byte84 << 2) | (byte85 >>> 6);
+        final long byte86 = blocks[blocksOffset++] & 0xFF;
+        final long byte87 = blocks[blocksOffset++] & 0xFF;
+        final long byte88 = blocks[blocksOffset++] & 0xFF;
+        final long byte89 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte85 & 63) << 25) | (byte86 << 17) | (byte87 << 9) | (byte88 << 1) | (byte89 >>> 7);
+        final long byte90 = blocks[blocksOffset++] & 0xFF;
+        final long byte91 = blocks[blocksOffset++] & 0xFF;
+        final long byte92 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte89 & 127) << 24) | (byte90 << 16) | (byte91 << 8) | byte92;
+        final long byte93 = blocks[blocksOffset++] & 0xFF;
+        final long byte94 = blocks[blocksOffset++] & 0xFF;
+        final long byte95 = blocks[blocksOffset++] & 0xFF;
+        final long byte96 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = (byte93 << 23) | (byte94 << 15) | (byte95 << 7) | (byte96 >>> 1);
+        final long byte97 = blocks[blocksOffset++] & 0xFF;
+        final long byte98 = blocks[blocksOffset++] & 0xFF;
+        final long byte99 = blocks[blocksOffset++] & 0xFF;
+        final long byte100 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte96 & 1) << 30) | (byte97 << 22) | (byte98 << 14) | (byte99 << 6) | (byte100 >>> 2);
+        final long byte101 = blocks[blocksOffset++] & 0xFF;
+        final long byte102 = blocks[blocksOffset++] & 0xFF;
+        final long byte103 = blocks[blocksOffset++] & 0xFF;
+        final long byte104 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte100 & 3) << 29) | (byte101 << 21) | (byte102 << 13) | (byte103 << 5) | (byte104 >>> 3);
+        final long byte105 = blocks[blocksOffset++] & 0xFF;
+        final long byte106 = blocks[blocksOffset++] & 0xFF;
+        final long byte107 = blocks[blocksOffset++] & 0xFF;
+        final long byte108 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte104 & 7) << 28) | (byte105 << 20) | (byte106 << 12) | (byte107 << 4) | (byte108 >>> 4);
+        final long byte109 = blocks[blocksOffset++] & 0xFF;
+        final long byte110 = blocks[blocksOffset++] & 0xFF;
+        final long byte111 = blocks[blocksOffset++] & 0xFF;
+        final long byte112 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte108 & 15) << 27) | (byte109 << 19) | (byte110 << 11) | (byte111 << 3) | (byte112 >>> 5);
+        final long byte113 = blocks[blocksOffset++] & 0xFF;
+        final long byte114 = blocks[blocksOffset++] & 0xFF;
+        final long byte115 = blocks[blocksOffset++] & 0xFF;
+        final long byte116 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte112 & 31) << 26) | (byte113 << 18) | (byte114 << 10) | (byte115 << 2) | (byte116 >>> 6);
+        final long byte117 = blocks[blocksOffset++] & 0xFF;
+        final long byte118 = blocks[blocksOffset++] & 0xFF;
+        final long byte119 = blocks[blocksOffset++] & 0xFF;
+        final long byte120 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte116 & 63) << 25) | (byte117 << 17) | (byte118 << 9) | (byte119 << 1) | (byte120 >>> 7);
+        final long byte121 = blocks[blocksOffset++] & 0xFF;
+        final long byte122 = blocks[blocksOffset++] & 0xFF;
+        final long byte123 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte120 & 127) << 24) | (byte121 << 16) | (byte122 << 8) | byte123;
+        final long byte124 = blocks[blocksOffset++] & 0xFF;
+        final long byte125 = blocks[blocksOffset++] & 0xFF;
+        final long byte126 = blocks[blocksOffset++] & 0xFF;
+        final long byte127 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = (byte124 << 23) | (byte125 << 15) | (byte126 << 7) | (byte127 >>> 1);
+        final long byte128 = blocks[blocksOffset++] & 0xFF;
+        final long byte129 = blocks[blocksOffset++] & 0xFF;
+        final long byte130 = blocks[blocksOffset++] & 0xFF;
+        final long byte131 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte127 & 1) << 30) | (byte128 << 22) | (byte129 << 14) | (byte130 << 6) | (byte131 >>> 2);
+        final long byte132 = blocks[blocksOffset++] & 0xFF;
+        final long byte133 = blocks[blocksOffset++] & 0xFF;
+        final long byte134 = blocks[blocksOffset++] & 0xFF;
+        final long byte135 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte131 & 3) << 29) | (byte132 << 21) | (byte133 << 13) | (byte134 << 5) | (byte135 >>> 3);
+        final long byte136 = blocks[blocksOffset++] & 0xFF;
+        final long byte137 = blocks[blocksOffset++] & 0xFF;
+        final long byte138 = blocks[blocksOffset++] & 0xFF;
+        final long byte139 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte135 & 7) << 28) | (byte136 << 20) | (byte137 << 12) | (byte138 << 4) | (byte139 >>> 4);
+        final long byte140 = blocks[blocksOffset++] & 0xFF;
+        final long byte141 = blocks[blocksOffset++] & 0xFF;
+        final long byte142 = blocks[blocksOffset++] & 0xFF;
+        final long byte143 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte139 & 15) << 27) | (byte140 << 19) | (byte141 << 11) | (byte142 << 3) | (byte143 >>> 5);
+        final long byte144 = blocks[blocksOffset++] & 0xFF;
+        final long byte145 = blocks[blocksOffset++] & 0xFF;
+        final long byte146 = blocks[blocksOffset++] & 0xFF;
+        final long byte147 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte143 & 31) << 26) | (byte144 << 18) | (byte145 << 10) | (byte146 << 2) | (byte147 >>> 6);
+        final long byte148 = blocks[blocksOffset++] & 0xFF;
+        final long byte149 = blocks[blocksOffset++] & 0xFF;
+        final long byte150 = blocks[blocksOffset++] & 0xFF;
+        final long byte151 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte147 & 63) << 25) | (byte148 << 17) | (byte149 << 9) | (byte150 << 1) | (byte151 >>> 7);
+        final long byte152 = blocks[blocksOffset++] & 0xFF;
+        final long byte153 = blocks[blocksOffset++] & 0xFF;
+        final long byte154 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte151 & 127) << 24) | (byte152 << 16) | (byte153 << 8) | byte154;
+        final long byte155 = blocks[blocksOffset++] & 0xFF;
+        final long byte156 = blocks[blocksOffset++] & 0xFF;
+        final long byte157 = blocks[blocksOffset++] & 0xFF;
+        final long byte158 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = (byte155 << 23) | (byte156 << 15) | (byte157 << 7) | (byte158 >>> 1);
+        final long byte159 = blocks[blocksOffset++] & 0xFF;
+        final long byte160 = blocks[blocksOffset++] & 0xFF;
+        final long byte161 = blocks[blocksOffset++] & 0xFF;
+        final long byte162 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte158 & 1) << 30) | (byte159 << 22) | (byte160 << 14) | (byte161 << 6) | (byte162 >>> 2);
+        final long byte163 = blocks[blocksOffset++] & 0xFF;
+        final long byte164 = blocks[blocksOffset++] & 0xFF;
+        final long byte165 = blocks[blocksOffset++] & 0xFF;
+        final long byte166 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte162 & 3) << 29) | (byte163 << 21) | (byte164 << 13) | (byte165 << 5) | (byte166 >>> 3);
+        final long byte167 = blocks[blocksOffset++] & 0xFF;
+        final long byte168 = blocks[blocksOffset++] & 0xFF;
+        final long byte169 = blocks[blocksOffset++] & 0xFF;
+        final long byte170 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte166 & 7) << 28) | (byte167 << 20) | (byte168 << 12) | (byte169 << 4) | (byte170 >>> 4);
+        final long byte171 = blocks[blocksOffset++] & 0xFF;
+        final long byte172 = blocks[blocksOffset++] & 0xFF;
+        final long byte173 = blocks[blocksOffset++] & 0xFF;
+        final long byte174 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte170 & 15) << 27) | (byte171 << 19) | (byte172 << 11) | (byte173 << 3) | (byte174 >>> 5);
+        final long byte175 = blocks[blocksOffset++] & 0xFF;
+        final long byte176 = blocks[blocksOffset++] & 0xFF;
+        final long byte177 = blocks[blocksOffset++] & 0xFF;
+        final long byte178 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte174 & 31) << 26) | (byte175 << 18) | (byte176 << 10) | (byte177 << 2) | (byte178 >>> 6);
+        final long byte179 = blocks[blocksOffset++] & 0xFF;
+        final long byte180 = blocks[blocksOffset++] & 0xFF;
+        final long byte181 = blocks[blocksOffset++] & 0xFF;
+        final long byte182 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte178 & 63) << 25) | (byte179 << 17) | (byte180 << 9) | (byte181 << 1) | (byte182 >>> 7);
+        final long byte183 = blocks[blocksOffset++] & 0xFF;
+        final long byte184 = blocks[blocksOffset++] & 0xFF;
+        final long byte185 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte182 & 127) << 24) | (byte183 << 16) | (byte184 << 8) | byte185;
+        final long byte186 = blocks[blocksOffset++] & 0xFF;
+        final long byte187 = blocks[blocksOffset++] & 0xFF;
+        final long byte188 = blocks[blocksOffset++] & 0xFF;
+        final long byte189 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = (byte186 << 23) | (byte187 << 15) | (byte188 << 7) | (byte189 >>> 1);
+        final long byte190 = blocks[blocksOffset++] & 0xFF;
+        final long byte191 = blocks[blocksOffset++] & 0xFF;
+        final long byte192 = blocks[blocksOffset++] & 0xFF;
+        final long byte193 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte189 & 1) << 30) | (byte190 << 22) | (byte191 << 14) | (byte192 << 6) | (byte193 >>> 2);
+        final long byte194 = blocks[blocksOffset++] & 0xFF;
+        final long byte195 = blocks[blocksOffset++] & 0xFF;
+        final long byte196 = blocks[blocksOffset++] & 0xFF;
+        final long byte197 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte193 & 3) << 29) | (byte194 << 21) | (byte195 << 13) | (byte196 << 5) | (byte197 >>> 3);
+        final long byte198 = blocks[blocksOffset++] & 0xFF;
+        final long byte199 = blocks[blocksOffset++] & 0xFF;
+        final long byte200 = blocks[blocksOffset++] & 0xFF;
+        final long byte201 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte197 & 7) << 28) | (byte198 << 20) | (byte199 << 12) | (byte200 << 4) | (byte201 >>> 4);
+        final long byte202 = blocks[blocksOffset++] & 0xFF;
+        final long byte203 = blocks[blocksOffset++] & 0xFF;
+        final long byte204 = blocks[blocksOffset++] & 0xFF;
+        final long byte205 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte201 & 15) << 27) | (byte202 << 19) | (byte203 << 11) | (byte204 << 3) | (byte205 >>> 5);
+        final long byte206 = blocks[blocksOffset++] & 0xFF;
+        final long byte207 = blocks[blocksOffset++] & 0xFF;
+        final long byte208 = blocks[blocksOffset++] & 0xFF;
+        final long byte209 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte205 & 31) << 26) | (byte206 << 18) | (byte207 << 10) | (byte208 << 2) | (byte209 >>> 6);
+        final long byte210 = blocks[blocksOffset++] & 0xFF;
+        final long byte211 = blocks[blocksOffset++] & 0xFF;
+        final long byte212 = blocks[blocksOffset++] & 0xFF;
+        final long byte213 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte209 & 63) << 25) | (byte210 << 17) | (byte211 << 9) | (byte212 << 1) | (byte213 >>> 7);
+        final long byte214 = blocks[blocksOffset++] & 0xFF;
+        final long byte215 = blocks[blocksOffset++] & 0xFF;
+        final long byte216 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte213 & 127) << 24) | (byte214 << 16) | (byte215 << 8) | byte216;
+        final long byte217 = blocks[blocksOffset++] & 0xFF;
+        final long byte218 = blocks[blocksOffset++] & 0xFF;
+        final long byte219 = blocks[blocksOffset++] & 0xFF;
+        final long byte220 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = (byte217 << 23) | (byte218 << 15) | (byte219 << 7) | (byte220 >>> 1);
+        final long byte221 = blocks[blocksOffset++] & 0xFF;
+        final long byte222 = blocks[blocksOffset++] & 0xFF;
+        final long byte223 = blocks[blocksOffset++] & 0xFF;
+        final long byte224 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte220 & 1) << 30) | (byte221 << 22) | (byte222 << 14) | (byte223 << 6) | (byte224 >>> 2);
+        final long byte225 = blocks[blocksOffset++] & 0xFF;
+        final long byte226 = blocks[blocksOffset++] & 0xFF;
+        final long byte227 = blocks[blocksOffset++] & 0xFF;
+        final long byte228 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte224 & 3) << 29) | (byte225 << 21) | (byte226 << 13) | (byte227 << 5) | (byte228 >>> 3);
+        final long byte229 = blocks[blocksOffset++] & 0xFF;
+        final long byte230 = blocks[blocksOffset++] & 0xFF;
+        final long byte231 = blocks[blocksOffset++] & 0xFF;
+        final long byte232 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte228 & 7) << 28) | (byte229 << 20) | (byte230 << 12) | (byte231 << 4) | (byte232 >>> 4);
+        final long byte233 = blocks[blocksOffset++] & 0xFF;
+        final long byte234 = blocks[blocksOffset++] & 0xFF;
+        final long byte235 = blocks[blocksOffset++] & 0xFF;
+        final long byte236 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte232 & 15) << 27) | (byte233 << 19) | (byte234 << 11) | (byte235 << 3) | (byte236 >>> 5);
+        final long byte237 = blocks[blocksOffset++] & 0xFF;
+        final long byte238 = blocks[blocksOffset++] & 0xFF;
+        final long byte239 = blocks[blocksOffset++] & 0xFF;
+        final long byte240 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte236 & 31) << 26) | (byte237 << 18) | (byte238 << 10) | (byte239 << 2) | (byte240 >>> 6);
+        final long byte241 = blocks[blocksOffset++] & 0xFF;
+        final long byte242 = blocks[blocksOffset++] & 0xFF;
+        final long byte243 = blocks[blocksOffset++] & 0xFF;
+        final long byte244 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte240 & 63) << 25) | (byte241 << 17) | (byte242 << 9) | (byte243 << 1) | (byte244 >>> 7);
+        final long byte245 = blocks[blocksOffset++] & 0xFF;
+        final long byte246 = blocks[blocksOffset++] & 0xFF;
+        final long byte247 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = ((byte244 & 127) << 24) | (byte245 << 16) | (byte246 << 8) | byte247;
+      }
+    }
+
+    public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) {
+      assert blocksOffset + iterations * blockCount() <= blocks.length;
+      assert valuesOffset + iterations * valueCount() <= values.length;
+      for (int i = 0; i < iterations; ++i) {
+        blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 33) | ((values[valuesOffset++] & 0xffffffffL) << 2) | ((values[valuesOffset] & 0xffffffffL) >>> 29);
+        blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 35) | ((values[valuesOffset++] & 0xffffffffL) << 4) | ((values[valuesOffset] & 0xffffffffL) >>> 27);
+        blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 37) | ((values[valuesOffset++] & 0xffffffffL) << 6) | ((values[valuesOffset] & 0xffffffffL) >>> 25);
+        blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 39) | ((values[valuesOffset++] & 0xffffffffL) << 8) | ((values[valuesOffset] & 0xffffffffL) >>> 23);
+        blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 41) | ((values[valuesOffset++] & 0xffffffffL) << 10) | ((values[valuesOffset] & 0xffffffffL) >>> 21);
+        blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 43) | ((values[valuesOffset++] & 0xffffffffL) << 12) | ((values[valuesOffset] & 0xffffffffL) >>> 19);
+        blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 45) | ((values[valuesOffset++] & 0xffffffffL) << 14) | ((values[valuesOffset] & 0xffffffffL) >>> 17);
+        blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 47) | ((values[valuesOffset++] & 0xffffffffL) << 16) | ((values[valuesOffset] & 0xffffffffL) >>> 15);
+        blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 49) | ((values[valuesOffset++] & 0xffffffffL) << 18) | ((values[valuesOffset] & 0xffffffffL) >>> 13);
+        blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 51) | ((values[valuesOffset++] & 0xffffffffL) << 20) | ((values[valuesOffset] & 0xffffffffL) >>> 11);
+        blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 53) | ((values[valuesOffset++] & 0xffffffffL) << 22) | ((values[valuesOffset] & 0xffffffffL) >>> 9);
+        blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 55) | ((values[valuesOffset++] & 0xffffffffL) << 24) | ((values[valuesOffset] & 0xffffffffL) >>> 7);
+        blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 57) | ((values[valuesOffset++] & 0xffffffffL) << 26) | ((values[valuesOffset] & 0xffffffffL) >>> 5);
+        blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 59) | ((values[valuesOffset++] & 0xffffffffL) << 28) | ((values[valuesOffset] & 0xffffffffL) >>> 3);
+        blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 61) | ((values[valuesOffset++] & 0xffffffffL) << 30) | ((values[valuesOffset] & 0xffffffffL) >>> 1);
+        blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 63) | ((values[valuesOffset++] & 0xffffffffL) << 32) | ((values[valuesOffset++] & 0xffffffffL) << 1) | ((values[valuesOffset] & 0xffffffffL) >>> 30);
+        blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 34) | ((values[valuesOffset++] & 0xffffffffL) << 3) | ((values[valuesOffset] & 0xffffffffL) >>> 28);
+        blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 36) | ((values[valuesOffset++] & 0xffffffffL) << 5) | ((values[valuesOffset] & 0xffffffffL) >>> 26);
+        blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 38) | ((values[valuesOffset++] & 0xffffffffL) << 7) | ((values[valuesOffset] & 0xffffffffL) >>> 24);
+        blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 40) | ((values[valuesOffset++] & 0xffffffffL) << 9) | ((values[valuesOffset] & 0xffffffffL) >>> 22);
+        blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 42) | ((values[valuesOffset++] & 0xffffffffL) << 11) | ((values[valuesOffset] & 0xffffffffL) >>> 20);
+        blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 44) | ((values[valuesOffset++] & 0xffffffffL) << 13) | ((values[valuesOffset] & 0xffffffffL) >>> 18);
+        blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 46) | ((values[valuesOffset++] & 0xffffffffL) << 15) | ((values[valuesOffset] & 0xffffffffL) >>> 16);
+        blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 48) | ((values[valuesOffset++] & 0xffffffffL) << 17) | ((values[valuesOffset] & 0xffffffffL) >>> 14);
+        blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 50) | ((values[valuesOffset++] & 0xffffffffL) << 19) | ((values[valuesOffset] & 0xffffffffL) >>> 12);
+        blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 52) | ((values[valuesOffset++] & 0xffffffffL) << 21) | ((values[valuesOffset] & 0xffffffffL) >>> 10);
+        blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 54) | ((values[valuesOffset++] & 0xffffffffL) << 23) | ((values[valuesOffset] & 0xffffffffL) >>> 8);
+        blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 56) | ((values[valuesOffset++] & 0xffffffffL) << 25) | ((values[valuesOffset] & 0xffffffffL) >>> 6);
+        blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 58) | ((values[valuesOffset++] & 0xffffffffL) << 27) | ((values[valuesOffset] & 0xffffffffL) >>> 4);
+        blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 60) | ((values[valuesOffset++] & 0xffffffffL) << 29) | ((values[valuesOffset] & 0xffffffffL) >>> 2);
+        blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 62) | ((values[valuesOffset++] & 0xffffffffL) << 31) | (values[valuesOffset++] & 0xffffffffL);
+      }
+    }
+
+    public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) {
+      assert blocksOffset + iterations * blockCount() <= blocks.length;
+      assert valuesOffset + iterations * valueCount() <= values.length;
+      for (int i = 0; i < iterations; ++i) {
+        blocks[blocksOffset++] = (values[valuesOffset++] << 33) | (values[valuesOffset++] << 2) | (values[valuesOffset] >>> 29);
+        blocks[blocksOffset++] = (values[valuesOffset++] << 35) | (values[valuesOffset++] << 4) | (values[valuesOffset] >>> 27);
+        blocks[blocksOffset++] = (values[valuesOffset++] << 37) | (values[valuesOffset++] << 6) | (values[valuesOffset] >>> 25);
+        blocks[blocksOffset++] = (values[valuesOffset++] << 39) | (values[valuesOffset++] << 8) | (values[valuesOffset] >>> 23);
+        blocks[blocksOffset++] = (values[valuesOffset++] << 41) | (values[valuesOffset++] << 10) | (values[valuesOffset] >>> 21);
+        blocks[blocksOffset++] = (values[valuesOffset++] << 43) | (values[valuesOffset++] << 12) | (values[valuesOffset] >>> 19);
+        blocks[blocksOffset++] = (values[valuesOffset++] << 45) | (values[valuesOffset++] << 14) | (values[valuesOffset] >>> 17);
+        blocks[blocksOffset++] = (values[valuesOffset++] << 47) | (values[valuesOffset++] << 16) | (values[valuesOffset] >>> 15);
+        blocks[blocksOffset++] = (values[valuesOffset++] << 49) | (values[valuesOffset++] << 18) | (values[valuesOffset] >>> 13);
+        blocks[blocksOffset++] = (values[valuesOffset++] << 51) | (values[valuesOffset++] << 20) | (values[valuesOffset] >>> 11);
+        blocks[blocksOffset++] = (values[valuesOffset++] << 53) | (values[valuesOffset++] << 22) | (values[valuesOffset] >>> 9);
+        blocks[blocksOffset++] = (values[valuesOffset++] << 55) | (values[valuesOffset++] << 24) | (values[valuesOffset] >>> 7);
+        blocks[blocksOffset++] = (values[valuesOffset++] << 57) | (values[valuesOffset++] << 26) | (values[valuesOffset] >>> 5);
+        blocks[blocksOffset++] = (values[valuesOffset++] << 59) | (values[valuesOffset++] << 28) | (values[valuesOffset] >>> 3);
+        blocks[blocksOffset++] = (values[valuesOffset++] << 61) | (values[valuesOffset++] << 30) | (values[valuesOffset] >>> 1);
+        blocks[blocksOffset++] = (values[valuesOffset++] << 63) | (values[valuesOffset++] << 32) | (values[valuesOffset++] << 1) | (values[valuesOffset] >>> 30);
+        blocks[blocksOffset++] = (values[valuesOffset++] << 34) | (values[valuesOffset++] << 3) | (values[valuesOffset] >>> 28);
+        blocks[blocksOffset++] = (values[valuesOffset++] << 36) | (values[valuesOffset++] << 5) | (values[valuesOffset] >>> 26);
+        blocks[blocksOffset++] = (values[valuesOffset++] << 38) | (values[valuesOffset++] << 7) | (values[valuesOffset] >>> 24);
+        blocks[blocksOffset++] = (values[valuesOffset++] << 40) | (values[valuesOffset++] << 9) | (values[valuesOffset] >>> 22);
+        blocks[blocksOffset++] = (values[valuesOffset++] << 42) | (values[valuesOffset++] << 11) | (values[valuesOffset] >>> 20);
+        blocks[blocksOffset++] = (values[valuesOffset++] << 44) | (values[valuesOffset++] << 13) | (values[valuesOffset] >>> 18);
+        blocks[blocksOffset++] = (values[valuesOffset++] << 46) | (values[valuesOffset++] << 15) | (values[valuesOffset] >>> 16);
+        blocks[blocksOffset++] = (values[valuesOffset++] << 48) | (values[valuesOffset++] << 17) | (values[valuesOffset] >>> 14);
+        blocks[blocksOffset++] = (values[valuesOffset++] << 50) | (values[valuesOffset++] << 19) | (values[valuesOffset] >>> 12);
+        blocks[blocksOffset++] = (values[valuesOffset++] << 52) | (values[valuesOffset++] << 21) | (values[valuesOffset] >>> 10);
+        blocks[blocksOffset++] = (values[valuesOffset++] << 54) | (values[valuesOffset++] << 23) | (values[valuesOffset] >>> 8);
+        blocks[blocksOffset++] = (values[valuesOffset++] << 56) | (values[valuesOffset++] << 25) | (values[valuesOffset] >>> 6);
+        blocks[blocksOffset++] = (values[valuesOffset++] << 58) | (values[valuesOffset++] << 27) | (values[valuesOffset] >>> 4);
+        blocks[blocksOffset++] = (values[valuesOffset++] << 60) | (values[valuesOffset++] << 29) | (values[valuesOffset] >>> 2);
+        blocks[blocksOffset++] = (values[valuesOffset++] << 62) | (values[valuesOffset++] << 31) | values[valuesOffset++];
+      }
+    }
+
+}

Added: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked32.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked32.java?rev=1376305&view=auto
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked32.java (added)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked32.java Wed Aug 22 23:13:40 2012
@@ -0,0 +1,104 @@
+// This file has been automatically generated, DO NOT EDIT
+
+package org.apache.lucene.util.packed;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Efficient sequential read/write of packed integers.
+ */
+final class BulkOperationPacked32 extends BulkOperation {
+    public int blockCount() {
+      return 1;
+    }
+
+    public int valueCount() {
+      return 2;
+    }
+
+    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 >>> 32);
+        values[valuesOffset++] = (int) (block0 & 4294967295L);
+      }
+    }
+
+    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;
+        final int byte2 = blocks[blocksOffset++] & 0xFF;
+        final int byte3 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = (byte0 << 24) | (byte1 << 16) | (byte2 << 8) | byte3;
+        final int byte4 = blocks[blocksOffset++] & 0xFF;
+        final int byte5 = blocks[blocksOffset++] & 0xFF;
+        final int byte6 = blocks[blocksOffset++] & 0xFF;
+        final int byte7 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = (byte4 << 24) | (byte5 << 16) | (byte6 << 8) | byte7;
+      }
+    }
+
+    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 >>> 32;
+        values[valuesOffset++] = block0 & 4294967295L;
+      }
+    }
+
+    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;
+        final long byte2 = blocks[blocksOffset++] & 0xFF;
+        final long byte3 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = (byte0 << 24) | (byte1 << 16) | (byte2 << 8) | byte3;
+        final long byte4 = blocks[blocksOffset++] & 0xFF;
+        final long byte5 = blocks[blocksOffset++] & 0xFF;
+        final long byte6 = blocks[blocksOffset++] & 0xFF;
+        final long byte7 = blocks[blocksOffset++] & 0xFF;
+        values[valuesOffset++] = (byte4 << 24) | (byte5 << 16) | (byte6 << 8) | byte7;
+      }
+    }
+
+    public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) {
+      assert blocksOffset + iterations * blockCount() <= blocks.length;
+      assert valuesOffset + iterations * valueCount() <= values.length;
+      for (int i = 0; i < iterations; ++i) {
+        blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 32) | (values[valuesOffset++] & 0xffffffffL);
+      }
+    }
+
+    public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) {
+      assert blocksOffset + iterations * blockCount() <= blocks.length;
+      assert valuesOffset + iterations * valueCount() <= values.length;
+      for (int i = 0; i < iterations; ++i) {
+        blocks[blocksOffset++] = (values[valuesOffset++] << 32) | values[valuesOffset++];
+      }
+    }
+
+}



Mime
View raw message