LUCENE-3312: Final merge before reintegrate

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/lucene3312@1379940 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Uwe Schindler 2012-09-02 11:21:01 +00:00
commit 12dddf2285
88 changed files with 4074 additions and 10447 deletions

View File

@ -233,9 +233,6 @@
<exclude>**/*.java</exclude>
</excludes>
</testResource>
<testResource>
<directory>${top-level}/solr/solrj/src/test-files</directory>
</testResource>
<testResource>
<directory>${top-level}/dev-tools/maven/solr</directory>
<includes>
@ -249,7 +246,7 @@
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>add-sorlj-and-test-framework</id>
<id>add-test-framework</id>
<phase>generate-test-sources</phase>
<goals>
<goal>add-test-source</goal>
@ -257,7 +254,6 @@
<configuration>
<sources>
<source>${top-level}/solr/test-framework/src/java</source>
<source>${top-level}/solr/solrj/src/test</source> <!-- solrj tests are run from solr-core -->
</sources>
</configuration>
</execution>

View File

@ -115,25 +115,184 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<!-- lucene-test-framework dependency must be declared before lucene-core -->
<!-- This dependency cannot be put into solr-parent, because local -->
<!-- dependencies are always ordered before inherited dependencies. -->
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-test-framework</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-core</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-analyzers-common</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-analyzers-kuromoji</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-analyzers-morfologik</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-analyzers-phonetic</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-highlighter</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-memory</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-misc</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-queryparser</artifactId>
<version>${project.version}</version>
<exclusions>
<exclusion>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-sandbox</artifactId>
</exclusion>
</exclusions>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-spatial</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-suggest</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-grouping</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-queries</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-jdk14</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-util</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-webapp</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<sourceDirectory>${module-path}/src/java</sourceDirectory>
<testSourceDirectory>${module-path}/src/test</testSourceDirectory>
<testResources/>
<testResources>
<testResource>
<directory>${module-path}/src/test-files</directory>
</testResource>
<testResource>
<directory>${top-level}/dev-tools/maven/solr</directory>
<includes>
<include>maven.testlogging.properties</include>
</includes>
</testResource>
</testResources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skip>true</skip> <!-- Tests are run from solr-core module -->
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<skip>true</skip> <!-- This skips test compilation - tests are run from solr-core module -->
</configuration>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>add-solr-core-and-test-framework</id>
<phase>generate-test-sources</phase>
<goals>
<goal>add-test-source</goal>
</goals>
<configuration>
<sources>
<source>${top-level}/solr/core/src/java</source>
<source>${top-level}/solr/test-framework/src/java</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

View File

@ -29,6 +29,9 @@ New Features
as the default Codec on IndexWriter, because it cannot write new segments.
(Mike McCandless, Robert Muir)
* SOLR-3441: ElisionFilterFactory is now MultiTermAware
(Jack Krupansky via hossman)
API Changes
* LUCENE-4299: Added Terms.hasPositions() and Terms.hasOffsets().

View File

@ -34,7 +34,7 @@ import org.apache.lucene.analysis.fr.FrenchAnalyzer;
* &lt;/fieldType&gt;</pre>
*
*/
public class ElisionFilterFactory extends TokenFilterFactory implements ResourceLoaderAware {
public class ElisionFilterFactory extends TokenFilterFactory implements ResourceLoaderAware, MultiTermAwareComponent {
private CharArraySet articles;
@ -53,5 +53,10 @@ public class ElisionFilterFactory extends TokenFilterFactory implements Resource
public ElisionFilter create(TokenStream input) {
return new ElisionFilter(input, articles);
}
@Override
public AbstractAnalysisFactory getMultiTermComponent() {
return this;
}
}

View File

@ -170,7 +170,7 @@ public class DocMaker implements Closeable {
f = new DoubleField(name, 0.0, Field.Store.NO);
break;
default:
assert false;
throw new AssertionError("Cannot get here");
}
if (reuseFields) {
numericFields.put(name, f);

View File

@ -23,12 +23,14 @@ import java.util.Comparator;
import java.util.Iterator;
import java.util.TreeMap;
import org.apache.lucene.index.CorruptIndexException;
import org.apache.lucene.index.DocsAndPositionsEnum;
import org.apache.lucene.index.DocsEnum;
import org.apache.lucene.index.FieldInfo.IndexOptions;
import org.apache.lucene.index.FieldInfo;
import org.apache.lucene.index.FieldInfos;
import org.apache.lucene.index.IndexFileNames;
import org.apache.lucene.index.SegmentInfo;
import org.apache.lucene.index.TermState;
import org.apache.lucene.index.Terms;
import org.apache.lucene.index.TermsEnum;
@ -104,7 +106,7 @@ public class BlockTermsReader extends FieldsProducer {
// private String segment;
public BlockTermsReader(TermsIndexReaderBase indexReader, Directory dir, FieldInfos fieldInfos, String segment, PostingsReaderBase postingsReader, IOContext context,
public BlockTermsReader(TermsIndexReaderBase indexReader, Directory dir, FieldInfos fieldInfos, SegmentInfo info, PostingsReaderBase postingsReader, IOContext context,
int termsCacheSize, String segmentSuffix)
throws IOException {
@ -112,7 +114,7 @@ public class BlockTermsReader extends FieldsProducer {
termsCache = new DoubleBarrelLRUCache<FieldAndTerm,BlockTermState>(termsCacheSize);
// this.segment = segment;
in = dir.openInput(IndexFileNames.segmentFileName(segment, segmentSuffix, BlockTermsWriter.TERMS_EXTENSION),
in = dir.openInput(IndexFileNames.segmentFileName(info.name, segmentSuffix, BlockTermsWriter.TERMS_EXTENSION),
context);
boolean success = false;
@ -126,6 +128,9 @@ public class BlockTermsReader extends FieldsProducer {
seekDir(in, dirOffset);
final int numFields = in.readVInt();
if (numFields < 0) {
throw new CorruptIndexException("invalid number of fields: " + numFields + " (resource=" + in + ")");
}
for(int i=0;i<numFields;i++) {
final int field = in.readVInt();
final long numTerms = in.readVLong();
@ -135,8 +140,19 @@ public class BlockTermsReader extends FieldsProducer {
final long sumTotalTermFreq = fieldInfo.getIndexOptions() == IndexOptions.DOCS_ONLY ? -1 : in.readVLong();
final long sumDocFreq = in.readVLong();
final int docCount = in.readVInt();
assert !fields.containsKey(fieldInfo.name);
fields.put(fieldInfo.name, new FieldReader(fieldInfo, numTerms, termsStartPointer, sumTotalTermFreq, sumDocFreq, docCount));
if (docCount < 0 || docCount > info.getDocCount()) { // #docs with field must be <= #docs
throw new CorruptIndexException("invalid docCount: " + docCount + " maxDoc: " + info.getDocCount() + " (resource=" + in + ")");
}
if (sumDocFreq < docCount) { // #postings must be >= #docs with field
throw new CorruptIndexException("invalid sumDocFreq: " + sumDocFreq + " docCount: " + docCount + " (resource=" + in + ")");
}
if (sumTotalTermFreq != -1 && sumTotalTermFreq < sumDocFreq) { // #positions must be >= #postings
throw new CorruptIndexException("invalid sumTotalTermFreq: " + sumTotalTermFreq + " sumDocFreq: " + sumDocFreq + " (resource=" + in + ")");
}
FieldReader previous = fields.put(fieldInfo.name, new FieldReader(fieldInfo, numTerms, termsStartPointer, sumTotalTermFreq, sumDocFreq, docCount));
if (previous != null) {
throw new CorruptIndexException("duplicate fields: " + fieldInfo.name + " (resource=" + in + ")");
}
}
success = true;
} finally {

View File

@ -27,12 +27,14 @@ import java.util.Iterator;
import java.util.Locale;
import java.util.TreeMap;
import org.apache.lucene.index.CorruptIndexException;
import org.apache.lucene.index.DocsAndPositionsEnum;
import org.apache.lucene.index.DocsEnum;
import org.apache.lucene.index.FieldInfo.IndexOptions;
import org.apache.lucene.index.FieldInfo;
import org.apache.lucene.index.FieldInfos;
import org.apache.lucene.index.IndexFileNames;
import org.apache.lucene.index.SegmentInfo;
import org.apache.lucene.index.TermState;
import org.apache.lucene.index.Terms;
import org.apache.lucene.index.TermsEnum;
@ -103,14 +105,14 @@ public class BlockTreeTermsReader extends FieldsProducer {
private String segment;
public BlockTreeTermsReader(Directory dir, FieldInfos fieldInfos, String segment,
public BlockTreeTermsReader(Directory dir, FieldInfos fieldInfos, SegmentInfo info,
PostingsReaderBase postingsReader, IOContext ioContext,
String segmentSuffix, int indexDivisor)
throws IOException {
this.postingsReader = postingsReader;
this.segment = segment;
this.segment = info.name;
in = dir.openInput(IndexFileNames.segmentFileName(segment, segmentSuffix, BlockTreeTermsWriter.TERMS_EXTENSION),
ioContext);
@ -135,6 +137,9 @@ public class BlockTreeTermsReader extends FieldsProducer {
}
final int numFields = in.readVInt();
if (numFields < 0) {
throw new CorruptIndexException("invalid numFields: " + numFields + " (resource=" + in + ")");
}
for(int i=0;i<numFields;i++) {
final int field = in.readVInt();
@ -149,9 +154,20 @@ public class BlockTreeTermsReader extends FieldsProducer {
final long sumTotalTermFreq = fieldInfo.getIndexOptions() == IndexOptions.DOCS_ONLY ? -1 : in.readVLong();
final long sumDocFreq = in.readVLong();
final int docCount = in.readVInt();
if (docCount < 0 || docCount > info.getDocCount()) { // #docs with field must be <= #docs
throw new CorruptIndexException("invalid docCount: " + docCount + " maxDoc: " + info.getDocCount() + " (resource=" + in + ")");
}
if (sumDocFreq < docCount) { // #postings must be >= #docs with field
throw new CorruptIndexException("invalid sumDocFreq: " + sumDocFreq + " docCount: " + docCount + " (resource=" + in + ")");
}
if (sumTotalTermFreq != -1 && sumTotalTermFreq < sumDocFreq) { // #positions must be >= #postings
throw new CorruptIndexException("invalid sumTotalTermFreq: " + sumTotalTermFreq + " sumDocFreq: " + sumDocFreq + " (resource=" + in + ")");
}
final long indexStartFP = indexDivisor != -1 ? indexIn.readVLong() : 0;
assert !fields.containsKey(fieldInfo.name);
fields.put(fieldInfo.name, new FieldReader(fieldInfo, numTerms, rootCode, sumTotalTermFreq, sumDocFreq, docCount, indexStartFP, indexIn));
FieldReader previous = fields.put(fieldInfo.name, new FieldReader(fieldInfo, numTerms, rootCode, sumTotalTermFreq, sumDocFreq, docCount, indexStartFP, indexIn));
if (previous != null) {
throw new CorruptIndexException("duplicate field: " + fieldInfo.name + " (resource=" + in + ")");
}
}
success = true;
} finally {

View File

@ -20,6 +20,7 @@ package org.apache.lucene.codecs;
import org.apache.lucene.store.Directory;
import org.apache.lucene.store.IOContext;
import org.apache.lucene.store.IndexInput;
import org.apache.lucene.index.CorruptIndexException;
import org.apache.lucene.index.FieldInfos;
import org.apache.lucene.index.FieldInfo;
import org.apache.lucene.util.BytesRef;
@ -85,6 +86,9 @@ public class FixedGapTermsIndexReader extends TermsIndexReaderBase {
readHeader(in);
indexInterval = in.readInt();
if (indexInterval < 1) {
throw new CorruptIndexException("invalid indexInterval: " + indexInterval + " (resource=" + in + ")");
}
this.indexDivisor = indexDivisor;
if (indexDivisor < 0) {
@ -98,18 +102,29 @@ public class FixedGapTermsIndexReader extends TermsIndexReaderBase {
seekDir(in, dirOffset);
// Read directory
final int numFields = in.readVInt();
final int numFields = in.readVInt();
if (numFields < 0) {
throw new CorruptIndexException("invalid numFields: " + numFields + " (resource=" + in + ")");
}
//System.out.println("FGR: init seg=" + segment + " div=" + indexDivisor + " nF=" + numFields);
for(int i=0;i<numFields;i++) {
final int field = in.readVInt();
final int numIndexTerms = in.readVInt();
if (numIndexTerms < 0) {
throw new CorruptIndexException("invalid numIndexTerms: " + numIndexTerms + " (resource=" + in + ")");
}
final long termsStart = in.readVLong();
final long indexStart = in.readVLong();
final long packedIndexStart = in.readVLong();
final long packedOffsetsStart = in.readVLong();
assert packedIndexStart >= indexStart: "packedStart=" + packedIndexStart + " indexStart=" + indexStart + " numIndexTerms=" + numIndexTerms + " seg=" + segment;
if (packedIndexStart < indexStart) {
throw new CorruptIndexException("invalid packedIndexStart: " + packedIndexStart + " indexStart: " + indexStart + "numIndexTerms: " + numIndexTerms + " (resource=" + in + ")");
}
final FieldInfo fieldInfo = fieldInfos.fieldInfo(field);
fields.put(fieldInfo, new FieldIndexData(fieldInfo, numIndexTerms, indexStart, termsStart, packedIndexStart, packedOffsetsStart));
FieldIndexData previous = fields.put(fieldInfo, new FieldIndexData(fieldInfo, numIndexTerms, indexStart, termsStart, packedIndexStart, packedOffsetsStart));
if (previous != null) {
throw new CorruptIndexException("duplicate field: " + fieldInfo.name + " (resource=" + in + ")");
}
}
success = true;
} finally {

View File

@ -23,6 +23,7 @@ import java.io.OutputStreamWriter; // for toDot
import java.io.Writer; // for toDot
import java.util.HashMap;
import org.apache.lucene.index.CorruptIndexException;
import org.apache.lucene.index.FieldInfo;
import org.apache.lucene.index.FieldInfos;
import org.apache.lucene.index.IndexFileNames;
@ -71,12 +72,18 @@ public class VariableGapTermsIndexReader extends TermsIndexReaderBase {
// Read directory
final int numFields = in.readVInt();
if (numFields < 0) {
throw new CorruptIndexException("invalid numFields: " + numFields + " (resource=" + in + ")");
}
for(int i=0;i<numFields;i++) {
final int field = in.readVInt();
final long indexStart = in.readVLong();
final FieldInfo fieldInfo = fieldInfos.fieldInfo(field);
fields.put(fieldInfo, new FieldIndexData(fieldInfo, indexStart));
FieldIndexData previous = fields.put(fieldInfo, new FieldIndexData(fieldInfo, indexStart));
if (previous != null) {
throw new CorruptIndexException("duplicate field: " + fieldInfo.name + " (resource=" + in + ")");
}
}
success = true;
} finally {

View File

@ -64,7 +64,7 @@ class AppendingPostingsFormat extends PostingsFormat {
FieldsProducer ret = new AppendingTermsReader(
state.dir,
state.fieldInfos,
state.segmentInfo.name,
state.segmentInfo,
postings,
state.context,
state.segmentSuffix,

View File

@ -23,6 +23,7 @@ import org.apache.lucene.codecs.BlockTreeTermsReader;
import org.apache.lucene.codecs.CodecUtil;
import org.apache.lucene.codecs.PostingsReaderBase;
import org.apache.lucene.index.FieldInfos;
import org.apache.lucene.index.SegmentInfo;
import org.apache.lucene.store.Directory;
import org.apache.lucene.store.IOContext;
import org.apache.lucene.store.IndexInput;
@ -33,9 +34,9 @@ import org.apache.lucene.store.IndexInput;
*/
public class AppendingTermsReader extends BlockTreeTermsReader {
public AppendingTermsReader(Directory dir, FieldInfos fieldInfos, String segment, PostingsReaderBase postingsReader,
public AppendingTermsReader(Directory dir, FieldInfos fieldInfos, SegmentInfo info, PostingsReaderBase postingsReader,
IOContext ioContext, String segmentSuffix, int indexDivisor) throws IOException {
super(dir, fieldInfos, segment, postingsReader, ioContext, segmentSuffix, indexDivisor);
super(dir, fieldInfos, info, postingsReader, ioContext, segmentSuffix, indexDivisor);
}
@Override

View File

@ -406,7 +406,7 @@ public final class BlockPostingsFormat extends PostingsFormat {
try {
FieldsProducer ret = new BlockTreeTermsReader(state.dir,
state.fieldInfos,
state.segmentInfo.name,
state.segmentInfo,
postingsReader,
state.context,
state.segmentSuffix,

View File

@ -314,7 +314,7 @@ public class Lucene40PostingsFormat extends PostingsFormat {
FieldsProducer ret = new BlockTreeTermsReader(
state.dir,
state.fieldInfos,
state.segmentInfo.name,
state.segmentInfo,
postings,
state.context,
state.segmentSuffix,

View File

@ -24,6 +24,7 @@ import java.util.Set;
import org.apache.lucene.codecs.CodecUtil;
import org.apache.lucene.codecs.SegmentInfoReader;
import org.apache.lucene.index.CorruptIndexException;
import org.apache.lucene.index.IndexFileNames;
import org.apache.lucene.index.SegmentInfo;
import org.apache.lucene.store.Directory;
@ -50,10 +51,17 @@ public class Lucene40SegmentInfoReader extends SegmentInfoReader {
Lucene40SegmentInfoFormat.VERSION_CURRENT);
final String version = input.readString();
final int docCount = input.readInt();
if (docCount < 0) {
throw new CorruptIndexException("invalid docCount: " + docCount + " (resource=" + input + ")");
}
final boolean isCompoundFile = input.readByte() == SegmentInfo.YES;
final Map<String,String> diagnostics = input.readStringStringMap();
final Map<String,String> attributes = input.readStringStringMap();
final Set<String> files = input.readStringSet();
if (input.getFilePointer() != input.length()) {
throw new CorruptIndexException("did not read all bytes from file \"" + fileName + "\": read " + input.getFilePointer() + " vs size " + input.length() + " (resource: " + input + ")");
}
final SegmentInfo si = new SegmentInfo(dir, version, segment, docCount, isCompoundFile,
null, diagnostics, Collections.unmodifiableMap(attributes));

View File

@ -188,7 +188,7 @@ public final class Lucene40StoredFieldsWriter extends StoredFieldsWriter {
} else if (number instanceof Double) {
fieldsStream.writeLong(Double.doubleToLongBits(number.doubleValue()));
} else {
assert false;
throw new AssertionError("Cannot get here");
}
}
}

View File

@ -100,7 +100,7 @@ public abstract class PulsingPostingsFormat extends PostingsFormat {
docsReader = wrappedPostingsBaseFormat.postingsReaderBase(state);
pulsingReader = new PulsingPostingsReader(docsReader);
FieldsProducer ret = new BlockTreeTermsReader(
state.dir, state.fieldInfos, state.segmentInfo.name,
state.dir, state.fieldInfos, state.segmentInfo,
pulsingReader,
state.context,
state.segmentSuffix,

View File

@ -523,7 +523,7 @@ public class Field implements IndexableField, StorableField {
nts.setDoubleValue(val.doubleValue());
break;
default:
assert false : "Should never get here";
throw new AssertionError("Should never get here");
}
return internalTokenStream;
}

View File

@ -365,7 +365,7 @@ final class DocumentsWriter {
if (!perThread.isActive()) {
ensureOpen();
assert false: "perThread is not active but we are still open";
throw new IllegalStateException("perThread is not active but we are still open");
}
final DocumentsWriterPerThread dwpt = perThread.dwpt;

View File

@ -324,7 +324,7 @@ final class DocumentsWriterDeleteQueue {
.newUpdater(Node.class, Node.class, "next");
void apply(BufferedDeletes bufferedDeletes, int docIDUpto) {
assert false : "sentinel item must never be applied";
throw new IllegalStateException("sentinel item must never be applied");
}
boolean casNext(Node<?> cmp, Node<?> val) {

View File

@ -57,10 +57,14 @@ public class FieldInfos implements Iterable<FieldInfo> {
boolean hasDocValues = false;
for (FieldInfo info : infos) {
assert !byNumber.containsKey(info.number);
byNumber.put(info.number, info);
assert !byName.containsKey(info.name);
byName.put(info.name, info);
FieldInfo previous = byNumber.put(info.number, info);
if (previous != null) {
throw new IllegalArgumentException("duplicate field numbers: " + previous.name + " and " + info.name + " have: " + info.number);
}
previous = byName.put(info.name, info);
if (previous != null) {
throw new IllegalArgumentException("duplicate field names: " + previous.number + " and " + info.number + " have: " + info.name);
}
hasVectors |= info.hasVectors();
hasProx |= info.isIndexed() && info.getIndexOptions().compareTo(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS) >= 0;

View File

@ -401,8 +401,8 @@ public final class MultiTermsEnum extends TermsEnum {
subDocs[upto].slice = entry.subSlice;
upto++;
} else {
// One of our subs cannot provide a docsenum:
assert false;
// should this be an error?
assert false : "One of our subs cannot provide a docsenum";
}
}

View File

@ -282,6 +282,9 @@ public final class SegmentInfos implements Cloneable, Iterable<SegmentInfoPerCom
version = input.readLong();
counter = input.readInt();
int numSegments = input.readInt();
if (numSegments < 0) {
throw new CorruptIndexException("invalid segment count: " + numSegments + " (resource: " + input + ")");
}
for(int seg=0;seg<numSegments;seg++) {
String segName = input.readString();
Codec codec = Codec.forName(input.readString());
@ -290,7 +293,9 @@ public final class SegmentInfos implements Cloneable, Iterable<SegmentInfoPerCom
info.setCodec(codec);
long delGen = input.readLong();
int delCount = input.readInt();
assert delCount <= info.getDocCount();
if (delCount < 0 || delCount > info.getDocCount()) {
throw new CorruptIndexException("invalid deletion count: " + delCount + " (resource: " + input + ")");
}
add(new SegmentInfoPerCommit(info, delCount, delGen));
}
userData = input.readStringStringMap();

View File

@ -34,7 +34,7 @@ public class CollectionStatistics {
public CollectionStatistics(String field, long maxDoc, long docCount, long sumTotalTermFreq, long sumDocFreq) {
assert maxDoc >= 0;
assert docCount >= -1 && docCount <= maxDoc; // #docs with field must be <= #docs
assert sumDocFreq >= -1;
assert sumDocFreq == -1 || sumDocFreq >= docCount; // #postings must be >= #docs with field
assert sumTotalTermFreq == -1 || sumTotalTermFreq >= sumDocFreq; // #positions must be >= #postings
this.field = field;
this.maxDoc = maxDoc;

View File

@ -355,14 +355,9 @@ public abstract class BufferedIndexInput extends IndexInput {
*/
public static int bufferSize(IOContext context) {
switch (context.context) {
case DEFAULT:
case FLUSH:
case READ:
return BUFFER_SIZE;
case MERGE:
return MERGE_BUFFER_SIZE;
default:
assert false : "unknown IOContext " + context.context;
return BUFFER_SIZE;
}
}

View File

@ -93,27 +93,27 @@ abstract class BulkOperation implements PackedInts.Decoder, PackedInts.Encoder {
// NOTE: this is sparse (some entries are null):
private static final BulkOperation[] packedSingleBlockBulkOps = new BulkOperation[] {
new BulkOperationPackedSingleBlock1(),
new BulkOperationPackedSingleBlock2(),
new BulkOperationPackedSingleBlock3(),
new BulkOperationPackedSingleBlock4(),
new BulkOperationPackedSingleBlock5(),
new BulkOperationPackedSingleBlock6(),
new BulkOperationPackedSingleBlock7(),
new BulkOperationPackedSingleBlock8(),
new BulkOperationPackedSingleBlock9(),
new BulkOperationPackedSingleBlock10(),
new BulkOperationPackedSingleBlock(1),
new BulkOperationPackedSingleBlock(2),
new BulkOperationPackedSingleBlock(3),
new BulkOperationPackedSingleBlock(4),
new BulkOperationPackedSingleBlock(5),
new BulkOperationPackedSingleBlock(6),
new BulkOperationPackedSingleBlock(7),
new BulkOperationPackedSingleBlock(8),
new BulkOperationPackedSingleBlock(9),
new BulkOperationPackedSingleBlock(10),
null,
new BulkOperationPackedSingleBlock12(),
new BulkOperationPackedSingleBlock(12),
null,
null,
null,
new BulkOperationPackedSingleBlock16(),
new BulkOperationPackedSingleBlock(16),
null,
null,
null,
null,
new BulkOperationPackedSingleBlock21(),
new BulkOperationPackedSingleBlock(21),
null,
null,
null,

View File

@ -24,316 +24,60 @@ package org.apache.lucene.util.packed;
*/
final class BulkOperationPacked1 extends BulkOperationPacked {
public BulkOperationPacked1() {
super(1);
assert blockCount() == 1;
assert valueCount() == 64;
}
public BulkOperationPacked1() {
super(1);
assert blockCount() == 1;
assert valueCount() == 64;
}
@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 >>> 63);
values[valuesOffset++] = (int) ((block0 >>> 62) & 1L);
values[valuesOffset++] = (int) ((block0 >>> 61) & 1L);
values[valuesOffset++] = (int) ((block0 >>> 60) & 1L);
values[valuesOffset++] = (int) ((block0 >>> 59) & 1L);
values[valuesOffset++] = (int) ((block0 >>> 58) & 1L);
values[valuesOffset++] = (int) ((block0 >>> 57) & 1L);
values[valuesOffset++] = (int) ((block0 >>> 56) & 1L);
values[valuesOffset++] = (int) ((block0 >>> 55) & 1L);
values[valuesOffset++] = (int) ((block0 >>> 54) & 1L);
values[valuesOffset++] = (int) ((block0 >>> 53) & 1L);
values[valuesOffset++] = (int) ((block0 >>> 52) & 1L);
values[valuesOffset++] = (int) ((block0 >>> 51) & 1L);
values[valuesOffset++] = (int) ((block0 >>> 50) & 1L);
values[valuesOffset++] = (int) ((block0 >>> 49) & 1L);
values[valuesOffset++] = (int) ((block0 >>> 48) & 1L);
values[valuesOffset++] = (int) ((block0 >>> 47) & 1L);
values[valuesOffset++] = (int) ((block0 >>> 46) & 1L);
values[valuesOffset++] = (int) ((block0 >>> 45) & 1L);
values[valuesOffset++] = (int) ((block0 >>> 44) & 1L);
values[valuesOffset++] = (int) ((block0 >>> 43) & 1L);
values[valuesOffset++] = (int) ((block0 >>> 42) & 1L);
values[valuesOffset++] = (int) ((block0 >>> 41) & 1L);
values[valuesOffset++] = (int) ((block0 >>> 40) & 1L);
values[valuesOffset++] = (int) ((block0 >>> 39) & 1L);
values[valuesOffset++] = (int) ((block0 >>> 38) & 1L);
values[valuesOffset++] = (int) ((block0 >>> 37) & 1L);
values[valuesOffset++] = (int) ((block0 >>> 36) & 1L);
values[valuesOffset++] = (int) ((block0 >>> 35) & 1L);
values[valuesOffset++] = (int) ((block0 >>> 34) & 1L);
values[valuesOffset++] = (int) ((block0 >>> 33) & 1L);
values[valuesOffset++] = (int) ((block0 >>> 32) & 1L);
values[valuesOffset++] = (int) ((block0 >>> 31) & 1L);
values[valuesOffset++] = (int) ((block0 >>> 30) & 1L);
values[valuesOffset++] = (int) ((block0 >>> 29) & 1L);
values[valuesOffset++] = (int) ((block0 >>> 28) & 1L);
values[valuesOffset++] = (int) ((block0 >>> 27) & 1L);
values[valuesOffset++] = (int) ((block0 >>> 26) & 1L);
values[valuesOffset++] = (int) ((block0 >>> 25) & 1L);
values[valuesOffset++] = (int) ((block0 >>> 24) & 1L);
values[valuesOffset++] = (int) ((block0 >>> 23) & 1L);
values[valuesOffset++] = (int) ((block0 >>> 22) & 1L);
values[valuesOffset++] = (int) ((block0 >>> 21) & 1L);
values[valuesOffset++] = (int) ((block0 >>> 20) & 1L);
values[valuesOffset++] = (int) ((block0 >>> 19) & 1L);
values[valuesOffset++] = (int) ((block0 >>> 18) & 1L);
values[valuesOffset++] = (int) ((block0 >>> 17) & 1L);
values[valuesOffset++] = (int) ((block0 >>> 16) & 1L);
values[valuesOffset++] = (int) ((block0 >>> 15) & 1L);
values[valuesOffset++] = (int) ((block0 >>> 14) & 1L);
values[valuesOffset++] = (int) ((block0 >>> 13) & 1L);
values[valuesOffset++] = (int) ((block0 >>> 12) & 1L);
values[valuesOffset++] = (int) ((block0 >>> 11) & 1L);
values[valuesOffset++] = (int) ((block0 >>> 10) & 1L);
values[valuesOffset++] = (int) ((block0 >>> 9) & 1L);
values[valuesOffset++] = (int) ((block0 >>> 8) & 1L);
values[valuesOffset++] = (int) ((block0 >>> 7) & 1L);
values[valuesOffset++] = (int) ((block0 >>> 6) & 1L);
values[valuesOffset++] = (int) ((block0 >>> 5) & 1L);
values[valuesOffset++] = (int) ((block0 >>> 4) & 1L);
values[valuesOffset++] = (int) ((block0 >>> 3) & 1L);
values[valuesOffset++] = (int) ((block0 >>> 2) & 1L);
values[valuesOffset++] = (int) ((block0 >>> 1) & 1L);
values[valuesOffset++] = (int) (block0 & 1L);
@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 = 63; shift >= 0; shift -= 1) {
values[valuesOffset++] = (int) ((block >>> shift) & 1);
}
}
}
@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;
values[valuesOffset++] = byte0 >>> 7;
values[valuesOffset++] = (byte0 >>> 6) & 1;
values[valuesOffset++] = (byte0 >>> 5) & 1;
values[valuesOffset++] = (byte0 >>> 4) & 1;
values[valuesOffset++] = (byte0 >>> 3) & 1;
values[valuesOffset++] = (byte0 >>> 2) & 1;
values[valuesOffset++] = (byte0 >>> 1) & 1;
values[valuesOffset++] = byte0 & 1;
final int byte1 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte1 >>> 7;
values[valuesOffset++] = (byte1 >>> 6) & 1;
values[valuesOffset++] = (byte1 >>> 5) & 1;
values[valuesOffset++] = (byte1 >>> 4) & 1;
values[valuesOffset++] = (byte1 >>> 3) & 1;
values[valuesOffset++] = (byte1 >>> 2) & 1;
values[valuesOffset++] = (byte1 >>> 1) & 1;
values[valuesOffset++] = byte1 & 1;
final int byte2 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte2 >>> 7;
values[valuesOffset++] = (byte2 >>> 6) & 1;
values[valuesOffset++] = (byte2 >>> 5) & 1;
values[valuesOffset++] = (byte2 >>> 4) & 1;
values[valuesOffset++] = (byte2 >>> 3) & 1;
values[valuesOffset++] = (byte2 >>> 2) & 1;
values[valuesOffset++] = (byte2 >>> 1) & 1;
values[valuesOffset++] = byte2 & 1;
final int byte3 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte3 >>> 7;
values[valuesOffset++] = (byte3 >>> 6) & 1;
values[valuesOffset++] = (byte3 >>> 5) & 1;
values[valuesOffset++] = (byte3 >>> 4) & 1;
values[valuesOffset++] = (byte3 >>> 3) & 1;
values[valuesOffset++] = (byte3 >>> 2) & 1;
values[valuesOffset++] = (byte3 >>> 1) & 1;
values[valuesOffset++] = byte3 & 1;
final int byte4 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte4 >>> 7;
values[valuesOffset++] = (byte4 >>> 6) & 1;
values[valuesOffset++] = (byte4 >>> 5) & 1;
values[valuesOffset++] = (byte4 >>> 4) & 1;
values[valuesOffset++] = (byte4 >>> 3) & 1;
values[valuesOffset++] = (byte4 >>> 2) & 1;
values[valuesOffset++] = (byte4 >>> 1) & 1;
values[valuesOffset++] = byte4 & 1;
final int byte5 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte5 >>> 7;
values[valuesOffset++] = (byte5 >>> 6) & 1;
values[valuesOffset++] = (byte5 >>> 5) & 1;
values[valuesOffset++] = (byte5 >>> 4) & 1;
values[valuesOffset++] = (byte5 >>> 3) & 1;
values[valuesOffset++] = (byte5 >>> 2) & 1;
values[valuesOffset++] = (byte5 >>> 1) & 1;
values[valuesOffset++] = byte5 & 1;
final int byte6 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte6 >>> 7;
values[valuesOffset++] = (byte6 >>> 6) & 1;
values[valuesOffset++] = (byte6 >>> 5) & 1;
values[valuesOffset++] = (byte6 >>> 4) & 1;
values[valuesOffset++] = (byte6 >>> 3) & 1;
values[valuesOffset++] = (byte6 >>> 2) & 1;
values[valuesOffset++] = (byte6 >>> 1) & 1;
values[valuesOffset++] = byte6 & 1;
final int byte7 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte7 >>> 7;
values[valuesOffset++] = (byte7 >>> 6) & 1;
values[valuesOffset++] = (byte7 >>> 5) & 1;
values[valuesOffset++] = (byte7 >>> 4) & 1;
values[valuesOffset++] = (byte7 >>> 3) & 1;
values[valuesOffset++] = (byte7 >>> 2) & 1;
values[valuesOffset++] = (byte7 >>> 1) & 1;
values[valuesOffset++] = byte7 & 1;
@Override
public void decode(byte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) {
for (int j = 0; j < 8 * iterations; ++j) {
final byte block = blocks[blocksOffset++];
values[valuesOffset++] = (block >>> 7) & 1;
values[valuesOffset++] = (block >>> 6) & 1;
values[valuesOffset++] = (block >>> 5) & 1;
values[valuesOffset++] = (block >>> 4) & 1;
values[valuesOffset++] = (block >>> 3) & 1;
values[valuesOffset++] = (block >>> 2) & 1;
values[valuesOffset++] = (block >>> 1) & 1;
values[valuesOffset++] = block & 1;
}
}
@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 = 63; shift >= 0; shift -= 1) {
values[valuesOffset++] = (block >>> shift) & 1;
}
}
}
@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 >>> 63;
values[valuesOffset++] = (block0 >>> 62) & 1L;
values[valuesOffset++] = (block0 >>> 61) & 1L;
values[valuesOffset++] = (block0 >>> 60) & 1L;
values[valuesOffset++] = (block0 >>> 59) & 1L;
values[valuesOffset++] = (block0 >>> 58) & 1L;
values[valuesOffset++] = (block0 >>> 57) & 1L;
values[valuesOffset++] = (block0 >>> 56) & 1L;
values[valuesOffset++] = (block0 >>> 55) & 1L;
values[valuesOffset++] = (block0 >>> 54) & 1L;
values[valuesOffset++] = (block0 >>> 53) & 1L;
values[valuesOffset++] = (block0 >>> 52) & 1L;
values[valuesOffset++] = (block0 >>> 51) & 1L;
values[valuesOffset++] = (block0 >>> 50) & 1L;
values[valuesOffset++] = (block0 >>> 49) & 1L;
values[valuesOffset++] = (block0 >>> 48) & 1L;
values[valuesOffset++] = (block0 >>> 47) & 1L;
values[valuesOffset++] = (block0 >>> 46) & 1L;
values[valuesOffset++] = (block0 >>> 45) & 1L;
values[valuesOffset++] = (block0 >>> 44) & 1L;
values[valuesOffset++] = (block0 >>> 43) & 1L;
values[valuesOffset++] = (block0 >>> 42) & 1L;
values[valuesOffset++] = (block0 >>> 41) & 1L;
values[valuesOffset++] = (block0 >>> 40) & 1L;
values[valuesOffset++] = (block0 >>> 39) & 1L;
values[valuesOffset++] = (block0 >>> 38) & 1L;
values[valuesOffset++] = (block0 >>> 37) & 1L;
values[valuesOffset++] = (block0 >>> 36) & 1L;
values[valuesOffset++] = (block0 >>> 35) & 1L;
values[valuesOffset++] = (block0 >>> 34) & 1L;
values[valuesOffset++] = (block0 >>> 33) & 1L;
values[valuesOffset++] = (block0 >>> 32) & 1L;
values[valuesOffset++] = (block0 >>> 31) & 1L;
values[valuesOffset++] = (block0 >>> 30) & 1L;
values[valuesOffset++] = (block0 >>> 29) & 1L;
values[valuesOffset++] = (block0 >>> 28) & 1L;
values[valuesOffset++] = (block0 >>> 27) & 1L;
values[valuesOffset++] = (block0 >>> 26) & 1L;
values[valuesOffset++] = (block0 >>> 25) & 1L;
values[valuesOffset++] = (block0 >>> 24) & 1L;
values[valuesOffset++] = (block0 >>> 23) & 1L;
values[valuesOffset++] = (block0 >>> 22) & 1L;
values[valuesOffset++] = (block0 >>> 21) & 1L;
values[valuesOffset++] = (block0 >>> 20) & 1L;
values[valuesOffset++] = (block0 >>> 19) & 1L;
values[valuesOffset++] = (block0 >>> 18) & 1L;
values[valuesOffset++] = (block0 >>> 17) & 1L;
values[valuesOffset++] = (block0 >>> 16) & 1L;
values[valuesOffset++] = (block0 >>> 15) & 1L;
values[valuesOffset++] = (block0 >>> 14) & 1L;
values[valuesOffset++] = (block0 >>> 13) & 1L;
values[valuesOffset++] = (block0 >>> 12) & 1L;
values[valuesOffset++] = (block0 >>> 11) & 1L;
values[valuesOffset++] = (block0 >>> 10) & 1L;
values[valuesOffset++] = (block0 >>> 9) & 1L;
values[valuesOffset++] = (block0 >>> 8) & 1L;
values[valuesOffset++] = (block0 >>> 7) & 1L;
values[valuesOffset++] = (block0 >>> 6) & 1L;
values[valuesOffset++] = (block0 >>> 5) & 1L;
values[valuesOffset++] = (block0 >>> 4) & 1L;
values[valuesOffset++] = (block0 >>> 3) & 1L;
values[valuesOffset++] = (block0 >>> 2) & 1L;
values[valuesOffset++] = (block0 >>> 1) & 1L;
values[valuesOffset++] = block0 & 1L;
}
}
@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;
values[valuesOffset++] = byte0 >>> 7;
values[valuesOffset++] = (byte0 >>> 6) & 1;
values[valuesOffset++] = (byte0 >>> 5) & 1;
values[valuesOffset++] = (byte0 >>> 4) & 1;
values[valuesOffset++] = (byte0 >>> 3) & 1;
values[valuesOffset++] = (byte0 >>> 2) & 1;
values[valuesOffset++] = (byte0 >>> 1) & 1;
values[valuesOffset++] = byte0 & 1;
final long byte1 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte1 >>> 7;
values[valuesOffset++] = (byte1 >>> 6) & 1;
values[valuesOffset++] = (byte1 >>> 5) & 1;
values[valuesOffset++] = (byte1 >>> 4) & 1;
values[valuesOffset++] = (byte1 >>> 3) & 1;
values[valuesOffset++] = (byte1 >>> 2) & 1;
values[valuesOffset++] = (byte1 >>> 1) & 1;
values[valuesOffset++] = byte1 & 1;
final long byte2 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte2 >>> 7;
values[valuesOffset++] = (byte2 >>> 6) & 1;
values[valuesOffset++] = (byte2 >>> 5) & 1;
values[valuesOffset++] = (byte2 >>> 4) & 1;
values[valuesOffset++] = (byte2 >>> 3) & 1;
values[valuesOffset++] = (byte2 >>> 2) & 1;
values[valuesOffset++] = (byte2 >>> 1) & 1;
values[valuesOffset++] = byte2 & 1;
final long byte3 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte3 >>> 7;
values[valuesOffset++] = (byte3 >>> 6) & 1;
values[valuesOffset++] = (byte3 >>> 5) & 1;
values[valuesOffset++] = (byte3 >>> 4) & 1;
values[valuesOffset++] = (byte3 >>> 3) & 1;
values[valuesOffset++] = (byte3 >>> 2) & 1;
values[valuesOffset++] = (byte3 >>> 1) & 1;
values[valuesOffset++] = byte3 & 1;
final long byte4 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte4 >>> 7;
values[valuesOffset++] = (byte4 >>> 6) & 1;
values[valuesOffset++] = (byte4 >>> 5) & 1;
values[valuesOffset++] = (byte4 >>> 4) & 1;
values[valuesOffset++] = (byte4 >>> 3) & 1;
values[valuesOffset++] = (byte4 >>> 2) & 1;
values[valuesOffset++] = (byte4 >>> 1) & 1;
values[valuesOffset++] = byte4 & 1;
final long byte5 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte5 >>> 7;
values[valuesOffset++] = (byte5 >>> 6) & 1;
values[valuesOffset++] = (byte5 >>> 5) & 1;
values[valuesOffset++] = (byte5 >>> 4) & 1;
values[valuesOffset++] = (byte5 >>> 3) & 1;
values[valuesOffset++] = (byte5 >>> 2) & 1;
values[valuesOffset++] = (byte5 >>> 1) & 1;
values[valuesOffset++] = byte5 & 1;
final long byte6 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte6 >>> 7;
values[valuesOffset++] = (byte6 >>> 6) & 1;
values[valuesOffset++] = (byte6 >>> 5) & 1;
values[valuesOffset++] = (byte6 >>> 4) & 1;
values[valuesOffset++] = (byte6 >>> 3) & 1;
values[valuesOffset++] = (byte6 >>> 2) & 1;
values[valuesOffset++] = (byte6 >>> 1) & 1;
values[valuesOffset++] = byte6 & 1;
final long byte7 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte7 >>> 7;
values[valuesOffset++] = (byte7 >>> 6) & 1;
values[valuesOffset++] = (byte7 >>> 5) & 1;
values[valuesOffset++] = (byte7 >>> 4) & 1;
values[valuesOffset++] = (byte7 >>> 3) & 1;
values[valuesOffset++] = (byte7 >>> 2) & 1;
values[valuesOffset++] = (byte7 >>> 1) & 1;
values[valuesOffset++] = byte7 & 1;
}
@Override
public void decode(byte[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations) {
for (int j = 0; j < 8 * iterations; ++j) {
final byte block = blocks[blocksOffset++];
values[valuesOffset++] = (block >>> 7) & 1;
values[valuesOffset++] = (block >>> 6) & 1;
values[valuesOffset++] = (block >>> 5) & 1;
values[valuesOffset++] = (block >>> 4) & 1;
values[valuesOffset++] = (block >>> 3) & 1;
values[valuesOffset++] = (block >>> 2) & 1;
values[valuesOffset++] = (block >>> 1) & 1;
values[valuesOffset++] = block & 1;
}
}
}

View File

@ -24,260 +24,126 @@ package org.apache.lucene.util.packed;
*/
final class BulkOperationPacked10 extends BulkOperationPacked {
public BulkOperationPacked10() {
super(10);
assert blockCount() == 5;
assert valueCount() == 32;
}
public BulkOperationPacked10() {
super(10);
assert blockCount() == 5;
assert valueCount() == 32;
}
@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 >>> 54);
values[valuesOffset++] = (int) ((block0 >>> 44) & 1023L);
values[valuesOffset++] = (int) ((block0 >>> 34) & 1023L);
values[valuesOffset++] = (int) ((block0 >>> 24) & 1023L);
values[valuesOffset++] = (int) ((block0 >>> 14) & 1023L);
values[valuesOffset++] = (int) ((block0 >>> 4) & 1023L);
final long block1 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block0 & 15L) << 6) | (block1 >>> 58));
values[valuesOffset++] = (int) ((block1 >>> 48) & 1023L);
values[valuesOffset++] = (int) ((block1 >>> 38) & 1023L);
values[valuesOffset++] = (int) ((block1 >>> 28) & 1023L);
values[valuesOffset++] = (int) ((block1 >>> 18) & 1023L);
values[valuesOffset++] = (int) ((block1 >>> 8) & 1023L);
final long block2 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block1 & 255L) << 2) | (block2 >>> 62));
values[valuesOffset++] = (int) ((block2 >>> 52) & 1023L);
values[valuesOffset++] = (int) ((block2 >>> 42) & 1023L);
values[valuesOffset++] = (int) ((block2 >>> 32) & 1023L);
values[valuesOffset++] = (int) ((block2 >>> 22) & 1023L);
values[valuesOffset++] = (int) ((block2 >>> 12) & 1023L);
values[valuesOffset++] = (int) ((block2 >>> 2) & 1023L);
final long block3 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block2 & 3L) << 8) | (block3 >>> 56));
values[valuesOffset++] = (int) ((block3 >>> 46) & 1023L);
values[valuesOffset++] = (int) ((block3 >>> 36) & 1023L);
values[valuesOffset++] = (int) ((block3 >>> 26) & 1023L);
values[valuesOffset++] = (int) ((block3 >>> 16) & 1023L);
values[valuesOffset++] = (int) ((block3 >>> 6) & 1023L);
final long block4 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block3 & 63L) << 4) | (block4 >>> 60));
values[valuesOffset++] = (int) ((block4 >>> 50) & 1023L);
values[valuesOffset++] = (int) ((block4 >>> 40) & 1023L);
values[valuesOffset++] = (int) ((block4 >>> 30) & 1023L);
values[valuesOffset++] = (int) ((block4 >>> 20) & 1023L);
values[valuesOffset++] = (int) ((block4 >>> 10) & 1023L);
values[valuesOffset++] = (int) (block4 & 1023L);
}
@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 >>> 54);
values[valuesOffset++] = (int) ((block0 >>> 44) & 1023L);
values[valuesOffset++] = (int) ((block0 >>> 34) & 1023L);
values[valuesOffset++] = (int) ((block0 >>> 24) & 1023L);
values[valuesOffset++] = (int) ((block0 >>> 14) & 1023L);
values[valuesOffset++] = (int) ((block0 >>> 4) & 1023L);
final long block1 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block0 & 15L) << 6) | (block1 >>> 58));
values[valuesOffset++] = (int) ((block1 >>> 48) & 1023L);
values[valuesOffset++] = (int) ((block1 >>> 38) & 1023L);
values[valuesOffset++] = (int) ((block1 >>> 28) & 1023L);
values[valuesOffset++] = (int) ((block1 >>> 18) & 1023L);
values[valuesOffset++] = (int) ((block1 >>> 8) & 1023L);
final long block2 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block1 & 255L) << 2) | (block2 >>> 62));
values[valuesOffset++] = (int) ((block2 >>> 52) & 1023L);
values[valuesOffset++] = (int) ((block2 >>> 42) & 1023L);
values[valuesOffset++] = (int) ((block2 >>> 32) & 1023L);
values[valuesOffset++] = (int) ((block2 >>> 22) & 1023L);
values[valuesOffset++] = (int) ((block2 >>> 12) & 1023L);
values[valuesOffset++] = (int) ((block2 >>> 2) & 1023L);
final long block3 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block2 & 3L) << 8) | (block3 >>> 56));
values[valuesOffset++] = (int) ((block3 >>> 46) & 1023L);
values[valuesOffset++] = (int) ((block3 >>> 36) & 1023L);
values[valuesOffset++] = (int) ((block3 >>> 26) & 1023L);
values[valuesOffset++] = (int) ((block3 >>> 16) & 1023L);
values[valuesOffset++] = (int) ((block3 >>> 6) & 1023L);
final long block4 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block3 & 63L) << 4) | (block4 >>> 60));
values[valuesOffset++] = (int) ((block4 >>> 50) & 1023L);
values[valuesOffset++] = (int) ((block4 >>> 40) & 1023L);
values[valuesOffset++] = (int) ((block4 >>> 30) & 1023L);
values[valuesOffset++] = (int) ((block4 >>> 20) & 1023L);
values[valuesOffset++] = (int) ((block4 >>> 10) & 1023L);
values[valuesOffset++] = (int) (block4 & 1023L);
}
}
@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 << 2) | (byte1 >>> 6);
final int byte2 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte1 & 63) << 4) | (byte2 >>> 4);
final int byte3 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte2 & 15) << 6) | (byte3 >>> 2);
final int byte4 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte3 & 3) << 8) | byte4;
final int byte5 = blocks[blocksOffset++] & 0xFF;
final int byte6 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte5 << 2) | (byte6 >>> 6);
final int byte7 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte6 & 63) << 4) | (byte7 >>> 4);
final int byte8 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte7 & 15) << 6) | (byte8 >>> 2);
final int byte9 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte8 & 3) << 8) | byte9;
final int byte10 = blocks[blocksOffset++] & 0xFF;
final int byte11 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte10 << 2) | (byte11 >>> 6);
final int byte12 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte11 & 63) << 4) | (byte12 >>> 4);
final int byte13 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte12 & 15) << 6) | (byte13 >>> 2);
final int byte14 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte13 & 3) << 8) | byte14;
final int byte15 = blocks[blocksOffset++] & 0xFF;
final int byte16 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte15 << 2) | (byte16 >>> 6);
final int byte17 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte16 & 63) << 4) | (byte17 >>> 4);
final int byte18 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte17 & 15) << 6) | (byte18 >>> 2);
final int byte19 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte18 & 3) << 8) | byte19;
final int byte20 = blocks[blocksOffset++] & 0xFF;
final int byte21 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte20 << 2) | (byte21 >>> 6);
final int byte22 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte21 & 63) << 4) | (byte22 >>> 4);
final int byte23 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte22 & 15) << 6) | (byte23 >>> 2);
final int byte24 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte23 & 3) << 8) | byte24;
final int byte25 = blocks[blocksOffset++] & 0xFF;
final int byte26 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte25 << 2) | (byte26 >>> 6);
final int byte27 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte26 & 63) << 4) | (byte27 >>> 4);
final int byte28 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte27 & 15) << 6) | (byte28 >>> 2);
final int byte29 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte28 & 3) << 8) | byte29;
final int byte30 = blocks[blocksOffset++] & 0xFF;
final int byte31 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte30 << 2) | (byte31 >>> 6);
final int byte32 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte31 & 63) << 4) | (byte32 >>> 4);
final int byte33 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte32 & 15) << 6) | (byte33 >>> 2);
final int byte34 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte33 & 3) << 8) | byte34;
final int byte35 = blocks[blocksOffset++] & 0xFF;
final int byte36 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte35 << 2) | (byte36 >>> 6);
final int byte37 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte36 & 63) << 4) | (byte37 >>> 4);
final int byte38 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte37 & 15) << 6) | (byte38 >>> 2);
final int byte39 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte38 & 3) << 8) | byte39;
}
@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 << 2) | (byte1 >>> 6);
final int byte2 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte1 & 63) << 4) | (byte2 >>> 4);
final int byte3 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte2 & 15) << 6) | (byte3 >>> 2);
final int byte4 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte3 & 3) << 8) | byte4;
}
}
@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 >>> 54;
values[valuesOffset++] = (block0 >>> 44) & 1023L;
values[valuesOffset++] = (block0 >>> 34) & 1023L;
values[valuesOffset++] = (block0 >>> 24) & 1023L;
values[valuesOffset++] = (block0 >>> 14) & 1023L;
values[valuesOffset++] = (block0 >>> 4) & 1023L;
final long block1 = blocks[blocksOffset++];
values[valuesOffset++] = ((block0 & 15L) << 6) | (block1 >>> 58);
values[valuesOffset++] = (block1 >>> 48) & 1023L;
values[valuesOffset++] = (block1 >>> 38) & 1023L;
values[valuesOffset++] = (block1 >>> 28) & 1023L;
values[valuesOffset++] = (block1 >>> 18) & 1023L;
values[valuesOffset++] = (block1 >>> 8) & 1023L;
final long block2 = blocks[blocksOffset++];
values[valuesOffset++] = ((block1 & 255L) << 2) | (block2 >>> 62);
values[valuesOffset++] = (block2 >>> 52) & 1023L;
values[valuesOffset++] = (block2 >>> 42) & 1023L;
values[valuesOffset++] = (block2 >>> 32) & 1023L;
values[valuesOffset++] = (block2 >>> 22) & 1023L;
values[valuesOffset++] = (block2 >>> 12) & 1023L;
values[valuesOffset++] = (block2 >>> 2) & 1023L;
final long block3 = blocks[blocksOffset++];
values[valuesOffset++] = ((block2 & 3L) << 8) | (block3 >>> 56);
values[valuesOffset++] = (block3 >>> 46) & 1023L;
values[valuesOffset++] = (block3 >>> 36) & 1023L;
values[valuesOffset++] = (block3 >>> 26) & 1023L;
values[valuesOffset++] = (block3 >>> 16) & 1023L;
values[valuesOffset++] = (block3 >>> 6) & 1023L;
final long block4 = blocks[blocksOffset++];
values[valuesOffset++] = ((block3 & 63L) << 4) | (block4 >>> 60);
values[valuesOffset++] = (block4 >>> 50) & 1023L;
values[valuesOffset++] = (block4 >>> 40) & 1023L;
values[valuesOffset++] = (block4 >>> 30) & 1023L;
values[valuesOffset++] = (block4 >>> 20) & 1023L;
values[valuesOffset++] = (block4 >>> 10) & 1023L;
values[valuesOffset++] = block4 & 1023L;
}
@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 >>> 54;
values[valuesOffset++] = (block0 >>> 44) & 1023L;
values[valuesOffset++] = (block0 >>> 34) & 1023L;
values[valuesOffset++] = (block0 >>> 24) & 1023L;
values[valuesOffset++] = (block0 >>> 14) & 1023L;
values[valuesOffset++] = (block0 >>> 4) & 1023L;
final long block1 = blocks[blocksOffset++];
values[valuesOffset++] = ((block0 & 15L) << 6) | (block1 >>> 58);
values[valuesOffset++] = (block1 >>> 48) & 1023L;
values[valuesOffset++] = (block1 >>> 38) & 1023L;
values[valuesOffset++] = (block1 >>> 28) & 1023L;
values[valuesOffset++] = (block1 >>> 18) & 1023L;
values[valuesOffset++] = (block1 >>> 8) & 1023L;
final long block2 = blocks[blocksOffset++];
values[valuesOffset++] = ((block1 & 255L) << 2) | (block2 >>> 62);
values[valuesOffset++] = (block2 >>> 52) & 1023L;
values[valuesOffset++] = (block2 >>> 42) & 1023L;
values[valuesOffset++] = (block2 >>> 32) & 1023L;
values[valuesOffset++] = (block2 >>> 22) & 1023L;
values[valuesOffset++] = (block2 >>> 12) & 1023L;
values[valuesOffset++] = (block2 >>> 2) & 1023L;
final long block3 = blocks[blocksOffset++];
values[valuesOffset++] = ((block2 & 3L) << 8) | (block3 >>> 56);
values[valuesOffset++] = (block3 >>> 46) & 1023L;
values[valuesOffset++] = (block3 >>> 36) & 1023L;
values[valuesOffset++] = (block3 >>> 26) & 1023L;
values[valuesOffset++] = (block3 >>> 16) & 1023L;
values[valuesOffset++] = (block3 >>> 6) & 1023L;
final long block4 = blocks[blocksOffset++];
values[valuesOffset++] = ((block3 & 63L) << 4) | (block4 >>> 60);
values[valuesOffset++] = (block4 >>> 50) & 1023L;
values[valuesOffset++] = (block4 >>> 40) & 1023L;
values[valuesOffset++] = (block4 >>> 30) & 1023L;
values[valuesOffset++] = (block4 >>> 20) & 1023L;
values[valuesOffset++] = (block4 >>> 10) & 1023L;
values[valuesOffset++] = block4 & 1023L;
}
}
@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 << 2) | (byte1 >>> 6);
final long byte2 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte1 & 63) << 4) | (byte2 >>> 4);
final long byte3 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte2 & 15) << 6) | (byte3 >>> 2);
final long byte4 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte3 & 3) << 8) | byte4;
final long byte5 = blocks[blocksOffset++] & 0xFF;
final long byte6 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte5 << 2) | (byte6 >>> 6);
final long byte7 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte6 & 63) << 4) | (byte7 >>> 4);
final long byte8 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte7 & 15) << 6) | (byte8 >>> 2);
final long byte9 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte8 & 3) << 8) | byte9;
final long byte10 = blocks[blocksOffset++] & 0xFF;
final long byte11 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte10 << 2) | (byte11 >>> 6);
final long byte12 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte11 & 63) << 4) | (byte12 >>> 4);
final long byte13 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte12 & 15) << 6) | (byte13 >>> 2);
final long byte14 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte13 & 3) << 8) | byte14;
final long byte15 = blocks[blocksOffset++] & 0xFF;
final long byte16 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte15 << 2) | (byte16 >>> 6);
final long byte17 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte16 & 63) << 4) | (byte17 >>> 4);
final long byte18 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte17 & 15) << 6) | (byte18 >>> 2);
final long byte19 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte18 & 3) << 8) | byte19;
final long byte20 = blocks[blocksOffset++] & 0xFF;
final long byte21 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte20 << 2) | (byte21 >>> 6);
final long byte22 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte21 & 63) << 4) | (byte22 >>> 4);
final long byte23 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte22 & 15) << 6) | (byte23 >>> 2);
final long byte24 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte23 & 3) << 8) | byte24;
final long byte25 = blocks[blocksOffset++] & 0xFF;
final long byte26 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte25 << 2) | (byte26 >>> 6);
final long byte27 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte26 & 63) << 4) | (byte27 >>> 4);
final long byte28 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte27 & 15) << 6) | (byte28 >>> 2);
final long byte29 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte28 & 3) << 8) | byte29;
final long byte30 = blocks[blocksOffset++] & 0xFF;
final long byte31 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte30 << 2) | (byte31 >>> 6);
final long byte32 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte31 & 63) << 4) | (byte32 >>> 4);
final long byte33 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte32 & 15) << 6) | (byte33 >>> 2);
final long byte34 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte33 & 3) << 8) | byte34;
final long byte35 = blocks[blocksOffset++] & 0xFF;
final long byte36 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte35 << 2) | (byte36 >>> 6);
final long byte37 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte36 & 63) << 4) | (byte37 >>> 4);
final long byte38 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte37 & 15) << 6) | (byte38 >>> 2);
final long byte39 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte38 & 3) << 8) | byte39;
}
@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 << 2) | (byte1 >>> 6);
final long byte2 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte1 & 63) << 4) | (byte2 >>> 4);
final long byte3 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte2 & 15) << 6) | (byte3 >>> 2);
final long byte4 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte3 & 3) << 8) | byte4;
}
}
}

View File

@ -24,496 +24,222 @@ package org.apache.lucene.util.packed;
*/
final class BulkOperationPacked11 extends BulkOperationPacked {
public BulkOperationPacked11() {
super(11);
assert blockCount() == 11;
assert valueCount() == 64;
}
public BulkOperationPacked11() {
super(11);
assert blockCount() == 11;
assert valueCount() == 64;
}
@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 >>> 53);
values[valuesOffset++] = (int) ((block0 >>> 42) & 2047L);
values[valuesOffset++] = (int) ((block0 >>> 31) & 2047L);
values[valuesOffset++] = (int) ((block0 >>> 20) & 2047L);
values[valuesOffset++] = (int) ((block0 >>> 9) & 2047L);
final long block1 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block0 & 511L) << 2) | (block1 >>> 62));
values[valuesOffset++] = (int) ((block1 >>> 51) & 2047L);
values[valuesOffset++] = (int) ((block1 >>> 40) & 2047L);
values[valuesOffset++] = (int) ((block1 >>> 29) & 2047L);
values[valuesOffset++] = (int) ((block1 >>> 18) & 2047L);
values[valuesOffset++] = (int) ((block1 >>> 7) & 2047L);
final long block2 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block1 & 127L) << 4) | (block2 >>> 60));
values[valuesOffset++] = (int) ((block2 >>> 49) & 2047L);
values[valuesOffset++] = (int) ((block2 >>> 38) & 2047L);
values[valuesOffset++] = (int) ((block2 >>> 27) & 2047L);
values[valuesOffset++] = (int) ((block2 >>> 16) & 2047L);
values[valuesOffset++] = (int) ((block2 >>> 5) & 2047L);
final long block3 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block2 & 31L) << 6) | (block3 >>> 58));
values[valuesOffset++] = (int) ((block3 >>> 47) & 2047L);
values[valuesOffset++] = (int) ((block3 >>> 36) & 2047L);
values[valuesOffset++] = (int) ((block3 >>> 25) & 2047L);
values[valuesOffset++] = (int) ((block3 >>> 14) & 2047L);
values[valuesOffset++] = (int) ((block3 >>> 3) & 2047L);
final long block4 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block3 & 7L) << 8) | (block4 >>> 56));
values[valuesOffset++] = (int) ((block4 >>> 45) & 2047L);
values[valuesOffset++] = (int) ((block4 >>> 34) & 2047L);
values[valuesOffset++] = (int) ((block4 >>> 23) & 2047L);
values[valuesOffset++] = (int) ((block4 >>> 12) & 2047L);
values[valuesOffset++] = (int) ((block4 >>> 1) & 2047L);
final long block5 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block4 & 1L) << 10) | (block5 >>> 54));
values[valuesOffset++] = (int) ((block5 >>> 43) & 2047L);
values[valuesOffset++] = (int) ((block5 >>> 32) & 2047L);
values[valuesOffset++] = (int) ((block5 >>> 21) & 2047L);
values[valuesOffset++] = (int) ((block5 >>> 10) & 2047L);
final long block6 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block5 & 1023L) << 1) | (block6 >>> 63));
values[valuesOffset++] = (int) ((block6 >>> 52) & 2047L);
values[valuesOffset++] = (int) ((block6 >>> 41) & 2047L);
values[valuesOffset++] = (int) ((block6 >>> 30) & 2047L);
values[valuesOffset++] = (int) ((block6 >>> 19) & 2047L);
values[valuesOffset++] = (int) ((block6 >>> 8) & 2047L);
final long block7 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block6 & 255L) << 3) | (block7 >>> 61));
values[valuesOffset++] = (int) ((block7 >>> 50) & 2047L);
values[valuesOffset++] = (int) ((block7 >>> 39) & 2047L);
values[valuesOffset++] = (int) ((block7 >>> 28) & 2047L);
values[valuesOffset++] = (int) ((block7 >>> 17) & 2047L);
values[valuesOffset++] = (int) ((block7 >>> 6) & 2047L);
final long block8 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block7 & 63L) << 5) | (block8 >>> 59));
values[valuesOffset++] = (int) ((block8 >>> 48) & 2047L);
values[valuesOffset++] = (int) ((block8 >>> 37) & 2047L);
values[valuesOffset++] = (int) ((block8 >>> 26) & 2047L);
values[valuesOffset++] = (int) ((block8 >>> 15) & 2047L);
values[valuesOffset++] = (int) ((block8 >>> 4) & 2047L);
final long block9 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block8 & 15L) << 7) | (block9 >>> 57));
values[valuesOffset++] = (int) ((block9 >>> 46) & 2047L);
values[valuesOffset++] = (int) ((block9 >>> 35) & 2047L);
values[valuesOffset++] = (int) ((block9 >>> 24) & 2047L);
values[valuesOffset++] = (int) ((block9 >>> 13) & 2047L);
values[valuesOffset++] = (int) ((block9 >>> 2) & 2047L);
final long block10 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block9 & 3L) << 9) | (block10 >>> 55));
values[valuesOffset++] = (int) ((block10 >>> 44) & 2047L);
values[valuesOffset++] = (int) ((block10 >>> 33) & 2047L);
values[valuesOffset++] = (int) ((block10 >>> 22) & 2047L);
values[valuesOffset++] = (int) ((block10 >>> 11) & 2047L);
values[valuesOffset++] = (int) (block10 & 2047L);
}
@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 >>> 53);
values[valuesOffset++] = (int) ((block0 >>> 42) & 2047L);
values[valuesOffset++] = (int) ((block0 >>> 31) & 2047L);
values[valuesOffset++] = (int) ((block0 >>> 20) & 2047L);
values[valuesOffset++] = (int) ((block0 >>> 9) & 2047L);
final long block1 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block0 & 511L) << 2) | (block1 >>> 62));
values[valuesOffset++] = (int) ((block1 >>> 51) & 2047L);
values[valuesOffset++] = (int) ((block1 >>> 40) & 2047L);
values[valuesOffset++] = (int) ((block1 >>> 29) & 2047L);
values[valuesOffset++] = (int) ((block1 >>> 18) & 2047L);
values[valuesOffset++] = (int) ((block1 >>> 7) & 2047L);
final long block2 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block1 & 127L) << 4) | (block2 >>> 60));
values[valuesOffset++] = (int) ((block2 >>> 49) & 2047L);
values[valuesOffset++] = (int) ((block2 >>> 38) & 2047L);
values[valuesOffset++] = (int) ((block2 >>> 27) & 2047L);
values[valuesOffset++] = (int) ((block2 >>> 16) & 2047L);
values[valuesOffset++] = (int) ((block2 >>> 5) & 2047L);
final long block3 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block2 & 31L) << 6) | (block3 >>> 58));
values[valuesOffset++] = (int) ((block3 >>> 47) & 2047L);
values[valuesOffset++] = (int) ((block3 >>> 36) & 2047L);
values[valuesOffset++] = (int) ((block3 >>> 25) & 2047L);
values[valuesOffset++] = (int) ((block3 >>> 14) & 2047L);
values[valuesOffset++] = (int) ((block3 >>> 3) & 2047L);
final long block4 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block3 & 7L) << 8) | (block4 >>> 56));
values[valuesOffset++] = (int) ((block4 >>> 45) & 2047L);
values[valuesOffset++] = (int) ((block4 >>> 34) & 2047L);
values[valuesOffset++] = (int) ((block4 >>> 23) & 2047L);
values[valuesOffset++] = (int) ((block4 >>> 12) & 2047L);
values[valuesOffset++] = (int) ((block4 >>> 1) & 2047L);
final long block5 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block4 & 1L) << 10) | (block5 >>> 54));
values[valuesOffset++] = (int) ((block5 >>> 43) & 2047L);
values[valuesOffset++] = (int) ((block5 >>> 32) & 2047L);
values[valuesOffset++] = (int) ((block5 >>> 21) & 2047L);
values[valuesOffset++] = (int) ((block5 >>> 10) & 2047L);
final long block6 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block5 & 1023L) << 1) | (block6 >>> 63));
values[valuesOffset++] = (int) ((block6 >>> 52) & 2047L);
values[valuesOffset++] = (int) ((block6 >>> 41) & 2047L);
values[valuesOffset++] = (int) ((block6 >>> 30) & 2047L);
values[valuesOffset++] = (int) ((block6 >>> 19) & 2047L);
values[valuesOffset++] = (int) ((block6 >>> 8) & 2047L);
final long block7 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block6 & 255L) << 3) | (block7 >>> 61));
values[valuesOffset++] = (int) ((block7 >>> 50) & 2047L);
values[valuesOffset++] = (int) ((block7 >>> 39) & 2047L);
values[valuesOffset++] = (int) ((block7 >>> 28) & 2047L);
values[valuesOffset++] = (int) ((block7 >>> 17) & 2047L);
values[valuesOffset++] = (int) ((block7 >>> 6) & 2047L);
final long block8 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block7 & 63L) << 5) | (block8 >>> 59));
values[valuesOffset++] = (int) ((block8 >>> 48) & 2047L);
values[valuesOffset++] = (int) ((block8 >>> 37) & 2047L);
values[valuesOffset++] = (int) ((block8 >>> 26) & 2047L);
values[valuesOffset++] = (int) ((block8 >>> 15) & 2047L);
values[valuesOffset++] = (int) ((block8 >>> 4) & 2047L);
final long block9 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block8 & 15L) << 7) | (block9 >>> 57));
values[valuesOffset++] = (int) ((block9 >>> 46) & 2047L);
values[valuesOffset++] = (int) ((block9 >>> 35) & 2047L);
values[valuesOffset++] = (int) ((block9 >>> 24) & 2047L);
values[valuesOffset++] = (int) ((block9 >>> 13) & 2047L);
values[valuesOffset++] = (int) ((block9 >>> 2) & 2047L);
final long block10 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block9 & 3L) << 9) | (block10 >>> 55));
values[valuesOffset++] = (int) ((block10 >>> 44) & 2047L);
values[valuesOffset++] = (int) ((block10 >>> 33) & 2047L);
values[valuesOffset++] = (int) ((block10 >>> 22) & 2047L);
values[valuesOffset++] = (int) ((block10 >>> 11) & 2047L);
values[valuesOffset++] = (int) (block10 & 2047L);
}
}
@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 << 3) | (byte1 >>> 5);
final int byte2 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte1 & 31) << 6) | (byte2 >>> 2);
final int byte3 = blocks[blocksOffset++] & 0xFF;
final int byte4 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte2 & 3) << 9) | (byte3 << 1) | (byte4 >>> 7);
final int byte5 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte4 & 127) << 4) | (byte5 >>> 4);
final int byte6 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte5 & 15) << 7) | (byte6 >>> 1);
final int byte7 = blocks[blocksOffset++] & 0xFF;
final int byte8 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte6 & 1) << 10) | (byte7 << 2) | (byte8 >>> 6);
final int byte9 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte8 & 63) << 5) | (byte9 >>> 3);
final int byte10 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte9 & 7) << 8) | byte10;
final int byte11 = blocks[blocksOffset++] & 0xFF;
final int byte12 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte11 << 3) | (byte12 >>> 5);
final int byte13 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte12 & 31) << 6) | (byte13 >>> 2);
final int byte14 = blocks[blocksOffset++] & 0xFF;
final int byte15 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte13 & 3) << 9) | (byte14 << 1) | (byte15 >>> 7);
final int byte16 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte15 & 127) << 4) | (byte16 >>> 4);
final int byte17 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte16 & 15) << 7) | (byte17 >>> 1);
final int byte18 = blocks[blocksOffset++] & 0xFF;
final int byte19 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte17 & 1) << 10) | (byte18 << 2) | (byte19 >>> 6);
final int byte20 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte19 & 63) << 5) | (byte20 >>> 3);
final int byte21 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte20 & 7) << 8) | byte21;
final int byte22 = blocks[blocksOffset++] & 0xFF;
final int byte23 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte22 << 3) | (byte23 >>> 5);
final int byte24 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte23 & 31) << 6) | (byte24 >>> 2);
final int byte25 = blocks[blocksOffset++] & 0xFF;
final int byte26 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte24 & 3) << 9) | (byte25 << 1) | (byte26 >>> 7);
final int byte27 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte26 & 127) << 4) | (byte27 >>> 4);
final int byte28 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte27 & 15) << 7) | (byte28 >>> 1);
final int byte29 = blocks[blocksOffset++] & 0xFF;
final int byte30 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte28 & 1) << 10) | (byte29 << 2) | (byte30 >>> 6);
final int byte31 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte30 & 63) << 5) | (byte31 >>> 3);
final int byte32 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte31 & 7) << 8) | byte32;
final int byte33 = blocks[blocksOffset++] & 0xFF;
final int byte34 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte33 << 3) | (byte34 >>> 5);
final int byte35 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte34 & 31) << 6) | (byte35 >>> 2);
final int byte36 = blocks[blocksOffset++] & 0xFF;
final int byte37 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte35 & 3) << 9) | (byte36 << 1) | (byte37 >>> 7);
final int byte38 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte37 & 127) << 4) | (byte38 >>> 4);
final int byte39 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte38 & 15) << 7) | (byte39 >>> 1);
final int byte40 = blocks[blocksOffset++] & 0xFF;
final int byte41 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte39 & 1) << 10) | (byte40 << 2) | (byte41 >>> 6);
final int byte42 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte41 & 63) << 5) | (byte42 >>> 3);
final int byte43 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte42 & 7) << 8) | byte43;
final int byte44 = blocks[blocksOffset++] & 0xFF;
final int byte45 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte44 << 3) | (byte45 >>> 5);
final int byte46 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte45 & 31) << 6) | (byte46 >>> 2);
final int byte47 = blocks[blocksOffset++] & 0xFF;
final int byte48 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte46 & 3) << 9) | (byte47 << 1) | (byte48 >>> 7);
final int byte49 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte48 & 127) << 4) | (byte49 >>> 4);
final int byte50 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte49 & 15) << 7) | (byte50 >>> 1);
final int byte51 = blocks[blocksOffset++] & 0xFF;
final int byte52 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte50 & 1) << 10) | (byte51 << 2) | (byte52 >>> 6);
final int byte53 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte52 & 63) << 5) | (byte53 >>> 3);
final int byte54 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte53 & 7) << 8) | byte54;
final int byte55 = blocks[blocksOffset++] & 0xFF;
final int byte56 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte55 << 3) | (byte56 >>> 5);
final int byte57 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte56 & 31) << 6) | (byte57 >>> 2);
final int byte58 = blocks[blocksOffset++] & 0xFF;
final int byte59 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte57 & 3) << 9) | (byte58 << 1) | (byte59 >>> 7);
final int byte60 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte59 & 127) << 4) | (byte60 >>> 4);
final int byte61 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte60 & 15) << 7) | (byte61 >>> 1);
final int byte62 = blocks[blocksOffset++] & 0xFF;
final int byte63 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte61 & 1) << 10) | (byte62 << 2) | (byte63 >>> 6);
final int byte64 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte63 & 63) << 5) | (byte64 >>> 3);
final int byte65 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte64 & 7) << 8) | byte65;
final int byte66 = blocks[blocksOffset++] & 0xFF;
final int byte67 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte66 << 3) | (byte67 >>> 5);
final int byte68 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte67 & 31) << 6) | (byte68 >>> 2);
final int byte69 = blocks[blocksOffset++] & 0xFF;
final int byte70 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte68 & 3) << 9) | (byte69 << 1) | (byte70 >>> 7);
final int byte71 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte70 & 127) << 4) | (byte71 >>> 4);
final int byte72 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte71 & 15) << 7) | (byte72 >>> 1);
final int byte73 = blocks[blocksOffset++] & 0xFF;
final int byte74 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte72 & 1) << 10) | (byte73 << 2) | (byte74 >>> 6);
final int byte75 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte74 & 63) << 5) | (byte75 >>> 3);
final int byte76 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte75 & 7) << 8) | byte76;
final int byte77 = blocks[blocksOffset++] & 0xFF;
final int byte78 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte77 << 3) | (byte78 >>> 5);
final int byte79 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte78 & 31) << 6) | (byte79 >>> 2);
final int byte80 = blocks[blocksOffset++] & 0xFF;
final int byte81 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte79 & 3) << 9) | (byte80 << 1) | (byte81 >>> 7);
final int byte82 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte81 & 127) << 4) | (byte82 >>> 4);
final int byte83 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte82 & 15) << 7) | (byte83 >>> 1);
final int byte84 = blocks[blocksOffset++] & 0xFF;
final int byte85 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte83 & 1) << 10) | (byte84 << 2) | (byte85 >>> 6);
final int byte86 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte85 & 63) << 5) | (byte86 >>> 3);
final int byte87 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte86 & 7) << 8) | byte87;
}
@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 << 3) | (byte1 >>> 5);
final int byte2 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte1 & 31) << 6) | (byte2 >>> 2);
final int byte3 = blocks[blocksOffset++] & 0xFF;
final int byte4 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte2 & 3) << 9) | (byte3 << 1) | (byte4 >>> 7);
final int byte5 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte4 & 127) << 4) | (byte5 >>> 4);
final int byte6 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte5 & 15) << 7) | (byte6 >>> 1);
final int byte7 = blocks[blocksOffset++] & 0xFF;
final int byte8 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte6 & 1) << 10) | (byte7 << 2) | (byte8 >>> 6);
final int byte9 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte8 & 63) << 5) | (byte9 >>> 3);
final int byte10 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte9 & 7) << 8) | byte10;
}
}
@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 >>> 53;
values[valuesOffset++] = (block0 >>> 42) & 2047L;
values[valuesOffset++] = (block0 >>> 31) & 2047L;
values[valuesOffset++] = (block0 >>> 20) & 2047L;
values[valuesOffset++] = (block0 >>> 9) & 2047L;
final long block1 = blocks[blocksOffset++];
values[valuesOffset++] = ((block0 & 511L) << 2) | (block1 >>> 62);
values[valuesOffset++] = (block1 >>> 51) & 2047L;
values[valuesOffset++] = (block1 >>> 40) & 2047L;
values[valuesOffset++] = (block1 >>> 29) & 2047L;
values[valuesOffset++] = (block1 >>> 18) & 2047L;
values[valuesOffset++] = (block1 >>> 7) & 2047L;
final long block2 = blocks[blocksOffset++];
values[valuesOffset++] = ((block1 & 127L) << 4) | (block2 >>> 60);
values[valuesOffset++] = (block2 >>> 49) & 2047L;
values[valuesOffset++] = (block2 >>> 38) & 2047L;
values[valuesOffset++] = (block2 >>> 27) & 2047L;
values[valuesOffset++] = (block2 >>> 16) & 2047L;
values[valuesOffset++] = (block2 >>> 5) & 2047L;
final long block3 = blocks[blocksOffset++];
values[valuesOffset++] = ((block2 & 31L) << 6) | (block3 >>> 58);
values[valuesOffset++] = (block3 >>> 47) & 2047L;
values[valuesOffset++] = (block3 >>> 36) & 2047L;
values[valuesOffset++] = (block3 >>> 25) & 2047L;
values[valuesOffset++] = (block3 >>> 14) & 2047L;
values[valuesOffset++] = (block3 >>> 3) & 2047L;
final long block4 = blocks[blocksOffset++];
values[valuesOffset++] = ((block3 & 7L) << 8) | (block4 >>> 56);
values[valuesOffset++] = (block4 >>> 45) & 2047L;
values[valuesOffset++] = (block4 >>> 34) & 2047L;
values[valuesOffset++] = (block4 >>> 23) & 2047L;
values[valuesOffset++] = (block4 >>> 12) & 2047L;
values[valuesOffset++] = (block4 >>> 1) & 2047L;
final long block5 = blocks[blocksOffset++];
values[valuesOffset++] = ((block4 & 1L) << 10) | (block5 >>> 54);
values[valuesOffset++] = (block5 >>> 43) & 2047L;
values[valuesOffset++] = (block5 >>> 32) & 2047L;
values[valuesOffset++] = (block5 >>> 21) & 2047L;
values[valuesOffset++] = (block5 >>> 10) & 2047L;
final long block6 = blocks[blocksOffset++];
values[valuesOffset++] = ((block5 & 1023L) << 1) | (block6 >>> 63);
values[valuesOffset++] = (block6 >>> 52) & 2047L;
values[valuesOffset++] = (block6 >>> 41) & 2047L;
values[valuesOffset++] = (block6 >>> 30) & 2047L;
values[valuesOffset++] = (block6 >>> 19) & 2047L;
values[valuesOffset++] = (block6 >>> 8) & 2047L;
final long block7 = blocks[blocksOffset++];
values[valuesOffset++] = ((block6 & 255L) << 3) | (block7 >>> 61);
values[valuesOffset++] = (block7 >>> 50) & 2047L;
values[valuesOffset++] = (block7 >>> 39) & 2047L;
values[valuesOffset++] = (block7 >>> 28) & 2047L;
values[valuesOffset++] = (block7 >>> 17) & 2047L;
values[valuesOffset++] = (block7 >>> 6) & 2047L;
final long block8 = blocks[blocksOffset++];
values[valuesOffset++] = ((block7 & 63L) << 5) | (block8 >>> 59);
values[valuesOffset++] = (block8 >>> 48) & 2047L;
values[valuesOffset++] = (block8 >>> 37) & 2047L;
values[valuesOffset++] = (block8 >>> 26) & 2047L;
values[valuesOffset++] = (block8 >>> 15) & 2047L;
values[valuesOffset++] = (block8 >>> 4) & 2047L;
final long block9 = blocks[blocksOffset++];
values[valuesOffset++] = ((block8 & 15L) << 7) | (block9 >>> 57);
values[valuesOffset++] = (block9 >>> 46) & 2047L;
values[valuesOffset++] = (block9 >>> 35) & 2047L;
values[valuesOffset++] = (block9 >>> 24) & 2047L;
values[valuesOffset++] = (block9 >>> 13) & 2047L;
values[valuesOffset++] = (block9 >>> 2) & 2047L;
final long block10 = blocks[blocksOffset++];
values[valuesOffset++] = ((block9 & 3L) << 9) | (block10 >>> 55);
values[valuesOffset++] = (block10 >>> 44) & 2047L;
values[valuesOffset++] = (block10 >>> 33) & 2047L;
values[valuesOffset++] = (block10 >>> 22) & 2047L;
values[valuesOffset++] = (block10 >>> 11) & 2047L;
values[valuesOffset++] = block10 & 2047L;
}
@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 >>> 53;
values[valuesOffset++] = (block0 >>> 42) & 2047L;
values[valuesOffset++] = (block0 >>> 31) & 2047L;
values[valuesOffset++] = (block0 >>> 20) & 2047L;
values[valuesOffset++] = (block0 >>> 9) & 2047L;
final long block1 = blocks[blocksOffset++];
values[valuesOffset++] = ((block0 & 511L) << 2) | (block1 >>> 62);
values[valuesOffset++] = (block1 >>> 51) & 2047L;
values[valuesOffset++] = (block1 >>> 40) & 2047L;
values[valuesOffset++] = (block1 >>> 29) & 2047L;
values[valuesOffset++] = (block1 >>> 18) & 2047L;
values[valuesOffset++] = (block1 >>> 7) & 2047L;
final long block2 = blocks[blocksOffset++];
values[valuesOffset++] = ((block1 & 127L) << 4) | (block2 >>> 60);
values[valuesOffset++] = (block2 >>> 49) & 2047L;
values[valuesOffset++] = (block2 >>> 38) & 2047L;
values[valuesOffset++] = (block2 >>> 27) & 2047L;
values[valuesOffset++] = (block2 >>> 16) & 2047L;
values[valuesOffset++] = (block2 >>> 5) & 2047L;
final long block3 = blocks[blocksOffset++];
values[valuesOffset++] = ((block2 & 31L) << 6) | (block3 >>> 58);
values[valuesOffset++] = (block3 >>> 47) & 2047L;
values[valuesOffset++] = (block3 >>> 36) & 2047L;
values[valuesOffset++] = (block3 >>> 25) & 2047L;
values[valuesOffset++] = (block3 >>> 14) & 2047L;
values[valuesOffset++] = (block3 >>> 3) & 2047L;
final long block4 = blocks[blocksOffset++];
values[valuesOffset++] = ((block3 & 7L) << 8) | (block4 >>> 56);
values[valuesOffset++] = (block4 >>> 45) & 2047L;
values[valuesOffset++] = (block4 >>> 34) & 2047L;
values[valuesOffset++] = (block4 >>> 23) & 2047L;
values[valuesOffset++] = (block4 >>> 12) & 2047L;
values[valuesOffset++] = (block4 >>> 1) & 2047L;
final long block5 = blocks[blocksOffset++];
values[valuesOffset++] = ((block4 & 1L) << 10) | (block5 >>> 54);
values[valuesOffset++] = (block5 >>> 43) & 2047L;
values[valuesOffset++] = (block5 >>> 32) & 2047L;
values[valuesOffset++] = (block5 >>> 21) & 2047L;
values[valuesOffset++] = (block5 >>> 10) & 2047L;
final long block6 = blocks[blocksOffset++];
values[valuesOffset++] = ((block5 & 1023L) << 1) | (block6 >>> 63);
values[valuesOffset++] = (block6 >>> 52) & 2047L;
values[valuesOffset++] = (block6 >>> 41) & 2047L;
values[valuesOffset++] = (block6 >>> 30) & 2047L;
values[valuesOffset++] = (block6 >>> 19) & 2047L;
values[valuesOffset++] = (block6 >>> 8) & 2047L;
final long block7 = blocks[blocksOffset++];
values[valuesOffset++] = ((block6 & 255L) << 3) | (block7 >>> 61);
values[valuesOffset++] = (block7 >>> 50) & 2047L;
values[valuesOffset++] = (block7 >>> 39) & 2047L;
values[valuesOffset++] = (block7 >>> 28) & 2047L;
values[valuesOffset++] = (block7 >>> 17) & 2047L;
values[valuesOffset++] = (block7 >>> 6) & 2047L;
final long block8 = blocks[blocksOffset++];
values[valuesOffset++] = ((block7 & 63L) << 5) | (block8 >>> 59);
values[valuesOffset++] = (block8 >>> 48) & 2047L;
values[valuesOffset++] = (block8 >>> 37) & 2047L;
values[valuesOffset++] = (block8 >>> 26) & 2047L;
values[valuesOffset++] = (block8 >>> 15) & 2047L;
values[valuesOffset++] = (block8 >>> 4) & 2047L;
final long block9 = blocks[blocksOffset++];
values[valuesOffset++] = ((block8 & 15L) << 7) | (block9 >>> 57);
values[valuesOffset++] = (block9 >>> 46) & 2047L;
values[valuesOffset++] = (block9 >>> 35) & 2047L;
values[valuesOffset++] = (block9 >>> 24) & 2047L;
values[valuesOffset++] = (block9 >>> 13) & 2047L;
values[valuesOffset++] = (block9 >>> 2) & 2047L;
final long block10 = blocks[blocksOffset++];
values[valuesOffset++] = ((block9 & 3L) << 9) | (block10 >>> 55);
values[valuesOffset++] = (block10 >>> 44) & 2047L;
values[valuesOffset++] = (block10 >>> 33) & 2047L;
values[valuesOffset++] = (block10 >>> 22) & 2047L;
values[valuesOffset++] = (block10 >>> 11) & 2047L;
values[valuesOffset++] = block10 & 2047L;
}
}
@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 << 3) | (byte1 >>> 5);
final long byte2 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte1 & 31) << 6) | (byte2 >>> 2);
final long byte3 = blocks[blocksOffset++] & 0xFF;
final long byte4 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte2 & 3) << 9) | (byte3 << 1) | (byte4 >>> 7);
final long byte5 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte4 & 127) << 4) | (byte5 >>> 4);
final long byte6 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte5 & 15) << 7) | (byte6 >>> 1);
final long byte7 = blocks[blocksOffset++] & 0xFF;
final long byte8 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte6 & 1) << 10) | (byte7 << 2) | (byte8 >>> 6);
final long byte9 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte8 & 63) << 5) | (byte9 >>> 3);
final long byte10 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte9 & 7) << 8) | byte10;
final long byte11 = blocks[blocksOffset++] & 0xFF;
final long byte12 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte11 << 3) | (byte12 >>> 5);
final long byte13 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte12 & 31) << 6) | (byte13 >>> 2);
final long byte14 = blocks[blocksOffset++] & 0xFF;
final long byte15 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte13 & 3) << 9) | (byte14 << 1) | (byte15 >>> 7);
final long byte16 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte15 & 127) << 4) | (byte16 >>> 4);
final long byte17 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte16 & 15) << 7) | (byte17 >>> 1);
final long byte18 = blocks[blocksOffset++] & 0xFF;
final long byte19 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte17 & 1) << 10) | (byte18 << 2) | (byte19 >>> 6);
final long byte20 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte19 & 63) << 5) | (byte20 >>> 3);
final long byte21 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte20 & 7) << 8) | byte21;
final long byte22 = blocks[blocksOffset++] & 0xFF;
final long byte23 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte22 << 3) | (byte23 >>> 5);
final long byte24 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte23 & 31) << 6) | (byte24 >>> 2);
final long byte25 = blocks[blocksOffset++] & 0xFF;
final long byte26 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte24 & 3) << 9) | (byte25 << 1) | (byte26 >>> 7);
final long byte27 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte26 & 127) << 4) | (byte27 >>> 4);
final long byte28 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte27 & 15) << 7) | (byte28 >>> 1);
final long byte29 = blocks[blocksOffset++] & 0xFF;
final long byte30 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte28 & 1) << 10) | (byte29 << 2) | (byte30 >>> 6);
final long byte31 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte30 & 63) << 5) | (byte31 >>> 3);
final long byte32 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte31 & 7) << 8) | byte32;
final long byte33 = blocks[blocksOffset++] & 0xFF;
final long byte34 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte33 << 3) | (byte34 >>> 5);
final long byte35 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte34 & 31) << 6) | (byte35 >>> 2);
final long byte36 = blocks[blocksOffset++] & 0xFF;
final long byte37 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte35 & 3) << 9) | (byte36 << 1) | (byte37 >>> 7);
final long byte38 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte37 & 127) << 4) | (byte38 >>> 4);
final long byte39 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte38 & 15) << 7) | (byte39 >>> 1);
final long byte40 = blocks[blocksOffset++] & 0xFF;
final long byte41 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte39 & 1) << 10) | (byte40 << 2) | (byte41 >>> 6);
final long byte42 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte41 & 63) << 5) | (byte42 >>> 3);
final long byte43 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte42 & 7) << 8) | byte43;
final long byte44 = blocks[blocksOffset++] & 0xFF;
final long byte45 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte44 << 3) | (byte45 >>> 5);
final long byte46 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte45 & 31) << 6) | (byte46 >>> 2);
final long byte47 = blocks[blocksOffset++] & 0xFF;
final long byte48 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte46 & 3) << 9) | (byte47 << 1) | (byte48 >>> 7);
final long byte49 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte48 & 127) << 4) | (byte49 >>> 4);
final long byte50 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte49 & 15) << 7) | (byte50 >>> 1);
final long byte51 = blocks[blocksOffset++] & 0xFF;
final long byte52 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte50 & 1) << 10) | (byte51 << 2) | (byte52 >>> 6);
final long byte53 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte52 & 63) << 5) | (byte53 >>> 3);
final long byte54 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte53 & 7) << 8) | byte54;
final long byte55 = blocks[blocksOffset++] & 0xFF;
final long byte56 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte55 << 3) | (byte56 >>> 5);
final long byte57 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte56 & 31) << 6) | (byte57 >>> 2);
final long byte58 = blocks[blocksOffset++] & 0xFF;
final long byte59 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte57 & 3) << 9) | (byte58 << 1) | (byte59 >>> 7);
final long byte60 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte59 & 127) << 4) | (byte60 >>> 4);
final long byte61 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte60 & 15) << 7) | (byte61 >>> 1);
final long byte62 = blocks[blocksOffset++] & 0xFF;
final long byte63 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte61 & 1) << 10) | (byte62 << 2) | (byte63 >>> 6);
final long byte64 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte63 & 63) << 5) | (byte64 >>> 3);
final long byte65 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte64 & 7) << 8) | byte65;
final long byte66 = blocks[blocksOffset++] & 0xFF;
final long byte67 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte66 << 3) | (byte67 >>> 5);
final long byte68 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte67 & 31) << 6) | (byte68 >>> 2);
final long byte69 = blocks[blocksOffset++] & 0xFF;
final long byte70 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte68 & 3) << 9) | (byte69 << 1) | (byte70 >>> 7);
final long byte71 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte70 & 127) << 4) | (byte71 >>> 4);
final long byte72 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte71 & 15) << 7) | (byte72 >>> 1);
final long byte73 = blocks[blocksOffset++] & 0xFF;
final long byte74 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte72 & 1) << 10) | (byte73 << 2) | (byte74 >>> 6);
final long byte75 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte74 & 63) << 5) | (byte75 >>> 3);
final long byte76 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte75 & 7) << 8) | byte76;
final long byte77 = blocks[blocksOffset++] & 0xFF;
final long byte78 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte77 << 3) | (byte78 >>> 5);
final long byte79 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte78 & 31) << 6) | (byte79 >>> 2);
final long byte80 = blocks[blocksOffset++] & 0xFF;
final long byte81 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte79 & 3) << 9) | (byte80 << 1) | (byte81 >>> 7);
final long byte82 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte81 & 127) << 4) | (byte82 >>> 4);
final long byte83 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte82 & 15) << 7) | (byte83 >>> 1);
final long byte84 = blocks[blocksOffset++] & 0xFF;
final long byte85 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte83 & 1) << 10) | (byte84 << 2) | (byte85 >>> 6);
final long byte86 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte85 & 63) << 5) | (byte86 >>> 3);
final long byte87 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte86 & 7) << 8) | byte87;
}
@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 << 3) | (byte1 >>> 5);
final long byte2 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte1 & 31) << 6) | (byte2 >>> 2);
final long byte3 = blocks[blocksOffset++] & 0xFF;
final long byte4 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte2 & 3) << 9) | (byte3 << 1) | (byte4 >>> 7);
final long byte5 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte4 & 127) << 4) | (byte5 >>> 4);
final long byte6 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte5 & 15) << 7) | (byte6 >>> 1);
final long byte7 = blocks[blocksOffset++] & 0xFF;
final long byte8 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte6 & 1) << 10) | (byte7 << 2) | (byte8 >>> 6);
final long byte9 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte8 & 63) << 5) | (byte9 >>> 3);
final long byte10 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte9 & 7) << 8) | byte10;
}
}
}

View File

@ -24,160 +24,82 @@ package org.apache.lucene.util.packed;
*/
final class BulkOperationPacked12 extends BulkOperationPacked {
public BulkOperationPacked12() {
super(12);
assert blockCount() == 3;
assert valueCount() == 16;
}
public BulkOperationPacked12() {
super(12);
assert blockCount() == 3;
assert valueCount() == 16;
}
@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 >>> 52);
values[valuesOffset++] = (int) ((block0 >>> 40) & 4095L);
values[valuesOffset++] = (int) ((block0 >>> 28) & 4095L);
values[valuesOffset++] = (int) ((block0 >>> 16) & 4095L);
values[valuesOffset++] = (int) ((block0 >>> 4) & 4095L);
final long block1 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block0 & 15L) << 8) | (block1 >>> 56));
values[valuesOffset++] = (int) ((block1 >>> 44) & 4095L);
values[valuesOffset++] = (int) ((block1 >>> 32) & 4095L);
values[valuesOffset++] = (int) ((block1 >>> 20) & 4095L);
values[valuesOffset++] = (int) ((block1 >>> 8) & 4095L);
final long block2 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block1 & 255L) << 4) | (block2 >>> 60));
values[valuesOffset++] = (int) ((block2 >>> 48) & 4095L);
values[valuesOffset++] = (int) ((block2 >>> 36) & 4095L);
values[valuesOffset++] = (int) ((block2 >>> 24) & 4095L);
values[valuesOffset++] = (int) ((block2 >>> 12) & 4095L);
values[valuesOffset++] = (int) (block2 & 4095L);
}
@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 >>> 52);
values[valuesOffset++] = (int) ((block0 >>> 40) & 4095L);
values[valuesOffset++] = (int) ((block0 >>> 28) & 4095L);
values[valuesOffset++] = (int) ((block0 >>> 16) & 4095L);
values[valuesOffset++] = (int) ((block0 >>> 4) & 4095L);
final long block1 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block0 & 15L) << 8) | (block1 >>> 56));
values[valuesOffset++] = (int) ((block1 >>> 44) & 4095L);
values[valuesOffset++] = (int) ((block1 >>> 32) & 4095L);
values[valuesOffset++] = (int) ((block1 >>> 20) & 4095L);
values[valuesOffset++] = (int) ((block1 >>> 8) & 4095L);
final long block2 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block1 & 255L) << 4) | (block2 >>> 60));
values[valuesOffset++] = (int) ((block2 >>> 48) & 4095L);
values[valuesOffset++] = (int) ((block2 >>> 36) & 4095L);
values[valuesOffset++] = (int) ((block2 >>> 24) & 4095L);
values[valuesOffset++] = (int) ((block2 >>> 12) & 4095L);
values[valuesOffset++] = (int) (block2 & 4095L);
}
}
@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 << 4) | (byte1 >>> 4);
final int byte2 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte1 & 15) << 8) | byte2;
final int byte3 = blocks[blocksOffset++] & 0xFF;
final int byte4 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte3 << 4) | (byte4 >>> 4);
final int byte5 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte4 & 15) << 8) | byte5;
final int byte6 = blocks[blocksOffset++] & 0xFF;
final int byte7 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte6 << 4) | (byte7 >>> 4);
final int byte8 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte7 & 15) << 8) | byte8;
final int byte9 = blocks[blocksOffset++] & 0xFF;
final int byte10 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte9 << 4) | (byte10 >>> 4);
final int byte11 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte10 & 15) << 8) | byte11;
final int byte12 = blocks[blocksOffset++] & 0xFF;
final int byte13 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte12 << 4) | (byte13 >>> 4);
final int byte14 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte13 & 15) << 8) | byte14;
final int byte15 = blocks[blocksOffset++] & 0xFF;
final int byte16 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte15 << 4) | (byte16 >>> 4);
final int byte17 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte16 & 15) << 8) | byte17;
final int byte18 = blocks[blocksOffset++] & 0xFF;
final int byte19 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte18 << 4) | (byte19 >>> 4);
final int byte20 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte19 & 15) << 8) | byte20;
final int byte21 = blocks[blocksOffset++] & 0xFF;
final int byte22 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte21 << 4) | (byte22 >>> 4);
final int byte23 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte22 & 15) << 8) | byte23;
}
@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 << 4) | (byte1 >>> 4);
final int byte2 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte1 & 15) << 8) | byte2;
}
}
@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 >>> 52;
values[valuesOffset++] = (block0 >>> 40) & 4095L;
values[valuesOffset++] = (block0 >>> 28) & 4095L;
values[valuesOffset++] = (block0 >>> 16) & 4095L;
values[valuesOffset++] = (block0 >>> 4) & 4095L;
final long block1 = blocks[blocksOffset++];
values[valuesOffset++] = ((block0 & 15L) << 8) | (block1 >>> 56);
values[valuesOffset++] = (block1 >>> 44) & 4095L;
values[valuesOffset++] = (block1 >>> 32) & 4095L;
values[valuesOffset++] = (block1 >>> 20) & 4095L;
values[valuesOffset++] = (block1 >>> 8) & 4095L;
final long block2 = blocks[blocksOffset++];
values[valuesOffset++] = ((block1 & 255L) << 4) | (block2 >>> 60);
values[valuesOffset++] = (block2 >>> 48) & 4095L;
values[valuesOffset++] = (block2 >>> 36) & 4095L;
values[valuesOffset++] = (block2 >>> 24) & 4095L;
values[valuesOffset++] = (block2 >>> 12) & 4095L;
values[valuesOffset++] = block2 & 4095L;
}
@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 >>> 52;
values[valuesOffset++] = (block0 >>> 40) & 4095L;
values[valuesOffset++] = (block0 >>> 28) & 4095L;
values[valuesOffset++] = (block0 >>> 16) & 4095L;
values[valuesOffset++] = (block0 >>> 4) & 4095L;
final long block1 = blocks[blocksOffset++];
values[valuesOffset++] = ((block0 & 15L) << 8) | (block1 >>> 56);
values[valuesOffset++] = (block1 >>> 44) & 4095L;
values[valuesOffset++] = (block1 >>> 32) & 4095L;
values[valuesOffset++] = (block1 >>> 20) & 4095L;
values[valuesOffset++] = (block1 >>> 8) & 4095L;
final long block2 = blocks[blocksOffset++];
values[valuesOffset++] = ((block1 & 255L) << 4) | (block2 >>> 60);
values[valuesOffset++] = (block2 >>> 48) & 4095L;
values[valuesOffset++] = (block2 >>> 36) & 4095L;
values[valuesOffset++] = (block2 >>> 24) & 4095L;
values[valuesOffset++] = (block2 >>> 12) & 4095L;
values[valuesOffset++] = block2 & 4095L;
}
}
@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 << 4) | (byte1 >>> 4);
final long byte2 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte1 & 15) << 8) | byte2;
final long byte3 = blocks[blocksOffset++] & 0xFF;
final long byte4 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte3 << 4) | (byte4 >>> 4);
final long byte5 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte4 & 15) << 8) | byte5;
final long byte6 = blocks[blocksOffset++] & 0xFF;
final long byte7 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte6 << 4) | (byte7 >>> 4);
final long byte8 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte7 & 15) << 8) | byte8;
final long byte9 = blocks[blocksOffset++] & 0xFF;
final long byte10 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte9 << 4) | (byte10 >>> 4);
final long byte11 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte10 & 15) << 8) | byte11;
final long byte12 = blocks[blocksOffset++] & 0xFF;
final long byte13 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte12 << 4) | (byte13 >>> 4);
final long byte14 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte13 & 15) << 8) | byte14;
final long byte15 = blocks[blocksOffset++] & 0xFF;
final long byte16 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte15 << 4) | (byte16 >>> 4);
final long byte17 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte16 & 15) << 8) | byte17;
final long byte18 = blocks[blocksOffset++] & 0xFF;
final long byte19 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte18 << 4) | (byte19 >>> 4);
final long byte20 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte19 & 15) << 8) | byte20;
final long byte21 = blocks[blocksOffset++] & 0xFF;
final long byte22 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte21 << 4) | (byte22 >>> 4);
final long byte23 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte22 & 15) << 8) | byte23;
}
@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 << 4) | (byte1 >>> 4);
final long byte2 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte1 & 15) << 8) | byte2;
}
}
}

View File

@ -24,532 +24,230 @@ package org.apache.lucene.util.packed;
*/
final class BulkOperationPacked13 extends BulkOperationPacked {
public BulkOperationPacked13() {
super(13);
assert blockCount() == 13;
assert valueCount() == 64;
}
public BulkOperationPacked13() {
super(13);
assert blockCount() == 13;
assert valueCount() == 64;
}
@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 >>> 51);
values[valuesOffset++] = (int) ((block0 >>> 38) & 8191L);
values[valuesOffset++] = (int) ((block0 >>> 25) & 8191L);
values[valuesOffset++] = (int) ((block0 >>> 12) & 8191L);
final long block1 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block0 & 4095L) << 1) | (block1 >>> 63));
values[valuesOffset++] = (int) ((block1 >>> 50) & 8191L);
values[valuesOffset++] = (int) ((block1 >>> 37) & 8191L);
values[valuesOffset++] = (int) ((block1 >>> 24) & 8191L);
values[valuesOffset++] = (int) ((block1 >>> 11) & 8191L);
final long block2 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block1 & 2047L) << 2) | (block2 >>> 62));
values[valuesOffset++] = (int) ((block2 >>> 49) & 8191L);
values[valuesOffset++] = (int) ((block2 >>> 36) & 8191L);
values[valuesOffset++] = (int) ((block2 >>> 23) & 8191L);
values[valuesOffset++] = (int) ((block2 >>> 10) & 8191L);
final long block3 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block2 & 1023L) << 3) | (block3 >>> 61));
values[valuesOffset++] = (int) ((block3 >>> 48) & 8191L);
values[valuesOffset++] = (int) ((block3 >>> 35) & 8191L);
values[valuesOffset++] = (int) ((block3 >>> 22) & 8191L);
values[valuesOffset++] = (int) ((block3 >>> 9) & 8191L);
final long block4 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block3 & 511L) << 4) | (block4 >>> 60));
values[valuesOffset++] = (int) ((block4 >>> 47) & 8191L);
values[valuesOffset++] = (int) ((block4 >>> 34) & 8191L);
values[valuesOffset++] = (int) ((block4 >>> 21) & 8191L);
values[valuesOffset++] = (int) ((block4 >>> 8) & 8191L);
final long block5 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block4 & 255L) << 5) | (block5 >>> 59));
values[valuesOffset++] = (int) ((block5 >>> 46) & 8191L);
values[valuesOffset++] = (int) ((block5 >>> 33) & 8191L);
values[valuesOffset++] = (int) ((block5 >>> 20) & 8191L);
values[valuesOffset++] = (int) ((block5 >>> 7) & 8191L);
final long block6 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block5 & 127L) << 6) | (block6 >>> 58));
values[valuesOffset++] = (int) ((block6 >>> 45) & 8191L);
values[valuesOffset++] = (int) ((block6 >>> 32) & 8191L);
values[valuesOffset++] = (int) ((block6 >>> 19) & 8191L);
values[valuesOffset++] = (int) ((block6 >>> 6) & 8191L);
final long block7 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block6 & 63L) << 7) | (block7 >>> 57));
values[valuesOffset++] = (int) ((block7 >>> 44) & 8191L);
values[valuesOffset++] = (int) ((block7 >>> 31) & 8191L);
values[valuesOffset++] = (int) ((block7 >>> 18) & 8191L);
values[valuesOffset++] = (int) ((block7 >>> 5) & 8191L);
final long block8 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block7 & 31L) << 8) | (block8 >>> 56));
values[valuesOffset++] = (int) ((block8 >>> 43) & 8191L);
values[valuesOffset++] = (int) ((block8 >>> 30) & 8191L);
values[valuesOffset++] = (int) ((block8 >>> 17) & 8191L);
values[valuesOffset++] = (int) ((block8 >>> 4) & 8191L);
final long block9 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block8 & 15L) << 9) | (block9 >>> 55));
values[valuesOffset++] = (int) ((block9 >>> 42) & 8191L);
values[valuesOffset++] = (int) ((block9 >>> 29) & 8191L);
values[valuesOffset++] = (int) ((block9 >>> 16) & 8191L);
values[valuesOffset++] = (int) ((block9 >>> 3) & 8191L);
final long block10 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block9 & 7L) << 10) | (block10 >>> 54));
values[valuesOffset++] = (int) ((block10 >>> 41) & 8191L);
values[valuesOffset++] = (int) ((block10 >>> 28) & 8191L);
values[valuesOffset++] = (int) ((block10 >>> 15) & 8191L);
values[valuesOffset++] = (int) ((block10 >>> 2) & 8191L);
final long block11 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block10 & 3L) << 11) | (block11 >>> 53));
values[valuesOffset++] = (int) ((block11 >>> 40) & 8191L);
values[valuesOffset++] = (int) ((block11 >>> 27) & 8191L);
values[valuesOffset++] = (int) ((block11 >>> 14) & 8191L);
values[valuesOffset++] = (int) ((block11 >>> 1) & 8191L);
final long block12 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block11 & 1L) << 12) | (block12 >>> 52));
values[valuesOffset++] = (int) ((block12 >>> 39) & 8191L);
values[valuesOffset++] = (int) ((block12 >>> 26) & 8191L);
values[valuesOffset++] = (int) ((block12 >>> 13) & 8191L);
values[valuesOffset++] = (int) (block12 & 8191L);
}
@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 >>> 51);
values[valuesOffset++] = (int) ((block0 >>> 38) & 8191L);
values[valuesOffset++] = (int) ((block0 >>> 25) & 8191L);
values[valuesOffset++] = (int) ((block0 >>> 12) & 8191L);
final long block1 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block0 & 4095L) << 1) | (block1 >>> 63));
values[valuesOffset++] = (int) ((block1 >>> 50) & 8191L);
values[valuesOffset++] = (int) ((block1 >>> 37) & 8191L);
values[valuesOffset++] = (int) ((block1 >>> 24) & 8191L);
values[valuesOffset++] = (int) ((block1 >>> 11) & 8191L);
final long block2 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block1 & 2047L) << 2) | (block2 >>> 62));
values[valuesOffset++] = (int) ((block2 >>> 49) & 8191L);
values[valuesOffset++] = (int) ((block2 >>> 36) & 8191L);
values[valuesOffset++] = (int) ((block2 >>> 23) & 8191L);
values[valuesOffset++] = (int) ((block2 >>> 10) & 8191L);
final long block3 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block2 & 1023L) << 3) | (block3 >>> 61));
values[valuesOffset++] = (int) ((block3 >>> 48) & 8191L);
values[valuesOffset++] = (int) ((block3 >>> 35) & 8191L);
values[valuesOffset++] = (int) ((block3 >>> 22) & 8191L);
values[valuesOffset++] = (int) ((block3 >>> 9) & 8191L);
final long block4 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block3 & 511L) << 4) | (block4 >>> 60));
values[valuesOffset++] = (int) ((block4 >>> 47) & 8191L);
values[valuesOffset++] = (int) ((block4 >>> 34) & 8191L);
values[valuesOffset++] = (int) ((block4 >>> 21) & 8191L);
values[valuesOffset++] = (int) ((block4 >>> 8) & 8191L);
final long block5 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block4 & 255L) << 5) | (block5 >>> 59));
values[valuesOffset++] = (int) ((block5 >>> 46) & 8191L);
values[valuesOffset++] = (int) ((block5 >>> 33) & 8191L);
values[valuesOffset++] = (int) ((block5 >>> 20) & 8191L);
values[valuesOffset++] = (int) ((block5 >>> 7) & 8191L);
final long block6 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block5 & 127L) << 6) | (block6 >>> 58));
values[valuesOffset++] = (int) ((block6 >>> 45) & 8191L);
values[valuesOffset++] = (int) ((block6 >>> 32) & 8191L);
values[valuesOffset++] = (int) ((block6 >>> 19) & 8191L);
values[valuesOffset++] = (int) ((block6 >>> 6) & 8191L);
final long block7 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block6 & 63L) << 7) | (block7 >>> 57));
values[valuesOffset++] = (int) ((block7 >>> 44) & 8191L);
values[valuesOffset++] = (int) ((block7 >>> 31) & 8191L);
values[valuesOffset++] = (int) ((block7 >>> 18) & 8191L);
values[valuesOffset++] = (int) ((block7 >>> 5) & 8191L);
final long block8 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block7 & 31L) << 8) | (block8 >>> 56));
values[valuesOffset++] = (int) ((block8 >>> 43) & 8191L);
values[valuesOffset++] = (int) ((block8 >>> 30) & 8191L);
values[valuesOffset++] = (int) ((block8 >>> 17) & 8191L);
values[valuesOffset++] = (int) ((block8 >>> 4) & 8191L);
final long block9 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block8 & 15L) << 9) | (block9 >>> 55));
values[valuesOffset++] = (int) ((block9 >>> 42) & 8191L);
values[valuesOffset++] = (int) ((block9 >>> 29) & 8191L);
values[valuesOffset++] = (int) ((block9 >>> 16) & 8191L);
values[valuesOffset++] = (int) ((block9 >>> 3) & 8191L);
final long block10 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block9 & 7L) << 10) | (block10 >>> 54));
values[valuesOffset++] = (int) ((block10 >>> 41) & 8191L);
values[valuesOffset++] = (int) ((block10 >>> 28) & 8191L);
values[valuesOffset++] = (int) ((block10 >>> 15) & 8191L);
values[valuesOffset++] = (int) ((block10 >>> 2) & 8191L);
final long block11 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block10 & 3L) << 11) | (block11 >>> 53));
values[valuesOffset++] = (int) ((block11 >>> 40) & 8191L);
values[valuesOffset++] = (int) ((block11 >>> 27) & 8191L);
values[valuesOffset++] = (int) ((block11 >>> 14) & 8191L);
values[valuesOffset++] = (int) ((block11 >>> 1) & 8191L);
final long block12 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block11 & 1L) << 12) | (block12 >>> 52));
values[valuesOffset++] = (int) ((block12 >>> 39) & 8191L);
values[valuesOffset++] = (int) ((block12 >>> 26) & 8191L);
values[valuesOffset++] = (int) ((block12 >>> 13) & 8191L);
values[valuesOffset++] = (int) (block12 & 8191L);
}
}
@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 << 5) | (byte1 >>> 3);
final int byte2 = blocks[blocksOffset++] & 0xFF;
final int byte3 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte1 & 7) << 10) | (byte2 << 2) | (byte3 >>> 6);
final int byte4 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte3 & 63) << 7) | (byte4 >>> 1);
final int byte5 = blocks[blocksOffset++] & 0xFF;
final int byte6 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte4 & 1) << 12) | (byte5 << 4) | (byte6 >>> 4);
final int byte7 = blocks[blocksOffset++] & 0xFF;
final int byte8 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte6 & 15) << 9) | (byte7 << 1) | (byte8 >>> 7);
final int byte9 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte8 & 127) << 6) | (byte9 >>> 2);
final int byte10 = blocks[blocksOffset++] & 0xFF;
final int byte11 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte9 & 3) << 11) | (byte10 << 3) | (byte11 >>> 5);
final int byte12 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte11 & 31) << 8) | byte12;
final int byte13 = blocks[blocksOffset++] & 0xFF;
final int byte14 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte13 << 5) | (byte14 >>> 3);
final int byte15 = blocks[blocksOffset++] & 0xFF;
final int byte16 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte14 & 7) << 10) | (byte15 << 2) | (byte16 >>> 6);
final int byte17 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte16 & 63) << 7) | (byte17 >>> 1);
final int byte18 = blocks[blocksOffset++] & 0xFF;
final int byte19 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte17 & 1) << 12) | (byte18 << 4) | (byte19 >>> 4);
final int byte20 = blocks[blocksOffset++] & 0xFF;
final int byte21 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte19 & 15) << 9) | (byte20 << 1) | (byte21 >>> 7);
final int byte22 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte21 & 127) << 6) | (byte22 >>> 2);
final int byte23 = blocks[blocksOffset++] & 0xFF;
final int byte24 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte22 & 3) << 11) | (byte23 << 3) | (byte24 >>> 5);
final int byte25 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte24 & 31) << 8) | byte25;
final int byte26 = blocks[blocksOffset++] & 0xFF;
final int byte27 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte26 << 5) | (byte27 >>> 3);
final int byte28 = blocks[blocksOffset++] & 0xFF;
final int byte29 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte27 & 7) << 10) | (byte28 << 2) | (byte29 >>> 6);
final int byte30 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte29 & 63) << 7) | (byte30 >>> 1);
final int byte31 = blocks[blocksOffset++] & 0xFF;
final int byte32 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte30 & 1) << 12) | (byte31 << 4) | (byte32 >>> 4);
final int byte33 = blocks[blocksOffset++] & 0xFF;
final int byte34 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte32 & 15) << 9) | (byte33 << 1) | (byte34 >>> 7);
final int byte35 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte34 & 127) << 6) | (byte35 >>> 2);
final int byte36 = blocks[blocksOffset++] & 0xFF;
final int byte37 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte35 & 3) << 11) | (byte36 << 3) | (byte37 >>> 5);
final int byte38 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte37 & 31) << 8) | byte38;
final int byte39 = blocks[blocksOffset++] & 0xFF;
final int byte40 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte39 << 5) | (byte40 >>> 3);
final int byte41 = blocks[blocksOffset++] & 0xFF;
final int byte42 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte40 & 7) << 10) | (byte41 << 2) | (byte42 >>> 6);
final int byte43 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte42 & 63) << 7) | (byte43 >>> 1);
final int byte44 = blocks[blocksOffset++] & 0xFF;
final int byte45 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte43 & 1) << 12) | (byte44 << 4) | (byte45 >>> 4);
final int byte46 = blocks[blocksOffset++] & 0xFF;
final int byte47 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte45 & 15) << 9) | (byte46 << 1) | (byte47 >>> 7);
final int byte48 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte47 & 127) << 6) | (byte48 >>> 2);
final int byte49 = blocks[blocksOffset++] & 0xFF;
final int byte50 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte48 & 3) << 11) | (byte49 << 3) | (byte50 >>> 5);
final int byte51 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte50 & 31) << 8) | byte51;
final int byte52 = blocks[blocksOffset++] & 0xFF;
final int byte53 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte52 << 5) | (byte53 >>> 3);
final int byte54 = blocks[blocksOffset++] & 0xFF;
final int byte55 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte53 & 7) << 10) | (byte54 << 2) | (byte55 >>> 6);
final int byte56 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte55 & 63) << 7) | (byte56 >>> 1);
final int byte57 = blocks[blocksOffset++] & 0xFF;
final int byte58 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte56 & 1) << 12) | (byte57 << 4) | (byte58 >>> 4);
final int byte59 = blocks[blocksOffset++] & 0xFF;
final int byte60 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte58 & 15) << 9) | (byte59 << 1) | (byte60 >>> 7);
final int byte61 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte60 & 127) << 6) | (byte61 >>> 2);
final int byte62 = blocks[blocksOffset++] & 0xFF;
final int byte63 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte61 & 3) << 11) | (byte62 << 3) | (byte63 >>> 5);
final int byte64 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte63 & 31) << 8) | byte64;
final int byte65 = blocks[blocksOffset++] & 0xFF;
final int byte66 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte65 << 5) | (byte66 >>> 3);
final int byte67 = blocks[blocksOffset++] & 0xFF;
final int byte68 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte66 & 7) << 10) | (byte67 << 2) | (byte68 >>> 6);
final int byte69 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte68 & 63) << 7) | (byte69 >>> 1);
final int byte70 = blocks[blocksOffset++] & 0xFF;
final int byte71 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte69 & 1) << 12) | (byte70 << 4) | (byte71 >>> 4);
final int byte72 = blocks[blocksOffset++] & 0xFF;
final int byte73 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte71 & 15) << 9) | (byte72 << 1) | (byte73 >>> 7);
final int byte74 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte73 & 127) << 6) | (byte74 >>> 2);
final int byte75 = blocks[blocksOffset++] & 0xFF;
final int byte76 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte74 & 3) << 11) | (byte75 << 3) | (byte76 >>> 5);
final int byte77 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte76 & 31) << 8) | byte77;
final int byte78 = blocks[blocksOffset++] & 0xFF;
final int byte79 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte78 << 5) | (byte79 >>> 3);
final int byte80 = blocks[blocksOffset++] & 0xFF;
final int byte81 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte79 & 7) << 10) | (byte80 << 2) | (byte81 >>> 6);
final int byte82 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte81 & 63) << 7) | (byte82 >>> 1);
final int byte83 = blocks[blocksOffset++] & 0xFF;
final int byte84 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte82 & 1) << 12) | (byte83 << 4) | (byte84 >>> 4);
final int byte85 = blocks[blocksOffset++] & 0xFF;
final int byte86 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte84 & 15) << 9) | (byte85 << 1) | (byte86 >>> 7);
final int byte87 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte86 & 127) << 6) | (byte87 >>> 2);
final int byte88 = blocks[blocksOffset++] & 0xFF;
final int byte89 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte87 & 3) << 11) | (byte88 << 3) | (byte89 >>> 5);
final int byte90 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte89 & 31) << 8) | byte90;
final int byte91 = blocks[blocksOffset++] & 0xFF;
final int byte92 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte91 << 5) | (byte92 >>> 3);
final int byte93 = blocks[blocksOffset++] & 0xFF;
final int byte94 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte92 & 7) << 10) | (byte93 << 2) | (byte94 >>> 6);
final int byte95 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte94 & 63) << 7) | (byte95 >>> 1);
final int byte96 = blocks[blocksOffset++] & 0xFF;
final int byte97 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte95 & 1) << 12) | (byte96 << 4) | (byte97 >>> 4);
final int byte98 = blocks[blocksOffset++] & 0xFF;
final int byte99 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte97 & 15) << 9) | (byte98 << 1) | (byte99 >>> 7);
final int byte100 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte99 & 127) << 6) | (byte100 >>> 2);
final int byte101 = blocks[blocksOffset++] & 0xFF;
final int byte102 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte100 & 3) << 11) | (byte101 << 3) | (byte102 >>> 5);
final int byte103 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte102 & 31) << 8) | byte103;
}
@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 << 5) | (byte1 >>> 3);
final int byte2 = blocks[blocksOffset++] & 0xFF;
final int byte3 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte1 & 7) << 10) | (byte2 << 2) | (byte3 >>> 6);
final int byte4 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte3 & 63) << 7) | (byte4 >>> 1);
final int byte5 = blocks[blocksOffset++] & 0xFF;
final int byte6 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte4 & 1) << 12) | (byte5 << 4) | (byte6 >>> 4);
final int byte7 = blocks[blocksOffset++] & 0xFF;
final int byte8 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte6 & 15) << 9) | (byte7 << 1) | (byte8 >>> 7);
final int byte9 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte8 & 127) << 6) | (byte9 >>> 2);
final int byte10 = blocks[blocksOffset++] & 0xFF;
final int byte11 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte9 & 3) << 11) | (byte10 << 3) | (byte11 >>> 5);
final int byte12 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte11 & 31) << 8) | byte12;
}
}
@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 >>> 51;
values[valuesOffset++] = (block0 >>> 38) & 8191L;
values[valuesOffset++] = (block0 >>> 25) & 8191L;
values[valuesOffset++] = (block0 >>> 12) & 8191L;
final long block1 = blocks[blocksOffset++];
values[valuesOffset++] = ((block0 & 4095L) << 1) | (block1 >>> 63);
values[valuesOffset++] = (block1 >>> 50) & 8191L;
values[valuesOffset++] = (block1 >>> 37) & 8191L;
values[valuesOffset++] = (block1 >>> 24) & 8191L;
values[valuesOffset++] = (block1 >>> 11) & 8191L;
final long block2 = blocks[blocksOffset++];
values[valuesOffset++] = ((block1 & 2047L) << 2) | (block2 >>> 62);
values[valuesOffset++] = (block2 >>> 49) & 8191L;
values[valuesOffset++] = (block2 >>> 36) & 8191L;
values[valuesOffset++] = (block2 >>> 23) & 8191L;
values[valuesOffset++] = (block2 >>> 10) & 8191L;
final long block3 = blocks[blocksOffset++];
values[valuesOffset++] = ((block2 & 1023L) << 3) | (block3 >>> 61);
values[valuesOffset++] = (block3 >>> 48) & 8191L;
values[valuesOffset++] = (block3 >>> 35) & 8191L;
values[valuesOffset++] = (block3 >>> 22) & 8191L;
values[valuesOffset++] = (block3 >>> 9) & 8191L;
final long block4 = blocks[blocksOffset++];
values[valuesOffset++] = ((block3 & 511L) << 4) | (block4 >>> 60);
values[valuesOffset++] = (block4 >>> 47) & 8191L;
values[valuesOffset++] = (block4 >>> 34) & 8191L;
values[valuesOffset++] = (block4 >>> 21) & 8191L;
values[valuesOffset++] = (block4 >>> 8) & 8191L;
final long block5 = blocks[blocksOffset++];
values[valuesOffset++] = ((block4 & 255L) << 5) | (block5 >>> 59);
values[valuesOffset++] = (block5 >>> 46) & 8191L;
values[valuesOffset++] = (block5 >>> 33) & 8191L;
values[valuesOffset++] = (block5 >>> 20) & 8191L;
values[valuesOffset++] = (block5 >>> 7) & 8191L;
final long block6 = blocks[blocksOffset++];
values[valuesOffset++] = ((block5 & 127L) << 6) | (block6 >>> 58);
values[valuesOffset++] = (block6 >>> 45) & 8191L;
values[valuesOffset++] = (block6 >>> 32) & 8191L;
values[valuesOffset++] = (block6 >>> 19) & 8191L;
values[valuesOffset++] = (block6 >>> 6) & 8191L;
final long block7 = blocks[blocksOffset++];
values[valuesOffset++] = ((block6 & 63L) << 7) | (block7 >>> 57);
values[valuesOffset++] = (block7 >>> 44) & 8191L;
values[valuesOffset++] = (block7 >>> 31) & 8191L;
values[valuesOffset++] = (block7 >>> 18) & 8191L;
values[valuesOffset++] = (block7 >>> 5) & 8191L;
final long block8 = blocks[blocksOffset++];
values[valuesOffset++] = ((block7 & 31L) << 8) | (block8 >>> 56);
values[valuesOffset++] = (block8 >>> 43) & 8191L;
values[valuesOffset++] = (block8 >>> 30) & 8191L;
values[valuesOffset++] = (block8 >>> 17) & 8191L;
values[valuesOffset++] = (block8 >>> 4) & 8191L;
final long block9 = blocks[blocksOffset++];
values[valuesOffset++] = ((block8 & 15L) << 9) | (block9 >>> 55);
values[valuesOffset++] = (block9 >>> 42) & 8191L;
values[valuesOffset++] = (block9 >>> 29) & 8191L;
values[valuesOffset++] = (block9 >>> 16) & 8191L;
values[valuesOffset++] = (block9 >>> 3) & 8191L;
final long block10 = blocks[blocksOffset++];
values[valuesOffset++] = ((block9 & 7L) << 10) | (block10 >>> 54);
values[valuesOffset++] = (block10 >>> 41) & 8191L;
values[valuesOffset++] = (block10 >>> 28) & 8191L;
values[valuesOffset++] = (block10 >>> 15) & 8191L;
values[valuesOffset++] = (block10 >>> 2) & 8191L;
final long block11 = blocks[blocksOffset++];
values[valuesOffset++] = ((block10 & 3L) << 11) | (block11 >>> 53);
values[valuesOffset++] = (block11 >>> 40) & 8191L;
values[valuesOffset++] = (block11 >>> 27) & 8191L;
values[valuesOffset++] = (block11 >>> 14) & 8191L;
values[valuesOffset++] = (block11 >>> 1) & 8191L;
final long block12 = blocks[blocksOffset++];
values[valuesOffset++] = ((block11 & 1L) << 12) | (block12 >>> 52);
values[valuesOffset++] = (block12 >>> 39) & 8191L;
values[valuesOffset++] = (block12 >>> 26) & 8191L;
values[valuesOffset++] = (block12 >>> 13) & 8191L;
values[valuesOffset++] = block12 & 8191L;
}
@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 >>> 51;
values[valuesOffset++] = (block0 >>> 38) & 8191L;
values[valuesOffset++] = (block0 >>> 25) & 8191L;
values[valuesOffset++] = (block0 >>> 12) & 8191L;
final long block1 = blocks[blocksOffset++];
values[valuesOffset++] = ((block0 & 4095L) << 1) | (block1 >>> 63);
values[valuesOffset++] = (block1 >>> 50) & 8191L;
values[valuesOffset++] = (block1 >>> 37) & 8191L;
values[valuesOffset++] = (block1 >>> 24) & 8191L;
values[valuesOffset++] = (block1 >>> 11) & 8191L;
final long block2 = blocks[blocksOffset++];
values[valuesOffset++] = ((block1 & 2047L) << 2) | (block2 >>> 62);
values[valuesOffset++] = (block2 >>> 49) & 8191L;
values[valuesOffset++] = (block2 >>> 36) & 8191L;
values[valuesOffset++] = (block2 >>> 23) & 8191L;
values[valuesOffset++] = (block2 >>> 10) & 8191L;
final long block3 = blocks[blocksOffset++];
values[valuesOffset++] = ((block2 & 1023L) << 3) | (block3 >>> 61);
values[valuesOffset++] = (block3 >>> 48) & 8191L;
values[valuesOffset++] = (block3 >>> 35) & 8191L;
values[valuesOffset++] = (block3 >>> 22) & 8191L;
values[valuesOffset++] = (block3 >>> 9) & 8191L;
final long block4 = blocks[blocksOffset++];
values[valuesOffset++] = ((block3 & 511L) << 4) | (block4 >>> 60);
values[valuesOffset++] = (block4 >>> 47) & 8191L;
values[valuesOffset++] = (block4 >>> 34) & 8191L;
values[valuesOffset++] = (block4 >>> 21) & 8191L;
values[valuesOffset++] = (block4 >>> 8) & 8191L;
final long block5 = blocks[blocksOffset++];
values[valuesOffset++] = ((block4 & 255L) << 5) | (block5 >>> 59);
values[valuesOffset++] = (block5 >>> 46) & 8191L;
values[valuesOffset++] = (block5 >>> 33) & 8191L;
values[valuesOffset++] = (block5 >>> 20) & 8191L;
values[valuesOffset++] = (block5 >>> 7) & 8191L;
final long block6 = blocks[blocksOffset++];
values[valuesOffset++] = ((block5 & 127L) << 6) | (block6 >>> 58);
values[valuesOffset++] = (block6 >>> 45) & 8191L;
values[valuesOffset++] = (block6 >>> 32) & 8191L;
values[valuesOffset++] = (block6 >>> 19) & 8191L;
values[valuesOffset++] = (block6 >>> 6) & 8191L;
final long block7 = blocks[blocksOffset++];
values[valuesOffset++] = ((block6 & 63L) << 7) | (block7 >>> 57);
values[valuesOffset++] = (block7 >>> 44) & 8191L;
values[valuesOffset++] = (block7 >>> 31) & 8191L;
values[valuesOffset++] = (block7 >>> 18) & 8191L;
values[valuesOffset++] = (block7 >>> 5) & 8191L;
final long block8 = blocks[blocksOffset++];
values[valuesOffset++] = ((block7 & 31L) << 8) | (block8 >>> 56);
values[valuesOffset++] = (block8 >>> 43) & 8191L;
values[valuesOffset++] = (block8 >>> 30) & 8191L;
values[valuesOffset++] = (block8 >>> 17) & 8191L;
values[valuesOffset++] = (block8 >>> 4) & 8191L;
final long block9 = blocks[blocksOffset++];
values[valuesOffset++] = ((block8 & 15L) << 9) | (block9 >>> 55);
values[valuesOffset++] = (block9 >>> 42) & 8191L;
values[valuesOffset++] = (block9 >>> 29) & 8191L;
values[valuesOffset++] = (block9 >>> 16) & 8191L;
values[valuesOffset++] = (block9 >>> 3) & 8191L;
final long block10 = blocks[blocksOffset++];
values[valuesOffset++] = ((block9 & 7L) << 10) | (block10 >>> 54);
values[valuesOffset++] = (block10 >>> 41) & 8191L;
values[valuesOffset++] = (block10 >>> 28) & 8191L;
values[valuesOffset++] = (block10 >>> 15) & 8191L;
values[valuesOffset++] = (block10 >>> 2) & 8191L;
final long block11 = blocks[blocksOffset++];
values[valuesOffset++] = ((block10 & 3L) << 11) | (block11 >>> 53);
values[valuesOffset++] = (block11 >>> 40) & 8191L;
values[valuesOffset++] = (block11 >>> 27) & 8191L;
values[valuesOffset++] = (block11 >>> 14) & 8191L;
values[valuesOffset++] = (block11 >>> 1) & 8191L;
final long block12 = blocks[blocksOffset++];
values[valuesOffset++] = ((block11 & 1L) << 12) | (block12 >>> 52);
values[valuesOffset++] = (block12 >>> 39) & 8191L;
values[valuesOffset++] = (block12 >>> 26) & 8191L;
values[valuesOffset++] = (block12 >>> 13) & 8191L;
values[valuesOffset++] = block12 & 8191L;
}
}
@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 << 5) | (byte1 >>> 3);
final long byte2 = blocks[blocksOffset++] & 0xFF;
final long byte3 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte1 & 7) << 10) | (byte2 << 2) | (byte3 >>> 6);
final long byte4 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte3 & 63) << 7) | (byte4 >>> 1);
final long byte5 = blocks[blocksOffset++] & 0xFF;
final long byte6 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte4 & 1) << 12) | (byte5 << 4) | (byte6 >>> 4);
final long byte7 = blocks[blocksOffset++] & 0xFF;
final long byte8 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte6 & 15) << 9) | (byte7 << 1) | (byte8 >>> 7);
final long byte9 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte8 & 127) << 6) | (byte9 >>> 2);
final long byte10 = blocks[blocksOffset++] & 0xFF;
final long byte11 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte9 & 3) << 11) | (byte10 << 3) | (byte11 >>> 5);
final long byte12 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte11 & 31) << 8) | byte12;
final long byte13 = blocks[blocksOffset++] & 0xFF;
final long byte14 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte13 << 5) | (byte14 >>> 3);
final long byte15 = blocks[blocksOffset++] & 0xFF;
final long byte16 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte14 & 7) << 10) | (byte15 << 2) | (byte16 >>> 6);
final long byte17 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte16 & 63) << 7) | (byte17 >>> 1);
final long byte18 = blocks[blocksOffset++] & 0xFF;
final long byte19 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte17 & 1) << 12) | (byte18 << 4) | (byte19 >>> 4);
final long byte20 = blocks[blocksOffset++] & 0xFF;
final long byte21 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte19 & 15) << 9) | (byte20 << 1) | (byte21 >>> 7);
final long byte22 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte21 & 127) << 6) | (byte22 >>> 2);
final long byte23 = blocks[blocksOffset++] & 0xFF;
final long byte24 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte22 & 3) << 11) | (byte23 << 3) | (byte24 >>> 5);
final long byte25 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte24 & 31) << 8) | byte25;
final long byte26 = blocks[blocksOffset++] & 0xFF;
final long byte27 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte26 << 5) | (byte27 >>> 3);
final long byte28 = blocks[blocksOffset++] & 0xFF;
final long byte29 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte27 & 7) << 10) | (byte28 << 2) | (byte29 >>> 6);
final long byte30 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte29 & 63) << 7) | (byte30 >>> 1);
final long byte31 = blocks[blocksOffset++] & 0xFF;
final long byte32 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte30 & 1) << 12) | (byte31 << 4) | (byte32 >>> 4);
final long byte33 = blocks[blocksOffset++] & 0xFF;
final long byte34 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte32 & 15) << 9) | (byte33 << 1) | (byte34 >>> 7);
final long byte35 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte34 & 127) << 6) | (byte35 >>> 2);
final long byte36 = blocks[blocksOffset++] & 0xFF;
final long byte37 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte35 & 3) << 11) | (byte36 << 3) | (byte37 >>> 5);
final long byte38 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte37 & 31) << 8) | byte38;
final long byte39 = blocks[blocksOffset++] & 0xFF;
final long byte40 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte39 << 5) | (byte40 >>> 3);
final long byte41 = blocks[blocksOffset++] & 0xFF;
final long byte42 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte40 & 7) << 10) | (byte41 << 2) | (byte42 >>> 6);
final long byte43 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte42 & 63) << 7) | (byte43 >>> 1);
final long byte44 = blocks[blocksOffset++] & 0xFF;
final long byte45 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte43 & 1) << 12) | (byte44 << 4) | (byte45 >>> 4);
final long byte46 = blocks[blocksOffset++] & 0xFF;
final long byte47 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte45 & 15) << 9) | (byte46 << 1) | (byte47 >>> 7);
final long byte48 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte47 & 127) << 6) | (byte48 >>> 2);
final long byte49 = blocks[blocksOffset++] & 0xFF;
final long byte50 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte48 & 3) << 11) | (byte49 << 3) | (byte50 >>> 5);
final long byte51 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte50 & 31) << 8) | byte51;
final long byte52 = blocks[blocksOffset++] & 0xFF;
final long byte53 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte52 << 5) | (byte53 >>> 3);
final long byte54 = blocks[blocksOffset++] & 0xFF;
final long byte55 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte53 & 7) << 10) | (byte54 << 2) | (byte55 >>> 6);
final long byte56 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte55 & 63) << 7) | (byte56 >>> 1);
final long byte57 = blocks[blocksOffset++] & 0xFF;
final long byte58 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte56 & 1) << 12) | (byte57 << 4) | (byte58 >>> 4);
final long byte59 = blocks[blocksOffset++] & 0xFF;
final long byte60 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte58 & 15) << 9) | (byte59 << 1) | (byte60 >>> 7);
final long byte61 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte60 & 127) << 6) | (byte61 >>> 2);
final long byte62 = blocks[blocksOffset++] & 0xFF;
final long byte63 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte61 & 3) << 11) | (byte62 << 3) | (byte63 >>> 5);
final long byte64 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte63 & 31) << 8) | byte64;
final long byte65 = blocks[blocksOffset++] & 0xFF;
final long byte66 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte65 << 5) | (byte66 >>> 3);
final long byte67 = blocks[blocksOffset++] & 0xFF;
final long byte68 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte66 & 7) << 10) | (byte67 << 2) | (byte68 >>> 6);
final long byte69 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte68 & 63) << 7) | (byte69 >>> 1);
final long byte70 = blocks[blocksOffset++] & 0xFF;
final long byte71 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte69 & 1) << 12) | (byte70 << 4) | (byte71 >>> 4);
final long byte72 = blocks[blocksOffset++] & 0xFF;
final long byte73 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte71 & 15) << 9) | (byte72 << 1) | (byte73 >>> 7);
final long byte74 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte73 & 127) << 6) | (byte74 >>> 2);
final long byte75 = blocks[blocksOffset++] & 0xFF;
final long byte76 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte74 & 3) << 11) | (byte75 << 3) | (byte76 >>> 5);
final long byte77 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte76 & 31) << 8) | byte77;
final long byte78 = blocks[blocksOffset++] & 0xFF;
final long byte79 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte78 << 5) | (byte79 >>> 3);
final long byte80 = blocks[blocksOffset++] & 0xFF;
final long byte81 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte79 & 7) << 10) | (byte80 << 2) | (byte81 >>> 6);
final long byte82 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte81 & 63) << 7) | (byte82 >>> 1);
final long byte83 = blocks[blocksOffset++] & 0xFF;
final long byte84 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte82 & 1) << 12) | (byte83 << 4) | (byte84 >>> 4);
final long byte85 = blocks[blocksOffset++] & 0xFF;
final long byte86 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte84 & 15) << 9) | (byte85 << 1) | (byte86 >>> 7);
final long byte87 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte86 & 127) << 6) | (byte87 >>> 2);
final long byte88 = blocks[blocksOffset++] & 0xFF;
final long byte89 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte87 & 3) << 11) | (byte88 << 3) | (byte89 >>> 5);
final long byte90 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte89 & 31) << 8) | byte90;
final long byte91 = blocks[blocksOffset++] & 0xFF;
final long byte92 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte91 << 5) | (byte92 >>> 3);
final long byte93 = blocks[blocksOffset++] & 0xFF;
final long byte94 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte92 & 7) << 10) | (byte93 << 2) | (byte94 >>> 6);
final long byte95 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte94 & 63) << 7) | (byte95 >>> 1);
final long byte96 = blocks[blocksOffset++] & 0xFF;
final long byte97 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte95 & 1) << 12) | (byte96 << 4) | (byte97 >>> 4);
final long byte98 = blocks[blocksOffset++] & 0xFF;
final long byte99 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte97 & 15) << 9) | (byte98 << 1) | (byte99 >>> 7);
final long byte100 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte99 & 127) << 6) | (byte100 >>> 2);
final long byte101 = blocks[blocksOffset++] & 0xFF;
final long byte102 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte100 & 3) << 11) | (byte101 << 3) | (byte102 >>> 5);
final long byte103 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte102 & 31) << 8) | byte103;
}
@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 << 5) | (byte1 >>> 3);
final long byte2 = blocks[blocksOffset++] & 0xFF;
final long byte3 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte1 & 7) << 10) | (byte2 << 2) | (byte3 >>> 6);
final long byte4 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte3 & 63) << 7) | (byte4 >>> 1);
final long byte5 = blocks[blocksOffset++] & 0xFF;
final long byte6 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte4 & 1) << 12) | (byte5 << 4) | (byte6 >>> 4);
final long byte7 = blocks[blocksOffset++] & 0xFF;
final long byte8 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte6 & 15) << 9) | (byte7 << 1) | (byte8 >>> 7);
final long byte9 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte8 & 127) << 6) | (byte9 >>> 2);
final long byte10 = blocks[blocksOffset++] & 0xFF;
final long byte11 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte9 & 3) << 11) | (byte10 << 3) | (byte11 >>> 5);
final long byte12 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte11 & 31) << 8) | byte12;
}
}
}

View File

@ -24,296 +24,134 @@ package org.apache.lucene.util.packed;
*/
final class BulkOperationPacked14 extends BulkOperationPacked {
public BulkOperationPacked14() {
super(14);
assert blockCount() == 7;
assert valueCount() == 32;
}
public BulkOperationPacked14() {
super(14);
assert blockCount() == 7;
assert valueCount() == 32;
}
@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 >>> 50);
values[valuesOffset++] = (int) ((block0 >>> 36) & 16383L);
values[valuesOffset++] = (int) ((block0 >>> 22) & 16383L);
values[valuesOffset++] = (int) ((block0 >>> 8) & 16383L);
final long block1 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block0 & 255L) << 6) | (block1 >>> 58));
values[valuesOffset++] = (int) ((block1 >>> 44) & 16383L);
values[valuesOffset++] = (int) ((block1 >>> 30) & 16383L);
values[valuesOffset++] = (int) ((block1 >>> 16) & 16383L);
values[valuesOffset++] = (int) ((block1 >>> 2) & 16383L);
final long block2 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block1 & 3L) << 12) | (block2 >>> 52));
values[valuesOffset++] = (int) ((block2 >>> 38) & 16383L);
values[valuesOffset++] = (int) ((block2 >>> 24) & 16383L);
values[valuesOffset++] = (int) ((block2 >>> 10) & 16383L);
final long block3 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block2 & 1023L) << 4) | (block3 >>> 60));
values[valuesOffset++] = (int) ((block3 >>> 46) & 16383L);
values[valuesOffset++] = (int) ((block3 >>> 32) & 16383L);
values[valuesOffset++] = (int) ((block3 >>> 18) & 16383L);
values[valuesOffset++] = (int) ((block3 >>> 4) & 16383L);
final long block4 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block3 & 15L) << 10) | (block4 >>> 54));
values[valuesOffset++] = (int) ((block4 >>> 40) & 16383L);
values[valuesOffset++] = (int) ((block4 >>> 26) & 16383L);
values[valuesOffset++] = (int) ((block4 >>> 12) & 16383L);
final long block5 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block4 & 4095L) << 2) | (block5 >>> 62));
values[valuesOffset++] = (int) ((block5 >>> 48) & 16383L);
values[valuesOffset++] = (int) ((block5 >>> 34) & 16383L);
values[valuesOffset++] = (int) ((block5 >>> 20) & 16383L);
values[valuesOffset++] = (int) ((block5 >>> 6) & 16383L);
final long block6 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block5 & 63L) << 8) | (block6 >>> 56));
values[valuesOffset++] = (int) ((block6 >>> 42) & 16383L);
values[valuesOffset++] = (int) ((block6 >>> 28) & 16383L);
values[valuesOffset++] = (int) ((block6 >>> 14) & 16383L);
values[valuesOffset++] = (int) (block6 & 16383L);
}
@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 >>> 50);
values[valuesOffset++] = (int) ((block0 >>> 36) & 16383L);
values[valuesOffset++] = (int) ((block0 >>> 22) & 16383L);
values[valuesOffset++] = (int) ((block0 >>> 8) & 16383L);
final long block1 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block0 & 255L) << 6) | (block1 >>> 58));
values[valuesOffset++] = (int) ((block1 >>> 44) & 16383L);
values[valuesOffset++] = (int) ((block1 >>> 30) & 16383L);
values[valuesOffset++] = (int) ((block1 >>> 16) & 16383L);
values[valuesOffset++] = (int) ((block1 >>> 2) & 16383L);
final long block2 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block1 & 3L) << 12) | (block2 >>> 52));
values[valuesOffset++] = (int) ((block2 >>> 38) & 16383L);
values[valuesOffset++] = (int) ((block2 >>> 24) & 16383L);
values[valuesOffset++] = (int) ((block2 >>> 10) & 16383L);
final long block3 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block2 & 1023L) << 4) | (block3 >>> 60));
values[valuesOffset++] = (int) ((block3 >>> 46) & 16383L);
values[valuesOffset++] = (int) ((block3 >>> 32) & 16383L);
values[valuesOffset++] = (int) ((block3 >>> 18) & 16383L);
values[valuesOffset++] = (int) ((block3 >>> 4) & 16383L);
final long block4 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block3 & 15L) << 10) | (block4 >>> 54));
values[valuesOffset++] = (int) ((block4 >>> 40) & 16383L);
values[valuesOffset++] = (int) ((block4 >>> 26) & 16383L);
values[valuesOffset++] = (int) ((block4 >>> 12) & 16383L);
final long block5 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block4 & 4095L) << 2) | (block5 >>> 62));
values[valuesOffset++] = (int) ((block5 >>> 48) & 16383L);
values[valuesOffset++] = (int) ((block5 >>> 34) & 16383L);
values[valuesOffset++] = (int) ((block5 >>> 20) & 16383L);
values[valuesOffset++] = (int) ((block5 >>> 6) & 16383L);
final long block6 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block5 & 63L) << 8) | (block6 >>> 56));
values[valuesOffset++] = (int) ((block6 >>> 42) & 16383L);
values[valuesOffset++] = (int) ((block6 >>> 28) & 16383L);
values[valuesOffset++] = (int) ((block6 >>> 14) & 16383L);
values[valuesOffset++] = (int) (block6 & 16383L);
}
}
@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 << 6) | (byte1 >>> 2);
final int byte2 = blocks[blocksOffset++] & 0xFF;
final int byte3 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte1 & 3) << 12) | (byte2 << 4) | (byte3 >>> 4);
final int byte4 = blocks[blocksOffset++] & 0xFF;
final int byte5 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte3 & 15) << 10) | (byte4 << 2) | (byte5 >>> 6);
final int byte6 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte5 & 63) << 8) | byte6;
final int byte7 = blocks[blocksOffset++] & 0xFF;
final int byte8 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte7 << 6) | (byte8 >>> 2);
final int byte9 = blocks[blocksOffset++] & 0xFF;
final int byte10 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte8 & 3) << 12) | (byte9 << 4) | (byte10 >>> 4);
final int byte11 = blocks[blocksOffset++] & 0xFF;
final int byte12 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte10 & 15) << 10) | (byte11 << 2) | (byte12 >>> 6);
final int byte13 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte12 & 63) << 8) | byte13;
final int byte14 = blocks[blocksOffset++] & 0xFF;
final int byte15 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte14 << 6) | (byte15 >>> 2);
final int byte16 = blocks[blocksOffset++] & 0xFF;
final int byte17 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte15 & 3) << 12) | (byte16 << 4) | (byte17 >>> 4);
final int byte18 = blocks[blocksOffset++] & 0xFF;
final int byte19 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte17 & 15) << 10) | (byte18 << 2) | (byte19 >>> 6);
final int byte20 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte19 & 63) << 8) | byte20;
final int byte21 = blocks[blocksOffset++] & 0xFF;
final int byte22 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte21 << 6) | (byte22 >>> 2);
final int byte23 = blocks[blocksOffset++] & 0xFF;
final int byte24 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte22 & 3) << 12) | (byte23 << 4) | (byte24 >>> 4);
final int byte25 = blocks[blocksOffset++] & 0xFF;
final int byte26 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte24 & 15) << 10) | (byte25 << 2) | (byte26 >>> 6);
final int byte27 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte26 & 63) << 8) | byte27;
final int byte28 = blocks[blocksOffset++] & 0xFF;
final int byte29 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte28 << 6) | (byte29 >>> 2);
final int byte30 = blocks[blocksOffset++] & 0xFF;
final int byte31 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte29 & 3) << 12) | (byte30 << 4) | (byte31 >>> 4);
final int byte32 = blocks[blocksOffset++] & 0xFF;
final int byte33 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte31 & 15) << 10) | (byte32 << 2) | (byte33 >>> 6);
final int byte34 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte33 & 63) << 8) | byte34;
final int byte35 = blocks[blocksOffset++] & 0xFF;
final int byte36 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte35 << 6) | (byte36 >>> 2);
final int byte37 = blocks[blocksOffset++] & 0xFF;
final int byte38 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte36 & 3) << 12) | (byte37 << 4) | (byte38 >>> 4);
final int byte39 = blocks[blocksOffset++] & 0xFF;
final int byte40 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte38 & 15) << 10) | (byte39 << 2) | (byte40 >>> 6);
final int byte41 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte40 & 63) << 8) | byte41;
final int byte42 = blocks[blocksOffset++] & 0xFF;
final int byte43 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte42 << 6) | (byte43 >>> 2);
final int byte44 = blocks[blocksOffset++] & 0xFF;
final int byte45 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte43 & 3) << 12) | (byte44 << 4) | (byte45 >>> 4);
final int byte46 = blocks[blocksOffset++] & 0xFF;
final int byte47 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte45 & 15) << 10) | (byte46 << 2) | (byte47 >>> 6);
final int byte48 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte47 & 63) << 8) | byte48;
final int byte49 = blocks[blocksOffset++] & 0xFF;
final int byte50 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte49 << 6) | (byte50 >>> 2);
final int byte51 = blocks[blocksOffset++] & 0xFF;
final int byte52 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte50 & 3) << 12) | (byte51 << 4) | (byte52 >>> 4);
final int byte53 = blocks[blocksOffset++] & 0xFF;
final int byte54 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte52 & 15) << 10) | (byte53 << 2) | (byte54 >>> 6);
final int byte55 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte54 & 63) << 8) | byte55;
}
@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 << 6) | (byte1 >>> 2);
final int byte2 = blocks[blocksOffset++] & 0xFF;
final int byte3 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte1 & 3) << 12) | (byte2 << 4) | (byte3 >>> 4);
final int byte4 = blocks[blocksOffset++] & 0xFF;
final int byte5 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte3 & 15) << 10) | (byte4 << 2) | (byte5 >>> 6);
final int byte6 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte5 & 63) << 8) | byte6;
}
}
@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 >>> 50;
values[valuesOffset++] = (block0 >>> 36) & 16383L;
values[valuesOffset++] = (block0 >>> 22) & 16383L;
values[valuesOffset++] = (block0 >>> 8) & 16383L;
final long block1 = blocks[blocksOffset++];
values[valuesOffset++] = ((block0 & 255L) << 6) | (block1 >>> 58);
values[valuesOffset++] = (block1 >>> 44) & 16383L;
values[valuesOffset++] = (block1 >>> 30) & 16383L;
values[valuesOffset++] = (block1 >>> 16) & 16383L;
values[valuesOffset++] = (block1 >>> 2) & 16383L;
final long block2 = blocks[blocksOffset++];
values[valuesOffset++] = ((block1 & 3L) << 12) | (block2 >>> 52);
values[valuesOffset++] = (block2 >>> 38) & 16383L;
values[valuesOffset++] = (block2 >>> 24) & 16383L;
values[valuesOffset++] = (block2 >>> 10) & 16383L;
final long block3 = blocks[blocksOffset++];
values[valuesOffset++] = ((block2 & 1023L) << 4) | (block3 >>> 60);
values[valuesOffset++] = (block3 >>> 46) & 16383L;
values[valuesOffset++] = (block3 >>> 32) & 16383L;
values[valuesOffset++] = (block3 >>> 18) & 16383L;
values[valuesOffset++] = (block3 >>> 4) & 16383L;
final long block4 = blocks[blocksOffset++];
values[valuesOffset++] = ((block3 & 15L) << 10) | (block4 >>> 54);
values[valuesOffset++] = (block4 >>> 40) & 16383L;
values[valuesOffset++] = (block4 >>> 26) & 16383L;
values[valuesOffset++] = (block4 >>> 12) & 16383L;
final long block5 = blocks[blocksOffset++];
values[valuesOffset++] = ((block4 & 4095L) << 2) | (block5 >>> 62);
values[valuesOffset++] = (block5 >>> 48) & 16383L;
values[valuesOffset++] = (block5 >>> 34) & 16383L;
values[valuesOffset++] = (block5 >>> 20) & 16383L;
values[valuesOffset++] = (block5 >>> 6) & 16383L;
final long block6 = blocks[blocksOffset++];
values[valuesOffset++] = ((block5 & 63L) << 8) | (block6 >>> 56);
values[valuesOffset++] = (block6 >>> 42) & 16383L;
values[valuesOffset++] = (block6 >>> 28) & 16383L;
values[valuesOffset++] = (block6 >>> 14) & 16383L;
values[valuesOffset++] = block6 & 16383L;
}
@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 >>> 50;
values[valuesOffset++] = (block0 >>> 36) & 16383L;
values[valuesOffset++] = (block0 >>> 22) & 16383L;
values[valuesOffset++] = (block0 >>> 8) & 16383L;
final long block1 = blocks[blocksOffset++];
values[valuesOffset++] = ((block0 & 255L) << 6) | (block1 >>> 58);
values[valuesOffset++] = (block1 >>> 44) & 16383L;
values[valuesOffset++] = (block1 >>> 30) & 16383L;
values[valuesOffset++] = (block1 >>> 16) & 16383L;
values[valuesOffset++] = (block1 >>> 2) & 16383L;
final long block2 = blocks[blocksOffset++];
values[valuesOffset++] = ((block1 & 3L) << 12) | (block2 >>> 52);
values[valuesOffset++] = (block2 >>> 38) & 16383L;
values[valuesOffset++] = (block2 >>> 24) & 16383L;
values[valuesOffset++] = (block2 >>> 10) & 16383L;
final long block3 = blocks[blocksOffset++];
values[valuesOffset++] = ((block2 & 1023L) << 4) | (block3 >>> 60);
values[valuesOffset++] = (block3 >>> 46) & 16383L;
values[valuesOffset++] = (block3 >>> 32) & 16383L;
values[valuesOffset++] = (block3 >>> 18) & 16383L;
values[valuesOffset++] = (block3 >>> 4) & 16383L;
final long block4 = blocks[blocksOffset++];
values[valuesOffset++] = ((block3 & 15L) << 10) | (block4 >>> 54);
values[valuesOffset++] = (block4 >>> 40) & 16383L;
values[valuesOffset++] = (block4 >>> 26) & 16383L;
values[valuesOffset++] = (block4 >>> 12) & 16383L;
final long block5 = blocks[blocksOffset++];
values[valuesOffset++] = ((block4 & 4095L) << 2) | (block5 >>> 62);
values[valuesOffset++] = (block5 >>> 48) & 16383L;
values[valuesOffset++] = (block5 >>> 34) & 16383L;
values[valuesOffset++] = (block5 >>> 20) & 16383L;
values[valuesOffset++] = (block5 >>> 6) & 16383L;
final long block6 = blocks[blocksOffset++];
values[valuesOffset++] = ((block5 & 63L) << 8) | (block6 >>> 56);
values[valuesOffset++] = (block6 >>> 42) & 16383L;
values[valuesOffset++] = (block6 >>> 28) & 16383L;
values[valuesOffset++] = (block6 >>> 14) & 16383L;
values[valuesOffset++] = block6 & 16383L;
}
}
@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 << 6) | (byte1 >>> 2);
final long byte2 = blocks[blocksOffset++] & 0xFF;
final long byte3 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte1 & 3) << 12) | (byte2 << 4) | (byte3 >>> 4);
final long byte4 = blocks[blocksOffset++] & 0xFF;
final long byte5 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte3 & 15) << 10) | (byte4 << 2) | (byte5 >>> 6);
final long byte6 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte5 & 63) << 8) | byte6;
final long byte7 = blocks[blocksOffset++] & 0xFF;
final long byte8 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte7 << 6) | (byte8 >>> 2);
final long byte9 = blocks[blocksOffset++] & 0xFF;
final long byte10 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte8 & 3) << 12) | (byte9 << 4) | (byte10 >>> 4);
final long byte11 = blocks[blocksOffset++] & 0xFF;
final long byte12 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte10 & 15) << 10) | (byte11 << 2) | (byte12 >>> 6);
final long byte13 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte12 & 63) << 8) | byte13;
final long byte14 = blocks[blocksOffset++] & 0xFF;
final long byte15 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte14 << 6) | (byte15 >>> 2);
final long byte16 = blocks[blocksOffset++] & 0xFF;
final long byte17 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte15 & 3) << 12) | (byte16 << 4) | (byte17 >>> 4);
final long byte18 = blocks[blocksOffset++] & 0xFF;
final long byte19 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte17 & 15) << 10) | (byte18 << 2) | (byte19 >>> 6);
final long byte20 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte19 & 63) << 8) | byte20;
final long byte21 = blocks[blocksOffset++] & 0xFF;
final long byte22 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte21 << 6) | (byte22 >>> 2);
final long byte23 = blocks[blocksOffset++] & 0xFF;
final long byte24 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte22 & 3) << 12) | (byte23 << 4) | (byte24 >>> 4);
final long byte25 = blocks[blocksOffset++] & 0xFF;
final long byte26 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte24 & 15) << 10) | (byte25 << 2) | (byte26 >>> 6);
final long byte27 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte26 & 63) << 8) | byte27;
final long byte28 = blocks[blocksOffset++] & 0xFF;
final long byte29 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte28 << 6) | (byte29 >>> 2);
final long byte30 = blocks[blocksOffset++] & 0xFF;
final long byte31 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte29 & 3) << 12) | (byte30 << 4) | (byte31 >>> 4);
final long byte32 = blocks[blocksOffset++] & 0xFF;
final long byte33 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte31 & 15) << 10) | (byte32 << 2) | (byte33 >>> 6);
final long byte34 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte33 & 63) << 8) | byte34;
final long byte35 = blocks[blocksOffset++] & 0xFF;
final long byte36 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte35 << 6) | (byte36 >>> 2);
final long byte37 = blocks[blocksOffset++] & 0xFF;
final long byte38 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte36 & 3) << 12) | (byte37 << 4) | (byte38 >>> 4);
final long byte39 = blocks[blocksOffset++] & 0xFF;
final long byte40 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte38 & 15) << 10) | (byte39 << 2) | (byte40 >>> 6);
final long byte41 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte40 & 63) << 8) | byte41;
final long byte42 = blocks[blocksOffset++] & 0xFF;
final long byte43 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte42 << 6) | (byte43 >>> 2);
final long byte44 = blocks[blocksOffset++] & 0xFF;
final long byte45 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte43 & 3) << 12) | (byte44 << 4) | (byte45 >>> 4);
final long byte46 = blocks[blocksOffset++] & 0xFF;
final long byte47 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte45 & 15) << 10) | (byte46 << 2) | (byte47 >>> 6);
final long byte48 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte47 & 63) << 8) | byte48;
final long byte49 = blocks[blocksOffset++] & 0xFF;
final long byte50 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte49 << 6) | (byte50 >>> 2);
final long byte51 = blocks[blocksOffset++] & 0xFF;
final long byte52 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte50 & 3) << 12) | (byte51 << 4) | (byte52 >>> 4);
final long byte53 = blocks[blocksOffset++] & 0xFF;
final long byte54 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte52 & 15) << 10) | (byte53 << 2) | (byte54 >>> 6);
final long byte55 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte54 & 63) << 8) | byte55;
}
@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 << 6) | (byte1 >>> 2);
final long byte2 = blocks[blocksOffset++] & 0xFF;
final long byte3 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte1 & 3) << 12) | (byte2 << 4) | (byte3 >>> 4);
final long byte4 = blocks[blocksOffset++] & 0xFF;
final long byte5 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte3 & 15) << 10) | (byte4 << 2) | (byte5 >>> 6);
final long byte6 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte5 & 63) << 8) | byte6;
}
}
}

View File

@ -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) {
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(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(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(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(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(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(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;
}
}
}

View File

@ -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;
}
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);
@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) {
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(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(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);
}
}
}

View File

@ -24,604 +24,246 @@ package org.apache.lucene.util.packed;
*/
final class BulkOperationPacked17 extends BulkOperationPacked {
public BulkOperationPacked17() {
super(17);
assert blockCount() == 17;
assert valueCount() == 64;
}
public BulkOperationPacked17() {
super(17);
assert blockCount() == 17;
assert valueCount() == 64;
}
@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 >>> 47);
values[valuesOffset++] = (int) ((block0 >>> 30) & 131071L);
values[valuesOffset++] = (int) ((block0 >>> 13) & 131071L);
final long block1 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block0 & 8191L) << 4) | (block1 >>> 60));
values[valuesOffset++] = (int) ((block1 >>> 43) & 131071L);
values[valuesOffset++] = (int) ((block1 >>> 26) & 131071L);
values[valuesOffset++] = (int) ((block1 >>> 9) & 131071L);
final long block2 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block1 & 511L) << 8) | (block2 >>> 56));
values[valuesOffset++] = (int) ((block2 >>> 39) & 131071L);
values[valuesOffset++] = (int) ((block2 >>> 22) & 131071L);
values[valuesOffset++] = (int) ((block2 >>> 5) & 131071L);
final long block3 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block2 & 31L) << 12) | (block3 >>> 52));
values[valuesOffset++] = (int) ((block3 >>> 35) & 131071L);
values[valuesOffset++] = (int) ((block3 >>> 18) & 131071L);
values[valuesOffset++] = (int) ((block3 >>> 1) & 131071L);
final long block4 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block3 & 1L) << 16) | (block4 >>> 48));
values[valuesOffset++] = (int) ((block4 >>> 31) & 131071L);
values[valuesOffset++] = (int) ((block4 >>> 14) & 131071L);
final long block5 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block4 & 16383L) << 3) | (block5 >>> 61));
values[valuesOffset++] = (int) ((block5 >>> 44) & 131071L);
values[valuesOffset++] = (int) ((block5 >>> 27) & 131071L);
values[valuesOffset++] = (int) ((block5 >>> 10) & 131071L);
final long block6 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block5 & 1023L) << 7) | (block6 >>> 57));
values[valuesOffset++] = (int) ((block6 >>> 40) & 131071L);
values[valuesOffset++] = (int) ((block6 >>> 23) & 131071L);
values[valuesOffset++] = (int) ((block6 >>> 6) & 131071L);
final long block7 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block6 & 63L) << 11) | (block7 >>> 53));
values[valuesOffset++] = (int) ((block7 >>> 36) & 131071L);
values[valuesOffset++] = (int) ((block7 >>> 19) & 131071L);
values[valuesOffset++] = (int) ((block7 >>> 2) & 131071L);
final long block8 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block7 & 3L) << 15) | (block8 >>> 49));
values[valuesOffset++] = (int) ((block8 >>> 32) & 131071L);
values[valuesOffset++] = (int) ((block8 >>> 15) & 131071L);
final long block9 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block8 & 32767L) << 2) | (block9 >>> 62));
values[valuesOffset++] = (int) ((block9 >>> 45) & 131071L);
values[valuesOffset++] = (int) ((block9 >>> 28) & 131071L);
values[valuesOffset++] = (int) ((block9 >>> 11) & 131071L);
final long block10 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block9 & 2047L) << 6) | (block10 >>> 58));
values[valuesOffset++] = (int) ((block10 >>> 41) & 131071L);
values[valuesOffset++] = (int) ((block10 >>> 24) & 131071L);
values[valuesOffset++] = (int) ((block10 >>> 7) & 131071L);
final long block11 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block10 & 127L) << 10) | (block11 >>> 54));
values[valuesOffset++] = (int) ((block11 >>> 37) & 131071L);
values[valuesOffset++] = (int) ((block11 >>> 20) & 131071L);
values[valuesOffset++] = (int) ((block11 >>> 3) & 131071L);
final long block12 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block11 & 7L) << 14) | (block12 >>> 50));
values[valuesOffset++] = (int) ((block12 >>> 33) & 131071L);
values[valuesOffset++] = (int) ((block12 >>> 16) & 131071L);
final long block13 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block12 & 65535L) << 1) | (block13 >>> 63));
values[valuesOffset++] = (int) ((block13 >>> 46) & 131071L);
values[valuesOffset++] = (int) ((block13 >>> 29) & 131071L);
values[valuesOffset++] = (int) ((block13 >>> 12) & 131071L);
final long block14 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block13 & 4095L) << 5) | (block14 >>> 59));
values[valuesOffset++] = (int) ((block14 >>> 42) & 131071L);
values[valuesOffset++] = (int) ((block14 >>> 25) & 131071L);
values[valuesOffset++] = (int) ((block14 >>> 8) & 131071L);
final long block15 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block14 & 255L) << 9) | (block15 >>> 55));
values[valuesOffset++] = (int) ((block15 >>> 38) & 131071L);
values[valuesOffset++] = (int) ((block15 >>> 21) & 131071L);
values[valuesOffset++] = (int) ((block15 >>> 4) & 131071L);
final long block16 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block15 & 15L) << 13) | (block16 >>> 51));
values[valuesOffset++] = (int) ((block16 >>> 34) & 131071L);
values[valuesOffset++] = (int) ((block16 >>> 17) & 131071L);
values[valuesOffset++] = (int) (block16 & 131071L);
}
@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 >>> 47);
values[valuesOffset++] = (int) ((block0 >>> 30) & 131071L);
values[valuesOffset++] = (int) ((block0 >>> 13) & 131071L);
final long block1 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block0 & 8191L) << 4) | (block1 >>> 60));
values[valuesOffset++] = (int) ((block1 >>> 43) & 131071L);
values[valuesOffset++] = (int) ((block1 >>> 26) & 131071L);
values[valuesOffset++] = (int) ((block1 >>> 9) & 131071L);
final long block2 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block1 & 511L) << 8) | (block2 >>> 56));
values[valuesOffset++] = (int) ((block2 >>> 39) & 131071L);
values[valuesOffset++] = (int) ((block2 >>> 22) & 131071L);
values[valuesOffset++] = (int) ((block2 >>> 5) & 131071L);
final long block3 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block2 & 31L) << 12) | (block3 >>> 52));
values[valuesOffset++] = (int) ((block3 >>> 35) & 131071L);
values[valuesOffset++] = (int) ((block3 >>> 18) & 131071L);
values[valuesOffset++] = (int) ((block3 >>> 1) & 131071L);
final long block4 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block3 & 1L) << 16) | (block4 >>> 48));
values[valuesOffset++] = (int) ((block4 >>> 31) & 131071L);
values[valuesOffset++] = (int) ((block4 >>> 14) & 131071L);
final long block5 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block4 & 16383L) << 3) | (block5 >>> 61));
values[valuesOffset++] = (int) ((block5 >>> 44) & 131071L);
values[valuesOffset++] = (int) ((block5 >>> 27) & 131071L);
values[valuesOffset++] = (int) ((block5 >>> 10) & 131071L);
final long block6 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block5 & 1023L) << 7) | (block6 >>> 57));
values[valuesOffset++] = (int) ((block6 >>> 40) & 131071L);
values[valuesOffset++] = (int) ((block6 >>> 23) & 131071L);
values[valuesOffset++] = (int) ((block6 >>> 6) & 131071L);
final long block7 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block6 & 63L) << 11) | (block7 >>> 53));
values[valuesOffset++] = (int) ((block7 >>> 36) & 131071L);
values[valuesOffset++] = (int) ((block7 >>> 19) & 131071L);
values[valuesOffset++] = (int) ((block7 >>> 2) & 131071L);
final long block8 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block7 & 3L) << 15) | (block8 >>> 49));
values[valuesOffset++] = (int) ((block8 >>> 32) & 131071L);
values[valuesOffset++] = (int) ((block8 >>> 15) & 131071L);
final long block9 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block8 & 32767L) << 2) | (block9 >>> 62));
values[valuesOffset++] = (int) ((block9 >>> 45) & 131071L);
values[valuesOffset++] = (int) ((block9 >>> 28) & 131071L);
values[valuesOffset++] = (int) ((block9 >>> 11) & 131071L);
final long block10 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block9 & 2047L) << 6) | (block10 >>> 58));
values[valuesOffset++] = (int) ((block10 >>> 41) & 131071L);
values[valuesOffset++] = (int) ((block10 >>> 24) & 131071L);
values[valuesOffset++] = (int) ((block10 >>> 7) & 131071L);
final long block11 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block10 & 127L) << 10) | (block11 >>> 54));
values[valuesOffset++] = (int) ((block11 >>> 37) & 131071L);
values[valuesOffset++] = (int) ((block11 >>> 20) & 131071L);
values[valuesOffset++] = (int) ((block11 >>> 3) & 131071L);
final long block12 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block11 & 7L) << 14) | (block12 >>> 50));
values[valuesOffset++] = (int) ((block12 >>> 33) & 131071L);
values[valuesOffset++] = (int) ((block12 >>> 16) & 131071L);
final long block13 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block12 & 65535L) << 1) | (block13 >>> 63));
values[valuesOffset++] = (int) ((block13 >>> 46) & 131071L);
values[valuesOffset++] = (int) ((block13 >>> 29) & 131071L);
values[valuesOffset++] = (int) ((block13 >>> 12) & 131071L);
final long block14 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block13 & 4095L) << 5) | (block14 >>> 59));
values[valuesOffset++] = (int) ((block14 >>> 42) & 131071L);
values[valuesOffset++] = (int) ((block14 >>> 25) & 131071L);
values[valuesOffset++] = (int) ((block14 >>> 8) & 131071L);
final long block15 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block14 & 255L) << 9) | (block15 >>> 55));
values[valuesOffset++] = (int) ((block15 >>> 38) & 131071L);
values[valuesOffset++] = (int) ((block15 >>> 21) & 131071L);
values[valuesOffset++] = (int) ((block15 >>> 4) & 131071L);
final long block16 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block15 & 15L) << 13) | (block16 >>> 51));
values[valuesOffset++] = (int) ((block16 >>> 34) & 131071L);
values[valuesOffset++] = (int) ((block16 >>> 17) & 131071L);
values[valuesOffset++] = (int) (block16 & 131071L);
}
}
@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;
final int byte2 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte0 << 9) | (byte1 << 1) | (byte2 >>> 7);
final int byte3 = blocks[blocksOffset++] & 0xFF;
final int byte4 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte2 & 127) << 10) | (byte3 << 2) | (byte4 >>> 6);
final int byte5 = blocks[blocksOffset++] & 0xFF;
final int byte6 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte4 & 63) << 11) | (byte5 << 3) | (byte6 >>> 5);
final int byte7 = blocks[blocksOffset++] & 0xFF;
final int byte8 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte6 & 31) << 12) | (byte7 << 4) | (byte8 >>> 4);
final int byte9 = blocks[blocksOffset++] & 0xFF;
final int byte10 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte8 & 15) << 13) | (byte9 << 5) | (byte10 >>> 3);
final int byte11 = blocks[blocksOffset++] & 0xFF;
final int byte12 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte10 & 7) << 14) | (byte11 << 6) | (byte12 >>> 2);
final int byte13 = blocks[blocksOffset++] & 0xFF;
final int byte14 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte12 & 3) << 15) | (byte13 << 7) | (byte14 >>> 1);
final int byte15 = blocks[blocksOffset++] & 0xFF;
final int byte16 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte14 & 1) << 16) | (byte15 << 8) | byte16;
final int byte17 = blocks[blocksOffset++] & 0xFF;
final int byte18 = blocks[blocksOffset++] & 0xFF;
final int byte19 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte17 << 9) | (byte18 << 1) | (byte19 >>> 7);
final int byte20 = blocks[blocksOffset++] & 0xFF;
final int byte21 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte19 & 127) << 10) | (byte20 << 2) | (byte21 >>> 6);
final int byte22 = blocks[blocksOffset++] & 0xFF;
final int byte23 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte21 & 63) << 11) | (byte22 << 3) | (byte23 >>> 5);
final int byte24 = blocks[blocksOffset++] & 0xFF;
final int byte25 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte23 & 31) << 12) | (byte24 << 4) | (byte25 >>> 4);
final int byte26 = blocks[blocksOffset++] & 0xFF;
final int byte27 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte25 & 15) << 13) | (byte26 << 5) | (byte27 >>> 3);
final int byte28 = blocks[blocksOffset++] & 0xFF;
final int byte29 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte27 & 7) << 14) | (byte28 << 6) | (byte29 >>> 2);
final int byte30 = blocks[blocksOffset++] & 0xFF;
final int byte31 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte29 & 3) << 15) | (byte30 << 7) | (byte31 >>> 1);
final int byte32 = blocks[blocksOffset++] & 0xFF;
final int byte33 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte31 & 1) << 16) | (byte32 << 8) | byte33;
final int byte34 = blocks[blocksOffset++] & 0xFF;
final int byte35 = blocks[blocksOffset++] & 0xFF;
final int byte36 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte34 << 9) | (byte35 << 1) | (byte36 >>> 7);
final int byte37 = blocks[blocksOffset++] & 0xFF;
final int byte38 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte36 & 127) << 10) | (byte37 << 2) | (byte38 >>> 6);
final int byte39 = blocks[blocksOffset++] & 0xFF;
final int byte40 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte38 & 63) << 11) | (byte39 << 3) | (byte40 >>> 5);
final int byte41 = blocks[blocksOffset++] & 0xFF;
final int byte42 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte40 & 31) << 12) | (byte41 << 4) | (byte42 >>> 4);
final int byte43 = blocks[blocksOffset++] & 0xFF;
final int byte44 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte42 & 15) << 13) | (byte43 << 5) | (byte44 >>> 3);
final int byte45 = blocks[blocksOffset++] & 0xFF;
final int byte46 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte44 & 7) << 14) | (byte45 << 6) | (byte46 >>> 2);
final int byte47 = blocks[blocksOffset++] & 0xFF;
final int byte48 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte46 & 3) << 15) | (byte47 << 7) | (byte48 >>> 1);
final int byte49 = blocks[blocksOffset++] & 0xFF;
final int byte50 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte48 & 1) << 16) | (byte49 << 8) | byte50;
final int byte51 = blocks[blocksOffset++] & 0xFF;
final int byte52 = blocks[blocksOffset++] & 0xFF;
final int byte53 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte51 << 9) | (byte52 << 1) | (byte53 >>> 7);
final int byte54 = blocks[blocksOffset++] & 0xFF;
final int byte55 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte53 & 127) << 10) | (byte54 << 2) | (byte55 >>> 6);
final int byte56 = blocks[blocksOffset++] & 0xFF;
final int byte57 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte55 & 63) << 11) | (byte56 << 3) | (byte57 >>> 5);
final int byte58 = blocks[blocksOffset++] & 0xFF;
final int byte59 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte57 & 31) << 12) | (byte58 << 4) | (byte59 >>> 4);
final int byte60 = blocks[blocksOffset++] & 0xFF;
final int byte61 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte59 & 15) << 13) | (byte60 << 5) | (byte61 >>> 3);
final int byte62 = blocks[blocksOffset++] & 0xFF;
final int byte63 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte61 & 7) << 14) | (byte62 << 6) | (byte63 >>> 2);
final int byte64 = blocks[blocksOffset++] & 0xFF;
final int byte65 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte63 & 3) << 15) | (byte64 << 7) | (byte65 >>> 1);
final int byte66 = blocks[blocksOffset++] & 0xFF;
final int byte67 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte65 & 1) << 16) | (byte66 << 8) | byte67;
final int byte68 = blocks[blocksOffset++] & 0xFF;
final int byte69 = blocks[blocksOffset++] & 0xFF;
final int byte70 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte68 << 9) | (byte69 << 1) | (byte70 >>> 7);
final int byte71 = blocks[blocksOffset++] & 0xFF;
final int byte72 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte70 & 127) << 10) | (byte71 << 2) | (byte72 >>> 6);
final int byte73 = blocks[blocksOffset++] & 0xFF;
final int byte74 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte72 & 63) << 11) | (byte73 << 3) | (byte74 >>> 5);
final int byte75 = blocks[blocksOffset++] & 0xFF;
final int byte76 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte74 & 31) << 12) | (byte75 << 4) | (byte76 >>> 4);
final int byte77 = blocks[blocksOffset++] & 0xFF;
final int byte78 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte76 & 15) << 13) | (byte77 << 5) | (byte78 >>> 3);
final int byte79 = blocks[blocksOffset++] & 0xFF;
final int byte80 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte78 & 7) << 14) | (byte79 << 6) | (byte80 >>> 2);
final int byte81 = blocks[blocksOffset++] & 0xFF;
final int byte82 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte80 & 3) << 15) | (byte81 << 7) | (byte82 >>> 1);
final int byte83 = blocks[blocksOffset++] & 0xFF;
final int byte84 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte82 & 1) << 16) | (byte83 << 8) | byte84;
final int byte85 = blocks[blocksOffset++] & 0xFF;
final int byte86 = blocks[blocksOffset++] & 0xFF;
final int byte87 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte85 << 9) | (byte86 << 1) | (byte87 >>> 7);
final int byte88 = blocks[blocksOffset++] & 0xFF;
final int byte89 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte87 & 127) << 10) | (byte88 << 2) | (byte89 >>> 6);
final int byte90 = blocks[blocksOffset++] & 0xFF;
final int byte91 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte89 & 63) << 11) | (byte90 << 3) | (byte91 >>> 5);
final int byte92 = blocks[blocksOffset++] & 0xFF;
final int byte93 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte91 & 31) << 12) | (byte92 << 4) | (byte93 >>> 4);
final int byte94 = blocks[blocksOffset++] & 0xFF;
final int byte95 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte93 & 15) << 13) | (byte94 << 5) | (byte95 >>> 3);
final int byte96 = blocks[blocksOffset++] & 0xFF;
final int byte97 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte95 & 7) << 14) | (byte96 << 6) | (byte97 >>> 2);
final int byte98 = blocks[blocksOffset++] & 0xFF;
final int byte99 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte97 & 3) << 15) | (byte98 << 7) | (byte99 >>> 1);
final int byte100 = blocks[blocksOffset++] & 0xFF;
final int byte101 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte99 & 1) << 16) | (byte100 << 8) | byte101;
final int byte102 = blocks[blocksOffset++] & 0xFF;
final int byte103 = blocks[blocksOffset++] & 0xFF;
final int byte104 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte102 << 9) | (byte103 << 1) | (byte104 >>> 7);
final int byte105 = blocks[blocksOffset++] & 0xFF;
final int byte106 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte104 & 127) << 10) | (byte105 << 2) | (byte106 >>> 6);
final int byte107 = blocks[blocksOffset++] & 0xFF;
final int byte108 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte106 & 63) << 11) | (byte107 << 3) | (byte108 >>> 5);
final int byte109 = blocks[blocksOffset++] & 0xFF;
final int byte110 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte108 & 31) << 12) | (byte109 << 4) | (byte110 >>> 4);
final int byte111 = blocks[blocksOffset++] & 0xFF;
final int byte112 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte110 & 15) << 13) | (byte111 << 5) | (byte112 >>> 3);
final int byte113 = blocks[blocksOffset++] & 0xFF;
final int byte114 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte112 & 7) << 14) | (byte113 << 6) | (byte114 >>> 2);
final int byte115 = blocks[blocksOffset++] & 0xFF;
final int byte116 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte114 & 3) << 15) | (byte115 << 7) | (byte116 >>> 1);
final int byte117 = blocks[blocksOffset++] & 0xFF;
final int byte118 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte116 & 1) << 16) | (byte117 << 8) | byte118;
final int byte119 = blocks[blocksOffset++] & 0xFF;
final int byte120 = blocks[blocksOffset++] & 0xFF;
final int byte121 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte119 << 9) | (byte120 << 1) | (byte121 >>> 7);
final int byte122 = blocks[blocksOffset++] & 0xFF;
final int byte123 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte121 & 127) << 10) | (byte122 << 2) | (byte123 >>> 6);
final int byte124 = blocks[blocksOffset++] & 0xFF;
final int byte125 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte123 & 63) << 11) | (byte124 << 3) | (byte125 >>> 5);
final int byte126 = blocks[blocksOffset++] & 0xFF;
final int byte127 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte125 & 31) << 12) | (byte126 << 4) | (byte127 >>> 4);
final int byte128 = blocks[blocksOffset++] & 0xFF;
final int byte129 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte127 & 15) << 13) | (byte128 << 5) | (byte129 >>> 3);
final int byte130 = blocks[blocksOffset++] & 0xFF;
final int byte131 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte129 & 7) << 14) | (byte130 << 6) | (byte131 >>> 2);
final int byte132 = blocks[blocksOffset++] & 0xFF;
final int byte133 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte131 & 3) << 15) | (byte132 << 7) | (byte133 >>> 1);
final int byte134 = blocks[blocksOffset++] & 0xFF;
final int byte135 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte133 & 1) << 16) | (byte134 << 8) | byte135;
}
@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;
final int byte2 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte0 << 9) | (byte1 << 1) | (byte2 >>> 7);
final int byte3 = blocks[blocksOffset++] & 0xFF;
final int byte4 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte2 & 127) << 10) | (byte3 << 2) | (byte4 >>> 6);
final int byte5 = blocks[blocksOffset++] & 0xFF;
final int byte6 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte4 & 63) << 11) | (byte5 << 3) | (byte6 >>> 5);
final int byte7 = blocks[blocksOffset++] & 0xFF;
final int byte8 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte6 & 31) << 12) | (byte7 << 4) | (byte8 >>> 4);
final int byte9 = blocks[blocksOffset++] & 0xFF;
final int byte10 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte8 & 15) << 13) | (byte9 << 5) | (byte10 >>> 3);
final int byte11 = blocks[blocksOffset++] & 0xFF;
final int byte12 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte10 & 7) << 14) | (byte11 << 6) | (byte12 >>> 2);
final int byte13 = blocks[blocksOffset++] & 0xFF;
final int byte14 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte12 & 3) << 15) | (byte13 << 7) | (byte14 >>> 1);
final int byte15 = blocks[blocksOffset++] & 0xFF;
final int byte16 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte14 & 1) << 16) | (byte15 << 8) | byte16;
}
}
@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 >>> 47;
values[valuesOffset++] = (block0 >>> 30) & 131071L;
values[valuesOffset++] = (block0 >>> 13) & 131071L;
final long block1 = blocks[blocksOffset++];
values[valuesOffset++] = ((block0 & 8191L) << 4) | (block1 >>> 60);
values[valuesOffset++] = (block1 >>> 43) & 131071L;
values[valuesOffset++] = (block1 >>> 26) & 131071L;
values[valuesOffset++] = (block1 >>> 9) & 131071L;
final long block2 = blocks[blocksOffset++];
values[valuesOffset++] = ((block1 & 511L) << 8) | (block2 >>> 56);
values[valuesOffset++] = (block2 >>> 39) & 131071L;
values[valuesOffset++] = (block2 >>> 22) & 131071L;
values[valuesOffset++] = (block2 >>> 5) & 131071L;
final long block3 = blocks[blocksOffset++];
values[valuesOffset++] = ((block2 & 31L) << 12) | (block3 >>> 52);
values[valuesOffset++] = (block3 >>> 35) & 131071L;
values[valuesOffset++] = (block3 >>> 18) & 131071L;
values[valuesOffset++] = (block3 >>> 1) & 131071L;
final long block4 = blocks[blocksOffset++];
values[valuesOffset++] = ((block3 & 1L) << 16) | (block4 >>> 48);
values[valuesOffset++] = (block4 >>> 31) & 131071L;
values[valuesOffset++] = (block4 >>> 14) & 131071L;
final long block5 = blocks[blocksOffset++];
values[valuesOffset++] = ((block4 & 16383L) << 3) | (block5 >>> 61);
values[valuesOffset++] = (block5 >>> 44) & 131071L;
values[valuesOffset++] = (block5 >>> 27) & 131071L;
values[valuesOffset++] = (block5 >>> 10) & 131071L;
final long block6 = blocks[blocksOffset++];
values[valuesOffset++] = ((block5 & 1023L) << 7) | (block6 >>> 57);
values[valuesOffset++] = (block6 >>> 40) & 131071L;
values[valuesOffset++] = (block6 >>> 23) & 131071L;
values[valuesOffset++] = (block6 >>> 6) & 131071L;
final long block7 = blocks[blocksOffset++];
values[valuesOffset++] = ((block6 & 63L) << 11) | (block7 >>> 53);
values[valuesOffset++] = (block7 >>> 36) & 131071L;
values[valuesOffset++] = (block7 >>> 19) & 131071L;
values[valuesOffset++] = (block7 >>> 2) & 131071L;
final long block8 = blocks[blocksOffset++];
values[valuesOffset++] = ((block7 & 3L) << 15) | (block8 >>> 49);
values[valuesOffset++] = (block8 >>> 32) & 131071L;
values[valuesOffset++] = (block8 >>> 15) & 131071L;
final long block9 = blocks[blocksOffset++];
values[valuesOffset++] = ((block8 & 32767L) << 2) | (block9 >>> 62);
values[valuesOffset++] = (block9 >>> 45) & 131071L;
values[valuesOffset++] = (block9 >>> 28) & 131071L;
values[valuesOffset++] = (block9 >>> 11) & 131071L;
final long block10 = blocks[blocksOffset++];
values[valuesOffset++] = ((block9 & 2047L) << 6) | (block10 >>> 58);
values[valuesOffset++] = (block10 >>> 41) & 131071L;
values[valuesOffset++] = (block10 >>> 24) & 131071L;
values[valuesOffset++] = (block10 >>> 7) & 131071L;
final long block11 = blocks[blocksOffset++];
values[valuesOffset++] = ((block10 & 127L) << 10) | (block11 >>> 54);
values[valuesOffset++] = (block11 >>> 37) & 131071L;
values[valuesOffset++] = (block11 >>> 20) & 131071L;
values[valuesOffset++] = (block11 >>> 3) & 131071L;
final long block12 = blocks[blocksOffset++];
values[valuesOffset++] = ((block11 & 7L) << 14) | (block12 >>> 50);
values[valuesOffset++] = (block12 >>> 33) & 131071L;
values[valuesOffset++] = (block12 >>> 16) & 131071L;
final long block13 = blocks[blocksOffset++];
values[valuesOffset++] = ((block12 & 65535L) << 1) | (block13 >>> 63);
values[valuesOffset++] = (block13 >>> 46) & 131071L;
values[valuesOffset++] = (block13 >>> 29) & 131071L;
values[valuesOffset++] = (block13 >>> 12) & 131071L;
final long block14 = blocks[blocksOffset++];
values[valuesOffset++] = ((block13 & 4095L) << 5) | (block14 >>> 59);
values[valuesOffset++] = (block14 >>> 42) & 131071L;
values[valuesOffset++] = (block14 >>> 25) & 131071L;
values[valuesOffset++] = (block14 >>> 8) & 131071L;
final long block15 = blocks[blocksOffset++];
values[valuesOffset++] = ((block14 & 255L) << 9) | (block15 >>> 55);
values[valuesOffset++] = (block15 >>> 38) & 131071L;
values[valuesOffset++] = (block15 >>> 21) & 131071L;
values[valuesOffset++] = (block15 >>> 4) & 131071L;
final long block16 = blocks[blocksOffset++];
values[valuesOffset++] = ((block15 & 15L) << 13) | (block16 >>> 51);
values[valuesOffset++] = (block16 >>> 34) & 131071L;
values[valuesOffset++] = (block16 >>> 17) & 131071L;
values[valuesOffset++] = block16 & 131071L;
}
@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 >>> 47;
values[valuesOffset++] = (block0 >>> 30) & 131071L;
values[valuesOffset++] = (block0 >>> 13) & 131071L;
final long block1 = blocks[blocksOffset++];
values[valuesOffset++] = ((block0 & 8191L) << 4) | (block1 >>> 60);
values[valuesOffset++] = (block1 >>> 43) & 131071L;
values[valuesOffset++] = (block1 >>> 26) & 131071L;
values[valuesOffset++] = (block1 >>> 9) & 131071L;
final long block2 = blocks[blocksOffset++];
values[valuesOffset++] = ((block1 & 511L) << 8) | (block2 >>> 56);
values[valuesOffset++] = (block2 >>> 39) & 131071L;
values[valuesOffset++] = (block2 >>> 22) & 131071L;
values[valuesOffset++] = (block2 >>> 5) & 131071L;
final long block3 = blocks[blocksOffset++];
values[valuesOffset++] = ((block2 & 31L) << 12) | (block3 >>> 52);
values[valuesOffset++] = (block3 >>> 35) & 131071L;
values[valuesOffset++] = (block3 >>> 18) & 131071L;
values[valuesOffset++] = (block3 >>> 1) & 131071L;
final long block4 = blocks[blocksOffset++];
values[valuesOffset++] = ((block3 & 1L) << 16) | (block4 >>> 48);
values[valuesOffset++] = (block4 >>> 31) & 131071L;
values[valuesOffset++] = (block4 >>> 14) & 131071L;
final long block5 = blocks[blocksOffset++];
values[valuesOffset++] = ((block4 & 16383L) << 3) | (block5 >>> 61);
values[valuesOffset++] = (block5 >>> 44) & 131071L;
values[valuesOffset++] = (block5 >>> 27) & 131071L;
values[valuesOffset++] = (block5 >>> 10) & 131071L;
final long block6 = blocks[blocksOffset++];
values[valuesOffset++] = ((block5 & 1023L) << 7) | (block6 >>> 57);
values[valuesOffset++] = (block6 >>> 40) & 131071L;
values[valuesOffset++] = (block6 >>> 23) & 131071L;
values[valuesOffset++] = (block6 >>> 6) & 131071L;
final long block7 = blocks[blocksOffset++];
values[valuesOffset++] = ((block6 & 63L) << 11) | (block7 >>> 53);
values[valuesOffset++] = (block7 >>> 36) & 131071L;
values[valuesOffset++] = (block7 >>> 19) & 131071L;
values[valuesOffset++] = (block7 >>> 2) & 131071L;
final long block8 = blocks[blocksOffset++];
values[valuesOffset++] = ((block7 & 3L) << 15) | (block8 >>> 49);
values[valuesOffset++] = (block8 >>> 32) & 131071L;
values[valuesOffset++] = (block8 >>> 15) & 131071L;
final long block9 = blocks[blocksOffset++];
values[valuesOffset++] = ((block8 & 32767L) << 2) | (block9 >>> 62);
values[valuesOffset++] = (block9 >>> 45) & 131071L;
values[valuesOffset++] = (block9 >>> 28) & 131071L;
values[valuesOffset++] = (block9 >>> 11) & 131071L;
final long block10 = blocks[blocksOffset++];
values[valuesOffset++] = ((block9 & 2047L) << 6) | (block10 >>> 58);
values[valuesOffset++] = (block10 >>> 41) & 131071L;
values[valuesOffset++] = (block10 >>> 24) & 131071L;
values[valuesOffset++] = (block10 >>> 7) & 131071L;
final long block11 = blocks[blocksOffset++];
values[valuesOffset++] = ((block10 & 127L) << 10) | (block11 >>> 54);
values[valuesOffset++] = (block11 >>> 37) & 131071L;
values[valuesOffset++] = (block11 >>> 20) & 131071L;
values[valuesOffset++] = (block11 >>> 3) & 131071L;
final long block12 = blocks[blocksOffset++];
values[valuesOffset++] = ((block11 & 7L) << 14) | (block12 >>> 50);
values[valuesOffset++] = (block12 >>> 33) & 131071L;
values[valuesOffset++] = (block12 >>> 16) & 131071L;
final long block13 = blocks[blocksOffset++];
values[valuesOffset++] = ((block12 & 65535L) << 1) | (block13 >>> 63);
values[valuesOffset++] = (block13 >>> 46) & 131071L;
values[valuesOffset++] = (block13 >>> 29) & 131071L;
values[valuesOffset++] = (block13 >>> 12) & 131071L;
final long block14 = blocks[blocksOffset++];
values[valuesOffset++] = ((block13 & 4095L) << 5) | (block14 >>> 59);
values[valuesOffset++] = (block14 >>> 42) & 131071L;
values[valuesOffset++] = (block14 >>> 25) & 131071L;
values[valuesOffset++] = (block14 >>> 8) & 131071L;
final long block15 = blocks[blocksOffset++];
values[valuesOffset++] = ((block14 & 255L) << 9) | (block15 >>> 55);
values[valuesOffset++] = (block15 >>> 38) & 131071L;
values[valuesOffset++] = (block15 >>> 21) & 131071L;
values[valuesOffset++] = (block15 >>> 4) & 131071L;
final long block16 = blocks[blocksOffset++];
values[valuesOffset++] = ((block15 & 15L) << 13) | (block16 >>> 51);
values[valuesOffset++] = (block16 >>> 34) & 131071L;
values[valuesOffset++] = (block16 >>> 17) & 131071L;
values[valuesOffset++] = block16 & 131071L;
}
}
@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;
final long byte2 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte0 << 9) | (byte1 << 1) | (byte2 >>> 7);
final long byte3 = blocks[blocksOffset++] & 0xFF;
final long byte4 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte2 & 127) << 10) | (byte3 << 2) | (byte4 >>> 6);
final long byte5 = blocks[blocksOffset++] & 0xFF;
final long byte6 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte4 & 63) << 11) | (byte5 << 3) | (byte6 >>> 5);
final long byte7 = blocks[blocksOffset++] & 0xFF;
final long byte8 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte6 & 31) << 12) | (byte7 << 4) | (byte8 >>> 4);
final long byte9 = blocks[blocksOffset++] & 0xFF;
final long byte10 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte8 & 15) << 13) | (byte9 << 5) | (byte10 >>> 3);
final long byte11 = blocks[blocksOffset++] & 0xFF;
final long byte12 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte10 & 7) << 14) | (byte11 << 6) | (byte12 >>> 2);
final long byte13 = blocks[blocksOffset++] & 0xFF;
final long byte14 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte12 & 3) << 15) | (byte13 << 7) | (byte14 >>> 1);
final long byte15 = blocks[blocksOffset++] & 0xFF;
final long byte16 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte14 & 1) << 16) | (byte15 << 8) | byte16;
final long byte17 = blocks[blocksOffset++] & 0xFF;
final long byte18 = blocks[blocksOffset++] & 0xFF;
final long byte19 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte17 << 9) | (byte18 << 1) | (byte19 >>> 7);
final long byte20 = blocks[blocksOffset++] & 0xFF;
final long byte21 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte19 & 127) << 10) | (byte20 << 2) | (byte21 >>> 6);
final long byte22 = blocks[blocksOffset++] & 0xFF;
final long byte23 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte21 & 63) << 11) | (byte22 << 3) | (byte23 >>> 5);
final long byte24 = blocks[blocksOffset++] & 0xFF;
final long byte25 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte23 & 31) << 12) | (byte24 << 4) | (byte25 >>> 4);
final long byte26 = blocks[blocksOffset++] & 0xFF;
final long byte27 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte25 & 15) << 13) | (byte26 << 5) | (byte27 >>> 3);
final long byte28 = blocks[blocksOffset++] & 0xFF;
final long byte29 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte27 & 7) << 14) | (byte28 << 6) | (byte29 >>> 2);
final long byte30 = blocks[blocksOffset++] & 0xFF;
final long byte31 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte29 & 3) << 15) | (byte30 << 7) | (byte31 >>> 1);
final long byte32 = blocks[blocksOffset++] & 0xFF;
final long byte33 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte31 & 1) << 16) | (byte32 << 8) | byte33;
final long byte34 = blocks[blocksOffset++] & 0xFF;
final long byte35 = blocks[blocksOffset++] & 0xFF;
final long byte36 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte34 << 9) | (byte35 << 1) | (byte36 >>> 7);
final long byte37 = blocks[blocksOffset++] & 0xFF;
final long byte38 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte36 & 127) << 10) | (byte37 << 2) | (byte38 >>> 6);
final long byte39 = blocks[blocksOffset++] & 0xFF;
final long byte40 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte38 & 63) << 11) | (byte39 << 3) | (byte40 >>> 5);
final long byte41 = blocks[blocksOffset++] & 0xFF;
final long byte42 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte40 & 31) << 12) | (byte41 << 4) | (byte42 >>> 4);
final long byte43 = blocks[blocksOffset++] & 0xFF;
final long byte44 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte42 & 15) << 13) | (byte43 << 5) | (byte44 >>> 3);
final long byte45 = blocks[blocksOffset++] & 0xFF;
final long byte46 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte44 & 7) << 14) | (byte45 << 6) | (byte46 >>> 2);
final long byte47 = blocks[blocksOffset++] & 0xFF;
final long byte48 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte46 & 3) << 15) | (byte47 << 7) | (byte48 >>> 1);
final long byte49 = blocks[blocksOffset++] & 0xFF;
final long byte50 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte48 & 1) << 16) | (byte49 << 8) | byte50;
final long byte51 = blocks[blocksOffset++] & 0xFF;
final long byte52 = blocks[blocksOffset++] & 0xFF;
final long byte53 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte51 << 9) | (byte52 << 1) | (byte53 >>> 7);
final long byte54 = blocks[blocksOffset++] & 0xFF;
final long byte55 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte53 & 127) << 10) | (byte54 << 2) | (byte55 >>> 6);
final long byte56 = blocks[blocksOffset++] & 0xFF;
final long byte57 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte55 & 63) << 11) | (byte56 << 3) | (byte57 >>> 5);
final long byte58 = blocks[blocksOffset++] & 0xFF;
final long byte59 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte57 & 31) << 12) | (byte58 << 4) | (byte59 >>> 4);
final long byte60 = blocks[blocksOffset++] & 0xFF;
final long byte61 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte59 & 15) << 13) | (byte60 << 5) | (byte61 >>> 3);
final long byte62 = blocks[blocksOffset++] & 0xFF;
final long byte63 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte61 & 7) << 14) | (byte62 << 6) | (byte63 >>> 2);
final long byte64 = blocks[blocksOffset++] & 0xFF;
final long byte65 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte63 & 3) << 15) | (byte64 << 7) | (byte65 >>> 1);
final long byte66 = blocks[blocksOffset++] & 0xFF;
final long byte67 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte65 & 1) << 16) | (byte66 << 8) | byte67;
final long byte68 = blocks[blocksOffset++] & 0xFF;
final long byte69 = blocks[blocksOffset++] & 0xFF;
final long byte70 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte68 << 9) | (byte69 << 1) | (byte70 >>> 7);
final long byte71 = blocks[blocksOffset++] & 0xFF;
final long byte72 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte70 & 127) << 10) | (byte71 << 2) | (byte72 >>> 6);
final long byte73 = blocks[blocksOffset++] & 0xFF;
final long byte74 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte72 & 63) << 11) | (byte73 << 3) | (byte74 >>> 5);
final long byte75 = blocks[blocksOffset++] & 0xFF;
final long byte76 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte74 & 31) << 12) | (byte75 << 4) | (byte76 >>> 4);
final long byte77 = blocks[blocksOffset++] & 0xFF;
final long byte78 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte76 & 15) << 13) | (byte77 << 5) | (byte78 >>> 3);
final long byte79 = blocks[blocksOffset++] & 0xFF;
final long byte80 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte78 & 7) << 14) | (byte79 << 6) | (byte80 >>> 2);
final long byte81 = blocks[blocksOffset++] & 0xFF;
final long byte82 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte80 & 3) << 15) | (byte81 << 7) | (byte82 >>> 1);
final long byte83 = blocks[blocksOffset++] & 0xFF;
final long byte84 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte82 & 1) << 16) | (byte83 << 8) | byte84;
final long byte85 = blocks[blocksOffset++] & 0xFF;
final long byte86 = blocks[blocksOffset++] & 0xFF;
final long byte87 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte85 << 9) | (byte86 << 1) | (byte87 >>> 7);
final long byte88 = blocks[blocksOffset++] & 0xFF;
final long byte89 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte87 & 127) << 10) | (byte88 << 2) | (byte89 >>> 6);
final long byte90 = blocks[blocksOffset++] & 0xFF;
final long byte91 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte89 & 63) << 11) | (byte90 << 3) | (byte91 >>> 5);
final long byte92 = blocks[blocksOffset++] & 0xFF;
final long byte93 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte91 & 31) << 12) | (byte92 << 4) | (byte93 >>> 4);
final long byte94 = blocks[blocksOffset++] & 0xFF;
final long byte95 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte93 & 15) << 13) | (byte94 << 5) | (byte95 >>> 3);
final long byte96 = blocks[blocksOffset++] & 0xFF;
final long byte97 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte95 & 7) << 14) | (byte96 << 6) | (byte97 >>> 2);
final long byte98 = blocks[blocksOffset++] & 0xFF;
final long byte99 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte97 & 3) << 15) | (byte98 << 7) | (byte99 >>> 1);
final long byte100 = blocks[blocksOffset++] & 0xFF;
final long byte101 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte99 & 1) << 16) | (byte100 << 8) | byte101;
final long byte102 = blocks[blocksOffset++] & 0xFF;
final long byte103 = blocks[blocksOffset++] & 0xFF;
final long byte104 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte102 << 9) | (byte103 << 1) | (byte104 >>> 7);
final long byte105 = blocks[blocksOffset++] & 0xFF;
final long byte106 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte104 & 127) << 10) | (byte105 << 2) | (byte106 >>> 6);
final long byte107 = blocks[blocksOffset++] & 0xFF;
final long byte108 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte106 & 63) << 11) | (byte107 << 3) | (byte108 >>> 5);
final long byte109 = blocks[blocksOffset++] & 0xFF;
final long byte110 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte108 & 31) << 12) | (byte109 << 4) | (byte110 >>> 4);
final long byte111 = blocks[blocksOffset++] & 0xFF;
final long byte112 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte110 & 15) << 13) | (byte111 << 5) | (byte112 >>> 3);
final long byte113 = blocks[blocksOffset++] & 0xFF;
final long byte114 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte112 & 7) << 14) | (byte113 << 6) | (byte114 >>> 2);
final long byte115 = blocks[blocksOffset++] & 0xFF;
final long byte116 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte114 & 3) << 15) | (byte115 << 7) | (byte116 >>> 1);
final long byte117 = blocks[blocksOffset++] & 0xFF;
final long byte118 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte116 & 1) << 16) | (byte117 << 8) | byte118;
final long byte119 = blocks[blocksOffset++] & 0xFF;
final long byte120 = blocks[blocksOffset++] & 0xFF;
final long byte121 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte119 << 9) | (byte120 << 1) | (byte121 >>> 7);
final long byte122 = blocks[blocksOffset++] & 0xFF;
final long byte123 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte121 & 127) << 10) | (byte122 << 2) | (byte123 >>> 6);
final long byte124 = blocks[blocksOffset++] & 0xFF;
final long byte125 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte123 & 63) << 11) | (byte124 << 3) | (byte125 >>> 5);
final long byte126 = blocks[blocksOffset++] & 0xFF;
final long byte127 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte125 & 31) << 12) | (byte126 << 4) | (byte127 >>> 4);
final long byte128 = blocks[blocksOffset++] & 0xFF;
final long byte129 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte127 & 15) << 13) | (byte128 << 5) | (byte129 >>> 3);
final long byte130 = blocks[blocksOffset++] & 0xFF;
final long byte131 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte129 & 7) << 14) | (byte130 << 6) | (byte131 >>> 2);
final long byte132 = blocks[blocksOffset++] & 0xFF;
final long byte133 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte131 & 3) << 15) | (byte132 << 7) | (byte133 >>> 1);
final long byte134 = blocks[blocksOffset++] & 0xFF;
final long byte135 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte133 & 1) << 16) | (byte134 << 8) | byte135;
}
@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;
final long byte2 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte0 << 9) | (byte1 << 1) | (byte2 >>> 7);
final long byte3 = blocks[blocksOffset++] & 0xFF;
final long byte4 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte2 & 127) << 10) | (byte3 << 2) | (byte4 >>> 6);
final long byte5 = blocks[blocksOffset++] & 0xFF;
final long byte6 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte4 & 63) << 11) | (byte5 << 3) | (byte6 >>> 5);
final long byte7 = blocks[blocksOffset++] & 0xFF;
final long byte8 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte6 & 31) << 12) | (byte7 << 4) | (byte8 >>> 4);
final long byte9 = blocks[blocksOffset++] & 0xFF;
final long byte10 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte8 & 15) << 13) | (byte9 << 5) | (byte10 >>> 3);
final long byte11 = blocks[blocksOffset++] & 0xFF;
final long byte12 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte10 & 7) << 14) | (byte11 << 6) | (byte12 >>> 2);
final long byte13 = blocks[blocksOffset++] & 0xFF;
final long byte14 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte12 & 3) << 15) | (byte13 << 7) | (byte14 >>> 1);
final long byte15 = blocks[blocksOffset++] & 0xFF;
final long byte16 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte14 & 1) << 16) | (byte15 << 8) | byte16;
}
}
}

View File

@ -24,332 +24,142 @@ package org.apache.lucene.util.packed;
*/
final class BulkOperationPacked18 extends BulkOperationPacked {
public BulkOperationPacked18() {
super(18);
assert blockCount() == 9;
assert valueCount() == 32;
}
public BulkOperationPacked18() {
super(18);
assert blockCount() == 9;
assert valueCount() == 32;
}
@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 >>> 46);
values[valuesOffset++] = (int) ((block0 >>> 28) & 262143L);
values[valuesOffset++] = (int) ((block0 >>> 10) & 262143L);
final long block1 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block0 & 1023L) << 8) | (block1 >>> 56));
values[valuesOffset++] = (int) ((block1 >>> 38) & 262143L);
values[valuesOffset++] = (int) ((block1 >>> 20) & 262143L);
values[valuesOffset++] = (int) ((block1 >>> 2) & 262143L);
final long block2 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block1 & 3L) << 16) | (block2 >>> 48));
values[valuesOffset++] = (int) ((block2 >>> 30) & 262143L);
values[valuesOffset++] = (int) ((block2 >>> 12) & 262143L);
final long block3 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block2 & 4095L) << 6) | (block3 >>> 58));
values[valuesOffset++] = (int) ((block3 >>> 40) & 262143L);
values[valuesOffset++] = (int) ((block3 >>> 22) & 262143L);
values[valuesOffset++] = (int) ((block3 >>> 4) & 262143L);
final long block4 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block3 & 15L) << 14) | (block4 >>> 50));
values[valuesOffset++] = (int) ((block4 >>> 32) & 262143L);
values[valuesOffset++] = (int) ((block4 >>> 14) & 262143L);
final long block5 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block4 & 16383L) << 4) | (block5 >>> 60));
values[valuesOffset++] = (int) ((block5 >>> 42) & 262143L);
values[valuesOffset++] = (int) ((block5 >>> 24) & 262143L);
values[valuesOffset++] = (int) ((block5 >>> 6) & 262143L);
final long block6 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block5 & 63L) << 12) | (block6 >>> 52));
values[valuesOffset++] = (int) ((block6 >>> 34) & 262143L);
values[valuesOffset++] = (int) ((block6 >>> 16) & 262143L);
final long block7 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block6 & 65535L) << 2) | (block7 >>> 62));
values[valuesOffset++] = (int) ((block7 >>> 44) & 262143L);
values[valuesOffset++] = (int) ((block7 >>> 26) & 262143L);
values[valuesOffset++] = (int) ((block7 >>> 8) & 262143L);
final long block8 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block7 & 255L) << 10) | (block8 >>> 54));
values[valuesOffset++] = (int) ((block8 >>> 36) & 262143L);
values[valuesOffset++] = (int) ((block8 >>> 18) & 262143L);
values[valuesOffset++] = (int) (block8 & 262143L);
}
@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 >>> 46);
values[valuesOffset++] = (int) ((block0 >>> 28) & 262143L);
values[valuesOffset++] = (int) ((block0 >>> 10) & 262143L);
final long block1 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block0 & 1023L) << 8) | (block1 >>> 56));
values[valuesOffset++] = (int) ((block1 >>> 38) & 262143L);
values[valuesOffset++] = (int) ((block1 >>> 20) & 262143L);
values[valuesOffset++] = (int) ((block1 >>> 2) & 262143L);
final long block2 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block1 & 3L) << 16) | (block2 >>> 48));
values[valuesOffset++] = (int) ((block2 >>> 30) & 262143L);
values[valuesOffset++] = (int) ((block2 >>> 12) & 262143L);
final long block3 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block2 & 4095L) << 6) | (block3 >>> 58));
values[valuesOffset++] = (int) ((block3 >>> 40) & 262143L);
values[valuesOffset++] = (int) ((block3 >>> 22) & 262143L);
values[valuesOffset++] = (int) ((block3 >>> 4) & 262143L);
final long block4 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block3 & 15L) << 14) | (block4 >>> 50));
values[valuesOffset++] = (int) ((block4 >>> 32) & 262143L);
values[valuesOffset++] = (int) ((block4 >>> 14) & 262143L);
final long block5 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block4 & 16383L) << 4) | (block5 >>> 60));
values[valuesOffset++] = (int) ((block5 >>> 42) & 262143L);
values[valuesOffset++] = (int) ((block5 >>> 24) & 262143L);
values[valuesOffset++] = (int) ((block5 >>> 6) & 262143L);
final long block6 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block5 & 63L) << 12) | (block6 >>> 52));
values[valuesOffset++] = (int) ((block6 >>> 34) & 262143L);
values[valuesOffset++] = (int) ((block6 >>> 16) & 262143L);
final long block7 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block6 & 65535L) << 2) | (block7 >>> 62));
values[valuesOffset++] = (int) ((block7 >>> 44) & 262143L);
values[valuesOffset++] = (int) ((block7 >>> 26) & 262143L);
values[valuesOffset++] = (int) ((block7 >>> 8) & 262143L);
final long block8 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block7 & 255L) << 10) | (block8 >>> 54));
values[valuesOffset++] = (int) ((block8 >>> 36) & 262143L);
values[valuesOffset++] = (int) ((block8 >>> 18) & 262143L);
values[valuesOffset++] = (int) (block8 & 262143L);
}
}
@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;
final int byte2 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte0 << 10) | (byte1 << 2) | (byte2 >>> 6);
final int byte3 = blocks[blocksOffset++] & 0xFF;
final int byte4 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte2 & 63) << 12) | (byte3 << 4) | (byte4 >>> 4);
final int byte5 = blocks[blocksOffset++] & 0xFF;
final int byte6 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte4 & 15) << 14) | (byte5 << 6) | (byte6 >>> 2);
final int byte7 = blocks[blocksOffset++] & 0xFF;
final int byte8 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte6 & 3) << 16) | (byte7 << 8) | byte8;
final int byte9 = blocks[blocksOffset++] & 0xFF;
final int byte10 = blocks[blocksOffset++] & 0xFF;
final int byte11 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte9 << 10) | (byte10 << 2) | (byte11 >>> 6);
final int byte12 = blocks[blocksOffset++] & 0xFF;
final int byte13 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte11 & 63) << 12) | (byte12 << 4) | (byte13 >>> 4);
final int byte14 = blocks[blocksOffset++] & 0xFF;
final int byte15 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte13 & 15) << 14) | (byte14 << 6) | (byte15 >>> 2);
final int byte16 = blocks[blocksOffset++] & 0xFF;
final int byte17 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte15 & 3) << 16) | (byte16 << 8) | byte17;
final int byte18 = blocks[blocksOffset++] & 0xFF;
final int byte19 = blocks[blocksOffset++] & 0xFF;
final int byte20 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte18 << 10) | (byte19 << 2) | (byte20 >>> 6);
final int byte21 = blocks[blocksOffset++] & 0xFF;
final int byte22 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte20 & 63) << 12) | (byte21 << 4) | (byte22 >>> 4);
final int byte23 = blocks[blocksOffset++] & 0xFF;
final int byte24 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte22 & 15) << 14) | (byte23 << 6) | (byte24 >>> 2);
final int byte25 = blocks[blocksOffset++] & 0xFF;
final int byte26 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte24 & 3) << 16) | (byte25 << 8) | byte26;
final int byte27 = blocks[blocksOffset++] & 0xFF;
final int byte28 = blocks[blocksOffset++] & 0xFF;
final int byte29 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte27 << 10) | (byte28 << 2) | (byte29 >>> 6);
final int byte30 = blocks[blocksOffset++] & 0xFF;
final int byte31 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte29 & 63) << 12) | (byte30 << 4) | (byte31 >>> 4);
final int byte32 = blocks[blocksOffset++] & 0xFF;
final int byte33 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte31 & 15) << 14) | (byte32 << 6) | (byte33 >>> 2);
final int byte34 = blocks[blocksOffset++] & 0xFF;
final int byte35 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte33 & 3) << 16) | (byte34 << 8) | byte35;
final int byte36 = blocks[blocksOffset++] & 0xFF;
final int byte37 = blocks[blocksOffset++] & 0xFF;
final int byte38 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte36 << 10) | (byte37 << 2) | (byte38 >>> 6);
final int byte39 = blocks[blocksOffset++] & 0xFF;
final int byte40 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte38 & 63) << 12) | (byte39 << 4) | (byte40 >>> 4);
final int byte41 = blocks[blocksOffset++] & 0xFF;
final int byte42 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte40 & 15) << 14) | (byte41 << 6) | (byte42 >>> 2);
final int byte43 = blocks[blocksOffset++] & 0xFF;
final int byte44 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte42 & 3) << 16) | (byte43 << 8) | byte44;
final int byte45 = blocks[blocksOffset++] & 0xFF;
final int byte46 = blocks[blocksOffset++] & 0xFF;
final int byte47 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte45 << 10) | (byte46 << 2) | (byte47 >>> 6);
final int byte48 = blocks[blocksOffset++] & 0xFF;
final int byte49 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte47 & 63) << 12) | (byte48 << 4) | (byte49 >>> 4);
final int byte50 = blocks[blocksOffset++] & 0xFF;
final int byte51 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte49 & 15) << 14) | (byte50 << 6) | (byte51 >>> 2);
final int byte52 = blocks[blocksOffset++] & 0xFF;
final int byte53 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte51 & 3) << 16) | (byte52 << 8) | byte53;
final int byte54 = blocks[blocksOffset++] & 0xFF;
final int byte55 = blocks[blocksOffset++] & 0xFF;
final int byte56 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte54 << 10) | (byte55 << 2) | (byte56 >>> 6);
final int byte57 = blocks[blocksOffset++] & 0xFF;
final int byte58 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte56 & 63) << 12) | (byte57 << 4) | (byte58 >>> 4);
final int byte59 = blocks[blocksOffset++] & 0xFF;
final int byte60 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte58 & 15) << 14) | (byte59 << 6) | (byte60 >>> 2);
final int byte61 = blocks[blocksOffset++] & 0xFF;
final int byte62 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte60 & 3) << 16) | (byte61 << 8) | byte62;
final int byte63 = blocks[blocksOffset++] & 0xFF;
final int byte64 = blocks[blocksOffset++] & 0xFF;
final int byte65 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte63 << 10) | (byte64 << 2) | (byte65 >>> 6);
final int byte66 = blocks[blocksOffset++] & 0xFF;
final int byte67 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte65 & 63) << 12) | (byte66 << 4) | (byte67 >>> 4);
final int byte68 = blocks[blocksOffset++] & 0xFF;
final int byte69 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte67 & 15) << 14) | (byte68 << 6) | (byte69 >>> 2);
final int byte70 = blocks[blocksOffset++] & 0xFF;
final int byte71 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte69 & 3) << 16) | (byte70 << 8) | byte71;
}
@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;
final int byte2 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte0 << 10) | (byte1 << 2) | (byte2 >>> 6);
final int byte3 = blocks[blocksOffset++] & 0xFF;
final int byte4 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte2 & 63) << 12) | (byte3 << 4) | (byte4 >>> 4);
final int byte5 = blocks[blocksOffset++] & 0xFF;
final int byte6 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte4 & 15) << 14) | (byte5 << 6) | (byte6 >>> 2);
final int byte7 = blocks[blocksOffset++] & 0xFF;
final int byte8 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte6 & 3) << 16) | (byte7 << 8) | byte8;
}
}
@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 >>> 46;
values[valuesOffset++] = (block0 >>> 28) & 262143L;
values[valuesOffset++] = (block0 >>> 10) & 262143L;
final long block1 = blocks[blocksOffset++];
values[valuesOffset++] = ((block0 & 1023L) << 8) | (block1 >>> 56);
values[valuesOffset++] = (block1 >>> 38) & 262143L;
values[valuesOffset++] = (block1 >>> 20) & 262143L;
values[valuesOffset++] = (block1 >>> 2) & 262143L;
final long block2 = blocks[blocksOffset++];
values[valuesOffset++] = ((block1 & 3L) << 16) | (block2 >>> 48);
values[valuesOffset++] = (block2 >>> 30) & 262143L;
values[valuesOffset++] = (block2 >>> 12) & 262143L;
final long block3 = blocks[blocksOffset++];
values[valuesOffset++] = ((block2 & 4095L) << 6) | (block3 >>> 58);
values[valuesOffset++] = (block3 >>> 40) & 262143L;
values[valuesOffset++] = (block3 >>> 22) & 262143L;
values[valuesOffset++] = (block3 >>> 4) & 262143L;
final long block4 = blocks[blocksOffset++];
values[valuesOffset++] = ((block3 & 15L) << 14) | (block4 >>> 50);
values[valuesOffset++] = (block4 >>> 32) & 262143L;
values[valuesOffset++] = (block4 >>> 14) & 262143L;
final long block5 = blocks[blocksOffset++];
values[valuesOffset++] = ((block4 & 16383L) << 4) | (block5 >>> 60);
values[valuesOffset++] = (block5 >>> 42) & 262143L;
values[valuesOffset++] = (block5 >>> 24) & 262143L;
values[valuesOffset++] = (block5 >>> 6) & 262143L;
final long block6 = blocks[blocksOffset++];
values[valuesOffset++] = ((block5 & 63L) << 12) | (block6 >>> 52);
values[valuesOffset++] = (block6 >>> 34) & 262143L;
values[valuesOffset++] = (block6 >>> 16) & 262143L;
final long block7 = blocks[blocksOffset++];
values[valuesOffset++] = ((block6 & 65535L) << 2) | (block7 >>> 62);
values[valuesOffset++] = (block7 >>> 44) & 262143L;
values[valuesOffset++] = (block7 >>> 26) & 262143L;
values[valuesOffset++] = (block7 >>> 8) & 262143L;
final long block8 = blocks[blocksOffset++];
values[valuesOffset++] = ((block7 & 255L) << 10) | (block8 >>> 54);
values[valuesOffset++] = (block8 >>> 36) & 262143L;
values[valuesOffset++] = (block8 >>> 18) & 262143L;
values[valuesOffset++] = block8 & 262143L;
}
@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 >>> 46;
values[valuesOffset++] = (block0 >>> 28) & 262143L;
values[valuesOffset++] = (block0 >>> 10) & 262143L;
final long block1 = blocks[blocksOffset++];
values[valuesOffset++] = ((block0 & 1023L) << 8) | (block1 >>> 56);
values[valuesOffset++] = (block1 >>> 38) & 262143L;
values[valuesOffset++] = (block1 >>> 20) & 262143L;
values[valuesOffset++] = (block1 >>> 2) & 262143L;
final long block2 = blocks[blocksOffset++];
values[valuesOffset++] = ((block1 & 3L) << 16) | (block2 >>> 48);
values[valuesOffset++] = (block2 >>> 30) & 262143L;
values[valuesOffset++] = (block2 >>> 12) & 262143L;
final long block3 = blocks[blocksOffset++];
values[valuesOffset++] = ((block2 & 4095L) << 6) | (block3 >>> 58);
values[valuesOffset++] = (block3 >>> 40) & 262143L;
values[valuesOffset++] = (block3 >>> 22) & 262143L;
values[valuesOffset++] = (block3 >>> 4) & 262143L;
final long block4 = blocks[blocksOffset++];
values[valuesOffset++] = ((block3 & 15L) << 14) | (block4 >>> 50);
values[valuesOffset++] = (block4 >>> 32) & 262143L;
values[valuesOffset++] = (block4 >>> 14) & 262143L;
final long block5 = blocks[blocksOffset++];
values[valuesOffset++] = ((block4 & 16383L) << 4) | (block5 >>> 60);
values[valuesOffset++] = (block5 >>> 42) & 262143L;
values[valuesOffset++] = (block5 >>> 24) & 262143L;
values[valuesOffset++] = (block5 >>> 6) & 262143L;
final long block6 = blocks[blocksOffset++];
values[valuesOffset++] = ((block5 & 63L) << 12) | (block6 >>> 52);
values[valuesOffset++] = (block6 >>> 34) & 262143L;
values[valuesOffset++] = (block6 >>> 16) & 262143L;
final long block7 = blocks[blocksOffset++];
values[valuesOffset++] = ((block6 & 65535L) << 2) | (block7 >>> 62);
values[valuesOffset++] = (block7 >>> 44) & 262143L;
values[valuesOffset++] = (block7 >>> 26) & 262143L;
values[valuesOffset++] = (block7 >>> 8) & 262143L;
final long block8 = blocks[blocksOffset++];
values[valuesOffset++] = ((block7 & 255L) << 10) | (block8 >>> 54);
values[valuesOffset++] = (block8 >>> 36) & 262143L;
values[valuesOffset++] = (block8 >>> 18) & 262143L;
values[valuesOffset++] = block8 & 262143L;
}
}
@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;
final long byte2 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte0 << 10) | (byte1 << 2) | (byte2 >>> 6);
final long byte3 = blocks[blocksOffset++] & 0xFF;
final long byte4 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte2 & 63) << 12) | (byte3 << 4) | (byte4 >>> 4);
final long byte5 = blocks[blocksOffset++] & 0xFF;
final long byte6 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte4 & 15) << 14) | (byte5 << 6) | (byte6 >>> 2);
final long byte7 = blocks[blocksOffset++] & 0xFF;
final long byte8 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte6 & 3) << 16) | (byte7 << 8) | byte8;
final long byte9 = blocks[blocksOffset++] & 0xFF;
final long byte10 = blocks[blocksOffset++] & 0xFF;
final long byte11 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte9 << 10) | (byte10 << 2) | (byte11 >>> 6);
final long byte12 = blocks[blocksOffset++] & 0xFF;
final long byte13 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte11 & 63) << 12) | (byte12 << 4) | (byte13 >>> 4);
final long byte14 = blocks[blocksOffset++] & 0xFF;
final long byte15 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte13 & 15) << 14) | (byte14 << 6) | (byte15 >>> 2);
final long byte16 = blocks[blocksOffset++] & 0xFF;
final long byte17 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte15 & 3) << 16) | (byte16 << 8) | byte17;
final long byte18 = blocks[blocksOffset++] & 0xFF;
final long byte19 = blocks[blocksOffset++] & 0xFF;
final long byte20 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte18 << 10) | (byte19 << 2) | (byte20 >>> 6);
final long byte21 = blocks[blocksOffset++] & 0xFF;
final long byte22 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte20 & 63) << 12) | (byte21 << 4) | (byte22 >>> 4);
final long byte23 = blocks[blocksOffset++] & 0xFF;
final long byte24 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte22 & 15) << 14) | (byte23 << 6) | (byte24 >>> 2);
final long byte25 = blocks[blocksOffset++] & 0xFF;
final long byte26 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte24 & 3) << 16) | (byte25 << 8) | byte26;
final long byte27 = blocks[blocksOffset++] & 0xFF;
final long byte28 = blocks[blocksOffset++] & 0xFF;
final long byte29 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte27 << 10) | (byte28 << 2) | (byte29 >>> 6);
final long byte30 = blocks[blocksOffset++] & 0xFF;
final long byte31 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte29 & 63) << 12) | (byte30 << 4) | (byte31 >>> 4);
final long byte32 = blocks[blocksOffset++] & 0xFF;
final long byte33 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte31 & 15) << 14) | (byte32 << 6) | (byte33 >>> 2);
final long byte34 = blocks[blocksOffset++] & 0xFF;
final long byte35 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte33 & 3) << 16) | (byte34 << 8) | byte35;
final long byte36 = blocks[blocksOffset++] & 0xFF;
final long byte37 = blocks[blocksOffset++] & 0xFF;
final long byte38 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte36 << 10) | (byte37 << 2) | (byte38 >>> 6);
final long byte39 = blocks[blocksOffset++] & 0xFF;
final long byte40 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte38 & 63) << 12) | (byte39 << 4) | (byte40 >>> 4);
final long byte41 = blocks[blocksOffset++] & 0xFF;
final long byte42 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte40 & 15) << 14) | (byte41 << 6) | (byte42 >>> 2);
final long byte43 = blocks[blocksOffset++] & 0xFF;
final long byte44 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte42 & 3) << 16) | (byte43 << 8) | byte44;
final long byte45 = blocks[blocksOffset++] & 0xFF;
final long byte46 = blocks[blocksOffset++] & 0xFF;
final long byte47 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte45 << 10) | (byte46 << 2) | (byte47 >>> 6);
final long byte48 = blocks[blocksOffset++] & 0xFF;
final long byte49 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte47 & 63) << 12) | (byte48 << 4) | (byte49 >>> 4);
final long byte50 = blocks[blocksOffset++] & 0xFF;
final long byte51 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte49 & 15) << 14) | (byte50 << 6) | (byte51 >>> 2);
final long byte52 = blocks[blocksOffset++] & 0xFF;
final long byte53 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte51 & 3) << 16) | (byte52 << 8) | byte53;
final long byte54 = blocks[blocksOffset++] & 0xFF;
final long byte55 = blocks[blocksOffset++] & 0xFF;
final long byte56 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte54 << 10) | (byte55 << 2) | (byte56 >>> 6);
final long byte57 = blocks[blocksOffset++] & 0xFF;
final long byte58 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte56 & 63) << 12) | (byte57 << 4) | (byte58 >>> 4);
final long byte59 = blocks[blocksOffset++] & 0xFF;
final long byte60 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte58 & 15) << 14) | (byte59 << 6) | (byte60 >>> 2);
final long byte61 = blocks[blocksOffset++] & 0xFF;
final long byte62 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte60 & 3) << 16) | (byte61 << 8) | byte62;
final long byte63 = blocks[blocksOffset++] & 0xFF;
final long byte64 = blocks[blocksOffset++] & 0xFF;
final long byte65 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte63 << 10) | (byte64 << 2) | (byte65 >>> 6);
final long byte66 = blocks[blocksOffset++] & 0xFF;
final long byte67 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte65 & 63) << 12) | (byte66 << 4) | (byte67 >>> 4);
final long byte68 = blocks[blocksOffset++] & 0xFF;
final long byte69 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte67 & 15) << 14) | (byte68 << 6) | (byte69 >>> 2);
final long byte70 = blocks[blocksOffset++] & 0xFF;
final long byte71 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte69 & 3) << 16) | (byte70 << 8) | byte71;
}
@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;
final long byte2 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte0 << 10) | (byte1 << 2) | (byte2 >>> 6);
final long byte3 = blocks[blocksOffset++] & 0xFF;
final long byte4 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte2 & 63) << 12) | (byte3 << 4) | (byte4 >>> 4);
final long byte5 = blocks[blocksOffset++] & 0xFF;
final long byte6 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte4 & 15) << 14) | (byte5 << 6) | (byte6 >>> 2);
final long byte7 = blocks[blocksOffset++] & 0xFF;
final long byte8 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte6 & 3) << 16) | (byte7 << 8) | byte8;
}
}
}

View File

@ -24,640 +24,254 @@ package org.apache.lucene.util.packed;
*/
final class BulkOperationPacked19 extends BulkOperationPacked {
public BulkOperationPacked19() {
super(19);
assert blockCount() == 19;
assert valueCount() == 64;
}
public BulkOperationPacked19() {
super(19);
assert blockCount() == 19;
assert valueCount() == 64;
}
@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 >>> 45);
values[valuesOffset++] = (int) ((block0 >>> 26) & 524287L);
values[valuesOffset++] = (int) ((block0 >>> 7) & 524287L);
final long block1 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block0 & 127L) << 12) | (block1 >>> 52));
values[valuesOffset++] = (int) ((block1 >>> 33) & 524287L);
values[valuesOffset++] = (int) ((block1 >>> 14) & 524287L);
final long block2 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block1 & 16383L) << 5) | (block2 >>> 59));
values[valuesOffset++] = (int) ((block2 >>> 40) & 524287L);
values[valuesOffset++] = (int) ((block2 >>> 21) & 524287L);
values[valuesOffset++] = (int) ((block2 >>> 2) & 524287L);
final long block3 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block2 & 3L) << 17) | (block3 >>> 47));
values[valuesOffset++] = (int) ((block3 >>> 28) & 524287L);
values[valuesOffset++] = (int) ((block3 >>> 9) & 524287L);
final long block4 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block3 & 511L) << 10) | (block4 >>> 54));
values[valuesOffset++] = (int) ((block4 >>> 35) & 524287L);
values[valuesOffset++] = (int) ((block4 >>> 16) & 524287L);
final long block5 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block4 & 65535L) << 3) | (block5 >>> 61));
values[valuesOffset++] = (int) ((block5 >>> 42) & 524287L);
values[valuesOffset++] = (int) ((block5 >>> 23) & 524287L);
values[valuesOffset++] = (int) ((block5 >>> 4) & 524287L);
final long block6 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block5 & 15L) << 15) | (block6 >>> 49));
values[valuesOffset++] = (int) ((block6 >>> 30) & 524287L);
values[valuesOffset++] = (int) ((block6 >>> 11) & 524287L);
final long block7 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block6 & 2047L) << 8) | (block7 >>> 56));
values[valuesOffset++] = (int) ((block7 >>> 37) & 524287L);
values[valuesOffset++] = (int) ((block7 >>> 18) & 524287L);
final long block8 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block7 & 262143L) << 1) | (block8 >>> 63));
values[valuesOffset++] = (int) ((block8 >>> 44) & 524287L);
values[valuesOffset++] = (int) ((block8 >>> 25) & 524287L);
values[valuesOffset++] = (int) ((block8 >>> 6) & 524287L);
final long block9 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block8 & 63L) << 13) | (block9 >>> 51));
values[valuesOffset++] = (int) ((block9 >>> 32) & 524287L);
values[valuesOffset++] = (int) ((block9 >>> 13) & 524287L);
final long block10 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block9 & 8191L) << 6) | (block10 >>> 58));
values[valuesOffset++] = (int) ((block10 >>> 39) & 524287L);
values[valuesOffset++] = (int) ((block10 >>> 20) & 524287L);
values[valuesOffset++] = (int) ((block10 >>> 1) & 524287L);
final long block11 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block10 & 1L) << 18) | (block11 >>> 46));
values[valuesOffset++] = (int) ((block11 >>> 27) & 524287L);
values[valuesOffset++] = (int) ((block11 >>> 8) & 524287L);
final long block12 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block11 & 255L) << 11) | (block12 >>> 53));
values[valuesOffset++] = (int) ((block12 >>> 34) & 524287L);
values[valuesOffset++] = (int) ((block12 >>> 15) & 524287L);
final long block13 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block12 & 32767L) << 4) | (block13 >>> 60));
values[valuesOffset++] = (int) ((block13 >>> 41) & 524287L);
values[valuesOffset++] = (int) ((block13 >>> 22) & 524287L);
values[valuesOffset++] = (int) ((block13 >>> 3) & 524287L);
final long block14 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block13 & 7L) << 16) | (block14 >>> 48));
values[valuesOffset++] = (int) ((block14 >>> 29) & 524287L);
values[valuesOffset++] = (int) ((block14 >>> 10) & 524287L);
final long block15 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block14 & 1023L) << 9) | (block15 >>> 55));
values[valuesOffset++] = (int) ((block15 >>> 36) & 524287L);
values[valuesOffset++] = (int) ((block15 >>> 17) & 524287L);
final long block16 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block15 & 131071L) << 2) | (block16 >>> 62));
values[valuesOffset++] = (int) ((block16 >>> 43) & 524287L);
values[valuesOffset++] = (int) ((block16 >>> 24) & 524287L);
values[valuesOffset++] = (int) ((block16 >>> 5) & 524287L);
final long block17 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block16 & 31L) << 14) | (block17 >>> 50));
values[valuesOffset++] = (int) ((block17 >>> 31) & 524287L);
values[valuesOffset++] = (int) ((block17 >>> 12) & 524287L);
final long block18 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block17 & 4095L) << 7) | (block18 >>> 57));
values[valuesOffset++] = (int) ((block18 >>> 38) & 524287L);
values[valuesOffset++] = (int) ((block18 >>> 19) & 524287L);
values[valuesOffset++] = (int) (block18 & 524287L);
}
@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 >>> 45);
values[valuesOffset++] = (int) ((block0 >>> 26) & 524287L);
values[valuesOffset++] = (int) ((block0 >>> 7) & 524287L);
final long block1 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block0 & 127L) << 12) | (block1 >>> 52));
values[valuesOffset++] = (int) ((block1 >>> 33) & 524287L);
values[valuesOffset++] = (int) ((block1 >>> 14) & 524287L);
final long block2 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block1 & 16383L) << 5) | (block2 >>> 59));
values[valuesOffset++] = (int) ((block2 >>> 40) & 524287L);
values[valuesOffset++] = (int) ((block2 >>> 21) & 524287L);
values[valuesOffset++] = (int) ((block2 >>> 2) & 524287L);
final long block3 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block2 & 3L) << 17) | (block3 >>> 47));
values[valuesOffset++] = (int) ((block3 >>> 28) & 524287L);
values[valuesOffset++] = (int) ((block3 >>> 9) & 524287L);
final long block4 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block3 & 511L) << 10) | (block4 >>> 54));
values[valuesOffset++] = (int) ((block4 >>> 35) & 524287L);
values[valuesOffset++] = (int) ((block4 >>> 16) & 524287L);
final long block5 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block4 & 65535L) << 3) | (block5 >>> 61));
values[valuesOffset++] = (int) ((block5 >>> 42) & 524287L);
values[valuesOffset++] = (int) ((block5 >>> 23) & 524287L);
values[valuesOffset++] = (int) ((block5 >>> 4) & 524287L);
final long block6 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block5 & 15L) << 15) | (block6 >>> 49));
values[valuesOffset++] = (int) ((block6 >>> 30) & 524287L);
values[valuesOffset++] = (int) ((block6 >>> 11) & 524287L);
final long block7 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block6 & 2047L) << 8) | (block7 >>> 56));
values[valuesOffset++] = (int) ((block7 >>> 37) & 524287L);
values[valuesOffset++] = (int) ((block7 >>> 18) & 524287L);
final long block8 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block7 & 262143L) << 1) | (block8 >>> 63));
values[valuesOffset++] = (int) ((block8 >>> 44) & 524287L);
values[valuesOffset++] = (int) ((block8 >>> 25) & 524287L);
values[valuesOffset++] = (int) ((block8 >>> 6) & 524287L);
final long block9 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block8 & 63L) << 13) | (block9 >>> 51));
values[valuesOffset++] = (int) ((block9 >>> 32) & 524287L);
values[valuesOffset++] = (int) ((block9 >>> 13) & 524287L);
final long block10 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block9 & 8191L) << 6) | (block10 >>> 58));
values[valuesOffset++] = (int) ((block10 >>> 39) & 524287L);
values[valuesOffset++] = (int) ((block10 >>> 20) & 524287L);
values[valuesOffset++] = (int) ((block10 >>> 1) & 524287L);
final long block11 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block10 & 1L) << 18) | (block11 >>> 46));
values[valuesOffset++] = (int) ((block11 >>> 27) & 524287L);
values[valuesOffset++] = (int) ((block11 >>> 8) & 524287L);
final long block12 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block11 & 255L) << 11) | (block12 >>> 53));
values[valuesOffset++] = (int) ((block12 >>> 34) & 524287L);
values[valuesOffset++] = (int) ((block12 >>> 15) & 524287L);
final long block13 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block12 & 32767L) << 4) | (block13 >>> 60));
values[valuesOffset++] = (int) ((block13 >>> 41) & 524287L);
values[valuesOffset++] = (int) ((block13 >>> 22) & 524287L);
values[valuesOffset++] = (int) ((block13 >>> 3) & 524287L);
final long block14 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block13 & 7L) << 16) | (block14 >>> 48));
values[valuesOffset++] = (int) ((block14 >>> 29) & 524287L);
values[valuesOffset++] = (int) ((block14 >>> 10) & 524287L);
final long block15 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block14 & 1023L) << 9) | (block15 >>> 55));
values[valuesOffset++] = (int) ((block15 >>> 36) & 524287L);
values[valuesOffset++] = (int) ((block15 >>> 17) & 524287L);
final long block16 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block15 & 131071L) << 2) | (block16 >>> 62));
values[valuesOffset++] = (int) ((block16 >>> 43) & 524287L);
values[valuesOffset++] = (int) ((block16 >>> 24) & 524287L);
values[valuesOffset++] = (int) ((block16 >>> 5) & 524287L);
final long block17 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block16 & 31L) << 14) | (block17 >>> 50));
values[valuesOffset++] = (int) ((block17 >>> 31) & 524287L);
values[valuesOffset++] = (int) ((block17 >>> 12) & 524287L);
final long block18 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block17 & 4095L) << 7) | (block18 >>> 57));
values[valuesOffset++] = (int) ((block18 >>> 38) & 524287L);
values[valuesOffset++] = (int) ((block18 >>> 19) & 524287L);
values[valuesOffset++] = (int) (block18 & 524287L);
}
}
@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;
final int byte2 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte0 << 11) | (byte1 << 3) | (byte2 >>> 5);
final int byte3 = blocks[blocksOffset++] & 0xFF;
final int byte4 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte2 & 31) << 14) | (byte3 << 6) | (byte4 >>> 2);
final int byte5 = blocks[blocksOffset++] & 0xFF;
final int byte6 = blocks[blocksOffset++] & 0xFF;
final int byte7 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte4 & 3) << 17) | (byte5 << 9) | (byte6 << 1) | (byte7 >>> 7);
final int byte8 = blocks[blocksOffset++] & 0xFF;
final int byte9 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte7 & 127) << 12) | (byte8 << 4) | (byte9 >>> 4);
final int byte10 = blocks[blocksOffset++] & 0xFF;
final int byte11 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte9 & 15) << 15) | (byte10 << 7) | (byte11 >>> 1);
final int byte12 = blocks[blocksOffset++] & 0xFF;
final int byte13 = blocks[blocksOffset++] & 0xFF;
final int byte14 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte11 & 1) << 18) | (byte12 << 10) | (byte13 << 2) | (byte14 >>> 6);
final int byte15 = blocks[blocksOffset++] & 0xFF;
final int byte16 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte14 & 63) << 13) | (byte15 << 5) | (byte16 >>> 3);
final int byte17 = blocks[blocksOffset++] & 0xFF;
final int byte18 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte16 & 7) << 16) | (byte17 << 8) | byte18;
final int byte19 = blocks[blocksOffset++] & 0xFF;
final int byte20 = blocks[blocksOffset++] & 0xFF;
final int byte21 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte19 << 11) | (byte20 << 3) | (byte21 >>> 5);
final int byte22 = blocks[blocksOffset++] & 0xFF;
final int byte23 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte21 & 31) << 14) | (byte22 << 6) | (byte23 >>> 2);
final int byte24 = blocks[blocksOffset++] & 0xFF;
final int byte25 = blocks[blocksOffset++] & 0xFF;
final int byte26 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte23 & 3) << 17) | (byte24 << 9) | (byte25 << 1) | (byte26 >>> 7);
final int byte27 = blocks[blocksOffset++] & 0xFF;
final int byte28 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte26 & 127) << 12) | (byte27 << 4) | (byte28 >>> 4);
final int byte29 = blocks[blocksOffset++] & 0xFF;
final int byte30 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte28 & 15) << 15) | (byte29 << 7) | (byte30 >>> 1);
final int byte31 = blocks[blocksOffset++] & 0xFF;
final int byte32 = blocks[blocksOffset++] & 0xFF;
final int byte33 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte30 & 1) << 18) | (byte31 << 10) | (byte32 << 2) | (byte33 >>> 6);
final int byte34 = blocks[blocksOffset++] & 0xFF;
final int byte35 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte33 & 63) << 13) | (byte34 << 5) | (byte35 >>> 3);
final int byte36 = blocks[blocksOffset++] & 0xFF;
final int byte37 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte35 & 7) << 16) | (byte36 << 8) | byte37;
final int byte38 = blocks[blocksOffset++] & 0xFF;
final int byte39 = blocks[blocksOffset++] & 0xFF;
final int byte40 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte38 << 11) | (byte39 << 3) | (byte40 >>> 5);
final int byte41 = blocks[blocksOffset++] & 0xFF;
final int byte42 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte40 & 31) << 14) | (byte41 << 6) | (byte42 >>> 2);
final int byte43 = blocks[blocksOffset++] & 0xFF;
final int byte44 = blocks[blocksOffset++] & 0xFF;
final int byte45 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte42 & 3) << 17) | (byte43 << 9) | (byte44 << 1) | (byte45 >>> 7);
final int byte46 = blocks[blocksOffset++] & 0xFF;
final int byte47 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte45 & 127) << 12) | (byte46 << 4) | (byte47 >>> 4);
final int byte48 = blocks[blocksOffset++] & 0xFF;
final int byte49 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte47 & 15) << 15) | (byte48 << 7) | (byte49 >>> 1);
final int byte50 = blocks[blocksOffset++] & 0xFF;
final int byte51 = blocks[blocksOffset++] & 0xFF;
final int byte52 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte49 & 1) << 18) | (byte50 << 10) | (byte51 << 2) | (byte52 >>> 6);
final int byte53 = blocks[blocksOffset++] & 0xFF;
final int byte54 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte52 & 63) << 13) | (byte53 << 5) | (byte54 >>> 3);
final int byte55 = blocks[blocksOffset++] & 0xFF;
final int byte56 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte54 & 7) << 16) | (byte55 << 8) | byte56;
final int byte57 = blocks[blocksOffset++] & 0xFF;
final int byte58 = blocks[blocksOffset++] & 0xFF;
final int byte59 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte57 << 11) | (byte58 << 3) | (byte59 >>> 5);
final int byte60 = blocks[blocksOffset++] & 0xFF;
final int byte61 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte59 & 31) << 14) | (byte60 << 6) | (byte61 >>> 2);
final int byte62 = blocks[blocksOffset++] & 0xFF;
final int byte63 = blocks[blocksOffset++] & 0xFF;
final int byte64 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte61 & 3) << 17) | (byte62 << 9) | (byte63 << 1) | (byte64 >>> 7);
final int byte65 = blocks[blocksOffset++] & 0xFF;
final int byte66 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte64 & 127) << 12) | (byte65 << 4) | (byte66 >>> 4);
final int byte67 = blocks[blocksOffset++] & 0xFF;
final int byte68 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte66 & 15) << 15) | (byte67 << 7) | (byte68 >>> 1);
final int byte69 = blocks[blocksOffset++] & 0xFF;
final int byte70 = blocks[blocksOffset++] & 0xFF;
final int byte71 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte68 & 1) << 18) | (byte69 << 10) | (byte70 << 2) | (byte71 >>> 6);
final int byte72 = blocks[blocksOffset++] & 0xFF;
final int byte73 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte71 & 63) << 13) | (byte72 << 5) | (byte73 >>> 3);
final int byte74 = blocks[blocksOffset++] & 0xFF;
final int byte75 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte73 & 7) << 16) | (byte74 << 8) | byte75;
final int byte76 = blocks[blocksOffset++] & 0xFF;
final int byte77 = blocks[blocksOffset++] & 0xFF;
final int byte78 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte76 << 11) | (byte77 << 3) | (byte78 >>> 5);
final int byte79 = blocks[blocksOffset++] & 0xFF;
final int byte80 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte78 & 31) << 14) | (byte79 << 6) | (byte80 >>> 2);
final int byte81 = blocks[blocksOffset++] & 0xFF;
final int byte82 = blocks[blocksOffset++] & 0xFF;
final int byte83 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte80 & 3) << 17) | (byte81 << 9) | (byte82 << 1) | (byte83 >>> 7);
final int byte84 = blocks[blocksOffset++] & 0xFF;
final int byte85 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte83 & 127) << 12) | (byte84 << 4) | (byte85 >>> 4);
final int byte86 = blocks[blocksOffset++] & 0xFF;
final int byte87 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte85 & 15) << 15) | (byte86 << 7) | (byte87 >>> 1);
final int byte88 = blocks[blocksOffset++] & 0xFF;
final int byte89 = blocks[blocksOffset++] & 0xFF;
final int byte90 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte87 & 1) << 18) | (byte88 << 10) | (byte89 << 2) | (byte90 >>> 6);
final int byte91 = blocks[blocksOffset++] & 0xFF;
final int byte92 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte90 & 63) << 13) | (byte91 << 5) | (byte92 >>> 3);
final int byte93 = blocks[blocksOffset++] & 0xFF;
final int byte94 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte92 & 7) << 16) | (byte93 << 8) | byte94;
final int byte95 = blocks[blocksOffset++] & 0xFF;
final int byte96 = blocks[blocksOffset++] & 0xFF;
final int byte97 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte95 << 11) | (byte96 << 3) | (byte97 >>> 5);
final int byte98 = blocks[blocksOffset++] & 0xFF;
final int byte99 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte97 & 31) << 14) | (byte98 << 6) | (byte99 >>> 2);
final int byte100 = blocks[blocksOffset++] & 0xFF;
final int byte101 = blocks[blocksOffset++] & 0xFF;
final int byte102 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte99 & 3) << 17) | (byte100 << 9) | (byte101 << 1) | (byte102 >>> 7);
final int byte103 = blocks[blocksOffset++] & 0xFF;
final int byte104 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte102 & 127) << 12) | (byte103 << 4) | (byte104 >>> 4);
final int byte105 = blocks[blocksOffset++] & 0xFF;
final int byte106 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte104 & 15) << 15) | (byte105 << 7) | (byte106 >>> 1);
final int byte107 = blocks[blocksOffset++] & 0xFF;
final int byte108 = blocks[blocksOffset++] & 0xFF;
final int byte109 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte106 & 1) << 18) | (byte107 << 10) | (byte108 << 2) | (byte109 >>> 6);
final int byte110 = blocks[blocksOffset++] & 0xFF;
final int byte111 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte109 & 63) << 13) | (byte110 << 5) | (byte111 >>> 3);
final int byte112 = blocks[blocksOffset++] & 0xFF;
final int byte113 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte111 & 7) << 16) | (byte112 << 8) | byte113;
final int byte114 = blocks[blocksOffset++] & 0xFF;
final int byte115 = blocks[blocksOffset++] & 0xFF;
final int byte116 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte114 << 11) | (byte115 << 3) | (byte116 >>> 5);
final int byte117 = blocks[blocksOffset++] & 0xFF;
final int byte118 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte116 & 31) << 14) | (byte117 << 6) | (byte118 >>> 2);
final int byte119 = blocks[blocksOffset++] & 0xFF;
final int byte120 = blocks[blocksOffset++] & 0xFF;
final int byte121 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte118 & 3) << 17) | (byte119 << 9) | (byte120 << 1) | (byte121 >>> 7);
final int byte122 = blocks[blocksOffset++] & 0xFF;
final int byte123 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte121 & 127) << 12) | (byte122 << 4) | (byte123 >>> 4);
final int byte124 = blocks[blocksOffset++] & 0xFF;
final int byte125 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte123 & 15) << 15) | (byte124 << 7) | (byte125 >>> 1);
final int byte126 = blocks[blocksOffset++] & 0xFF;
final int byte127 = blocks[blocksOffset++] & 0xFF;
final int byte128 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte125 & 1) << 18) | (byte126 << 10) | (byte127 << 2) | (byte128 >>> 6);
final int byte129 = blocks[blocksOffset++] & 0xFF;
final int byte130 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte128 & 63) << 13) | (byte129 << 5) | (byte130 >>> 3);
final int byte131 = blocks[blocksOffset++] & 0xFF;
final int byte132 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte130 & 7) << 16) | (byte131 << 8) | byte132;
final int byte133 = blocks[blocksOffset++] & 0xFF;
final int byte134 = blocks[blocksOffset++] & 0xFF;
final int byte135 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte133 << 11) | (byte134 << 3) | (byte135 >>> 5);
final int byte136 = blocks[blocksOffset++] & 0xFF;
final int byte137 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte135 & 31) << 14) | (byte136 << 6) | (byte137 >>> 2);
final int byte138 = blocks[blocksOffset++] & 0xFF;
final int byte139 = blocks[blocksOffset++] & 0xFF;
final int byte140 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte137 & 3) << 17) | (byte138 << 9) | (byte139 << 1) | (byte140 >>> 7);
final int byte141 = blocks[blocksOffset++] & 0xFF;
final int byte142 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte140 & 127) << 12) | (byte141 << 4) | (byte142 >>> 4);
final int byte143 = blocks[blocksOffset++] & 0xFF;
final int byte144 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte142 & 15) << 15) | (byte143 << 7) | (byte144 >>> 1);
final int byte145 = blocks[blocksOffset++] & 0xFF;
final int byte146 = blocks[blocksOffset++] & 0xFF;
final int byte147 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte144 & 1) << 18) | (byte145 << 10) | (byte146 << 2) | (byte147 >>> 6);
final int byte148 = blocks[blocksOffset++] & 0xFF;
final int byte149 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte147 & 63) << 13) | (byte148 << 5) | (byte149 >>> 3);
final int byte150 = blocks[blocksOffset++] & 0xFF;
final int byte151 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte149 & 7) << 16) | (byte150 << 8) | byte151;
}
@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;
final int byte2 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte0 << 11) | (byte1 << 3) | (byte2 >>> 5);
final int byte3 = blocks[blocksOffset++] & 0xFF;
final int byte4 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte2 & 31) << 14) | (byte3 << 6) | (byte4 >>> 2);
final int byte5 = blocks[blocksOffset++] & 0xFF;
final int byte6 = blocks[blocksOffset++] & 0xFF;
final int byte7 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte4 & 3) << 17) | (byte5 << 9) | (byte6 << 1) | (byte7 >>> 7);
final int byte8 = blocks[blocksOffset++] & 0xFF;
final int byte9 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte7 & 127) << 12) | (byte8 << 4) | (byte9 >>> 4);
final int byte10 = blocks[blocksOffset++] & 0xFF;
final int byte11 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte9 & 15) << 15) | (byte10 << 7) | (byte11 >>> 1);
final int byte12 = blocks[blocksOffset++] & 0xFF;
final int byte13 = blocks[blocksOffset++] & 0xFF;
final int byte14 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte11 & 1) << 18) | (byte12 << 10) | (byte13 << 2) | (byte14 >>> 6);
final int byte15 = blocks[blocksOffset++] & 0xFF;
final int byte16 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte14 & 63) << 13) | (byte15 << 5) | (byte16 >>> 3);
final int byte17 = blocks[blocksOffset++] & 0xFF;
final int byte18 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte16 & 7) << 16) | (byte17 << 8) | byte18;
}
}
@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 >>> 45;
values[valuesOffset++] = (block0 >>> 26) & 524287L;
values[valuesOffset++] = (block0 >>> 7) & 524287L;
final long block1 = blocks[blocksOffset++];
values[valuesOffset++] = ((block0 & 127L) << 12) | (block1 >>> 52);
values[valuesOffset++] = (block1 >>> 33) & 524287L;
values[valuesOffset++] = (block1 >>> 14) & 524287L;
final long block2 = blocks[blocksOffset++];
values[valuesOffset++] = ((block1 & 16383L) << 5) | (block2 >>> 59);
values[valuesOffset++] = (block2 >>> 40) & 524287L;
values[valuesOffset++] = (block2 >>> 21) & 524287L;
values[valuesOffset++] = (block2 >>> 2) & 524287L;
final long block3 = blocks[blocksOffset++];
values[valuesOffset++] = ((block2 & 3L) << 17) | (block3 >>> 47);
values[valuesOffset++] = (block3 >>> 28) & 524287L;
values[valuesOffset++] = (block3 >>> 9) & 524287L;
final long block4 = blocks[blocksOffset++];
values[valuesOffset++] = ((block3 & 511L) << 10) | (block4 >>> 54);
values[valuesOffset++] = (block4 >>> 35) & 524287L;
values[valuesOffset++] = (block4 >>> 16) & 524287L;
final long block5 = blocks[blocksOffset++];
values[valuesOffset++] = ((block4 & 65535L) << 3) | (block5 >>> 61);
values[valuesOffset++] = (block5 >>> 42) & 524287L;
values[valuesOffset++] = (block5 >>> 23) & 524287L;
values[valuesOffset++] = (block5 >>> 4) & 524287L;
final long block6 = blocks[blocksOffset++];
values[valuesOffset++] = ((block5 & 15L) << 15) | (block6 >>> 49);
values[valuesOffset++] = (block6 >>> 30) & 524287L;
values[valuesOffset++] = (block6 >>> 11) & 524287L;
final long block7 = blocks[blocksOffset++];
values[valuesOffset++] = ((block6 & 2047L) << 8) | (block7 >>> 56);
values[valuesOffset++] = (block7 >>> 37) & 524287L;
values[valuesOffset++] = (block7 >>> 18) & 524287L;
final long block8 = blocks[blocksOffset++];
values[valuesOffset++] = ((block7 & 262143L) << 1) | (block8 >>> 63);
values[valuesOffset++] = (block8 >>> 44) & 524287L;
values[valuesOffset++] = (block8 >>> 25) & 524287L;
values[valuesOffset++] = (block8 >>> 6) & 524287L;
final long block9 = blocks[blocksOffset++];
values[valuesOffset++] = ((block8 & 63L) << 13) | (block9 >>> 51);
values[valuesOffset++] = (block9 >>> 32) & 524287L;
values[valuesOffset++] = (block9 >>> 13) & 524287L;
final long block10 = blocks[blocksOffset++];
values[valuesOffset++] = ((block9 & 8191L) << 6) | (block10 >>> 58);
values[valuesOffset++] = (block10 >>> 39) & 524287L;
values[valuesOffset++] = (block10 >>> 20) & 524287L;
values[valuesOffset++] = (block10 >>> 1) & 524287L;
final long block11 = blocks[blocksOffset++];
values[valuesOffset++] = ((block10 & 1L) << 18) | (block11 >>> 46);
values[valuesOffset++] = (block11 >>> 27) & 524287L;
values[valuesOffset++] = (block11 >>> 8) & 524287L;
final long block12 = blocks[blocksOffset++];
values[valuesOffset++] = ((block11 & 255L) << 11) | (block12 >>> 53);
values[valuesOffset++] = (block12 >>> 34) & 524287L;
values[valuesOffset++] = (block12 >>> 15) & 524287L;
final long block13 = blocks[blocksOffset++];
values[valuesOffset++] = ((block12 & 32767L) << 4) | (block13 >>> 60);
values[valuesOffset++] = (block13 >>> 41) & 524287L;
values[valuesOffset++] = (block13 >>> 22) & 524287L;
values[valuesOffset++] = (block13 >>> 3) & 524287L;
final long block14 = blocks[blocksOffset++];
values[valuesOffset++] = ((block13 & 7L) << 16) | (block14 >>> 48);
values[valuesOffset++] = (block14 >>> 29) & 524287L;
values[valuesOffset++] = (block14 >>> 10) & 524287L;
final long block15 = blocks[blocksOffset++];
values[valuesOffset++] = ((block14 & 1023L) << 9) | (block15 >>> 55);
values[valuesOffset++] = (block15 >>> 36) & 524287L;
values[valuesOffset++] = (block15 >>> 17) & 524287L;
final long block16 = blocks[blocksOffset++];
values[valuesOffset++] = ((block15 & 131071L) << 2) | (block16 >>> 62);
values[valuesOffset++] = (block16 >>> 43) & 524287L;
values[valuesOffset++] = (block16 >>> 24) & 524287L;
values[valuesOffset++] = (block16 >>> 5) & 524287L;
final long block17 = blocks[blocksOffset++];
values[valuesOffset++] = ((block16 & 31L) << 14) | (block17 >>> 50);
values[valuesOffset++] = (block17 >>> 31) & 524287L;
values[valuesOffset++] = (block17 >>> 12) & 524287L;
final long block18 = blocks[blocksOffset++];
values[valuesOffset++] = ((block17 & 4095L) << 7) | (block18 >>> 57);
values[valuesOffset++] = (block18 >>> 38) & 524287L;
values[valuesOffset++] = (block18 >>> 19) & 524287L;
values[valuesOffset++] = block18 & 524287L;
}
@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 >>> 45;
values[valuesOffset++] = (block0 >>> 26) & 524287L;
values[valuesOffset++] = (block0 >>> 7) & 524287L;
final long block1 = blocks[blocksOffset++];
values[valuesOffset++] = ((block0 & 127L) << 12) | (block1 >>> 52);
values[valuesOffset++] = (block1 >>> 33) & 524287L;
values[valuesOffset++] = (block1 >>> 14) & 524287L;
final long block2 = blocks[blocksOffset++];
values[valuesOffset++] = ((block1 & 16383L) << 5) | (block2 >>> 59);
values[valuesOffset++] = (block2 >>> 40) & 524287L;
values[valuesOffset++] = (block2 >>> 21) & 524287L;
values[valuesOffset++] = (block2 >>> 2) & 524287L;
final long block3 = blocks[blocksOffset++];
values[valuesOffset++] = ((block2 & 3L) << 17) | (block3 >>> 47);
values[valuesOffset++] = (block3 >>> 28) & 524287L;
values[valuesOffset++] = (block3 >>> 9) & 524287L;
final long block4 = blocks[blocksOffset++];
values[valuesOffset++] = ((block3 & 511L) << 10) | (block4 >>> 54);
values[valuesOffset++] = (block4 >>> 35) & 524287L;
values[valuesOffset++] = (block4 >>> 16) & 524287L;
final long block5 = blocks[blocksOffset++];
values[valuesOffset++] = ((block4 & 65535L) << 3) | (block5 >>> 61);
values[valuesOffset++] = (block5 >>> 42) & 524287L;
values[valuesOffset++] = (block5 >>> 23) & 524287L;
values[valuesOffset++] = (block5 >>> 4) & 524287L;
final long block6 = blocks[blocksOffset++];
values[valuesOffset++] = ((block5 & 15L) << 15) | (block6 >>> 49);
values[valuesOffset++] = (block6 >>> 30) & 524287L;
values[valuesOffset++] = (block6 >>> 11) & 524287L;
final long block7 = blocks[blocksOffset++];
values[valuesOffset++] = ((block6 & 2047L) << 8) | (block7 >>> 56);
values[valuesOffset++] = (block7 >>> 37) & 524287L;
values[valuesOffset++] = (block7 >>> 18) & 524287L;
final long block8 = blocks[blocksOffset++];
values[valuesOffset++] = ((block7 & 262143L) << 1) | (block8 >>> 63);
values[valuesOffset++] = (block8 >>> 44) & 524287L;
values[valuesOffset++] = (block8 >>> 25) & 524287L;
values[valuesOffset++] = (block8 >>> 6) & 524287L;
final long block9 = blocks[blocksOffset++];
values[valuesOffset++] = ((block8 & 63L) << 13) | (block9 >>> 51);
values[valuesOffset++] = (block9 >>> 32) & 524287L;
values[valuesOffset++] = (block9 >>> 13) & 524287L;
final long block10 = blocks[blocksOffset++];
values[valuesOffset++] = ((block9 & 8191L) << 6) | (block10 >>> 58);
values[valuesOffset++] = (block10 >>> 39) & 524287L;
values[valuesOffset++] = (block10 >>> 20) & 524287L;
values[valuesOffset++] = (block10 >>> 1) & 524287L;
final long block11 = blocks[blocksOffset++];
values[valuesOffset++] = ((block10 & 1L) << 18) | (block11 >>> 46);
values[valuesOffset++] = (block11 >>> 27) & 524287L;
values[valuesOffset++] = (block11 >>> 8) & 524287L;
final long block12 = blocks[blocksOffset++];
values[valuesOffset++] = ((block11 & 255L) << 11) | (block12 >>> 53);
values[valuesOffset++] = (block12 >>> 34) & 524287L;
values[valuesOffset++] = (block12 >>> 15) & 524287L;
final long block13 = blocks[blocksOffset++];
values[valuesOffset++] = ((block12 & 32767L) << 4) | (block13 >>> 60);
values[valuesOffset++] = (block13 >>> 41) & 524287L;
values[valuesOffset++] = (block13 >>> 22) & 524287L;
values[valuesOffset++] = (block13 >>> 3) & 524287L;
final long block14 = blocks[blocksOffset++];
values[valuesOffset++] = ((block13 & 7L) << 16) | (block14 >>> 48);
values[valuesOffset++] = (block14 >>> 29) & 524287L;
values[valuesOffset++] = (block14 >>> 10) & 524287L;
final long block15 = blocks[blocksOffset++];
values[valuesOffset++] = ((block14 & 1023L) << 9) | (block15 >>> 55);
values[valuesOffset++] = (block15 >>> 36) & 524287L;
values[valuesOffset++] = (block15 >>> 17) & 524287L;
final long block16 = blocks[blocksOffset++];
values[valuesOffset++] = ((block15 & 131071L) << 2) | (block16 >>> 62);
values[valuesOffset++] = (block16 >>> 43) & 524287L;
values[valuesOffset++] = (block16 >>> 24) & 524287L;
values[valuesOffset++] = (block16 >>> 5) & 524287L;
final long block17 = blocks[blocksOffset++];
values[valuesOffset++] = ((block16 & 31L) << 14) | (block17 >>> 50);
values[valuesOffset++] = (block17 >>> 31) & 524287L;
values[valuesOffset++] = (block17 >>> 12) & 524287L;
final long block18 = blocks[blocksOffset++];
values[valuesOffset++] = ((block17 & 4095L) << 7) | (block18 >>> 57);
values[valuesOffset++] = (block18 >>> 38) & 524287L;
values[valuesOffset++] = (block18 >>> 19) & 524287L;
values[valuesOffset++] = block18 & 524287L;
}
}
@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;
final long byte2 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte0 << 11) | (byte1 << 3) | (byte2 >>> 5);
final long byte3 = blocks[blocksOffset++] & 0xFF;
final long byte4 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte2 & 31) << 14) | (byte3 << 6) | (byte4 >>> 2);
final long byte5 = blocks[blocksOffset++] & 0xFF;
final long byte6 = blocks[blocksOffset++] & 0xFF;
final long byte7 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte4 & 3) << 17) | (byte5 << 9) | (byte6 << 1) | (byte7 >>> 7);
final long byte8 = blocks[blocksOffset++] & 0xFF;
final long byte9 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte7 & 127) << 12) | (byte8 << 4) | (byte9 >>> 4);
final long byte10 = blocks[blocksOffset++] & 0xFF;
final long byte11 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte9 & 15) << 15) | (byte10 << 7) | (byte11 >>> 1);
final long byte12 = blocks[blocksOffset++] & 0xFF;
final long byte13 = blocks[blocksOffset++] & 0xFF;
final long byte14 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte11 & 1) << 18) | (byte12 << 10) | (byte13 << 2) | (byte14 >>> 6);
final long byte15 = blocks[blocksOffset++] & 0xFF;
final long byte16 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte14 & 63) << 13) | (byte15 << 5) | (byte16 >>> 3);
final long byte17 = blocks[blocksOffset++] & 0xFF;
final long byte18 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte16 & 7) << 16) | (byte17 << 8) | byte18;
final long byte19 = blocks[blocksOffset++] & 0xFF;
final long byte20 = blocks[blocksOffset++] & 0xFF;
final long byte21 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte19 << 11) | (byte20 << 3) | (byte21 >>> 5);
final long byte22 = blocks[blocksOffset++] & 0xFF;
final long byte23 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte21 & 31) << 14) | (byte22 << 6) | (byte23 >>> 2);
final long byte24 = blocks[blocksOffset++] & 0xFF;
final long byte25 = blocks[blocksOffset++] & 0xFF;
final long byte26 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte23 & 3) << 17) | (byte24 << 9) | (byte25 << 1) | (byte26 >>> 7);
final long byte27 = blocks[blocksOffset++] & 0xFF;
final long byte28 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte26 & 127) << 12) | (byte27 << 4) | (byte28 >>> 4);
final long byte29 = blocks[blocksOffset++] & 0xFF;
final long byte30 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte28 & 15) << 15) | (byte29 << 7) | (byte30 >>> 1);
final long byte31 = blocks[blocksOffset++] & 0xFF;
final long byte32 = blocks[blocksOffset++] & 0xFF;
final long byte33 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte30 & 1) << 18) | (byte31 << 10) | (byte32 << 2) | (byte33 >>> 6);
final long byte34 = blocks[blocksOffset++] & 0xFF;
final long byte35 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte33 & 63) << 13) | (byte34 << 5) | (byte35 >>> 3);
final long byte36 = blocks[blocksOffset++] & 0xFF;
final long byte37 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte35 & 7) << 16) | (byte36 << 8) | byte37;
final long byte38 = blocks[blocksOffset++] & 0xFF;
final long byte39 = blocks[blocksOffset++] & 0xFF;
final long byte40 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte38 << 11) | (byte39 << 3) | (byte40 >>> 5);
final long byte41 = blocks[blocksOffset++] & 0xFF;
final long byte42 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte40 & 31) << 14) | (byte41 << 6) | (byte42 >>> 2);
final long byte43 = blocks[blocksOffset++] & 0xFF;
final long byte44 = blocks[blocksOffset++] & 0xFF;
final long byte45 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte42 & 3) << 17) | (byte43 << 9) | (byte44 << 1) | (byte45 >>> 7);
final long byte46 = blocks[blocksOffset++] & 0xFF;
final long byte47 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte45 & 127) << 12) | (byte46 << 4) | (byte47 >>> 4);
final long byte48 = blocks[blocksOffset++] & 0xFF;
final long byte49 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte47 & 15) << 15) | (byte48 << 7) | (byte49 >>> 1);
final long byte50 = blocks[blocksOffset++] & 0xFF;
final long byte51 = blocks[blocksOffset++] & 0xFF;
final long byte52 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte49 & 1) << 18) | (byte50 << 10) | (byte51 << 2) | (byte52 >>> 6);
final long byte53 = blocks[blocksOffset++] & 0xFF;
final long byte54 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte52 & 63) << 13) | (byte53 << 5) | (byte54 >>> 3);
final long byte55 = blocks[blocksOffset++] & 0xFF;
final long byte56 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte54 & 7) << 16) | (byte55 << 8) | byte56;
final long byte57 = blocks[blocksOffset++] & 0xFF;
final long byte58 = blocks[blocksOffset++] & 0xFF;
final long byte59 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte57 << 11) | (byte58 << 3) | (byte59 >>> 5);
final long byte60 = blocks[blocksOffset++] & 0xFF;
final long byte61 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte59 & 31) << 14) | (byte60 << 6) | (byte61 >>> 2);
final long byte62 = blocks[blocksOffset++] & 0xFF;
final long byte63 = blocks[blocksOffset++] & 0xFF;
final long byte64 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte61 & 3) << 17) | (byte62 << 9) | (byte63 << 1) | (byte64 >>> 7);
final long byte65 = blocks[blocksOffset++] & 0xFF;
final long byte66 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte64 & 127) << 12) | (byte65 << 4) | (byte66 >>> 4);
final long byte67 = blocks[blocksOffset++] & 0xFF;
final long byte68 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte66 & 15) << 15) | (byte67 << 7) | (byte68 >>> 1);
final long byte69 = blocks[blocksOffset++] & 0xFF;
final long byte70 = blocks[blocksOffset++] & 0xFF;
final long byte71 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte68 & 1) << 18) | (byte69 << 10) | (byte70 << 2) | (byte71 >>> 6);
final long byte72 = blocks[blocksOffset++] & 0xFF;
final long byte73 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte71 & 63) << 13) | (byte72 << 5) | (byte73 >>> 3);
final long byte74 = blocks[blocksOffset++] & 0xFF;
final long byte75 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte73 & 7) << 16) | (byte74 << 8) | byte75;
final long byte76 = blocks[blocksOffset++] & 0xFF;
final long byte77 = blocks[blocksOffset++] & 0xFF;
final long byte78 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte76 << 11) | (byte77 << 3) | (byte78 >>> 5);
final long byte79 = blocks[blocksOffset++] & 0xFF;
final long byte80 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte78 & 31) << 14) | (byte79 << 6) | (byte80 >>> 2);
final long byte81 = blocks[blocksOffset++] & 0xFF;
final long byte82 = blocks[blocksOffset++] & 0xFF;
final long byte83 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte80 & 3) << 17) | (byte81 << 9) | (byte82 << 1) | (byte83 >>> 7);
final long byte84 = blocks[blocksOffset++] & 0xFF;
final long byte85 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte83 & 127) << 12) | (byte84 << 4) | (byte85 >>> 4);
final long byte86 = blocks[blocksOffset++] & 0xFF;
final long byte87 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte85 & 15) << 15) | (byte86 << 7) | (byte87 >>> 1);
final long byte88 = blocks[blocksOffset++] & 0xFF;
final long byte89 = blocks[blocksOffset++] & 0xFF;
final long byte90 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte87 & 1) << 18) | (byte88 << 10) | (byte89 << 2) | (byte90 >>> 6);
final long byte91 = blocks[blocksOffset++] & 0xFF;
final long byte92 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte90 & 63) << 13) | (byte91 << 5) | (byte92 >>> 3);
final long byte93 = blocks[blocksOffset++] & 0xFF;
final long byte94 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte92 & 7) << 16) | (byte93 << 8) | byte94;
final long byte95 = blocks[blocksOffset++] & 0xFF;
final long byte96 = blocks[blocksOffset++] & 0xFF;
final long byte97 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte95 << 11) | (byte96 << 3) | (byte97 >>> 5);
final long byte98 = blocks[blocksOffset++] & 0xFF;
final long byte99 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte97 & 31) << 14) | (byte98 << 6) | (byte99 >>> 2);
final long byte100 = blocks[blocksOffset++] & 0xFF;
final long byte101 = blocks[blocksOffset++] & 0xFF;
final long byte102 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte99 & 3) << 17) | (byte100 << 9) | (byte101 << 1) | (byte102 >>> 7);
final long byte103 = blocks[blocksOffset++] & 0xFF;
final long byte104 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte102 & 127) << 12) | (byte103 << 4) | (byte104 >>> 4);
final long byte105 = blocks[blocksOffset++] & 0xFF;
final long byte106 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte104 & 15) << 15) | (byte105 << 7) | (byte106 >>> 1);
final long byte107 = blocks[blocksOffset++] & 0xFF;
final long byte108 = blocks[blocksOffset++] & 0xFF;
final long byte109 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte106 & 1) << 18) | (byte107 << 10) | (byte108 << 2) | (byte109 >>> 6);
final long byte110 = blocks[blocksOffset++] & 0xFF;
final long byte111 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte109 & 63) << 13) | (byte110 << 5) | (byte111 >>> 3);
final long byte112 = blocks[blocksOffset++] & 0xFF;
final long byte113 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte111 & 7) << 16) | (byte112 << 8) | byte113;
final long byte114 = blocks[blocksOffset++] & 0xFF;
final long byte115 = blocks[blocksOffset++] & 0xFF;
final long byte116 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte114 << 11) | (byte115 << 3) | (byte116 >>> 5);
final long byte117 = blocks[blocksOffset++] & 0xFF;
final long byte118 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte116 & 31) << 14) | (byte117 << 6) | (byte118 >>> 2);
final long byte119 = blocks[blocksOffset++] & 0xFF;
final long byte120 = blocks[blocksOffset++] & 0xFF;
final long byte121 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte118 & 3) << 17) | (byte119 << 9) | (byte120 << 1) | (byte121 >>> 7);
final long byte122 = blocks[blocksOffset++] & 0xFF;
final long byte123 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte121 & 127) << 12) | (byte122 << 4) | (byte123 >>> 4);
final long byte124 = blocks[blocksOffset++] & 0xFF;
final long byte125 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte123 & 15) << 15) | (byte124 << 7) | (byte125 >>> 1);
final long byte126 = blocks[blocksOffset++] & 0xFF;
final long byte127 = blocks[blocksOffset++] & 0xFF;
final long byte128 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte125 & 1) << 18) | (byte126 << 10) | (byte127 << 2) | (byte128 >>> 6);
final long byte129 = blocks[blocksOffset++] & 0xFF;
final long byte130 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte128 & 63) << 13) | (byte129 << 5) | (byte130 >>> 3);
final long byte131 = blocks[blocksOffset++] & 0xFF;
final long byte132 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte130 & 7) << 16) | (byte131 << 8) | byte132;
final long byte133 = blocks[blocksOffset++] & 0xFF;
final long byte134 = blocks[blocksOffset++] & 0xFF;
final long byte135 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte133 << 11) | (byte134 << 3) | (byte135 >>> 5);
final long byte136 = blocks[blocksOffset++] & 0xFF;
final long byte137 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte135 & 31) << 14) | (byte136 << 6) | (byte137 >>> 2);
final long byte138 = blocks[blocksOffset++] & 0xFF;
final long byte139 = blocks[blocksOffset++] & 0xFF;
final long byte140 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte137 & 3) << 17) | (byte138 << 9) | (byte139 << 1) | (byte140 >>> 7);
final long byte141 = blocks[blocksOffset++] & 0xFF;
final long byte142 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte140 & 127) << 12) | (byte141 << 4) | (byte142 >>> 4);
final long byte143 = blocks[blocksOffset++] & 0xFF;
final long byte144 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte142 & 15) << 15) | (byte143 << 7) | (byte144 >>> 1);
final long byte145 = blocks[blocksOffset++] & 0xFF;
final long byte146 = blocks[blocksOffset++] & 0xFF;
final long byte147 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte144 & 1) << 18) | (byte145 << 10) | (byte146 << 2) | (byte147 >>> 6);
final long byte148 = blocks[blocksOffset++] & 0xFF;
final long byte149 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte147 & 63) << 13) | (byte148 << 5) | (byte149 >>> 3);
final long byte150 = blocks[blocksOffset++] & 0xFF;
final long byte151 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte149 & 7) << 16) | (byte150 << 8) | byte151;
}
@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;
final long byte2 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte0 << 11) | (byte1 << 3) | (byte2 >>> 5);
final long byte3 = blocks[blocksOffset++] & 0xFF;
final long byte4 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte2 & 31) << 14) | (byte3 << 6) | (byte4 >>> 2);
final long byte5 = blocks[blocksOffset++] & 0xFF;
final long byte6 = blocks[blocksOffset++] & 0xFF;
final long byte7 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte4 & 3) << 17) | (byte5 << 9) | (byte6 << 1) | (byte7 >>> 7);
final long byte8 = blocks[blocksOffset++] & 0xFF;
final long byte9 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte7 & 127) << 12) | (byte8 << 4) | (byte9 >>> 4);
final long byte10 = blocks[blocksOffset++] & 0xFF;
final long byte11 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte9 & 15) << 15) | (byte10 << 7) | (byte11 >>> 1);
final long byte12 = blocks[blocksOffset++] & 0xFF;
final long byte13 = blocks[blocksOffset++] & 0xFF;
final long byte14 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte11 & 1) << 18) | (byte12 << 10) | (byte13 << 2) | (byte14 >>> 6);
final long byte15 = blocks[blocksOffset++] & 0xFF;
final long byte16 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte14 & 63) << 13) | (byte15 << 5) | (byte16 >>> 3);
final long byte17 = blocks[blocksOffset++] & 0xFF;
final long byte18 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte16 & 7) << 16) | (byte17 << 8) | byte18;
}
}
}

View File

@ -24,188 +24,52 @@ package org.apache.lucene.util.packed;
*/
final class BulkOperationPacked2 extends BulkOperationPacked {
public BulkOperationPacked2() {
super(2);
assert blockCount() == 1;
assert valueCount() == 32;
}
public BulkOperationPacked2() {
super(2);
assert blockCount() == 1;
assert valueCount() == 32;
}
@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 >>> 62);
values[valuesOffset++] = (int) ((block0 >>> 60) & 3L);
values[valuesOffset++] = (int) ((block0 >>> 58) & 3L);
values[valuesOffset++] = (int) ((block0 >>> 56) & 3L);
values[valuesOffset++] = (int) ((block0 >>> 54) & 3L);
values[valuesOffset++] = (int) ((block0 >>> 52) & 3L);
values[valuesOffset++] = (int) ((block0 >>> 50) & 3L);
values[valuesOffset++] = (int) ((block0 >>> 48) & 3L);
values[valuesOffset++] = (int) ((block0 >>> 46) & 3L);
values[valuesOffset++] = (int) ((block0 >>> 44) & 3L);
values[valuesOffset++] = (int) ((block0 >>> 42) & 3L);
values[valuesOffset++] = (int) ((block0 >>> 40) & 3L);
values[valuesOffset++] = (int) ((block0 >>> 38) & 3L);
values[valuesOffset++] = (int) ((block0 >>> 36) & 3L);
values[valuesOffset++] = (int) ((block0 >>> 34) & 3L);
values[valuesOffset++] = (int) ((block0 >>> 32) & 3L);
values[valuesOffset++] = (int) ((block0 >>> 30) & 3L);
values[valuesOffset++] = (int) ((block0 >>> 28) & 3L);
values[valuesOffset++] = (int) ((block0 >>> 26) & 3L);
values[valuesOffset++] = (int) ((block0 >>> 24) & 3L);
values[valuesOffset++] = (int) ((block0 >>> 22) & 3L);
values[valuesOffset++] = (int) ((block0 >>> 20) & 3L);
values[valuesOffset++] = (int) ((block0 >>> 18) & 3L);
values[valuesOffset++] = (int) ((block0 >>> 16) & 3L);
values[valuesOffset++] = (int) ((block0 >>> 14) & 3L);
values[valuesOffset++] = (int) ((block0 >>> 12) & 3L);
values[valuesOffset++] = (int) ((block0 >>> 10) & 3L);
values[valuesOffset++] = (int) ((block0 >>> 8) & 3L);
values[valuesOffset++] = (int) ((block0 >>> 6) & 3L);
values[valuesOffset++] = (int) ((block0 >>> 4) & 3L);
values[valuesOffset++] = (int) ((block0 >>> 2) & 3L);
values[valuesOffset++] = (int) (block0 & 3L);
@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 = 62; shift >= 0; shift -= 2) {
values[valuesOffset++] = (int) ((block >>> shift) & 3);
}
}
}
@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;
values[valuesOffset++] = byte0 >>> 6;
values[valuesOffset++] = (byte0 >>> 4) & 3;
values[valuesOffset++] = (byte0 >>> 2) & 3;
values[valuesOffset++] = byte0 & 3;
final int byte1 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte1 >>> 6;
values[valuesOffset++] = (byte1 >>> 4) & 3;
values[valuesOffset++] = (byte1 >>> 2) & 3;
values[valuesOffset++] = byte1 & 3;
final int byte2 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte2 >>> 6;
values[valuesOffset++] = (byte2 >>> 4) & 3;
values[valuesOffset++] = (byte2 >>> 2) & 3;
values[valuesOffset++] = byte2 & 3;
final int byte3 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte3 >>> 6;
values[valuesOffset++] = (byte3 >>> 4) & 3;
values[valuesOffset++] = (byte3 >>> 2) & 3;
values[valuesOffset++] = byte3 & 3;
final int byte4 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte4 >>> 6;
values[valuesOffset++] = (byte4 >>> 4) & 3;
values[valuesOffset++] = (byte4 >>> 2) & 3;
values[valuesOffset++] = byte4 & 3;
final int byte5 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte5 >>> 6;
values[valuesOffset++] = (byte5 >>> 4) & 3;
values[valuesOffset++] = (byte5 >>> 2) & 3;
values[valuesOffset++] = byte5 & 3;
final int byte6 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte6 >>> 6;
values[valuesOffset++] = (byte6 >>> 4) & 3;
values[valuesOffset++] = (byte6 >>> 2) & 3;
values[valuesOffset++] = byte6 & 3;
final int byte7 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte7 >>> 6;
values[valuesOffset++] = (byte7 >>> 4) & 3;
values[valuesOffset++] = (byte7 >>> 2) & 3;
values[valuesOffset++] = byte7 & 3;
@Override
public void decode(byte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) {
for (int j = 0; j < 8 * iterations; ++j) {
final byte block = blocks[blocksOffset++];
values[valuesOffset++] = (block >>> 6) & 3;
values[valuesOffset++] = (block >>> 4) & 3;
values[valuesOffset++] = (block >>> 2) & 3;
values[valuesOffset++] = block & 3;
}
}
@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 = 62; shift >= 0; shift -= 2) {
values[valuesOffset++] = (block >>> shift) & 3;
}
}
}
@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 >>> 62;
values[valuesOffset++] = (block0 >>> 60) & 3L;
values[valuesOffset++] = (block0 >>> 58) & 3L;
values[valuesOffset++] = (block0 >>> 56) & 3L;
values[valuesOffset++] = (block0 >>> 54) & 3L;
values[valuesOffset++] = (block0 >>> 52) & 3L;
values[valuesOffset++] = (block0 >>> 50) & 3L;
values[valuesOffset++] = (block0 >>> 48) & 3L;
values[valuesOffset++] = (block0 >>> 46) & 3L;
values[valuesOffset++] = (block0 >>> 44) & 3L;
values[valuesOffset++] = (block0 >>> 42) & 3L;
values[valuesOffset++] = (block0 >>> 40) & 3L;
values[valuesOffset++] = (block0 >>> 38) & 3L;
values[valuesOffset++] = (block0 >>> 36) & 3L;
values[valuesOffset++] = (block0 >>> 34) & 3L;
values[valuesOffset++] = (block0 >>> 32) & 3L;
values[valuesOffset++] = (block0 >>> 30) & 3L;
values[valuesOffset++] = (block0 >>> 28) & 3L;
values[valuesOffset++] = (block0 >>> 26) & 3L;
values[valuesOffset++] = (block0 >>> 24) & 3L;
values[valuesOffset++] = (block0 >>> 22) & 3L;
values[valuesOffset++] = (block0 >>> 20) & 3L;
values[valuesOffset++] = (block0 >>> 18) & 3L;
values[valuesOffset++] = (block0 >>> 16) & 3L;
values[valuesOffset++] = (block0 >>> 14) & 3L;
values[valuesOffset++] = (block0 >>> 12) & 3L;
values[valuesOffset++] = (block0 >>> 10) & 3L;
values[valuesOffset++] = (block0 >>> 8) & 3L;
values[valuesOffset++] = (block0 >>> 6) & 3L;
values[valuesOffset++] = (block0 >>> 4) & 3L;
values[valuesOffset++] = (block0 >>> 2) & 3L;
values[valuesOffset++] = block0 & 3L;
}
}
@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;
values[valuesOffset++] = byte0 >>> 6;
values[valuesOffset++] = (byte0 >>> 4) & 3;
values[valuesOffset++] = (byte0 >>> 2) & 3;
values[valuesOffset++] = byte0 & 3;
final long byte1 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte1 >>> 6;
values[valuesOffset++] = (byte1 >>> 4) & 3;
values[valuesOffset++] = (byte1 >>> 2) & 3;
values[valuesOffset++] = byte1 & 3;
final long byte2 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte2 >>> 6;
values[valuesOffset++] = (byte2 >>> 4) & 3;
values[valuesOffset++] = (byte2 >>> 2) & 3;
values[valuesOffset++] = byte2 & 3;
final long byte3 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte3 >>> 6;
values[valuesOffset++] = (byte3 >>> 4) & 3;
values[valuesOffset++] = (byte3 >>> 2) & 3;
values[valuesOffset++] = byte3 & 3;
final long byte4 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte4 >>> 6;
values[valuesOffset++] = (byte4 >>> 4) & 3;
values[valuesOffset++] = (byte4 >>> 2) & 3;
values[valuesOffset++] = byte4 & 3;
final long byte5 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte5 >>> 6;
values[valuesOffset++] = (byte5 >>> 4) & 3;
values[valuesOffset++] = (byte5 >>> 2) & 3;
values[valuesOffset++] = byte5 & 3;
final long byte6 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte6 >>> 6;
values[valuesOffset++] = (byte6 >>> 4) & 3;
values[valuesOffset++] = (byte6 >>> 2) & 3;
values[valuesOffset++] = byte6 & 3;
final long byte7 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte7 >>> 6;
values[valuesOffset++] = (byte7 >>> 4) & 3;
values[valuesOffset++] = (byte7 >>> 2) & 3;
values[valuesOffset++] = byte7 & 3;
}
@Override
public void decode(byte[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations) {
for (int j = 0; j < 8 * iterations; ++j) {
final byte block = blocks[blocksOffset++];
values[valuesOffset++] = (block >>> 6) & 3;
values[valuesOffset++] = (block >>> 4) & 3;
values[valuesOffset++] = (block >>> 2) & 3;
values[valuesOffset++] = block & 3;
}
}
}

View File

@ -24,196 +24,90 @@ package org.apache.lucene.util.packed;
*/
final class BulkOperationPacked20 extends BulkOperationPacked {
public BulkOperationPacked20() {
super(20);
assert blockCount() == 5;
assert valueCount() == 16;
}
public BulkOperationPacked20() {
super(20);
assert blockCount() == 5;
assert valueCount() == 16;
}
@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 >>> 44);
values[valuesOffset++] = (int) ((block0 >>> 24) & 1048575L);
values[valuesOffset++] = (int) ((block0 >>> 4) & 1048575L);
final long block1 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block0 & 15L) << 16) | (block1 >>> 48));
values[valuesOffset++] = (int) ((block1 >>> 28) & 1048575L);
values[valuesOffset++] = (int) ((block1 >>> 8) & 1048575L);
final long block2 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block1 & 255L) << 12) | (block2 >>> 52));
values[valuesOffset++] = (int) ((block2 >>> 32) & 1048575L);
values[valuesOffset++] = (int) ((block2 >>> 12) & 1048575L);
final long block3 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block2 & 4095L) << 8) | (block3 >>> 56));
values[valuesOffset++] = (int) ((block3 >>> 36) & 1048575L);
values[valuesOffset++] = (int) ((block3 >>> 16) & 1048575L);
final long block4 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block3 & 65535L) << 4) | (block4 >>> 60));
values[valuesOffset++] = (int) ((block4 >>> 40) & 1048575L);
values[valuesOffset++] = (int) ((block4 >>> 20) & 1048575L);
values[valuesOffset++] = (int) (block4 & 1048575L);
}
@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 >>> 44);
values[valuesOffset++] = (int) ((block0 >>> 24) & 1048575L);
values[valuesOffset++] = (int) ((block0 >>> 4) & 1048575L);
final long block1 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block0 & 15L) << 16) | (block1 >>> 48));
values[valuesOffset++] = (int) ((block1 >>> 28) & 1048575L);
values[valuesOffset++] = (int) ((block1 >>> 8) & 1048575L);
final long block2 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block1 & 255L) << 12) | (block2 >>> 52));
values[valuesOffset++] = (int) ((block2 >>> 32) & 1048575L);
values[valuesOffset++] = (int) ((block2 >>> 12) & 1048575L);
final long block3 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block2 & 4095L) << 8) | (block3 >>> 56));
values[valuesOffset++] = (int) ((block3 >>> 36) & 1048575L);
values[valuesOffset++] = (int) ((block3 >>> 16) & 1048575L);
final long block4 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block3 & 65535L) << 4) | (block4 >>> 60));
values[valuesOffset++] = (int) ((block4 >>> 40) & 1048575L);
values[valuesOffset++] = (int) ((block4 >>> 20) & 1048575L);
values[valuesOffset++] = (int) (block4 & 1048575L);
}
}
@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;
final int byte2 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte0 << 12) | (byte1 << 4) | (byte2 >>> 4);
final int byte3 = blocks[blocksOffset++] & 0xFF;
final int byte4 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte2 & 15) << 16) | (byte3 << 8) | byte4;
final int byte5 = blocks[blocksOffset++] & 0xFF;
final int byte6 = blocks[blocksOffset++] & 0xFF;
final int byte7 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte5 << 12) | (byte6 << 4) | (byte7 >>> 4);
final int byte8 = blocks[blocksOffset++] & 0xFF;
final int byte9 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte7 & 15) << 16) | (byte8 << 8) | byte9;
final int byte10 = blocks[blocksOffset++] & 0xFF;
final int byte11 = blocks[blocksOffset++] & 0xFF;
final int byte12 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte10 << 12) | (byte11 << 4) | (byte12 >>> 4);
final int byte13 = blocks[blocksOffset++] & 0xFF;
final int byte14 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte12 & 15) << 16) | (byte13 << 8) | byte14;
final int byte15 = blocks[blocksOffset++] & 0xFF;
final int byte16 = blocks[blocksOffset++] & 0xFF;
final int byte17 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte15 << 12) | (byte16 << 4) | (byte17 >>> 4);
final int byte18 = blocks[blocksOffset++] & 0xFF;
final int byte19 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte17 & 15) << 16) | (byte18 << 8) | byte19;
final int byte20 = blocks[blocksOffset++] & 0xFF;
final int byte21 = blocks[blocksOffset++] & 0xFF;
final int byte22 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte20 << 12) | (byte21 << 4) | (byte22 >>> 4);
final int byte23 = blocks[blocksOffset++] & 0xFF;
final int byte24 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte22 & 15) << 16) | (byte23 << 8) | byte24;
final int byte25 = blocks[blocksOffset++] & 0xFF;
final int byte26 = blocks[blocksOffset++] & 0xFF;
final int byte27 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte25 << 12) | (byte26 << 4) | (byte27 >>> 4);
final int byte28 = blocks[blocksOffset++] & 0xFF;
final int byte29 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte27 & 15) << 16) | (byte28 << 8) | byte29;
final int byte30 = blocks[blocksOffset++] & 0xFF;
final int byte31 = blocks[blocksOffset++] & 0xFF;
final int byte32 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte30 << 12) | (byte31 << 4) | (byte32 >>> 4);
final int byte33 = blocks[blocksOffset++] & 0xFF;
final int byte34 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte32 & 15) << 16) | (byte33 << 8) | byte34;
final int byte35 = blocks[blocksOffset++] & 0xFF;
final int byte36 = blocks[blocksOffset++] & 0xFF;
final int byte37 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte35 << 12) | (byte36 << 4) | (byte37 >>> 4);
final int byte38 = blocks[blocksOffset++] & 0xFF;
final int byte39 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte37 & 15) << 16) | (byte38 << 8) | byte39;
}
@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;
final int byte2 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte0 << 12) | (byte1 << 4) | (byte2 >>> 4);
final int byte3 = blocks[blocksOffset++] & 0xFF;
final int byte4 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte2 & 15) << 16) | (byte3 << 8) | byte4;
}
}
@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 >>> 44;
values[valuesOffset++] = (block0 >>> 24) & 1048575L;
values[valuesOffset++] = (block0 >>> 4) & 1048575L;
final long block1 = blocks[blocksOffset++];
values[valuesOffset++] = ((block0 & 15L) << 16) | (block1 >>> 48);
values[valuesOffset++] = (block1 >>> 28) & 1048575L;
values[valuesOffset++] = (block1 >>> 8) & 1048575L;
final long block2 = blocks[blocksOffset++];
values[valuesOffset++] = ((block1 & 255L) << 12) | (block2 >>> 52);
values[valuesOffset++] = (block2 >>> 32) & 1048575L;
values[valuesOffset++] = (block2 >>> 12) & 1048575L;
final long block3 = blocks[blocksOffset++];
values[valuesOffset++] = ((block2 & 4095L) << 8) | (block3 >>> 56);
values[valuesOffset++] = (block3 >>> 36) & 1048575L;
values[valuesOffset++] = (block3 >>> 16) & 1048575L;
final long block4 = blocks[blocksOffset++];
values[valuesOffset++] = ((block3 & 65535L) << 4) | (block4 >>> 60);
values[valuesOffset++] = (block4 >>> 40) & 1048575L;
values[valuesOffset++] = (block4 >>> 20) & 1048575L;
values[valuesOffset++] = block4 & 1048575L;
}
@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 >>> 44;
values[valuesOffset++] = (block0 >>> 24) & 1048575L;
values[valuesOffset++] = (block0 >>> 4) & 1048575L;
final long block1 = blocks[blocksOffset++];
values[valuesOffset++] = ((block0 & 15L) << 16) | (block1 >>> 48);
values[valuesOffset++] = (block1 >>> 28) & 1048575L;
values[valuesOffset++] = (block1 >>> 8) & 1048575L;
final long block2 = blocks[blocksOffset++];
values[valuesOffset++] = ((block1 & 255L) << 12) | (block2 >>> 52);
values[valuesOffset++] = (block2 >>> 32) & 1048575L;
values[valuesOffset++] = (block2 >>> 12) & 1048575L;
final long block3 = blocks[blocksOffset++];
values[valuesOffset++] = ((block2 & 4095L) << 8) | (block3 >>> 56);
values[valuesOffset++] = (block3 >>> 36) & 1048575L;
values[valuesOffset++] = (block3 >>> 16) & 1048575L;
final long block4 = blocks[blocksOffset++];
values[valuesOffset++] = ((block3 & 65535L) << 4) | (block4 >>> 60);
values[valuesOffset++] = (block4 >>> 40) & 1048575L;
values[valuesOffset++] = (block4 >>> 20) & 1048575L;
values[valuesOffset++] = block4 & 1048575L;
}
}
@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;
final long byte2 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte0 << 12) | (byte1 << 4) | (byte2 >>> 4);
final long byte3 = blocks[blocksOffset++] & 0xFF;
final long byte4 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte2 & 15) << 16) | (byte3 << 8) | byte4;
final long byte5 = blocks[blocksOffset++] & 0xFF;
final long byte6 = blocks[blocksOffset++] & 0xFF;
final long byte7 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte5 << 12) | (byte6 << 4) | (byte7 >>> 4);
final long byte8 = blocks[blocksOffset++] & 0xFF;
final long byte9 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte7 & 15) << 16) | (byte8 << 8) | byte9;
final long byte10 = blocks[blocksOffset++] & 0xFF;
final long byte11 = blocks[blocksOffset++] & 0xFF;
final long byte12 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte10 << 12) | (byte11 << 4) | (byte12 >>> 4);
final long byte13 = blocks[blocksOffset++] & 0xFF;
final long byte14 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte12 & 15) << 16) | (byte13 << 8) | byte14;
final long byte15 = blocks[blocksOffset++] & 0xFF;
final long byte16 = blocks[blocksOffset++] & 0xFF;
final long byte17 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte15 << 12) | (byte16 << 4) | (byte17 >>> 4);
final long byte18 = blocks[blocksOffset++] & 0xFF;
final long byte19 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte17 & 15) << 16) | (byte18 << 8) | byte19;
final long byte20 = blocks[blocksOffset++] & 0xFF;
final long byte21 = blocks[blocksOffset++] & 0xFF;
final long byte22 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte20 << 12) | (byte21 << 4) | (byte22 >>> 4);
final long byte23 = blocks[blocksOffset++] & 0xFF;
final long byte24 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte22 & 15) << 16) | (byte23 << 8) | byte24;
final long byte25 = blocks[blocksOffset++] & 0xFF;
final long byte26 = blocks[blocksOffset++] & 0xFF;
final long byte27 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte25 << 12) | (byte26 << 4) | (byte27 >>> 4);
final long byte28 = blocks[blocksOffset++] & 0xFF;
final long byte29 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte27 & 15) << 16) | (byte28 << 8) | byte29;
final long byte30 = blocks[blocksOffset++] & 0xFF;
final long byte31 = blocks[blocksOffset++] & 0xFF;
final long byte32 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte30 << 12) | (byte31 << 4) | (byte32 >>> 4);
final long byte33 = blocks[blocksOffset++] & 0xFF;
final long byte34 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte32 & 15) << 16) | (byte33 << 8) | byte34;
final long byte35 = blocks[blocksOffset++] & 0xFF;
final long byte36 = blocks[blocksOffset++] & 0xFF;
final long byte37 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte35 << 12) | (byte36 << 4) | (byte37 >>> 4);
final long byte38 = blocks[blocksOffset++] & 0xFF;
final long byte39 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte37 & 15) << 16) | (byte38 << 8) | byte39;
}
@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;
final long byte2 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte0 << 12) | (byte1 << 4) | (byte2 >>> 4);
final long byte3 = blocks[blocksOffset++] & 0xFF;
final long byte4 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte2 & 15) << 16) | (byte3 << 8) | byte4;
}
}
}

View File

@ -24,676 +24,262 @@ package org.apache.lucene.util.packed;
*/
final class BulkOperationPacked21 extends BulkOperationPacked {
public BulkOperationPacked21() {
super(21);
assert blockCount() == 21;
assert valueCount() == 64;
}
public BulkOperationPacked21() {
super(21);
assert blockCount() == 21;
assert valueCount() == 64;
}
@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 >>> 43);
values[valuesOffset++] = (int) ((block0 >>> 22) & 2097151L);
values[valuesOffset++] = (int) ((block0 >>> 1) & 2097151L);
final long block1 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block0 & 1L) << 20) | (block1 >>> 44));
values[valuesOffset++] = (int) ((block1 >>> 23) & 2097151L);
values[valuesOffset++] = (int) ((block1 >>> 2) & 2097151L);
final long block2 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block1 & 3L) << 19) | (block2 >>> 45));
values[valuesOffset++] = (int) ((block2 >>> 24) & 2097151L);
values[valuesOffset++] = (int) ((block2 >>> 3) & 2097151L);
final long block3 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block2 & 7L) << 18) | (block3 >>> 46));
values[valuesOffset++] = (int) ((block3 >>> 25) & 2097151L);
values[valuesOffset++] = (int) ((block3 >>> 4) & 2097151L);
final long block4 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block3 & 15L) << 17) | (block4 >>> 47));
values[valuesOffset++] = (int) ((block4 >>> 26) & 2097151L);
values[valuesOffset++] = (int) ((block4 >>> 5) & 2097151L);
final long block5 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block4 & 31L) << 16) | (block5 >>> 48));
values[valuesOffset++] = (int) ((block5 >>> 27) & 2097151L);
values[valuesOffset++] = (int) ((block5 >>> 6) & 2097151L);
final long block6 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block5 & 63L) << 15) | (block6 >>> 49));
values[valuesOffset++] = (int) ((block6 >>> 28) & 2097151L);
values[valuesOffset++] = (int) ((block6 >>> 7) & 2097151L);
final long block7 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block6 & 127L) << 14) | (block7 >>> 50));
values[valuesOffset++] = (int) ((block7 >>> 29) & 2097151L);
values[valuesOffset++] = (int) ((block7 >>> 8) & 2097151L);
final long block8 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block7 & 255L) << 13) | (block8 >>> 51));
values[valuesOffset++] = (int) ((block8 >>> 30) & 2097151L);
values[valuesOffset++] = (int) ((block8 >>> 9) & 2097151L);
final long block9 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block8 & 511L) << 12) | (block9 >>> 52));
values[valuesOffset++] = (int) ((block9 >>> 31) & 2097151L);
values[valuesOffset++] = (int) ((block9 >>> 10) & 2097151L);
final long block10 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block9 & 1023L) << 11) | (block10 >>> 53));
values[valuesOffset++] = (int) ((block10 >>> 32) & 2097151L);
values[valuesOffset++] = (int) ((block10 >>> 11) & 2097151L);
final long block11 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block10 & 2047L) << 10) | (block11 >>> 54));
values[valuesOffset++] = (int) ((block11 >>> 33) & 2097151L);
values[valuesOffset++] = (int) ((block11 >>> 12) & 2097151L);
final long block12 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block11 & 4095L) << 9) | (block12 >>> 55));
values[valuesOffset++] = (int) ((block12 >>> 34) & 2097151L);
values[valuesOffset++] = (int) ((block12 >>> 13) & 2097151L);
final long block13 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block12 & 8191L) << 8) | (block13 >>> 56));
values[valuesOffset++] = (int) ((block13 >>> 35) & 2097151L);
values[valuesOffset++] = (int) ((block13 >>> 14) & 2097151L);
final long block14 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block13 & 16383L) << 7) | (block14 >>> 57));
values[valuesOffset++] = (int) ((block14 >>> 36) & 2097151L);
values[valuesOffset++] = (int) ((block14 >>> 15) & 2097151L);
final long block15 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block14 & 32767L) << 6) | (block15 >>> 58));
values[valuesOffset++] = (int) ((block15 >>> 37) & 2097151L);
values[valuesOffset++] = (int) ((block15 >>> 16) & 2097151L);
final long block16 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block15 & 65535L) << 5) | (block16 >>> 59));
values[valuesOffset++] = (int) ((block16 >>> 38) & 2097151L);
values[valuesOffset++] = (int) ((block16 >>> 17) & 2097151L);
final long block17 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block16 & 131071L) << 4) | (block17 >>> 60));
values[valuesOffset++] = (int) ((block17 >>> 39) & 2097151L);
values[valuesOffset++] = (int) ((block17 >>> 18) & 2097151L);
final long block18 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block17 & 262143L) << 3) | (block18 >>> 61));
values[valuesOffset++] = (int) ((block18 >>> 40) & 2097151L);
values[valuesOffset++] = (int) ((block18 >>> 19) & 2097151L);
final long block19 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block18 & 524287L) << 2) | (block19 >>> 62));
values[valuesOffset++] = (int) ((block19 >>> 41) & 2097151L);
values[valuesOffset++] = (int) ((block19 >>> 20) & 2097151L);
final long block20 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block19 & 1048575L) << 1) | (block20 >>> 63));
values[valuesOffset++] = (int) ((block20 >>> 42) & 2097151L);
values[valuesOffset++] = (int) ((block20 >>> 21) & 2097151L);
values[valuesOffset++] = (int) (block20 & 2097151L);
}
@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 >>> 43);
values[valuesOffset++] = (int) ((block0 >>> 22) & 2097151L);
values[valuesOffset++] = (int) ((block0 >>> 1) & 2097151L);
final long block1 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block0 & 1L) << 20) | (block1 >>> 44));
values[valuesOffset++] = (int) ((block1 >>> 23) & 2097151L);
values[valuesOffset++] = (int) ((block1 >>> 2) & 2097151L);
final long block2 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block1 & 3L) << 19) | (block2 >>> 45));
values[valuesOffset++] = (int) ((block2 >>> 24) & 2097151L);
values[valuesOffset++] = (int) ((block2 >>> 3) & 2097151L);
final long block3 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block2 & 7L) << 18) | (block3 >>> 46));
values[valuesOffset++] = (int) ((block3 >>> 25) & 2097151L);
values[valuesOffset++] = (int) ((block3 >>> 4) & 2097151L);
final long block4 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block3 & 15L) << 17) | (block4 >>> 47));
values[valuesOffset++] = (int) ((block4 >>> 26) & 2097151L);
values[valuesOffset++] = (int) ((block4 >>> 5) & 2097151L);
final long block5 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block4 & 31L) << 16) | (block5 >>> 48));
values[valuesOffset++] = (int) ((block5 >>> 27) & 2097151L);
values[valuesOffset++] = (int) ((block5 >>> 6) & 2097151L);
final long block6 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block5 & 63L) << 15) | (block6 >>> 49));
values[valuesOffset++] = (int) ((block6 >>> 28) & 2097151L);
values[valuesOffset++] = (int) ((block6 >>> 7) & 2097151L);
final long block7 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block6 & 127L) << 14) | (block7 >>> 50));
values[valuesOffset++] = (int) ((block7 >>> 29) & 2097151L);
values[valuesOffset++] = (int) ((block7 >>> 8) & 2097151L);
final long block8 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block7 & 255L) << 13) | (block8 >>> 51));
values[valuesOffset++] = (int) ((block8 >>> 30) & 2097151L);
values[valuesOffset++] = (int) ((block8 >>> 9) & 2097151L);
final long block9 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block8 & 511L) << 12) | (block9 >>> 52));
values[valuesOffset++] = (int) ((block9 >>> 31) & 2097151L);
values[valuesOffset++] = (int) ((block9 >>> 10) & 2097151L);
final long block10 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block9 & 1023L) << 11) | (block10 >>> 53));
values[valuesOffset++] = (int) ((block10 >>> 32) & 2097151L);
values[valuesOffset++] = (int) ((block10 >>> 11) & 2097151L);
final long block11 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block10 & 2047L) << 10) | (block11 >>> 54));
values[valuesOffset++] = (int) ((block11 >>> 33) & 2097151L);
values[valuesOffset++] = (int) ((block11 >>> 12) & 2097151L);
final long block12 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block11 & 4095L) << 9) | (block12 >>> 55));
values[valuesOffset++] = (int) ((block12 >>> 34) & 2097151L);
values[valuesOffset++] = (int) ((block12 >>> 13) & 2097151L);
final long block13 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block12 & 8191L) << 8) | (block13 >>> 56));
values[valuesOffset++] = (int) ((block13 >>> 35) & 2097151L);
values[valuesOffset++] = (int) ((block13 >>> 14) & 2097151L);
final long block14 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block13 & 16383L) << 7) | (block14 >>> 57));
values[valuesOffset++] = (int) ((block14 >>> 36) & 2097151L);
values[valuesOffset++] = (int) ((block14 >>> 15) & 2097151L);
final long block15 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block14 & 32767L) << 6) | (block15 >>> 58));
values[valuesOffset++] = (int) ((block15 >>> 37) & 2097151L);
values[valuesOffset++] = (int) ((block15 >>> 16) & 2097151L);
final long block16 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block15 & 65535L) << 5) | (block16 >>> 59));
values[valuesOffset++] = (int) ((block16 >>> 38) & 2097151L);
values[valuesOffset++] = (int) ((block16 >>> 17) & 2097151L);
final long block17 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block16 & 131071L) << 4) | (block17 >>> 60));
values[valuesOffset++] = (int) ((block17 >>> 39) & 2097151L);
values[valuesOffset++] = (int) ((block17 >>> 18) & 2097151L);
final long block18 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block17 & 262143L) << 3) | (block18 >>> 61));
values[valuesOffset++] = (int) ((block18 >>> 40) & 2097151L);
values[valuesOffset++] = (int) ((block18 >>> 19) & 2097151L);
final long block19 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block18 & 524287L) << 2) | (block19 >>> 62));
values[valuesOffset++] = (int) ((block19 >>> 41) & 2097151L);
values[valuesOffset++] = (int) ((block19 >>> 20) & 2097151L);
final long block20 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block19 & 1048575L) << 1) | (block20 >>> 63));
values[valuesOffset++] = (int) ((block20 >>> 42) & 2097151L);
values[valuesOffset++] = (int) ((block20 >>> 21) & 2097151L);
values[valuesOffset++] = (int) (block20 & 2097151L);
}
}
@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;
final int byte2 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte0 << 13) | (byte1 << 5) | (byte2 >>> 3);
final int byte3 = blocks[blocksOffset++] & 0xFF;
final int byte4 = blocks[blocksOffset++] & 0xFF;
final int byte5 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte2 & 7) << 18) | (byte3 << 10) | (byte4 << 2) | (byte5 >>> 6);
final int byte6 = blocks[blocksOffset++] & 0xFF;
final int byte7 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte5 & 63) << 15) | (byte6 << 7) | (byte7 >>> 1);
final int byte8 = blocks[blocksOffset++] & 0xFF;
final int byte9 = blocks[blocksOffset++] & 0xFF;
final int byte10 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte7 & 1) << 20) | (byte8 << 12) | (byte9 << 4) | (byte10 >>> 4);
final int byte11 = blocks[blocksOffset++] & 0xFF;
final int byte12 = blocks[blocksOffset++] & 0xFF;
final int byte13 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte10 & 15) << 17) | (byte11 << 9) | (byte12 << 1) | (byte13 >>> 7);
final int byte14 = blocks[blocksOffset++] & 0xFF;
final int byte15 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte13 & 127) << 14) | (byte14 << 6) | (byte15 >>> 2);
final int byte16 = blocks[blocksOffset++] & 0xFF;
final int byte17 = blocks[blocksOffset++] & 0xFF;
final int byte18 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte15 & 3) << 19) | (byte16 << 11) | (byte17 << 3) | (byte18 >>> 5);
final int byte19 = blocks[blocksOffset++] & 0xFF;
final int byte20 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte18 & 31) << 16) | (byte19 << 8) | byte20;
final int byte21 = blocks[blocksOffset++] & 0xFF;
final int byte22 = blocks[blocksOffset++] & 0xFF;
final int byte23 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte21 << 13) | (byte22 << 5) | (byte23 >>> 3);
final int byte24 = blocks[blocksOffset++] & 0xFF;
final int byte25 = blocks[blocksOffset++] & 0xFF;
final int byte26 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte23 & 7) << 18) | (byte24 << 10) | (byte25 << 2) | (byte26 >>> 6);
final int byte27 = blocks[blocksOffset++] & 0xFF;
final int byte28 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte26 & 63) << 15) | (byte27 << 7) | (byte28 >>> 1);
final int byte29 = blocks[blocksOffset++] & 0xFF;
final int byte30 = blocks[blocksOffset++] & 0xFF;
final int byte31 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte28 & 1) << 20) | (byte29 << 12) | (byte30 << 4) | (byte31 >>> 4);
final int byte32 = blocks[blocksOffset++] & 0xFF;
final int byte33 = blocks[blocksOffset++] & 0xFF;
final int byte34 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte31 & 15) << 17) | (byte32 << 9) | (byte33 << 1) | (byte34 >>> 7);
final int byte35 = blocks[blocksOffset++] & 0xFF;
final int byte36 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte34 & 127) << 14) | (byte35 << 6) | (byte36 >>> 2);
final int byte37 = blocks[blocksOffset++] & 0xFF;
final int byte38 = blocks[blocksOffset++] & 0xFF;
final int byte39 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte36 & 3) << 19) | (byte37 << 11) | (byte38 << 3) | (byte39 >>> 5);
final int byte40 = blocks[blocksOffset++] & 0xFF;
final int byte41 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte39 & 31) << 16) | (byte40 << 8) | byte41;
final int byte42 = blocks[blocksOffset++] & 0xFF;
final int byte43 = blocks[blocksOffset++] & 0xFF;
final int byte44 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte42 << 13) | (byte43 << 5) | (byte44 >>> 3);
final int byte45 = blocks[blocksOffset++] & 0xFF;
final int byte46 = blocks[blocksOffset++] & 0xFF;
final int byte47 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte44 & 7) << 18) | (byte45 << 10) | (byte46 << 2) | (byte47 >>> 6);
final int byte48 = blocks[blocksOffset++] & 0xFF;
final int byte49 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte47 & 63) << 15) | (byte48 << 7) | (byte49 >>> 1);
final int byte50 = blocks[blocksOffset++] & 0xFF;
final int byte51 = blocks[blocksOffset++] & 0xFF;
final int byte52 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte49 & 1) << 20) | (byte50 << 12) | (byte51 << 4) | (byte52 >>> 4);
final int byte53 = blocks[blocksOffset++] & 0xFF;
final int byte54 = blocks[blocksOffset++] & 0xFF;
final int byte55 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte52 & 15) << 17) | (byte53 << 9) | (byte54 << 1) | (byte55 >>> 7);
final int byte56 = blocks[blocksOffset++] & 0xFF;
final int byte57 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte55 & 127) << 14) | (byte56 << 6) | (byte57 >>> 2);
final int byte58 = blocks[blocksOffset++] & 0xFF;
final int byte59 = blocks[blocksOffset++] & 0xFF;
final int byte60 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte57 & 3) << 19) | (byte58 << 11) | (byte59 << 3) | (byte60 >>> 5);
final int byte61 = blocks[blocksOffset++] & 0xFF;
final int byte62 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte60 & 31) << 16) | (byte61 << 8) | byte62;
final int byte63 = blocks[blocksOffset++] & 0xFF;
final int byte64 = blocks[blocksOffset++] & 0xFF;
final int byte65 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte63 << 13) | (byte64 << 5) | (byte65 >>> 3);
final int byte66 = blocks[blocksOffset++] & 0xFF;
final int byte67 = blocks[blocksOffset++] & 0xFF;
final int byte68 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte65 & 7) << 18) | (byte66 << 10) | (byte67 << 2) | (byte68 >>> 6);
final int byte69 = blocks[blocksOffset++] & 0xFF;
final int byte70 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte68 & 63) << 15) | (byte69 << 7) | (byte70 >>> 1);
final int byte71 = blocks[blocksOffset++] & 0xFF;
final int byte72 = blocks[blocksOffset++] & 0xFF;
final int byte73 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte70 & 1) << 20) | (byte71 << 12) | (byte72 << 4) | (byte73 >>> 4);
final int byte74 = blocks[blocksOffset++] & 0xFF;
final int byte75 = blocks[blocksOffset++] & 0xFF;
final int byte76 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte73 & 15) << 17) | (byte74 << 9) | (byte75 << 1) | (byte76 >>> 7);
final int byte77 = blocks[blocksOffset++] & 0xFF;
final int byte78 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte76 & 127) << 14) | (byte77 << 6) | (byte78 >>> 2);
final int byte79 = blocks[blocksOffset++] & 0xFF;
final int byte80 = blocks[blocksOffset++] & 0xFF;
final int byte81 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte78 & 3) << 19) | (byte79 << 11) | (byte80 << 3) | (byte81 >>> 5);
final int byte82 = blocks[blocksOffset++] & 0xFF;
final int byte83 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte81 & 31) << 16) | (byte82 << 8) | byte83;
final int byte84 = blocks[blocksOffset++] & 0xFF;
final int byte85 = blocks[blocksOffset++] & 0xFF;
final int byte86 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte84 << 13) | (byte85 << 5) | (byte86 >>> 3);
final int byte87 = blocks[blocksOffset++] & 0xFF;
final int byte88 = blocks[blocksOffset++] & 0xFF;
final int byte89 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte86 & 7) << 18) | (byte87 << 10) | (byte88 << 2) | (byte89 >>> 6);
final int byte90 = blocks[blocksOffset++] & 0xFF;
final int byte91 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte89 & 63) << 15) | (byte90 << 7) | (byte91 >>> 1);
final int byte92 = blocks[blocksOffset++] & 0xFF;
final int byte93 = blocks[blocksOffset++] & 0xFF;
final int byte94 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte91 & 1) << 20) | (byte92 << 12) | (byte93 << 4) | (byte94 >>> 4);
final int byte95 = blocks[blocksOffset++] & 0xFF;
final int byte96 = blocks[blocksOffset++] & 0xFF;
final int byte97 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte94 & 15) << 17) | (byte95 << 9) | (byte96 << 1) | (byte97 >>> 7);
final int byte98 = blocks[blocksOffset++] & 0xFF;
final int byte99 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte97 & 127) << 14) | (byte98 << 6) | (byte99 >>> 2);
final int byte100 = blocks[blocksOffset++] & 0xFF;
final int byte101 = blocks[blocksOffset++] & 0xFF;
final int byte102 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte99 & 3) << 19) | (byte100 << 11) | (byte101 << 3) | (byte102 >>> 5);
final int byte103 = blocks[blocksOffset++] & 0xFF;
final int byte104 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte102 & 31) << 16) | (byte103 << 8) | byte104;
final int byte105 = blocks[blocksOffset++] & 0xFF;
final int byte106 = blocks[blocksOffset++] & 0xFF;
final int byte107 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte105 << 13) | (byte106 << 5) | (byte107 >>> 3);
final int byte108 = blocks[blocksOffset++] & 0xFF;
final int byte109 = blocks[blocksOffset++] & 0xFF;
final int byte110 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte107 & 7) << 18) | (byte108 << 10) | (byte109 << 2) | (byte110 >>> 6);
final int byte111 = blocks[blocksOffset++] & 0xFF;
final int byte112 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte110 & 63) << 15) | (byte111 << 7) | (byte112 >>> 1);
final int byte113 = blocks[blocksOffset++] & 0xFF;
final int byte114 = blocks[blocksOffset++] & 0xFF;
final int byte115 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte112 & 1) << 20) | (byte113 << 12) | (byte114 << 4) | (byte115 >>> 4);
final int byte116 = blocks[blocksOffset++] & 0xFF;
final int byte117 = blocks[blocksOffset++] & 0xFF;
final int byte118 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte115 & 15) << 17) | (byte116 << 9) | (byte117 << 1) | (byte118 >>> 7);
final int byte119 = blocks[blocksOffset++] & 0xFF;
final int byte120 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte118 & 127) << 14) | (byte119 << 6) | (byte120 >>> 2);
final int byte121 = blocks[blocksOffset++] & 0xFF;
final int byte122 = blocks[blocksOffset++] & 0xFF;
final int byte123 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte120 & 3) << 19) | (byte121 << 11) | (byte122 << 3) | (byte123 >>> 5);
final int byte124 = blocks[blocksOffset++] & 0xFF;
final int byte125 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte123 & 31) << 16) | (byte124 << 8) | byte125;
final int byte126 = blocks[blocksOffset++] & 0xFF;
final int byte127 = blocks[blocksOffset++] & 0xFF;
final int byte128 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte126 << 13) | (byte127 << 5) | (byte128 >>> 3);
final int byte129 = blocks[blocksOffset++] & 0xFF;
final int byte130 = blocks[blocksOffset++] & 0xFF;
final int byte131 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte128 & 7) << 18) | (byte129 << 10) | (byte130 << 2) | (byte131 >>> 6);
final int byte132 = blocks[blocksOffset++] & 0xFF;
final int byte133 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte131 & 63) << 15) | (byte132 << 7) | (byte133 >>> 1);
final int byte134 = blocks[blocksOffset++] & 0xFF;
final int byte135 = blocks[blocksOffset++] & 0xFF;
final int byte136 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte133 & 1) << 20) | (byte134 << 12) | (byte135 << 4) | (byte136 >>> 4);
final int byte137 = blocks[blocksOffset++] & 0xFF;
final int byte138 = blocks[blocksOffset++] & 0xFF;
final int byte139 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte136 & 15) << 17) | (byte137 << 9) | (byte138 << 1) | (byte139 >>> 7);
final int byte140 = blocks[blocksOffset++] & 0xFF;
final int byte141 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte139 & 127) << 14) | (byte140 << 6) | (byte141 >>> 2);
final int byte142 = blocks[blocksOffset++] & 0xFF;
final int byte143 = blocks[blocksOffset++] & 0xFF;
final int byte144 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte141 & 3) << 19) | (byte142 << 11) | (byte143 << 3) | (byte144 >>> 5);
final int byte145 = blocks[blocksOffset++] & 0xFF;
final int byte146 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte144 & 31) << 16) | (byte145 << 8) | byte146;
final int byte147 = blocks[blocksOffset++] & 0xFF;
final int byte148 = blocks[blocksOffset++] & 0xFF;
final int byte149 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte147 << 13) | (byte148 << 5) | (byte149 >>> 3);
final int byte150 = blocks[blocksOffset++] & 0xFF;
final int byte151 = blocks[blocksOffset++] & 0xFF;
final int byte152 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte149 & 7) << 18) | (byte150 << 10) | (byte151 << 2) | (byte152 >>> 6);
final int byte153 = blocks[blocksOffset++] & 0xFF;
final int byte154 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte152 & 63) << 15) | (byte153 << 7) | (byte154 >>> 1);
final int byte155 = blocks[blocksOffset++] & 0xFF;
final int byte156 = blocks[blocksOffset++] & 0xFF;
final int byte157 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte154 & 1) << 20) | (byte155 << 12) | (byte156 << 4) | (byte157 >>> 4);
final int byte158 = blocks[blocksOffset++] & 0xFF;
final int byte159 = blocks[blocksOffset++] & 0xFF;
final int byte160 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte157 & 15) << 17) | (byte158 << 9) | (byte159 << 1) | (byte160 >>> 7);
final int byte161 = blocks[blocksOffset++] & 0xFF;
final int byte162 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte160 & 127) << 14) | (byte161 << 6) | (byte162 >>> 2);
final int byte163 = blocks[blocksOffset++] & 0xFF;
final int byte164 = blocks[blocksOffset++] & 0xFF;
final int byte165 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte162 & 3) << 19) | (byte163 << 11) | (byte164 << 3) | (byte165 >>> 5);
final int byte166 = blocks[blocksOffset++] & 0xFF;
final int byte167 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte165 & 31) << 16) | (byte166 << 8) | byte167;
}
@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;
final int byte2 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte0 << 13) | (byte1 << 5) | (byte2 >>> 3);
final int byte3 = blocks[blocksOffset++] & 0xFF;
final int byte4 = blocks[blocksOffset++] & 0xFF;
final int byte5 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte2 & 7) << 18) | (byte3 << 10) | (byte4 << 2) | (byte5 >>> 6);
final int byte6 = blocks[blocksOffset++] & 0xFF;
final int byte7 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte5 & 63) << 15) | (byte6 << 7) | (byte7 >>> 1);
final int byte8 = blocks[blocksOffset++] & 0xFF;
final int byte9 = blocks[blocksOffset++] & 0xFF;
final int byte10 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte7 & 1) << 20) | (byte8 << 12) | (byte9 << 4) | (byte10 >>> 4);
final int byte11 = blocks[blocksOffset++] & 0xFF;
final int byte12 = blocks[blocksOffset++] & 0xFF;
final int byte13 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte10 & 15) << 17) | (byte11 << 9) | (byte12 << 1) | (byte13 >>> 7);
final int byte14 = blocks[blocksOffset++] & 0xFF;
final int byte15 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte13 & 127) << 14) | (byte14 << 6) | (byte15 >>> 2);
final int byte16 = blocks[blocksOffset++] & 0xFF;
final int byte17 = blocks[blocksOffset++] & 0xFF;
final int byte18 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte15 & 3) << 19) | (byte16 << 11) | (byte17 << 3) | (byte18 >>> 5);
final int byte19 = blocks[blocksOffset++] & 0xFF;
final int byte20 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte18 & 31) << 16) | (byte19 << 8) | byte20;
}
}
@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 >>> 43;
values[valuesOffset++] = (block0 >>> 22) & 2097151L;
values[valuesOffset++] = (block0 >>> 1) & 2097151L;
final long block1 = blocks[blocksOffset++];
values[valuesOffset++] = ((block0 & 1L) << 20) | (block1 >>> 44);
values[valuesOffset++] = (block1 >>> 23) & 2097151L;
values[valuesOffset++] = (block1 >>> 2) & 2097151L;
final long block2 = blocks[blocksOffset++];
values[valuesOffset++] = ((block1 & 3L) << 19) | (block2 >>> 45);
values[valuesOffset++] = (block2 >>> 24) & 2097151L;
values[valuesOffset++] = (block2 >>> 3) & 2097151L;
final long block3 = blocks[blocksOffset++];
values[valuesOffset++] = ((block2 & 7L) << 18) | (block3 >>> 46);
values[valuesOffset++] = (block3 >>> 25) & 2097151L;
values[valuesOffset++] = (block3 >>> 4) & 2097151L;
final long block4 = blocks[blocksOffset++];
values[valuesOffset++] = ((block3 & 15L) << 17) | (block4 >>> 47);
values[valuesOffset++] = (block4 >>> 26) & 2097151L;
values[valuesOffset++] = (block4 >>> 5) & 2097151L;
final long block5 = blocks[blocksOffset++];
values[valuesOffset++] = ((block4 & 31L) << 16) | (block5 >>> 48);
values[valuesOffset++] = (block5 >>> 27) & 2097151L;
values[valuesOffset++] = (block5 >>> 6) & 2097151L;
final long block6 = blocks[blocksOffset++];
values[valuesOffset++] = ((block5 & 63L) << 15) | (block6 >>> 49);
values[valuesOffset++] = (block6 >>> 28) & 2097151L;
values[valuesOffset++] = (block6 >>> 7) & 2097151L;
final long block7 = blocks[blocksOffset++];
values[valuesOffset++] = ((block6 & 127L) << 14) | (block7 >>> 50);
values[valuesOffset++] = (block7 >>> 29) & 2097151L;
values[valuesOffset++] = (block7 >>> 8) & 2097151L;
final long block8 = blocks[blocksOffset++];
values[valuesOffset++] = ((block7 & 255L) << 13) | (block8 >>> 51);
values[valuesOffset++] = (block8 >>> 30) & 2097151L;
values[valuesOffset++] = (block8 >>> 9) & 2097151L;
final long block9 = blocks[blocksOffset++];
values[valuesOffset++] = ((block8 & 511L) << 12) | (block9 >>> 52);
values[valuesOffset++] = (block9 >>> 31) & 2097151L;
values[valuesOffset++] = (block9 >>> 10) & 2097151L;
final long block10 = blocks[blocksOffset++];
values[valuesOffset++] = ((block9 & 1023L) << 11) | (block10 >>> 53);
values[valuesOffset++] = (block10 >>> 32) & 2097151L;
values[valuesOffset++] = (block10 >>> 11) & 2097151L;
final long block11 = blocks[blocksOffset++];
values[valuesOffset++] = ((block10 & 2047L) << 10) | (block11 >>> 54);
values[valuesOffset++] = (block11 >>> 33) & 2097151L;
values[valuesOffset++] = (block11 >>> 12) & 2097151L;
final long block12 = blocks[blocksOffset++];
values[valuesOffset++] = ((block11 & 4095L) << 9) | (block12 >>> 55);
values[valuesOffset++] = (block12 >>> 34) & 2097151L;
values[valuesOffset++] = (block12 >>> 13) & 2097151L;
final long block13 = blocks[blocksOffset++];
values[valuesOffset++] = ((block12 & 8191L) << 8) | (block13 >>> 56);
values[valuesOffset++] = (block13 >>> 35) & 2097151L;
values[valuesOffset++] = (block13 >>> 14) & 2097151L;
final long block14 = blocks[blocksOffset++];
values[valuesOffset++] = ((block13 & 16383L) << 7) | (block14 >>> 57);
values[valuesOffset++] = (block14 >>> 36) & 2097151L;
values[valuesOffset++] = (block14 >>> 15) & 2097151L;
final long block15 = blocks[blocksOffset++];
values[valuesOffset++] = ((block14 & 32767L) << 6) | (block15 >>> 58);
values[valuesOffset++] = (block15 >>> 37) & 2097151L;
values[valuesOffset++] = (block15 >>> 16) & 2097151L;
final long block16 = blocks[blocksOffset++];
values[valuesOffset++] = ((block15 & 65535L) << 5) | (block16 >>> 59);
values[valuesOffset++] = (block16 >>> 38) & 2097151L;
values[valuesOffset++] = (block16 >>> 17) & 2097151L;
final long block17 = blocks[blocksOffset++];
values[valuesOffset++] = ((block16 & 131071L) << 4) | (block17 >>> 60);
values[valuesOffset++] = (block17 >>> 39) & 2097151L;
values[valuesOffset++] = (block17 >>> 18) & 2097151L;
final long block18 = blocks[blocksOffset++];
values[valuesOffset++] = ((block17 & 262143L) << 3) | (block18 >>> 61);
values[valuesOffset++] = (block18 >>> 40) & 2097151L;
values[valuesOffset++] = (block18 >>> 19) & 2097151L;
final long block19 = blocks[blocksOffset++];
values[valuesOffset++] = ((block18 & 524287L) << 2) | (block19 >>> 62);
values[valuesOffset++] = (block19 >>> 41) & 2097151L;
values[valuesOffset++] = (block19 >>> 20) & 2097151L;
final long block20 = blocks[blocksOffset++];
values[valuesOffset++] = ((block19 & 1048575L) << 1) | (block20 >>> 63);
values[valuesOffset++] = (block20 >>> 42) & 2097151L;
values[valuesOffset++] = (block20 >>> 21) & 2097151L;
values[valuesOffset++] = block20 & 2097151L;
}
@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 >>> 43;
values[valuesOffset++] = (block0 >>> 22) & 2097151L;
values[valuesOffset++] = (block0 >>> 1) & 2097151L;
final long block1 = blocks[blocksOffset++];
values[valuesOffset++] = ((block0 & 1L) << 20) | (block1 >>> 44);
values[valuesOffset++] = (block1 >>> 23) & 2097151L;
values[valuesOffset++] = (block1 >>> 2) & 2097151L;
final long block2 = blocks[blocksOffset++];
values[valuesOffset++] = ((block1 & 3L) << 19) | (block2 >>> 45);
values[valuesOffset++] = (block2 >>> 24) & 2097151L;
values[valuesOffset++] = (block2 >>> 3) & 2097151L;
final long block3 = blocks[blocksOffset++];
values[valuesOffset++] = ((block2 & 7L) << 18) | (block3 >>> 46);
values[valuesOffset++] = (block3 >>> 25) & 2097151L;
values[valuesOffset++] = (block3 >>> 4) & 2097151L;
final long block4 = blocks[blocksOffset++];
values[valuesOffset++] = ((block3 & 15L) << 17) | (block4 >>> 47);
values[valuesOffset++] = (block4 >>> 26) & 2097151L;
values[valuesOffset++] = (block4 >>> 5) & 2097151L;
final long block5 = blocks[blocksOffset++];
values[valuesOffset++] = ((block4 & 31L) << 16) | (block5 >>> 48);
values[valuesOffset++] = (block5 >>> 27) & 2097151L;
values[valuesOffset++] = (block5 >>> 6) & 2097151L;
final long block6 = blocks[blocksOffset++];
values[valuesOffset++] = ((block5 & 63L) << 15) | (block6 >>> 49);
values[valuesOffset++] = (block6 >>> 28) & 2097151L;
values[valuesOffset++] = (block6 >>> 7) & 2097151L;
final long block7 = blocks[blocksOffset++];
values[valuesOffset++] = ((block6 & 127L) << 14) | (block7 >>> 50);
values[valuesOffset++] = (block7 >>> 29) & 2097151L;
values[valuesOffset++] = (block7 >>> 8) & 2097151L;
final long block8 = blocks[blocksOffset++];
values[valuesOffset++] = ((block7 & 255L) << 13) | (block8 >>> 51);
values[valuesOffset++] = (block8 >>> 30) & 2097151L;
values[valuesOffset++] = (block8 >>> 9) & 2097151L;
final long block9 = blocks[blocksOffset++];
values[valuesOffset++] = ((block8 & 511L) << 12) | (block9 >>> 52);
values[valuesOffset++] = (block9 >>> 31) & 2097151L;
values[valuesOffset++] = (block9 >>> 10) & 2097151L;
final long block10 = blocks[blocksOffset++];
values[valuesOffset++] = ((block9 & 1023L) << 11) | (block10 >>> 53);
values[valuesOffset++] = (block10 >>> 32) & 2097151L;
values[valuesOffset++] = (block10 >>> 11) & 2097151L;
final long block11 = blocks[blocksOffset++];
values[valuesOffset++] = ((block10 & 2047L) << 10) | (block11 >>> 54);
values[valuesOffset++] = (block11 >>> 33) & 2097151L;
values[valuesOffset++] = (block11 >>> 12) & 2097151L;
final long block12 = blocks[blocksOffset++];
values[valuesOffset++] = ((block11 & 4095L) << 9) | (block12 >>> 55);
values[valuesOffset++] = (block12 >>> 34) & 2097151L;
values[valuesOffset++] = (block12 >>> 13) & 2097151L;
final long block13 = blocks[blocksOffset++];
values[valuesOffset++] = ((block12 & 8191L) << 8) | (block13 >>> 56);
values[valuesOffset++] = (block13 >>> 35) & 2097151L;
values[valuesOffset++] = (block13 >>> 14) & 2097151L;
final long block14 = blocks[blocksOffset++];
values[valuesOffset++] = ((block13 & 16383L) << 7) | (block14 >>> 57);
values[valuesOffset++] = (block14 >>> 36) & 2097151L;
values[valuesOffset++] = (block14 >>> 15) & 2097151L;
final long block15 = blocks[blocksOffset++];
values[valuesOffset++] = ((block14 & 32767L) << 6) | (block15 >>> 58);
values[valuesOffset++] = (block15 >>> 37) & 2097151L;
values[valuesOffset++] = (block15 >>> 16) & 2097151L;
final long block16 = blocks[blocksOffset++];
values[valuesOffset++] = ((block15 & 65535L) << 5) | (block16 >>> 59);
values[valuesOffset++] = (block16 >>> 38) & 2097151L;
values[valuesOffset++] = (block16 >>> 17) & 2097151L;
final long block17 = blocks[blocksOffset++];
values[valuesOffset++] = ((block16 & 131071L) << 4) | (block17 >>> 60);
values[valuesOffset++] = (block17 >>> 39) & 2097151L;
values[valuesOffset++] = (block17 >>> 18) & 2097151L;
final long block18 = blocks[blocksOffset++];
values[valuesOffset++] = ((block17 & 262143L) << 3) | (block18 >>> 61);
values[valuesOffset++] = (block18 >>> 40) & 2097151L;
values[valuesOffset++] = (block18 >>> 19) & 2097151L;
final long block19 = blocks[blocksOffset++];
values[valuesOffset++] = ((block18 & 524287L) << 2) | (block19 >>> 62);
values[valuesOffset++] = (block19 >>> 41) & 2097151L;
values[valuesOffset++] = (block19 >>> 20) & 2097151L;
final long block20 = blocks[blocksOffset++];
values[valuesOffset++] = ((block19 & 1048575L) << 1) | (block20 >>> 63);
values[valuesOffset++] = (block20 >>> 42) & 2097151L;
values[valuesOffset++] = (block20 >>> 21) & 2097151L;
values[valuesOffset++] = block20 & 2097151L;
}
}
@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;
final long byte2 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte0 << 13) | (byte1 << 5) | (byte2 >>> 3);
final long byte3 = blocks[blocksOffset++] & 0xFF;
final long byte4 = blocks[blocksOffset++] & 0xFF;
final long byte5 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte2 & 7) << 18) | (byte3 << 10) | (byte4 << 2) | (byte5 >>> 6);
final long byte6 = blocks[blocksOffset++] & 0xFF;
final long byte7 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte5 & 63) << 15) | (byte6 << 7) | (byte7 >>> 1);
final long byte8 = blocks[blocksOffset++] & 0xFF;
final long byte9 = blocks[blocksOffset++] & 0xFF;
final long byte10 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte7 & 1) << 20) | (byte8 << 12) | (byte9 << 4) | (byte10 >>> 4);
final long byte11 = blocks[blocksOffset++] & 0xFF;
final long byte12 = blocks[blocksOffset++] & 0xFF;
final long byte13 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte10 & 15) << 17) | (byte11 << 9) | (byte12 << 1) | (byte13 >>> 7);
final long byte14 = blocks[blocksOffset++] & 0xFF;
final long byte15 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte13 & 127) << 14) | (byte14 << 6) | (byte15 >>> 2);
final long byte16 = blocks[blocksOffset++] & 0xFF;
final long byte17 = blocks[blocksOffset++] & 0xFF;
final long byte18 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte15 & 3) << 19) | (byte16 << 11) | (byte17 << 3) | (byte18 >>> 5);
final long byte19 = blocks[blocksOffset++] & 0xFF;
final long byte20 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte18 & 31) << 16) | (byte19 << 8) | byte20;
final long byte21 = blocks[blocksOffset++] & 0xFF;
final long byte22 = blocks[blocksOffset++] & 0xFF;
final long byte23 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte21 << 13) | (byte22 << 5) | (byte23 >>> 3);
final long byte24 = blocks[blocksOffset++] & 0xFF;
final long byte25 = blocks[blocksOffset++] & 0xFF;
final long byte26 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte23 & 7) << 18) | (byte24 << 10) | (byte25 << 2) | (byte26 >>> 6);
final long byte27 = blocks[blocksOffset++] & 0xFF;
final long byte28 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte26 & 63) << 15) | (byte27 << 7) | (byte28 >>> 1);
final long byte29 = blocks[blocksOffset++] & 0xFF;
final long byte30 = blocks[blocksOffset++] & 0xFF;
final long byte31 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte28 & 1) << 20) | (byte29 << 12) | (byte30 << 4) | (byte31 >>> 4);
final long byte32 = blocks[blocksOffset++] & 0xFF;
final long byte33 = blocks[blocksOffset++] & 0xFF;
final long byte34 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte31 & 15) << 17) | (byte32 << 9) | (byte33 << 1) | (byte34 >>> 7);
final long byte35 = blocks[blocksOffset++] & 0xFF;
final long byte36 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte34 & 127) << 14) | (byte35 << 6) | (byte36 >>> 2);
final long byte37 = blocks[blocksOffset++] & 0xFF;
final long byte38 = blocks[blocksOffset++] & 0xFF;
final long byte39 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte36 & 3) << 19) | (byte37 << 11) | (byte38 << 3) | (byte39 >>> 5);
final long byte40 = blocks[blocksOffset++] & 0xFF;
final long byte41 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte39 & 31) << 16) | (byte40 << 8) | byte41;
final long byte42 = blocks[blocksOffset++] & 0xFF;
final long byte43 = blocks[blocksOffset++] & 0xFF;
final long byte44 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte42 << 13) | (byte43 << 5) | (byte44 >>> 3);
final long byte45 = blocks[blocksOffset++] & 0xFF;
final long byte46 = blocks[blocksOffset++] & 0xFF;
final long byte47 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte44 & 7) << 18) | (byte45 << 10) | (byte46 << 2) | (byte47 >>> 6);
final long byte48 = blocks[blocksOffset++] & 0xFF;
final long byte49 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte47 & 63) << 15) | (byte48 << 7) | (byte49 >>> 1);
final long byte50 = blocks[blocksOffset++] & 0xFF;
final long byte51 = blocks[blocksOffset++] & 0xFF;
final long byte52 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte49 & 1) << 20) | (byte50 << 12) | (byte51 << 4) | (byte52 >>> 4);
final long byte53 = blocks[blocksOffset++] & 0xFF;
final long byte54 = blocks[blocksOffset++] & 0xFF;
final long byte55 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte52 & 15) << 17) | (byte53 << 9) | (byte54 << 1) | (byte55 >>> 7);
final long byte56 = blocks[blocksOffset++] & 0xFF;
final long byte57 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte55 & 127) << 14) | (byte56 << 6) | (byte57 >>> 2);
final long byte58 = blocks[blocksOffset++] & 0xFF;
final long byte59 = blocks[blocksOffset++] & 0xFF;
final long byte60 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte57 & 3) << 19) | (byte58 << 11) | (byte59 << 3) | (byte60 >>> 5);
final long byte61 = blocks[blocksOffset++] & 0xFF;
final long byte62 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte60 & 31) << 16) | (byte61 << 8) | byte62;
final long byte63 = blocks[blocksOffset++] & 0xFF;
final long byte64 = blocks[blocksOffset++] & 0xFF;
final long byte65 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte63 << 13) | (byte64 << 5) | (byte65 >>> 3);
final long byte66 = blocks[blocksOffset++] & 0xFF;
final long byte67 = blocks[blocksOffset++] & 0xFF;
final long byte68 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte65 & 7) << 18) | (byte66 << 10) | (byte67 << 2) | (byte68 >>> 6);
final long byte69 = blocks[blocksOffset++] & 0xFF;
final long byte70 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte68 & 63) << 15) | (byte69 << 7) | (byte70 >>> 1);
final long byte71 = blocks[blocksOffset++] & 0xFF;
final long byte72 = blocks[blocksOffset++] & 0xFF;
final long byte73 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte70 & 1) << 20) | (byte71 << 12) | (byte72 << 4) | (byte73 >>> 4);
final long byte74 = blocks[blocksOffset++] & 0xFF;
final long byte75 = blocks[blocksOffset++] & 0xFF;
final long byte76 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte73 & 15) << 17) | (byte74 << 9) | (byte75 << 1) | (byte76 >>> 7);
final long byte77 = blocks[blocksOffset++] & 0xFF;
final long byte78 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte76 & 127) << 14) | (byte77 << 6) | (byte78 >>> 2);
final long byte79 = blocks[blocksOffset++] & 0xFF;
final long byte80 = blocks[blocksOffset++] & 0xFF;
final long byte81 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte78 & 3) << 19) | (byte79 << 11) | (byte80 << 3) | (byte81 >>> 5);
final long byte82 = blocks[blocksOffset++] & 0xFF;
final long byte83 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte81 & 31) << 16) | (byte82 << 8) | byte83;
final long byte84 = blocks[blocksOffset++] & 0xFF;
final long byte85 = blocks[blocksOffset++] & 0xFF;
final long byte86 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte84 << 13) | (byte85 << 5) | (byte86 >>> 3);
final long byte87 = blocks[blocksOffset++] & 0xFF;
final long byte88 = blocks[blocksOffset++] & 0xFF;
final long byte89 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte86 & 7) << 18) | (byte87 << 10) | (byte88 << 2) | (byte89 >>> 6);
final long byte90 = blocks[blocksOffset++] & 0xFF;
final long byte91 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte89 & 63) << 15) | (byte90 << 7) | (byte91 >>> 1);
final long byte92 = blocks[blocksOffset++] & 0xFF;
final long byte93 = blocks[blocksOffset++] & 0xFF;
final long byte94 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte91 & 1) << 20) | (byte92 << 12) | (byte93 << 4) | (byte94 >>> 4);
final long byte95 = blocks[blocksOffset++] & 0xFF;
final long byte96 = blocks[blocksOffset++] & 0xFF;
final long byte97 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte94 & 15) << 17) | (byte95 << 9) | (byte96 << 1) | (byte97 >>> 7);
final long byte98 = blocks[blocksOffset++] & 0xFF;
final long byte99 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte97 & 127) << 14) | (byte98 << 6) | (byte99 >>> 2);
final long byte100 = blocks[blocksOffset++] & 0xFF;
final long byte101 = blocks[blocksOffset++] & 0xFF;
final long byte102 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte99 & 3) << 19) | (byte100 << 11) | (byte101 << 3) | (byte102 >>> 5);
final long byte103 = blocks[blocksOffset++] & 0xFF;
final long byte104 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte102 & 31) << 16) | (byte103 << 8) | byte104;
final long byte105 = blocks[blocksOffset++] & 0xFF;
final long byte106 = blocks[blocksOffset++] & 0xFF;
final long byte107 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte105 << 13) | (byte106 << 5) | (byte107 >>> 3);
final long byte108 = blocks[blocksOffset++] & 0xFF;
final long byte109 = blocks[blocksOffset++] & 0xFF;
final long byte110 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte107 & 7) << 18) | (byte108 << 10) | (byte109 << 2) | (byte110 >>> 6);
final long byte111 = blocks[blocksOffset++] & 0xFF;
final long byte112 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte110 & 63) << 15) | (byte111 << 7) | (byte112 >>> 1);
final long byte113 = blocks[blocksOffset++] & 0xFF;
final long byte114 = blocks[blocksOffset++] & 0xFF;
final long byte115 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte112 & 1) << 20) | (byte113 << 12) | (byte114 << 4) | (byte115 >>> 4);
final long byte116 = blocks[blocksOffset++] & 0xFF;
final long byte117 = blocks[blocksOffset++] & 0xFF;
final long byte118 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte115 & 15) << 17) | (byte116 << 9) | (byte117 << 1) | (byte118 >>> 7);
final long byte119 = blocks[blocksOffset++] & 0xFF;
final long byte120 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte118 & 127) << 14) | (byte119 << 6) | (byte120 >>> 2);
final long byte121 = blocks[blocksOffset++] & 0xFF;
final long byte122 = blocks[blocksOffset++] & 0xFF;
final long byte123 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte120 & 3) << 19) | (byte121 << 11) | (byte122 << 3) | (byte123 >>> 5);
final long byte124 = blocks[blocksOffset++] & 0xFF;
final long byte125 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte123 & 31) << 16) | (byte124 << 8) | byte125;
final long byte126 = blocks[blocksOffset++] & 0xFF;
final long byte127 = blocks[blocksOffset++] & 0xFF;
final long byte128 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte126 << 13) | (byte127 << 5) | (byte128 >>> 3);
final long byte129 = blocks[blocksOffset++] & 0xFF;
final long byte130 = blocks[blocksOffset++] & 0xFF;
final long byte131 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte128 & 7) << 18) | (byte129 << 10) | (byte130 << 2) | (byte131 >>> 6);
final long byte132 = blocks[blocksOffset++] & 0xFF;
final long byte133 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte131 & 63) << 15) | (byte132 << 7) | (byte133 >>> 1);
final long byte134 = blocks[blocksOffset++] & 0xFF;
final long byte135 = blocks[blocksOffset++] & 0xFF;
final long byte136 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte133 & 1) << 20) | (byte134 << 12) | (byte135 << 4) | (byte136 >>> 4);
final long byte137 = blocks[blocksOffset++] & 0xFF;
final long byte138 = blocks[blocksOffset++] & 0xFF;
final long byte139 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte136 & 15) << 17) | (byte137 << 9) | (byte138 << 1) | (byte139 >>> 7);
final long byte140 = blocks[blocksOffset++] & 0xFF;
final long byte141 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte139 & 127) << 14) | (byte140 << 6) | (byte141 >>> 2);
final long byte142 = blocks[blocksOffset++] & 0xFF;
final long byte143 = blocks[blocksOffset++] & 0xFF;
final long byte144 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte141 & 3) << 19) | (byte142 << 11) | (byte143 << 3) | (byte144 >>> 5);
final long byte145 = blocks[blocksOffset++] & 0xFF;
final long byte146 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte144 & 31) << 16) | (byte145 << 8) | byte146;
final long byte147 = blocks[blocksOffset++] & 0xFF;
final long byte148 = blocks[blocksOffset++] & 0xFF;
final long byte149 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte147 << 13) | (byte148 << 5) | (byte149 >>> 3);
final long byte150 = blocks[blocksOffset++] & 0xFF;
final long byte151 = blocks[blocksOffset++] & 0xFF;
final long byte152 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte149 & 7) << 18) | (byte150 << 10) | (byte151 << 2) | (byte152 >>> 6);
final long byte153 = blocks[blocksOffset++] & 0xFF;
final long byte154 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte152 & 63) << 15) | (byte153 << 7) | (byte154 >>> 1);
final long byte155 = blocks[blocksOffset++] & 0xFF;
final long byte156 = blocks[blocksOffset++] & 0xFF;
final long byte157 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte154 & 1) << 20) | (byte155 << 12) | (byte156 << 4) | (byte157 >>> 4);
final long byte158 = blocks[blocksOffset++] & 0xFF;
final long byte159 = blocks[blocksOffset++] & 0xFF;
final long byte160 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte157 & 15) << 17) | (byte158 << 9) | (byte159 << 1) | (byte160 >>> 7);
final long byte161 = blocks[blocksOffset++] & 0xFF;
final long byte162 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte160 & 127) << 14) | (byte161 << 6) | (byte162 >>> 2);
final long byte163 = blocks[blocksOffset++] & 0xFF;
final long byte164 = blocks[blocksOffset++] & 0xFF;
final long byte165 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte162 & 3) << 19) | (byte163 << 11) | (byte164 << 3) | (byte165 >>> 5);
final long byte166 = blocks[blocksOffset++] & 0xFF;
final long byte167 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte165 & 31) << 16) | (byte166 << 8) | byte167;
}
@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;
final long byte2 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte0 << 13) | (byte1 << 5) | (byte2 >>> 3);
final long byte3 = blocks[blocksOffset++] & 0xFF;
final long byte4 = blocks[blocksOffset++] & 0xFF;
final long byte5 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte2 & 7) << 18) | (byte3 << 10) | (byte4 << 2) | (byte5 >>> 6);
final long byte6 = blocks[blocksOffset++] & 0xFF;
final long byte7 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte5 & 63) << 15) | (byte6 << 7) | (byte7 >>> 1);
final long byte8 = blocks[blocksOffset++] & 0xFF;
final long byte9 = blocks[blocksOffset++] & 0xFF;
final long byte10 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte7 & 1) << 20) | (byte8 << 12) | (byte9 << 4) | (byte10 >>> 4);
final long byte11 = blocks[blocksOffset++] & 0xFF;
final long byte12 = blocks[blocksOffset++] & 0xFF;
final long byte13 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte10 & 15) << 17) | (byte11 << 9) | (byte12 << 1) | (byte13 >>> 7);
final long byte14 = blocks[blocksOffset++] & 0xFF;
final long byte15 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte13 & 127) << 14) | (byte14 << 6) | (byte15 >>> 2);
final long byte16 = blocks[blocksOffset++] & 0xFF;
final long byte17 = blocks[blocksOffset++] & 0xFF;
final long byte18 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte15 & 3) << 19) | (byte16 << 11) | (byte17 << 3) | (byte18 >>> 5);
final long byte19 = blocks[blocksOffset++] & 0xFF;
final long byte20 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte18 & 31) << 16) | (byte19 << 8) | byte20;
}
}
}

View File

@ -24,368 +24,150 @@ package org.apache.lucene.util.packed;
*/
final class BulkOperationPacked22 extends BulkOperationPacked {
public BulkOperationPacked22() {
super(22);
assert blockCount() == 11;
assert valueCount() == 32;
}
public BulkOperationPacked22() {
super(22);
assert blockCount() == 11;
assert valueCount() == 32;
}
@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 >>> 42);
values[valuesOffset++] = (int) ((block0 >>> 20) & 4194303L);
final long block1 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block0 & 1048575L) << 2) | (block1 >>> 62));
values[valuesOffset++] = (int) ((block1 >>> 40) & 4194303L);
values[valuesOffset++] = (int) ((block1 >>> 18) & 4194303L);
final long block2 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block1 & 262143L) << 4) | (block2 >>> 60));
values[valuesOffset++] = (int) ((block2 >>> 38) & 4194303L);
values[valuesOffset++] = (int) ((block2 >>> 16) & 4194303L);
final long block3 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block2 & 65535L) << 6) | (block3 >>> 58));
values[valuesOffset++] = (int) ((block3 >>> 36) & 4194303L);
values[valuesOffset++] = (int) ((block3 >>> 14) & 4194303L);
final long block4 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block3 & 16383L) << 8) | (block4 >>> 56));
values[valuesOffset++] = (int) ((block4 >>> 34) & 4194303L);
values[valuesOffset++] = (int) ((block4 >>> 12) & 4194303L);
final long block5 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block4 & 4095L) << 10) | (block5 >>> 54));
values[valuesOffset++] = (int) ((block5 >>> 32) & 4194303L);
values[valuesOffset++] = (int) ((block5 >>> 10) & 4194303L);
final long block6 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block5 & 1023L) << 12) | (block6 >>> 52));
values[valuesOffset++] = (int) ((block6 >>> 30) & 4194303L);
values[valuesOffset++] = (int) ((block6 >>> 8) & 4194303L);
final long block7 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block6 & 255L) << 14) | (block7 >>> 50));
values[valuesOffset++] = (int) ((block7 >>> 28) & 4194303L);
values[valuesOffset++] = (int) ((block7 >>> 6) & 4194303L);
final long block8 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block7 & 63L) << 16) | (block8 >>> 48));
values[valuesOffset++] = (int) ((block8 >>> 26) & 4194303L);
values[valuesOffset++] = (int) ((block8 >>> 4) & 4194303L);
final long block9 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block8 & 15L) << 18) | (block9 >>> 46));
values[valuesOffset++] = (int) ((block9 >>> 24) & 4194303L);
values[valuesOffset++] = (int) ((block9 >>> 2) & 4194303L);
final long block10 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block9 & 3L) << 20) | (block10 >>> 44));
values[valuesOffset++] = (int) ((block10 >>> 22) & 4194303L);
values[valuesOffset++] = (int) (block10 & 4194303L);
}
@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 >>> 42);
values[valuesOffset++] = (int) ((block0 >>> 20) & 4194303L);
final long block1 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block0 & 1048575L) << 2) | (block1 >>> 62));
values[valuesOffset++] = (int) ((block1 >>> 40) & 4194303L);
values[valuesOffset++] = (int) ((block1 >>> 18) & 4194303L);
final long block2 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block1 & 262143L) << 4) | (block2 >>> 60));
values[valuesOffset++] = (int) ((block2 >>> 38) & 4194303L);
values[valuesOffset++] = (int) ((block2 >>> 16) & 4194303L);
final long block3 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block2 & 65535L) << 6) | (block3 >>> 58));
values[valuesOffset++] = (int) ((block3 >>> 36) & 4194303L);
values[valuesOffset++] = (int) ((block3 >>> 14) & 4194303L);
final long block4 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block3 & 16383L) << 8) | (block4 >>> 56));
values[valuesOffset++] = (int) ((block4 >>> 34) & 4194303L);
values[valuesOffset++] = (int) ((block4 >>> 12) & 4194303L);
final long block5 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block4 & 4095L) << 10) | (block5 >>> 54));
values[valuesOffset++] = (int) ((block5 >>> 32) & 4194303L);
values[valuesOffset++] = (int) ((block5 >>> 10) & 4194303L);
final long block6 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block5 & 1023L) << 12) | (block6 >>> 52));
values[valuesOffset++] = (int) ((block6 >>> 30) & 4194303L);
values[valuesOffset++] = (int) ((block6 >>> 8) & 4194303L);
final long block7 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block6 & 255L) << 14) | (block7 >>> 50));
values[valuesOffset++] = (int) ((block7 >>> 28) & 4194303L);
values[valuesOffset++] = (int) ((block7 >>> 6) & 4194303L);
final long block8 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block7 & 63L) << 16) | (block8 >>> 48));
values[valuesOffset++] = (int) ((block8 >>> 26) & 4194303L);
values[valuesOffset++] = (int) ((block8 >>> 4) & 4194303L);
final long block9 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block8 & 15L) << 18) | (block9 >>> 46));
values[valuesOffset++] = (int) ((block9 >>> 24) & 4194303L);
values[valuesOffset++] = (int) ((block9 >>> 2) & 4194303L);
final long block10 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block9 & 3L) << 20) | (block10 >>> 44));
values[valuesOffset++] = (int) ((block10 >>> 22) & 4194303L);
values[valuesOffset++] = (int) (block10 & 4194303L);
}
}
@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;
final int byte2 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte0 << 14) | (byte1 << 6) | (byte2 >>> 2);
final int byte3 = blocks[blocksOffset++] & 0xFF;
final int byte4 = blocks[blocksOffset++] & 0xFF;
final int byte5 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte2 & 3) << 20) | (byte3 << 12) | (byte4 << 4) | (byte5 >>> 4);
final int byte6 = blocks[blocksOffset++] & 0xFF;
final int byte7 = blocks[blocksOffset++] & 0xFF;
final int byte8 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte5 & 15) << 18) | (byte6 << 10) | (byte7 << 2) | (byte8 >>> 6);
final int byte9 = blocks[blocksOffset++] & 0xFF;
final int byte10 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte8 & 63) << 16) | (byte9 << 8) | byte10;
final int byte11 = blocks[blocksOffset++] & 0xFF;
final int byte12 = blocks[blocksOffset++] & 0xFF;
final int byte13 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte11 << 14) | (byte12 << 6) | (byte13 >>> 2);
final int byte14 = blocks[blocksOffset++] & 0xFF;
final int byte15 = blocks[blocksOffset++] & 0xFF;
final int byte16 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte13 & 3) << 20) | (byte14 << 12) | (byte15 << 4) | (byte16 >>> 4);
final int byte17 = blocks[blocksOffset++] & 0xFF;
final int byte18 = blocks[blocksOffset++] & 0xFF;
final int byte19 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte16 & 15) << 18) | (byte17 << 10) | (byte18 << 2) | (byte19 >>> 6);
final int byte20 = blocks[blocksOffset++] & 0xFF;
final int byte21 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte19 & 63) << 16) | (byte20 << 8) | byte21;
final int byte22 = blocks[blocksOffset++] & 0xFF;
final int byte23 = blocks[blocksOffset++] & 0xFF;
final int byte24 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte22 << 14) | (byte23 << 6) | (byte24 >>> 2);
final int byte25 = blocks[blocksOffset++] & 0xFF;
final int byte26 = blocks[blocksOffset++] & 0xFF;
final int byte27 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte24 & 3) << 20) | (byte25 << 12) | (byte26 << 4) | (byte27 >>> 4);
final int byte28 = blocks[blocksOffset++] & 0xFF;
final int byte29 = blocks[blocksOffset++] & 0xFF;
final int byte30 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte27 & 15) << 18) | (byte28 << 10) | (byte29 << 2) | (byte30 >>> 6);
final int byte31 = blocks[blocksOffset++] & 0xFF;
final int byte32 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte30 & 63) << 16) | (byte31 << 8) | byte32;
final int byte33 = blocks[blocksOffset++] & 0xFF;
final int byte34 = blocks[blocksOffset++] & 0xFF;
final int byte35 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte33 << 14) | (byte34 << 6) | (byte35 >>> 2);
final int byte36 = blocks[blocksOffset++] & 0xFF;
final int byte37 = blocks[blocksOffset++] & 0xFF;
final int byte38 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte35 & 3) << 20) | (byte36 << 12) | (byte37 << 4) | (byte38 >>> 4);
final int byte39 = blocks[blocksOffset++] & 0xFF;
final int byte40 = blocks[blocksOffset++] & 0xFF;
final int byte41 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte38 & 15) << 18) | (byte39 << 10) | (byte40 << 2) | (byte41 >>> 6);
final int byte42 = blocks[blocksOffset++] & 0xFF;
final int byte43 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte41 & 63) << 16) | (byte42 << 8) | byte43;
final int byte44 = blocks[blocksOffset++] & 0xFF;
final int byte45 = blocks[blocksOffset++] & 0xFF;
final int byte46 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte44 << 14) | (byte45 << 6) | (byte46 >>> 2);
final int byte47 = blocks[blocksOffset++] & 0xFF;
final int byte48 = blocks[blocksOffset++] & 0xFF;
final int byte49 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte46 & 3) << 20) | (byte47 << 12) | (byte48 << 4) | (byte49 >>> 4);
final int byte50 = blocks[blocksOffset++] & 0xFF;
final int byte51 = blocks[blocksOffset++] & 0xFF;
final int byte52 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte49 & 15) << 18) | (byte50 << 10) | (byte51 << 2) | (byte52 >>> 6);
final int byte53 = blocks[blocksOffset++] & 0xFF;
final int byte54 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte52 & 63) << 16) | (byte53 << 8) | byte54;
final int byte55 = blocks[blocksOffset++] & 0xFF;
final int byte56 = blocks[blocksOffset++] & 0xFF;
final int byte57 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte55 << 14) | (byte56 << 6) | (byte57 >>> 2);
final int byte58 = blocks[blocksOffset++] & 0xFF;
final int byte59 = blocks[blocksOffset++] & 0xFF;
final int byte60 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte57 & 3) << 20) | (byte58 << 12) | (byte59 << 4) | (byte60 >>> 4);
final int byte61 = blocks[blocksOffset++] & 0xFF;
final int byte62 = blocks[blocksOffset++] & 0xFF;
final int byte63 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte60 & 15) << 18) | (byte61 << 10) | (byte62 << 2) | (byte63 >>> 6);
final int byte64 = blocks[blocksOffset++] & 0xFF;
final int byte65 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte63 & 63) << 16) | (byte64 << 8) | byte65;
final int byte66 = blocks[blocksOffset++] & 0xFF;
final int byte67 = blocks[blocksOffset++] & 0xFF;
final int byte68 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte66 << 14) | (byte67 << 6) | (byte68 >>> 2);
final int byte69 = blocks[blocksOffset++] & 0xFF;
final int byte70 = blocks[blocksOffset++] & 0xFF;
final int byte71 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte68 & 3) << 20) | (byte69 << 12) | (byte70 << 4) | (byte71 >>> 4);
final int byte72 = blocks[blocksOffset++] & 0xFF;
final int byte73 = blocks[blocksOffset++] & 0xFF;
final int byte74 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte71 & 15) << 18) | (byte72 << 10) | (byte73 << 2) | (byte74 >>> 6);
final int byte75 = blocks[blocksOffset++] & 0xFF;
final int byte76 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte74 & 63) << 16) | (byte75 << 8) | byte76;
final int byte77 = blocks[blocksOffset++] & 0xFF;
final int byte78 = blocks[blocksOffset++] & 0xFF;
final int byte79 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte77 << 14) | (byte78 << 6) | (byte79 >>> 2);
final int byte80 = blocks[blocksOffset++] & 0xFF;
final int byte81 = blocks[blocksOffset++] & 0xFF;
final int byte82 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte79 & 3) << 20) | (byte80 << 12) | (byte81 << 4) | (byte82 >>> 4);
final int byte83 = blocks[blocksOffset++] & 0xFF;
final int byte84 = blocks[blocksOffset++] & 0xFF;
final int byte85 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte82 & 15) << 18) | (byte83 << 10) | (byte84 << 2) | (byte85 >>> 6);
final int byte86 = blocks[blocksOffset++] & 0xFF;
final int byte87 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte85 & 63) << 16) | (byte86 << 8) | byte87;
}
@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;
final int byte2 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte0 << 14) | (byte1 << 6) | (byte2 >>> 2);
final int byte3 = blocks[blocksOffset++] & 0xFF;
final int byte4 = blocks[blocksOffset++] & 0xFF;
final int byte5 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte2 & 3) << 20) | (byte3 << 12) | (byte4 << 4) | (byte5 >>> 4);
final int byte6 = blocks[blocksOffset++] & 0xFF;
final int byte7 = blocks[blocksOffset++] & 0xFF;
final int byte8 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte5 & 15) << 18) | (byte6 << 10) | (byte7 << 2) | (byte8 >>> 6);
final int byte9 = blocks[blocksOffset++] & 0xFF;
final int byte10 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte8 & 63) << 16) | (byte9 << 8) | byte10;
}
}
@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 >>> 42;
values[valuesOffset++] = (block0 >>> 20) & 4194303L;
final long block1 = blocks[blocksOffset++];
values[valuesOffset++] = ((block0 & 1048575L) << 2) | (block1 >>> 62);
values[valuesOffset++] = (block1 >>> 40) & 4194303L;
values[valuesOffset++] = (block1 >>> 18) & 4194303L;
final long block2 = blocks[blocksOffset++];
values[valuesOffset++] = ((block1 & 262143L) << 4) | (block2 >>> 60);
values[valuesOffset++] = (block2 >>> 38) & 4194303L;
values[valuesOffset++] = (block2 >>> 16) & 4194303L;
final long block3 = blocks[blocksOffset++];
values[valuesOffset++] = ((block2 & 65535L) << 6) | (block3 >>> 58);
values[valuesOffset++] = (block3 >>> 36) & 4194303L;
values[valuesOffset++] = (block3 >>> 14) & 4194303L;
final long block4 = blocks[blocksOffset++];
values[valuesOffset++] = ((block3 & 16383L) << 8) | (block4 >>> 56);
values[valuesOffset++] = (block4 >>> 34) & 4194303L;
values[valuesOffset++] = (block4 >>> 12) & 4194303L;
final long block5 = blocks[blocksOffset++];
values[valuesOffset++] = ((block4 & 4095L) << 10) | (block5 >>> 54);
values[valuesOffset++] = (block5 >>> 32) & 4194303L;
values[valuesOffset++] = (block5 >>> 10) & 4194303L;
final long block6 = blocks[blocksOffset++];
values[valuesOffset++] = ((block5 & 1023L) << 12) | (block6 >>> 52);
values[valuesOffset++] = (block6 >>> 30) & 4194303L;
values[valuesOffset++] = (block6 >>> 8) & 4194303L;
final long block7 = blocks[blocksOffset++];
values[valuesOffset++] = ((block6 & 255L) << 14) | (block7 >>> 50);
values[valuesOffset++] = (block7 >>> 28) & 4194303L;
values[valuesOffset++] = (block7 >>> 6) & 4194303L;
final long block8 = blocks[blocksOffset++];
values[valuesOffset++] = ((block7 & 63L) << 16) | (block8 >>> 48);
values[valuesOffset++] = (block8 >>> 26) & 4194303L;
values[valuesOffset++] = (block8 >>> 4) & 4194303L;
final long block9 = blocks[blocksOffset++];
values[valuesOffset++] = ((block8 & 15L) << 18) | (block9 >>> 46);
values[valuesOffset++] = (block9 >>> 24) & 4194303L;
values[valuesOffset++] = (block9 >>> 2) & 4194303L;
final long block10 = blocks[blocksOffset++];
values[valuesOffset++] = ((block9 & 3L) << 20) | (block10 >>> 44);
values[valuesOffset++] = (block10 >>> 22) & 4194303L;
values[valuesOffset++] = block10 & 4194303L;
}
@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 >>> 42;
values[valuesOffset++] = (block0 >>> 20) & 4194303L;
final long block1 = blocks[blocksOffset++];
values[valuesOffset++] = ((block0 & 1048575L) << 2) | (block1 >>> 62);
values[valuesOffset++] = (block1 >>> 40) & 4194303L;
values[valuesOffset++] = (block1 >>> 18) & 4194303L;
final long block2 = blocks[blocksOffset++];
values[valuesOffset++] = ((block1 & 262143L) << 4) | (block2 >>> 60);
values[valuesOffset++] = (block2 >>> 38) & 4194303L;
values[valuesOffset++] = (block2 >>> 16) & 4194303L;
final long block3 = blocks[blocksOffset++];
values[valuesOffset++] = ((block2 & 65535L) << 6) | (block3 >>> 58);
values[valuesOffset++] = (block3 >>> 36) & 4194303L;
values[valuesOffset++] = (block3 >>> 14) & 4194303L;
final long block4 = blocks[blocksOffset++];
values[valuesOffset++] = ((block3 & 16383L) << 8) | (block4 >>> 56);
values[valuesOffset++] = (block4 >>> 34) & 4194303L;
values[valuesOffset++] = (block4 >>> 12) & 4194303L;
final long block5 = blocks[blocksOffset++];
values[valuesOffset++] = ((block4 & 4095L) << 10) | (block5 >>> 54);
values[valuesOffset++] = (block5 >>> 32) & 4194303L;
values[valuesOffset++] = (block5 >>> 10) & 4194303L;
final long block6 = blocks[blocksOffset++];
values[valuesOffset++] = ((block5 & 1023L) << 12) | (block6 >>> 52);
values[valuesOffset++] = (block6 >>> 30) & 4194303L;
values[valuesOffset++] = (block6 >>> 8) & 4194303L;
final long block7 = blocks[blocksOffset++];
values[valuesOffset++] = ((block6 & 255L) << 14) | (block7 >>> 50);
values[valuesOffset++] = (block7 >>> 28) & 4194303L;
values[valuesOffset++] = (block7 >>> 6) & 4194303L;
final long block8 = blocks[blocksOffset++];
values[valuesOffset++] = ((block7 & 63L) << 16) | (block8 >>> 48);
values[valuesOffset++] = (block8 >>> 26) & 4194303L;
values[valuesOffset++] = (block8 >>> 4) & 4194303L;
final long block9 = blocks[blocksOffset++];
values[valuesOffset++] = ((block8 & 15L) << 18) | (block9 >>> 46);
values[valuesOffset++] = (block9 >>> 24) & 4194303L;
values[valuesOffset++] = (block9 >>> 2) & 4194303L;
final long block10 = blocks[blocksOffset++];
values[valuesOffset++] = ((block9 & 3L) << 20) | (block10 >>> 44);
values[valuesOffset++] = (block10 >>> 22) & 4194303L;
values[valuesOffset++] = block10 & 4194303L;
}
}
@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;
final long byte2 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte0 << 14) | (byte1 << 6) | (byte2 >>> 2);
final long byte3 = blocks[blocksOffset++] & 0xFF;
final long byte4 = blocks[blocksOffset++] & 0xFF;
final long byte5 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte2 & 3) << 20) | (byte3 << 12) | (byte4 << 4) | (byte5 >>> 4);
final long byte6 = blocks[blocksOffset++] & 0xFF;
final long byte7 = blocks[blocksOffset++] & 0xFF;
final long byte8 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte5 & 15) << 18) | (byte6 << 10) | (byte7 << 2) | (byte8 >>> 6);
final long byte9 = blocks[blocksOffset++] & 0xFF;
final long byte10 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte8 & 63) << 16) | (byte9 << 8) | byte10;
final long byte11 = blocks[blocksOffset++] & 0xFF;
final long byte12 = blocks[blocksOffset++] & 0xFF;
final long byte13 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte11 << 14) | (byte12 << 6) | (byte13 >>> 2);
final long byte14 = blocks[blocksOffset++] & 0xFF;
final long byte15 = blocks[blocksOffset++] & 0xFF;
final long byte16 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte13 & 3) << 20) | (byte14 << 12) | (byte15 << 4) | (byte16 >>> 4);
final long byte17 = blocks[blocksOffset++] & 0xFF;
final long byte18 = blocks[blocksOffset++] & 0xFF;
final long byte19 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte16 & 15) << 18) | (byte17 << 10) | (byte18 << 2) | (byte19 >>> 6);
final long byte20 = blocks[blocksOffset++] & 0xFF;
final long byte21 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte19 & 63) << 16) | (byte20 << 8) | byte21;
final long byte22 = blocks[blocksOffset++] & 0xFF;
final long byte23 = blocks[blocksOffset++] & 0xFF;
final long byte24 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte22 << 14) | (byte23 << 6) | (byte24 >>> 2);
final long byte25 = blocks[blocksOffset++] & 0xFF;
final long byte26 = blocks[blocksOffset++] & 0xFF;
final long byte27 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte24 & 3) << 20) | (byte25 << 12) | (byte26 << 4) | (byte27 >>> 4);
final long byte28 = blocks[blocksOffset++] & 0xFF;
final long byte29 = blocks[blocksOffset++] & 0xFF;
final long byte30 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte27 & 15) << 18) | (byte28 << 10) | (byte29 << 2) | (byte30 >>> 6);
final long byte31 = blocks[blocksOffset++] & 0xFF;
final long byte32 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte30 & 63) << 16) | (byte31 << 8) | byte32;
final long byte33 = blocks[blocksOffset++] & 0xFF;
final long byte34 = blocks[blocksOffset++] & 0xFF;
final long byte35 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte33 << 14) | (byte34 << 6) | (byte35 >>> 2);
final long byte36 = blocks[blocksOffset++] & 0xFF;
final long byte37 = blocks[blocksOffset++] & 0xFF;
final long byte38 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte35 & 3) << 20) | (byte36 << 12) | (byte37 << 4) | (byte38 >>> 4);
final long byte39 = blocks[blocksOffset++] & 0xFF;
final long byte40 = blocks[blocksOffset++] & 0xFF;
final long byte41 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte38 & 15) << 18) | (byte39 << 10) | (byte40 << 2) | (byte41 >>> 6);
final long byte42 = blocks[blocksOffset++] & 0xFF;
final long byte43 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte41 & 63) << 16) | (byte42 << 8) | byte43;
final long byte44 = blocks[blocksOffset++] & 0xFF;
final long byte45 = blocks[blocksOffset++] & 0xFF;
final long byte46 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte44 << 14) | (byte45 << 6) | (byte46 >>> 2);
final long byte47 = blocks[blocksOffset++] & 0xFF;
final long byte48 = blocks[blocksOffset++] & 0xFF;
final long byte49 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte46 & 3) << 20) | (byte47 << 12) | (byte48 << 4) | (byte49 >>> 4);
final long byte50 = blocks[blocksOffset++] & 0xFF;
final long byte51 = blocks[blocksOffset++] & 0xFF;
final long byte52 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte49 & 15) << 18) | (byte50 << 10) | (byte51 << 2) | (byte52 >>> 6);
final long byte53 = blocks[blocksOffset++] & 0xFF;
final long byte54 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte52 & 63) << 16) | (byte53 << 8) | byte54;
final long byte55 = blocks[blocksOffset++] & 0xFF;
final long byte56 = blocks[blocksOffset++] & 0xFF;
final long byte57 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte55 << 14) | (byte56 << 6) | (byte57 >>> 2);
final long byte58 = blocks[blocksOffset++] & 0xFF;
final long byte59 = blocks[blocksOffset++] & 0xFF;
final long byte60 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte57 & 3) << 20) | (byte58 << 12) | (byte59 << 4) | (byte60 >>> 4);
final long byte61 = blocks[blocksOffset++] & 0xFF;
final long byte62 = blocks[blocksOffset++] & 0xFF;
final long byte63 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte60 & 15) << 18) | (byte61 << 10) | (byte62 << 2) | (byte63 >>> 6);
final long byte64 = blocks[blocksOffset++] & 0xFF;
final long byte65 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte63 & 63) << 16) | (byte64 << 8) | byte65;
final long byte66 = blocks[blocksOffset++] & 0xFF;
final long byte67 = blocks[blocksOffset++] & 0xFF;
final long byte68 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte66 << 14) | (byte67 << 6) | (byte68 >>> 2);
final long byte69 = blocks[blocksOffset++] & 0xFF;
final long byte70 = blocks[blocksOffset++] & 0xFF;
final long byte71 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte68 & 3) << 20) | (byte69 << 12) | (byte70 << 4) | (byte71 >>> 4);
final long byte72 = blocks[blocksOffset++] & 0xFF;
final long byte73 = blocks[blocksOffset++] & 0xFF;
final long byte74 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte71 & 15) << 18) | (byte72 << 10) | (byte73 << 2) | (byte74 >>> 6);
final long byte75 = blocks[blocksOffset++] & 0xFF;
final long byte76 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte74 & 63) << 16) | (byte75 << 8) | byte76;
final long byte77 = blocks[blocksOffset++] & 0xFF;
final long byte78 = blocks[blocksOffset++] & 0xFF;
final long byte79 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte77 << 14) | (byte78 << 6) | (byte79 >>> 2);
final long byte80 = blocks[blocksOffset++] & 0xFF;
final long byte81 = blocks[blocksOffset++] & 0xFF;
final long byte82 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte79 & 3) << 20) | (byte80 << 12) | (byte81 << 4) | (byte82 >>> 4);
final long byte83 = blocks[blocksOffset++] & 0xFF;
final long byte84 = blocks[blocksOffset++] & 0xFF;
final long byte85 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte82 & 15) << 18) | (byte83 << 10) | (byte84 << 2) | (byte85 >>> 6);
final long byte86 = blocks[blocksOffset++] & 0xFF;
final long byte87 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte85 & 63) << 16) | (byte86 << 8) | byte87;
}
@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;
final long byte2 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte0 << 14) | (byte1 << 6) | (byte2 >>> 2);
final long byte3 = blocks[blocksOffset++] & 0xFF;
final long byte4 = blocks[blocksOffset++] & 0xFF;
final long byte5 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte2 & 3) << 20) | (byte3 << 12) | (byte4 << 4) | (byte5 >>> 4);
final long byte6 = blocks[blocksOffset++] & 0xFF;
final long byte7 = blocks[blocksOffset++] & 0xFF;
final long byte8 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte5 & 15) << 18) | (byte6 << 10) | (byte7 << 2) | (byte8 >>> 6);
final long byte9 = blocks[blocksOffset++] & 0xFF;
final long byte10 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte8 & 63) << 16) | (byte9 << 8) | byte10;
}
}
}

View File

@ -24,712 +24,270 @@ package org.apache.lucene.util.packed;
*/
final class BulkOperationPacked23 extends BulkOperationPacked {
public BulkOperationPacked23() {
super(23);
assert blockCount() == 23;
assert valueCount() == 64;
}
public BulkOperationPacked23() {
super(23);
assert blockCount() == 23;
assert valueCount() == 64;
}
@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 >>> 41);
values[valuesOffset++] = (int) ((block0 >>> 18) & 8388607L);
final long block1 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block0 & 262143L) << 5) | (block1 >>> 59));
values[valuesOffset++] = (int) ((block1 >>> 36) & 8388607L);
values[valuesOffset++] = (int) ((block1 >>> 13) & 8388607L);
final long block2 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block1 & 8191L) << 10) | (block2 >>> 54));
values[valuesOffset++] = (int) ((block2 >>> 31) & 8388607L);
values[valuesOffset++] = (int) ((block2 >>> 8) & 8388607L);
final long block3 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block2 & 255L) << 15) | (block3 >>> 49));
values[valuesOffset++] = (int) ((block3 >>> 26) & 8388607L);
values[valuesOffset++] = (int) ((block3 >>> 3) & 8388607L);
final long block4 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block3 & 7L) << 20) | (block4 >>> 44));
values[valuesOffset++] = (int) ((block4 >>> 21) & 8388607L);
final long block5 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block4 & 2097151L) << 2) | (block5 >>> 62));
values[valuesOffset++] = (int) ((block5 >>> 39) & 8388607L);
values[valuesOffset++] = (int) ((block5 >>> 16) & 8388607L);
final long block6 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block5 & 65535L) << 7) | (block6 >>> 57));
values[valuesOffset++] = (int) ((block6 >>> 34) & 8388607L);
values[valuesOffset++] = (int) ((block6 >>> 11) & 8388607L);
final long block7 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block6 & 2047L) << 12) | (block7 >>> 52));
values[valuesOffset++] = (int) ((block7 >>> 29) & 8388607L);
values[valuesOffset++] = (int) ((block7 >>> 6) & 8388607L);
final long block8 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block7 & 63L) << 17) | (block8 >>> 47));
values[valuesOffset++] = (int) ((block8 >>> 24) & 8388607L);
values[valuesOffset++] = (int) ((block8 >>> 1) & 8388607L);
final long block9 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block8 & 1L) << 22) | (block9 >>> 42));
values[valuesOffset++] = (int) ((block9 >>> 19) & 8388607L);
final long block10 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block9 & 524287L) << 4) | (block10 >>> 60));
values[valuesOffset++] = (int) ((block10 >>> 37) & 8388607L);
values[valuesOffset++] = (int) ((block10 >>> 14) & 8388607L);
final long block11 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block10 & 16383L) << 9) | (block11 >>> 55));
values[valuesOffset++] = (int) ((block11 >>> 32) & 8388607L);
values[valuesOffset++] = (int) ((block11 >>> 9) & 8388607L);
final long block12 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block11 & 511L) << 14) | (block12 >>> 50));
values[valuesOffset++] = (int) ((block12 >>> 27) & 8388607L);
values[valuesOffset++] = (int) ((block12 >>> 4) & 8388607L);
final long block13 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block12 & 15L) << 19) | (block13 >>> 45));
values[valuesOffset++] = (int) ((block13 >>> 22) & 8388607L);
final long block14 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block13 & 4194303L) << 1) | (block14 >>> 63));
values[valuesOffset++] = (int) ((block14 >>> 40) & 8388607L);
values[valuesOffset++] = (int) ((block14 >>> 17) & 8388607L);
final long block15 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block14 & 131071L) << 6) | (block15 >>> 58));
values[valuesOffset++] = (int) ((block15 >>> 35) & 8388607L);
values[valuesOffset++] = (int) ((block15 >>> 12) & 8388607L);
final long block16 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block15 & 4095L) << 11) | (block16 >>> 53));
values[valuesOffset++] = (int) ((block16 >>> 30) & 8388607L);
values[valuesOffset++] = (int) ((block16 >>> 7) & 8388607L);
final long block17 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block16 & 127L) << 16) | (block17 >>> 48));
values[valuesOffset++] = (int) ((block17 >>> 25) & 8388607L);
values[valuesOffset++] = (int) ((block17 >>> 2) & 8388607L);
final long block18 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block17 & 3L) << 21) | (block18 >>> 43));
values[valuesOffset++] = (int) ((block18 >>> 20) & 8388607L);
final long block19 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block18 & 1048575L) << 3) | (block19 >>> 61));
values[valuesOffset++] = (int) ((block19 >>> 38) & 8388607L);
values[valuesOffset++] = (int) ((block19 >>> 15) & 8388607L);
final long block20 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block19 & 32767L) << 8) | (block20 >>> 56));
values[valuesOffset++] = (int) ((block20 >>> 33) & 8388607L);
values[valuesOffset++] = (int) ((block20 >>> 10) & 8388607L);
final long block21 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block20 & 1023L) << 13) | (block21 >>> 51));
values[valuesOffset++] = (int) ((block21 >>> 28) & 8388607L);
values[valuesOffset++] = (int) ((block21 >>> 5) & 8388607L);
final long block22 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block21 & 31L) << 18) | (block22 >>> 46));
values[valuesOffset++] = (int) ((block22 >>> 23) & 8388607L);
values[valuesOffset++] = (int) (block22 & 8388607L);
}
@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 >>> 41);
values[valuesOffset++] = (int) ((block0 >>> 18) & 8388607L);
final long block1 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block0 & 262143L) << 5) | (block1 >>> 59));
values[valuesOffset++] = (int) ((block1 >>> 36) & 8388607L);
values[valuesOffset++] = (int) ((block1 >>> 13) & 8388607L);
final long block2 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block1 & 8191L) << 10) | (block2 >>> 54));
values[valuesOffset++] = (int) ((block2 >>> 31) & 8388607L);
values[valuesOffset++] = (int) ((block2 >>> 8) & 8388607L);
final long block3 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block2 & 255L) << 15) | (block3 >>> 49));
values[valuesOffset++] = (int) ((block3 >>> 26) & 8388607L);
values[valuesOffset++] = (int) ((block3 >>> 3) & 8388607L);
final long block4 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block3 & 7L) << 20) | (block4 >>> 44));
values[valuesOffset++] = (int) ((block4 >>> 21) & 8388607L);
final long block5 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block4 & 2097151L) << 2) | (block5 >>> 62));
values[valuesOffset++] = (int) ((block5 >>> 39) & 8388607L);
values[valuesOffset++] = (int) ((block5 >>> 16) & 8388607L);
final long block6 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block5 & 65535L) << 7) | (block6 >>> 57));
values[valuesOffset++] = (int) ((block6 >>> 34) & 8388607L);
values[valuesOffset++] = (int) ((block6 >>> 11) & 8388607L);
final long block7 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block6 & 2047L) << 12) | (block7 >>> 52));
values[valuesOffset++] = (int) ((block7 >>> 29) & 8388607L);
values[valuesOffset++] = (int) ((block7 >>> 6) & 8388607L);
final long block8 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block7 & 63L) << 17) | (block8 >>> 47));
values[valuesOffset++] = (int) ((block8 >>> 24) & 8388607L);
values[valuesOffset++] = (int) ((block8 >>> 1) & 8388607L);
final long block9 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block8 & 1L) << 22) | (block9 >>> 42));
values[valuesOffset++] = (int) ((block9 >>> 19) & 8388607L);
final long block10 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block9 & 524287L) << 4) | (block10 >>> 60));
values[valuesOffset++] = (int) ((block10 >>> 37) & 8388607L);
values[valuesOffset++] = (int) ((block10 >>> 14) & 8388607L);
final long block11 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block10 & 16383L) << 9) | (block11 >>> 55));
values[valuesOffset++] = (int) ((block11 >>> 32) & 8388607L);
values[valuesOffset++] = (int) ((block11 >>> 9) & 8388607L);
final long block12 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block11 & 511L) << 14) | (block12 >>> 50));
values[valuesOffset++] = (int) ((block12 >>> 27) & 8388607L);
values[valuesOffset++] = (int) ((block12 >>> 4) & 8388607L);
final long block13 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block12 & 15L) << 19) | (block13 >>> 45));
values[valuesOffset++] = (int) ((block13 >>> 22) & 8388607L);
final long block14 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block13 & 4194303L) << 1) | (block14 >>> 63));
values[valuesOffset++] = (int) ((block14 >>> 40) & 8388607L);
values[valuesOffset++] = (int) ((block14 >>> 17) & 8388607L);
final long block15 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block14 & 131071L) << 6) | (block15 >>> 58));
values[valuesOffset++] = (int) ((block15 >>> 35) & 8388607L);
values[valuesOffset++] = (int) ((block15 >>> 12) & 8388607L);
final long block16 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block15 & 4095L) << 11) | (block16 >>> 53));
values[valuesOffset++] = (int) ((block16 >>> 30) & 8388607L);
values[valuesOffset++] = (int) ((block16 >>> 7) & 8388607L);
final long block17 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block16 & 127L) << 16) | (block17 >>> 48));
values[valuesOffset++] = (int) ((block17 >>> 25) & 8388607L);
values[valuesOffset++] = (int) ((block17 >>> 2) & 8388607L);
final long block18 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block17 & 3L) << 21) | (block18 >>> 43));
values[valuesOffset++] = (int) ((block18 >>> 20) & 8388607L);
final long block19 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block18 & 1048575L) << 3) | (block19 >>> 61));
values[valuesOffset++] = (int) ((block19 >>> 38) & 8388607L);
values[valuesOffset++] = (int) ((block19 >>> 15) & 8388607L);
final long block20 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block19 & 32767L) << 8) | (block20 >>> 56));
values[valuesOffset++] = (int) ((block20 >>> 33) & 8388607L);
values[valuesOffset++] = (int) ((block20 >>> 10) & 8388607L);
final long block21 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block20 & 1023L) << 13) | (block21 >>> 51));
values[valuesOffset++] = (int) ((block21 >>> 28) & 8388607L);
values[valuesOffset++] = (int) ((block21 >>> 5) & 8388607L);
final long block22 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block21 & 31L) << 18) | (block22 >>> 46));
values[valuesOffset++] = (int) ((block22 >>> 23) & 8388607L);
values[valuesOffset++] = (int) (block22 & 8388607L);
}
}
@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;
final int byte2 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte0 << 15) | (byte1 << 7) | (byte2 >>> 1);
final int byte3 = blocks[blocksOffset++] & 0xFF;
final int byte4 = blocks[blocksOffset++] & 0xFF;
final int byte5 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte2 & 1) << 22) | (byte3 << 14) | (byte4 << 6) | (byte5 >>> 2);
final int byte6 = blocks[blocksOffset++] & 0xFF;
final int byte7 = blocks[blocksOffset++] & 0xFF;
final int byte8 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte5 & 3) << 21) | (byte6 << 13) | (byte7 << 5) | (byte8 >>> 3);
final int byte9 = blocks[blocksOffset++] & 0xFF;
final int byte10 = blocks[blocksOffset++] & 0xFF;
final int byte11 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte8 & 7) << 20) | (byte9 << 12) | (byte10 << 4) | (byte11 >>> 4);
final int byte12 = blocks[blocksOffset++] & 0xFF;
final int byte13 = blocks[blocksOffset++] & 0xFF;
final int byte14 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte11 & 15) << 19) | (byte12 << 11) | (byte13 << 3) | (byte14 >>> 5);
final int byte15 = blocks[blocksOffset++] & 0xFF;
final int byte16 = blocks[blocksOffset++] & 0xFF;
final int byte17 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte14 & 31) << 18) | (byte15 << 10) | (byte16 << 2) | (byte17 >>> 6);
final int byte18 = blocks[blocksOffset++] & 0xFF;
final int byte19 = blocks[blocksOffset++] & 0xFF;
final int byte20 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte17 & 63) << 17) | (byte18 << 9) | (byte19 << 1) | (byte20 >>> 7);
final int byte21 = blocks[blocksOffset++] & 0xFF;
final int byte22 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte20 & 127) << 16) | (byte21 << 8) | byte22;
final int byte23 = blocks[blocksOffset++] & 0xFF;
final int byte24 = blocks[blocksOffset++] & 0xFF;
final int byte25 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte23 << 15) | (byte24 << 7) | (byte25 >>> 1);
final int byte26 = blocks[blocksOffset++] & 0xFF;
final int byte27 = blocks[blocksOffset++] & 0xFF;
final int byte28 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte25 & 1) << 22) | (byte26 << 14) | (byte27 << 6) | (byte28 >>> 2);
final int byte29 = blocks[blocksOffset++] & 0xFF;
final int byte30 = blocks[blocksOffset++] & 0xFF;
final int byte31 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte28 & 3) << 21) | (byte29 << 13) | (byte30 << 5) | (byte31 >>> 3);
final int byte32 = blocks[blocksOffset++] & 0xFF;
final int byte33 = blocks[blocksOffset++] & 0xFF;
final int byte34 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte31 & 7) << 20) | (byte32 << 12) | (byte33 << 4) | (byte34 >>> 4);
final int byte35 = blocks[blocksOffset++] & 0xFF;
final int byte36 = blocks[blocksOffset++] & 0xFF;
final int byte37 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte34 & 15) << 19) | (byte35 << 11) | (byte36 << 3) | (byte37 >>> 5);
final int byte38 = blocks[blocksOffset++] & 0xFF;
final int byte39 = blocks[blocksOffset++] & 0xFF;
final int byte40 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte37 & 31) << 18) | (byte38 << 10) | (byte39 << 2) | (byte40 >>> 6);
final int byte41 = blocks[blocksOffset++] & 0xFF;
final int byte42 = blocks[blocksOffset++] & 0xFF;
final int byte43 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte40 & 63) << 17) | (byte41 << 9) | (byte42 << 1) | (byte43 >>> 7);
final int byte44 = blocks[blocksOffset++] & 0xFF;
final int byte45 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte43 & 127) << 16) | (byte44 << 8) | byte45;
final int byte46 = blocks[blocksOffset++] & 0xFF;
final int byte47 = blocks[blocksOffset++] & 0xFF;
final int byte48 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte46 << 15) | (byte47 << 7) | (byte48 >>> 1);
final int byte49 = blocks[blocksOffset++] & 0xFF;
final int byte50 = blocks[blocksOffset++] & 0xFF;
final int byte51 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte48 & 1) << 22) | (byte49 << 14) | (byte50 << 6) | (byte51 >>> 2);
final int byte52 = blocks[blocksOffset++] & 0xFF;
final int byte53 = blocks[blocksOffset++] & 0xFF;
final int byte54 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte51 & 3) << 21) | (byte52 << 13) | (byte53 << 5) | (byte54 >>> 3);
final int byte55 = blocks[blocksOffset++] & 0xFF;
final int byte56 = blocks[blocksOffset++] & 0xFF;
final int byte57 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte54 & 7) << 20) | (byte55 << 12) | (byte56 << 4) | (byte57 >>> 4);
final int byte58 = blocks[blocksOffset++] & 0xFF;
final int byte59 = blocks[blocksOffset++] & 0xFF;
final int byte60 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte57 & 15) << 19) | (byte58 << 11) | (byte59 << 3) | (byte60 >>> 5);
final int byte61 = blocks[blocksOffset++] & 0xFF;
final int byte62 = blocks[blocksOffset++] & 0xFF;
final int byte63 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte60 & 31) << 18) | (byte61 << 10) | (byte62 << 2) | (byte63 >>> 6);
final int byte64 = blocks[blocksOffset++] & 0xFF;
final int byte65 = blocks[blocksOffset++] & 0xFF;
final int byte66 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte63 & 63) << 17) | (byte64 << 9) | (byte65 << 1) | (byte66 >>> 7);
final int byte67 = blocks[blocksOffset++] & 0xFF;
final int byte68 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte66 & 127) << 16) | (byte67 << 8) | byte68;
final int byte69 = blocks[blocksOffset++] & 0xFF;
final int byte70 = blocks[blocksOffset++] & 0xFF;
final int byte71 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte69 << 15) | (byte70 << 7) | (byte71 >>> 1);
final int byte72 = blocks[blocksOffset++] & 0xFF;
final int byte73 = blocks[blocksOffset++] & 0xFF;
final int byte74 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte71 & 1) << 22) | (byte72 << 14) | (byte73 << 6) | (byte74 >>> 2);
final int byte75 = blocks[blocksOffset++] & 0xFF;
final int byte76 = blocks[blocksOffset++] & 0xFF;
final int byte77 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte74 & 3) << 21) | (byte75 << 13) | (byte76 << 5) | (byte77 >>> 3);
final int byte78 = blocks[blocksOffset++] & 0xFF;
final int byte79 = blocks[blocksOffset++] & 0xFF;
final int byte80 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte77 & 7) << 20) | (byte78 << 12) | (byte79 << 4) | (byte80 >>> 4);
final int byte81 = blocks[blocksOffset++] & 0xFF;
final int byte82 = blocks[blocksOffset++] & 0xFF;
final int byte83 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte80 & 15) << 19) | (byte81 << 11) | (byte82 << 3) | (byte83 >>> 5);
final int byte84 = blocks[blocksOffset++] & 0xFF;
final int byte85 = blocks[blocksOffset++] & 0xFF;
final int byte86 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte83 & 31) << 18) | (byte84 << 10) | (byte85 << 2) | (byte86 >>> 6);
final int byte87 = blocks[blocksOffset++] & 0xFF;
final int byte88 = blocks[blocksOffset++] & 0xFF;
final int byte89 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte86 & 63) << 17) | (byte87 << 9) | (byte88 << 1) | (byte89 >>> 7);
final int byte90 = blocks[blocksOffset++] & 0xFF;
final int byte91 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte89 & 127) << 16) | (byte90 << 8) | byte91;
final int byte92 = blocks[blocksOffset++] & 0xFF;
final int byte93 = blocks[blocksOffset++] & 0xFF;
final int byte94 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte92 << 15) | (byte93 << 7) | (byte94 >>> 1);
final int byte95 = blocks[blocksOffset++] & 0xFF;
final int byte96 = blocks[blocksOffset++] & 0xFF;
final int byte97 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte94 & 1) << 22) | (byte95 << 14) | (byte96 << 6) | (byte97 >>> 2);
final int byte98 = blocks[blocksOffset++] & 0xFF;
final int byte99 = blocks[blocksOffset++] & 0xFF;
final int byte100 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte97 & 3) << 21) | (byte98 << 13) | (byte99 << 5) | (byte100 >>> 3);
final int byte101 = blocks[blocksOffset++] & 0xFF;
final int byte102 = blocks[blocksOffset++] & 0xFF;
final int byte103 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte100 & 7) << 20) | (byte101 << 12) | (byte102 << 4) | (byte103 >>> 4);
final int byte104 = blocks[blocksOffset++] & 0xFF;
final int byte105 = blocks[blocksOffset++] & 0xFF;
final int byte106 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte103 & 15) << 19) | (byte104 << 11) | (byte105 << 3) | (byte106 >>> 5);
final int byte107 = blocks[blocksOffset++] & 0xFF;
final int byte108 = blocks[blocksOffset++] & 0xFF;
final int byte109 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte106 & 31) << 18) | (byte107 << 10) | (byte108 << 2) | (byte109 >>> 6);
final int byte110 = blocks[blocksOffset++] & 0xFF;
final int byte111 = blocks[blocksOffset++] & 0xFF;
final int byte112 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte109 & 63) << 17) | (byte110 << 9) | (byte111 << 1) | (byte112 >>> 7);
final int byte113 = blocks[blocksOffset++] & 0xFF;
final int byte114 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte112 & 127) << 16) | (byte113 << 8) | byte114;
final int byte115 = blocks[blocksOffset++] & 0xFF;
final int byte116 = blocks[blocksOffset++] & 0xFF;
final int byte117 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte115 << 15) | (byte116 << 7) | (byte117 >>> 1);
final int byte118 = blocks[blocksOffset++] & 0xFF;
final int byte119 = blocks[blocksOffset++] & 0xFF;
final int byte120 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte117 & 1) << 22) | (byte118 << 14) | (byte119 << 6) | (byte120 >>> 2);
final int byte121 = blocks[blocksOffset++] & 0xFF;
final int byte122 = blocks[blocksOffset++] & 0xFF;
final int byte123 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte120 & 3) << 21) | (byte121 << 13) | (byte122 << 5) | (byte123 >>> 3);
final int byte124 = blocks[blocksOffset++] & 0xFF;
final int byte125 = blocks[blocksOffset++] & 0xFF;
final int byte126 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte123 & 7) << 20) | (byte124 << 12) | (byte125 << 4) | (byte126 >>> 4);
final int byte127 = blocks[blocksOffset++] & 0xFF;
final int byte128 = blocks[blocksOffset++] & 0xFF;
final int byte129 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte126 & 15) << 19) | (byte127 << 11) | (byte128 << 3) | (byte129 >>> 5);
final int byte130 = blocks[blocksOffset++] & 0xFF;
final int byte131 = blocks[blocksOffset++] & 0xFF;
final int byte132 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte129 & 31) << 18) | (byte130 << 10) | (byte131 << 2) | (byte132 >>> 6);
final int byte133 = blocks[blocksOffset++] & 0xFF;
final int byte134 = blocks[blocksOffset++] & 0xFF;
final int byte135 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte132 & 63) << 17) | (byte133 << 9) | (byte134 << 1) | (byte135 >>> 7);
final int byte136 = blocks[blocksOffset++] & 0xFF;
final int byte137 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte135 & 127) << 16) | (byte136 << 8) | byte137;
final int byte138 = blocks[blocksOffset++] & 0xFF;
final int byte139 = blocks[blocksOffset++] & 0xFF;
final int byte140 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte138 << 15) | (byte139 << 7) | (byte140 >>> 1);
final int byte141 = blocks[blocksOffset++] & 0xFF;
final int byte142 = blocks[blocksOffset++] & 0xFF;
final int byte143 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte140 & 1) << 22) | (byte141 << 14) | (byte142 << 6) | (byte143 >>> 2);
final int byte144 = blocks[blocksOffset++] & 0xFF;
final int byte145 = blocks[blocksOffset++] & 0xFF;
final int byte146 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte143 & 3) << 21) | (byte144 << 13) | (byte145 << 5) | (byte146 >>> 3);
final int byte147 = blocks[blocksOffset++] & 0xFF;
final int byte148 = blocks[blocksOffset++] & 0xFF;
final int byte149 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte146 & 7) << 20) | (byte147 << 12) | (byte148 << 4) | (byte149 >>> 4);
final int byte150 = blocks[blocksOffset++] & 0xFF;
final int byte151 = blocks[blocksOffset++] & 0xFF;
final int byte152 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte149 & 15) << 19) | (byte150 << 11) | (byte151 << 3) | (byte152 >>> 5);
final int byte153 = blocks[blocksOffset++] & 0xFF;
final int byte154 = blocks[blocksOffset++] & 0xFF;
final int byte155 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte152 & 31) << 18) | (byte153 << 10) | (byte154 << 2) | (byte155 >>> 6);
final int byte156 = blocks[blocksOffset++] & 0xFF;
final int byte157 = blocks[blocksOffset++] & 0xFF;
final int byte158 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte155 & 63) << 17) | (byte156 << 9) | (byte157 << 1) | (byte158 >>> 7);
final int byte159 = blocks[blocksOffset++] & 0xFF;
final int byte160 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte158 & 127) << 16) | (byte159 << 8) | byte160;
final int byte161 = blocks[blocksOffset++] & 0xFF;
final int byte162 = blocks[blocksOffset++] & 0xFF;
final int byte163 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte161 << 15) | (byte162 << 7) | (byte163 >>> 1);
final int byte164 = blocks[blocksOffset++] & 0xFF;
final int byte165 = blocks[blocksOffset++] & 0xFF;
final int byte166 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte163 & 1) << 22) | (byte164 << 14) | (byte165 << 6) | (byte166 >>> 2);
final int byte167 = blocks[blocksOffset++] & 0xFF;
final int byte168 = blocks[blocksOffset++] & 0xFF;
final int byte169 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte166 & 3) << 21) | (byte167 << 13) | (byte168 << 5) | (byte169 >>> 3);
final int byte170 = blocks[blocksOffset++] & 0xFF;
final int byte171 = blocks[blocksOffset++] & 0xFF;
final int byte172 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte169 & 7) << 20) | (byte170 << 12) | (byte171 << 4) | (byte172 >>> 4);
final int byte173 = blocks[blocksOffset++] & 0xFF;
final int byte174 = blocks[blocksOffset++] & 0xFF;
final int byte175 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte172 & 15) << 19) | (byte173 << 11) | (byte174 << 3) | (byte175 >>> 5);
final int byte176 = blocks[blocksOffset++] & 0xFF;
final int byte177 = blocks[blocksOffset++] & 0xFF;
final int byte178 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte175 & 31) << 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;
values[valuesOffset++] = ((byte178 & 63) << 17) | (byte179 << 9) | (byte180 << 1) | (byte181 >>> 7);
final int byte182 = blocks[blocksOffset++] & 0xFF;
final int byte183 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte181 & 127) << 16) | (byte182 << 8) | byte183;
}
@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;
final int byte2 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte0 << 15) | (byte1 << 7) | (byte2 >>> 1);
final int byte3 = blocks[blocksOffset++] & 0xFF;
final int byte4 = blocks[blocksOffset++] & 0xFF;
final int byte5 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte2 & 1) << 22) | (byte3 << 14) | (byte4 << 6) | (byte5 >>> 2);
final int byte6 = blocks[blocksOffset++] & 0xFF;
final int byte7 = blocks[blocksOffset++] & 0xFF;
final int byte8 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte5 & 3) << 21) | (byte6 << 13) | (byte7 << 5) | (byte8 >>> 3);
final int byte9 = blocks[blocksOffset++] & 0xFF;
final int byte10 = blocks[blocksOffset++] & 0xFF;
final int byte11 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte8 & 7) << 20) | (byte9 << 12) | (byte10 << 4) | (byte11 >>> 4);
final int byte12 = blocks[blocksOffset++] & 0xFF;
final int byte13 = blocks[blocksOffset++] & 0xFF;
final int byte14 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte11 & 15) << 19) | (byte12 << 11) | (byte13 << 3) | (byte14 >>> 5);
final int byte15 = blocks[blocksOffset++] & 0xFF;
final int byte16 = blocks[blocksOffset++] & 0xFF;
final int byte17 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte14 & 31) << 18) | (byte15 << 10) | (byte16 << 2) | (byte17 >>> 6);
final int byte18 = blocks[blocksOffset++] & 0xFF;
final int byte19 = blocks[blocksOffset++] & 0xFF;
final int byte20 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte17 & 63) << 17) | (byte18 << 9) | (byte19 << 1) | (byte20 >>> 7);
final int byte21 = blocks[blocksOffset++] & 0xFF;
final int byte22 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte20 & 127) << 16) | (byte21 << 8) | byte22;
}
}
@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 >>> 41;
values[valuesOffset++] = (block0 >>> 18) & 8388607L;
final long block1 = blocks[blocksOffset++];
values[valuesOffset++] = ((block0 & 262143L) << 5) | (block1 >>> 59);
values[valuesOffset++] = (block1 >>> 36) & 8388607L;
values[valuesOffset++] = (block1 >>> 13) & 8388607L;
final long block2 = blocks[blocksOffset++];
values[valuesOffset++] = ((block1 & 8191L) << 10) | (block2 >>> 54);
values[valuesOffset++] = (block2 >>> 31) & 8388607L;
values[valuesOffset++] = (block2 >>> 8) & 8388607L;
final long block3 = blocks[blocksOffset++];
values[valuesOffset++] = ((block2 & 255L) << 15) | (block3 >>> 49);
values[valuesOffset++] = (block3 >>> 26) & 8388607L;
values[valuesOffset++] = (block3 >>> 3) & 8388607L;
final long block4 = blocks[blocksOffset++];
values[valuesOffset++] = ((block3 & 7L) << 20) | (block4 >>> 44);
values[valuesOffset++] = (block4 >>> 21) & 8388607L;
final long block5 = blocks[blocksOffset++];
values[valuesOffset++] = ((block4 & 2097151L) << 2) | (block5 >>> 62);
values[valuesOffset++] = (block5 >>> 39) & 8388607L;
values[valuesOffset++] = (block5 >>> 16) & 8388607L;
final long block6 = blocks[blocksOffset++];
values[valuesOffset++] = ((block5 & 65535L) << 7) | (block6 >>> 57);
values[valuesOffset++] = (block6 >>> 34) & 8388607L;
values[valuesOffset++] = (block6 >>> 11) & 8388607L;
final long block7 = blocks[blocksOffset++];
values[valuesOffset++] = ((block6 & 2047L) << 12) | (block7 >>> 52);
values[valuesOffset++] = (block7 >>> 29) & 8388607L;
values[valuesOffset++] = (block7 >>> 6) & 8388607L;
final long block8 = blocks[blocksOffset++];
values[valuesOffset++] = ((block7 & 63L) << 17) | (block8 >>> 47);
values[valuesOffset++] = (block8 >>> 24) & 8388607L;
values[valuesOffset++] = (block8 >>> 1) & 8388607L;
final long block9 = blocks[blocksOffset++];
values[valuesOffset++] = ((block8 & 1L) << 22) | (block9 >>> 42);
values[valuesOffset++] = (block9 >>> 19) & 8388607L;
final long block10 = blocks[blocksOffset++];
values[valuesOffset++] = ((block9 & 524287L) << 4) | (block10 >>> 60);
values[valuesOffset++] = (block10 >>> 37) & 8388607L;
values[valuesOffset++] = (block10 >>> 14) & 8388607L;
final long block11 = blocks[blocksOffset++];
values[valuesOffset++] = ((block10 & 16383L) << 9) | (block11 >>> 55);
values[valuesOffset++] = (block11 >>> 32) & 8388607L;
values[valuesOffset++] = (block11 >>> 9) & 8388607L;
final long block12 = blocks[blocksOffset++];
values[valuesOffset++] = ((block11 & 511L) << 14) | (block12 >>> 50);
values[valuesOffset++] = (block12 >>> 27) & 8388607L;
values[valuesOffset++] = (block12 >>> 4) & 8388607L;
final long block13 = blocks[blocksOffset++];
values[valuesOffset++] = ((block12 & 15L) << 19) | (block13 >>> 45);
values[valuesOffset++] = (block13 >>> 22) & 8388607L;
final long block14 = blocks[blocksOffset++];
values[valuesOffset++] = ((block13 & 4194303L) << 1) | (block14 >>> 63);
values[valuesOffset++] = (block14 >>> 40) & 8388607L;
values[valuesOffset++] = (block14 >>> 17) & 8388607L;
final long block15 = blocks[blocksOffset++];
values[valuesOffset++] = ((block14 & 131071L) << 6) | (block15 >>> 58);
values[valuesOffset++] = (block15 >>> 35) & 8388607L;
values[valuesOffset++] = (block15 >>> 12) & 8388607L;
final long block16 = blocks[blocksOffset++];
values[valuesOffset++] = ((block15 & 4095L) << 11) | (block16 >>> 53);
values[valuesOffset++] = (block16 >>> 30) & 8388607L;
values[valuesOffset++] = (block16 >>> 7) & 8388607L;
final long block17 = blocks[blocksOffset++];
values[valuesOffset++] = ((block16 & 127L) << 16) | (block17 >>> 48);
values[valuesOffset++] = (block17 >>> 25) & 8388607L;
values[valuesOffset++] = (block17 >>> 2) & 8388607L;
final long block18 = blocks[blocksOffset++];
values[valuesOffset++] = ((block17 & 3L) << 21) | (block18 >>> 43);
values[valuesOffset++] = (block18 >>> 20) & 8388607L;
final long block19 = blocks[blocksOffset++];
values[valuesOffset++] = ((block18 & 1048575L) << 3) | (block19 >>> 61);
values[valuesOffset++] = (block19 >>> 38) & 8388607L;
values[valuesOffset++] = (block19 >>> 15) & 8388607L;
final long block20 = blocks[blocksOffset++];
values[valuesOffset++] = ((block19 & 32767L) << 8) | (block20 >>> 56);
values[valuesOffset++] = (block20 >>> 33) & 8388607L;
values[valuesOffset++] = (block20 >>> 10) & 8388607L;
final long block21 = blocks[blocksOffset++];
values[valuesOffset++] = ((block20 & 1023L) << 13) | (block21 >>> 51);
values[valuesOffset++] = (block21 >>> 28) & 8388607L;
values[valuesOffset++] = (block21 >>> 5) & 8388607L;
final long block22 = blocks[blocksOffset++];
values[valuesOffset++] = ((block21 & 31L) << 18) | (block22 >>> 46);
values[valuesOffset++] = (block22 >>> 23) & 8388607L;
values[valuesOffset++] = block22 & 8388607L;
}
@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 >>> 41;
values[valuesOffset++] = (block0 >>> 18) & 8388607L;
final long block1 = blocks[blocksOffset++];
values[valuesOffset++] = ((block0 & 262143L) << 5) | (block1 >>> 59);
values[valuesOffset++] = (block1 >>> 36) & 8388607L;
values[valuesOffset++] = (block1 >>> 13) & 8388607L;
final long block2 = blocks[blocksOffset++];
values[valuesOffset++] = ((block1 & 8191L) << 10) | (block2 >>> 54);
values[valuesOffset++] = (block2 >>> 31) & 8388607L;
values[valuesOffset++] = (block2 >>> 8) & 8388607L;
final long block3 = blocks[blocksOffset++];
values[valuesOffset++] = ((block2 & 255L) << 15) | (block3 >>> 49);
values[valuesOffset++] = (block3 >>> 26) & 8388607L;
values[valuesOffset++] = (block3 >>> 3) & 8388607L;
final long block4 = blocks[blocksOffset++];
values[valuesOffset++] = ((block3 & 7L) << 20) | (block4 >>> 44);
values[valuesOffset++] = (block4 >>> 21) & 8388607L;
final long block5 = blocks[blocksOffset++];
values[valuesOffset++] = ((block4 & 2097151L) << 2) | (block5 >>> 62);
values[valuesOffset++] = (block5 >>> 39) & 8388607L;
values[valuesOffset++] = (block5 >>> 16) & 8388607L;
final long block6 = blocks[blocksOffset++];
values[valuesOffset++] = ((block5 & 65535L) << 7) | (block6 >>> 57);
values[valuesOffset++] = (block6 >>> 34) & 8388607L;
values[valuesOffset++] = (block6 >>> 11) & 8388607L;
final long block7 = blocks[blocksOffset++];
values[valuesOffset++] = ((block6 & 2047L) << 12) | (block7 >>> 52);
values[valuesOffset++] = (block7 >>> 29) & 8388607L;
values[valuesOffset++] = (block7 >>> 6) & 8388607L;
final long block8 = blocks[blocksOffset++];
values[valuesOffset++] = ((block7 & 63L) << 17) | (block8 >>> 47);
values[valuesOffset++] = (block8 >>> 24) & 8388607L;
values[valuesOffset++] = (block8 >>> 1) & 8388607L;
final long block9 = blocks[blocksOffset++];
values[valuesOffset++] = ((block8 & 1L) << 22) | (block9 >>> 42);
values[valuesOffset++] = (block9 >>> 19) & 8388607L;
final long block10 = blocks[blocksOffset++];
values[valuesOffset++] = ((block9 & 524287L) << 4) | (block10 >>> 60);
values[valuesOffset++] = (block10 >>> 37) & 8388607L;
values[valuesOffset++] = (block10 >>> 14) & 8388607L;
final long block11 = blocks[blocksOffset++];
values[valuesOffset++] = ((block10 & 16383L) << 9) | (block11 >>> 55);
values[valuesOffset++] = (block11 >>> 32) & 8388607L;
values[valuesOffset++] = (block11 >>> 9) & 8388607L;
final long block12 = blocks[blocksOffset++];
values[valuesOffset++] = ((block11 & 511L) << 14) | (block12 >>> 50);
values[valuesOffset++] = (block12 >>> 27) & 8388607L;
values[valuesOffset++] = (block12 >>> 4) & 8388607L;
final long block13 = blocks[blocksOffset++];
values[valuesOffset++] = ((block12 & 15L) << 19) | (block13 >>> 45);
values[valuesOffset++] = (block13 >>> 22) & 8388607L;
final long block14 = blocks[blocksOffset++];
values[valuesOffset++] = ((block13 & 4194303L) << 1) | (block14 >>> 63);
values[valuesOffset++] = (block14 >>> 40) & 8388607L;
values[valuesOffset++] = (block14 >>> 17) & 8388607L;
final long block15 = blocks[blocksOffset++];
values[valuesOffset++] = ((block14 & 131071L) << 6) | (block15 >>> 58);
values[valuesOffset++] = (block15 >>> 35) & 8388607L;
values[valuesOffset++] = (block15 >>> 12) & 8388607L;
final long block16 = blocks[blocksOffset++];
values[valuesOffset++] = ((block15 & 4095L) << 11) | (block16 >>> 53);
values[valuesOffset++] = (block16 >>> 30) & 8388607L;
values[valuesOffset++] = (block16 >>> 7) & 8388607L;
final long block17 = blocks[blocksOffset++];
values[valuesOffset++] = ((block16 & 127L) << 16) | (block17 >>> 48);
values[valuesOffset++] = (block17 >>> 25) & 8388607L;
values[valuesOffset++] = (block17 >>> 2) & 8388607L;
final long block18 = blocks[blocksOffset++];
values[valuesOffset++] = ((block17 & 3L) << 21) | (block18 >>> 43);
values[valuesOffset++] = (block18 >>> 20) & 8388607L;
final long block19 = blocks[blocksOffset++];
values[valuesOffset++] = ((block18 & 1048575L) << 3) | (block19 >>> 61);
values[valuesOffset++] = (block19 >>> 38) & 8388607L;
values[valuesOffset++] = (block19 >>> 15) & 8388607L;
final long block20 = blocks[blocksOffset++];
values[valuesOffset++] = ((block19 & 32767L) << 8) | (block20 >>> 56);
values[valuesOffset++] = (block20 >>> 33) & 8388607L;
values[valuesOffset++] = (block20 >>> 10) & 8388607L;
final long block21 = blocks[blocksOffset++];
values[valuesOffset++] = ((block20 & 1023L) << 13) | (block21 >>> 51);
values[valuesOffset++] = (block21 >>> 28) & 8388607L;
values[valuesOffset++] = (block21 >>> 5) & 8388607L;
final long block22 = blocks[blocksOffset++];
values[valuesOffset++] = ((block21 & 31L) << 18) | (block22 >>> 46);
values[valuesOffset++] = (block22 >>> 23) & 8388607L;
values[valuesOffset++] = block22 & 8388607L;
}
}
@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;
final long byte2 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte0 << 15) | (byte1 << 7) | (byte2 >>> 1);
final long byte3 = blocks[blocksOffset++] & 0xFF;
final long byte4 = blocks[blocksOffset++] & 0xFF;
final long byte5 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte2 & 1) << 22) | (byte3 << 14) | (byte4 << 6) | (byte5 >>> 2);
final long byte6 = blocks[blocksOffset++] & 0xFF;
final long byte7 = blocks[blocksOffset++] & 0xFF;
final long byte8 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte5 & 3) << 21) | (byte6 << 13) | (byte7 << 5) | (byte8 >>> 3);
final long byte9 = blocks[blocksOffset++] & 0xFF;
final long byte10 = blocks[blocksOffset++] & 0xFF;
final long byte11 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte8 & 7) << 20) | (byte9 << 12) | (byte10 << 4) | (byte11 >>> 4);
final long byte12 = blocks[blocksOffset++] & 0xFF;
final long byte13 = blocks[blocksOffset++] & 0xFF;
final long byte14 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte11 & 15) << 19) | (byte12 << 11) | (byte13 << 3) | (byte14 >>> 5);
final long byte15 = blocks[blocksOffset++] & 0xFF;
final long byte16 = blocks[blocksOffset++] & 0xFF;
final long byte17 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte14 & 31) << 18) | (byte15 << 10) | (byte16 << 2) | (byte17 >>> 6);
final long byte18 = blocks[blocksOffset++] & 0xFF;
final long byte19 = blocks[blocksOffset++] & 0xFF;
final long byte20 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte17 & 63) << 17) | (byte18 << 9) | (byte19 << 1) | (byte20 >>> 7);
final long byte21 = blocks[blocksOffset++] & 0xFF;
final long byte22 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte20 & 127) << 16) | (byte21 << 8) | byte22;
final long byte23 = blocks[blocksOffset++] & 0xFF;
final long byte24 = blocks[blocksOffset++] & 0xFF;
final long byte25 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte23 << 15) | (byte24 << 7) | (byte25 >>> 1);
final long byte26 = blocks[blocksOffset++] & 0xFF;
final long byte27 = blocks[blocksOffset++] & 0xFF;
final long byte28 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte25 & 1) << 22) | (byte26 << 14) | (byte27 << 6) | (byte28 >>> 2);
final long byte29 = blocks[blocksOffset++] & 0xFF;
final long byte30 = blocks[blocksOffset++] & 0xFF;
final long byte31 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte28 & 3) << 21) | (byte29 << 13) | (byte30 << 5) | (byte31 >>> 3);
final long byte32 = blocks[blocksOffset++] & 0xFF;
final long byte33 = blocks[blocksOffset++] & 0xFF;
final long byte34 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte31 & 7) << 20) | (byte32 << 12) | (byte33 << 4) | (byte34 >>> 4);
final long byte35 = blocks[blocksOffset++] & 0xFF;
final long byte36 = blocks[blocksOffset++] & 0xFF;
final long byte37 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte34 & 15) << 19) | (byte35 << 11) | (byte36 << 3) | (byte37 >>> 5);
final long byte38 = blocks[blocksOffset++] & 0xFF;
final long byte39 = blocks[blocksOffset++] & 0xFF;
final long byte40 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte37 & 31) << 18) | (byte38 << 10) | (byte39 << 2) | (byte40 >>> 6);
final long byte41 = blocks[blocksOffset++] & 0xFF;
final long byte42 = blocks[blocksOffset++] & 0xFF;
final long byte43 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte40 & 63) << 17) | (byte41 << 9) | (byte42 << 1) | (byte43 >>> 7);
final long byte44 = blocks[blocksOffset++] & 0xFF;
final long byte45 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte43 & 127) << 16) | (byte44 << 8) | byte45;
final long byte46 = blocks[blocksOffset++] & 0xFF;
final long byte47 = blocks[blocksOffset++] & 0xFF;
final long byte48 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte46 << 15) | (byte47 << 7) | (byte48 >>> 1);
final long byte49 = blocks[blocksOffset++] & 0xFF;
final long byte50 = blocks[blocksOffset++] & 0xFF;
final long byte51 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte48 & 1) << 22) | (byte49 << 14) | (byte50 << 6) | (byte51 >>> 2);
final long byte52 = blocks[blocksOffset++] & 0xFF;
final long byte53 = blocks[blocksOffset++] & 0xFF;
final long byte54 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte51 & 3) << 21) | (byte52 << 13) | (byte53 << 5) | (byte54 >>> 3);
final long byte55 = blocks[blocksOffset++] & 0xFF;
final long byte56 = blocks[blocksOffset++] & 0xFF;
final long byte57 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte54 & 7) << 20) | (byte55 << 12) | (byte56 << 4) | (byte57 >>> 4);
final long byte58 = blocks[blocksOffset++] & 0xFF;
final long byte59 = blocks[blocksOffset++] & 0xFF;
final long byte60 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte57 & 15) << 19) | (byte58 << 11) | (byte59 << 3) | (byte60 >>> 5);
final long byte61 = blocks[blocksOffset++] & 0xFF;
final long byte62 = blocks[blocksOffset++] & 0xFF;
final long byte63 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte60 & 31) << 18) | (byte61 << 10) | (byte62 << 2) | (byte63 >>> 6);
final long byte64 = blocks[blocksOffset++] & 0xFF;
final long byte65 = blocks[blocksOffset++] & 0xFF;
final long byte66 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte63 & 63) << 17) | (byte64 << 9) | (byte65 << 1) | (byte66 >>> 7);
final long byte67 = blocks[blocksOffset++] & 0xFF;
final long byte68 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte66 & 127) << 16) | (byte67 << 8) | byte68;
final long byte69 = blocks[blocksOffset++] & 0xFF;
final long byte70 = blocks[blocksOffset++] & 0xFF;
final long byte71 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte69 << 15) | (byte70 << 7) | (byte71 >>> 1);
final long byte72 = blocks[blocksOffset++] & 0xFF;
final long byte73 = blocks[blocksOffset++] & 0xFF;
final long byte74 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte71 & 1) << 22) | (byte72 << 14) | (byte73 << 6) | (byte74 >>> 2);
final long byte75 = blocks[blocksOffset++] & 0xFF;
final long byte76 = blocks[blocksOffset++] & 0xFF;
final long byte77 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte74 & 3) << 21) | (byte75 << 13) | (byte76 << 5) | (byte77 >>> 3);
final long byte78 = blocks[blocksOffset++] & 0xFF;
final long byte79 = blocks[blocksOffset++] & 0xFF;
final long byte80 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte77 & 7) << 20) | (byte78 << 12) | (byte79 << 4) | (byte80 >>> 4);
final long byte81 = blocks[blocksOffset++] & 0xFF;
final long byte82 = blocks[blocksOffset++] & 0xFF;
final long byte83 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte80 & 15) << 19) | (byte81 << 11) | (byte82 << 3) | (byte83 >>> 5);
final long byte84 = blocks[blocksOffset++] & 0xFF;
final long byte85 = blocks[blocksOffset++] & 0xFF;
final long byte86 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte83 & 31) << 18) | (byte84 << 10) | (byte85 << 2) | (byte86 >>> 6);
final long byte87 = blocks[blocksOffset++] & 0xFF;
final long byte88 = blocks[blocksOffset++] & 0xFF;
final long byte89 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte86 & 63) << 17) | (byte87 << 9) | (byte88 << 1) | (byte89 >>> 7);
final long byte90 = blocks[blocksOffset++] & 0xFF;
final long byte91 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte89 & 127) << 16) | (byte90 << 8) | byte91;
final long byte92 = blocks[blocksOffset++] & 0xFF;
final long byte93 = blocks[blocksOffset++] & 0xFF;
final long byte94 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte92 << 15) | (byte93 << 7) | (byte94 >>> 1);
final long byte95 = blocks[blocksOffset++] & 0xFF;
final long byte96 = blocks[blocksOffset++] & 0xFF;
final long byte97 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte94 & 1) << 22) | (byte95 << 14) | (byte96 << 6) | (byte97 >>> 2);
final long byte98 = blocks[blocksOffset++] & 0xFF;
final long byte99 = blocks[blocksOffset++] & 0xFF;
final long byte100 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte97 & 3) << 21) | (byte98 << 13) | (byte99 << 5) | (byte100 >>> 3);
final long byte101 = blocks[blocksOffset++] & 0xFF;
final long byte102 = blocks[blocksOffset++] & 0xFF;
final long byte103 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte100 & 7) << 20) | (byte101 << 12) | (byte102 << 4) | (byte103 >>> 4);
final long byte104 = blocks[blocksOffset++] & 0xFF;
final long byte105 = blocks[blocksOffset++] & 0xFF;
final long byte106 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte103 & 15) << 19) | (byte104 << 11) | (byte105 << 3) | (byte106 >>> 5);
final long byte107 = blocks[blocksOffset++] & 0xFF;
final long byte108 = blocks[blocksOffset++] & 0xFF;
final long byte109 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte106 & 31) << 18) | (byte107 << 10) | (byte108 << 2) | (byte109 >>> 6);
final long byte110 = blocks[blocksOffset++] & 0xFF;
final long byte111 = blocks[blocksOffset++] & 0xFF;
final long byte112 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte109 & 63) << 17) | (byte110 << 9) | (byte111 << 1) | (byte112 >>> 7);
final long byte113 = blocks[blocksOffset++] & 0xFF;
final long byte114 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte112 & 127) << 16) | (byte113 << 8) | byte114;
final long byte115 = blocks[blocksOffset++] & 0xFF;
final long byte116 = blocks[blocksOffset++] & 0xFF;
final long byte117 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte115 << 15) | (byte116 << 7) | (byte117 >>> 1);
final long byte118 = blocks[blocksOffset++] & 0xFF;
final long byte119 = blocks[blocksOffset++] & 0xFF;
final long byte120 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte117 & 1) << 22) | (byte118 << 14) | (byte119 << 6) | (byte120 >>> 2);
final long byte121 = blocks[blocksOffset++] & 0xFF;
final long byte122 = blocks[blocksOffset++] & 0xFF;
final long byte123 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte120 & 3) << 21) | (byte121 << 13) | (byte122 << 5) | (byte123 >>> 3);
final long byte124 = blocks[blocksOffset++] & 0xFF;
final long byte125 = blocks[blocksOffset++] & 0xFF;
final long byte126 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte123 & 7) << 20) | (byte124 << 12) | (byte125 << 4) | (byte126 >>> 4);
final long byte127 = blocks[blocksOffset++] & 0xFF;
final long byte128 = blocks[blocksOffset++] & 0xFF;
final long byte129 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte126 & 15) << 19) | (byte127 << 11) | (byte128 << 3) | (byte129 >>> 5);
final long byte130 = blocks[blocksOffset++] & 0xFF;
final long byte131 = blocks[blocksOffset++] & 0xFF;
final long byte132 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte129 & 31) << 18) | (byte130 << 10) | (byte131 << 2) | (byte132 >>> 6);
final long byte133 = blocks[blocksOffset++] & 0xFF;
final long byte134 = blocks[blocksOffset++] & 0xFF;
final long byte135 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte132 & 63) << 17) | (byte133 << 9) | (byte134 << 1) | (byte135 >>> 7);
final long byte136 = blocks[blocksOffset++] & 0xFF;
final long byte137 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte135 & 127) << 16) | (byte136 << 8) | byte137;
final long byte138 = blocks[blocksOffset++] & 0xFF;
final long byte139 = blocks[blocksOffset++] & 0xFF;
final long byte140 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte138 << 15) | (byte139 << 7) | (byte140 >>> 1);
final long byte141 = blocks[blocksOffset++] & 0xFF;
final long byte142 = blocks[blocksOffset++] & 0xFF;
final long byte143 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte140 & 1) << 22) | (byte141 << 14) | (byte142 << 6) | (byte143 >>> 2);
final long byte144 = blocks[blocksOffset++] & 0xFF;
final long byte145 = blocks[blocksOffset++] & 0xFF;
final long byte146 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte143 & 3) << 21) | (byte144 << 13) | (byte145 << 5) | (byte146 >>> 3);
final long byte147 = blocks[blocksOffset++] & 0xFF;
final long byte148 = blocks[blocksOffset++] & 0xFF;
final long byte149 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte146 & 7) << 20) | (byte147 << 12) | (byte148 << 4) | (byte149 >>> 4);
final long byte150 = blocks[blocksOffset++] & 0xFF;
final long byte151 = blocks[blocksOffset++] & 0xFF;
final long byte152 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte149 & 15) << 19) | (byte150 << 11) | (byte151 << 3) | (byte152 >>> 5);
final long byte153 = blocks[blocksOffset++] & 0xFF;
final long byte154 = blocks[blocksOffset++] & 0xFF;
final long byte155 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte152 & 31) << 18) | (byte153 << 10) | (byte154 << 2) | (byte155 >>> 6);
final long byte156 = blocks[blocksOffset++] & 0xFF;
final long byte157 = blocks[blocksOffset++] & 0xFF;
final long byte158 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte155 & 63) << 17) | (byte156 << 9) | (byte157 << 1) | (byte158 >>> 7);
final long byte159 = blocks[blocksOffset++] & 0xFF;
final long byte160 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte158 & 127) << 16) | (byte159 << 8) | byte160;
final long byte161 = blocks[blocksOffset++] & 0xFF;
final long byte162 = blocks[blocksOffset++] & 0xFF;
final long byte163 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte161 << 15) | (byte162 << 7) | (byte163 >>> 1);
final long byte164 = blocks[blocksOffset++] & 0xFF;
final long byte165 = blocks[blocksOffset++] & 0xFF;
final long byte166 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte163 & 1) << 22) | (byte164 << 14) | (byte165 << 6) | (byte166 >>> 2);
final long byte167 = blocks[blocksOffset++] & 0xFF;
final long byte168 = blocks[blocksOffset++] & 0xFF;
final long byte169 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte166 & 3) << 21) | (byte167 << 13) | (byte168 << 5) | (byte169 >>> 3);
final long byte170 = blocks[blocksOffset++] & 0xFF;
final long byte171 = blocks[blocksOffset++] & 0xFF;
final long byte172 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte169 & 7) << 20) | (byte170 << 12) | (byte171 << 4) | (byte172 >>> 4);
final long byte173 = blocks[blocksOffset++] & 0xFF;
final long byte174 = blocks[blocksOffset++] & 0xFF;
final long byte175 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte172 & 15) << 19) | (byte173 << 11) | (byte174 << 3) | (byte175 >>> 5);
final long byte176 = blocks[blocksOffset++] & 0xFF;
final long byte177 = blocks[blocksOffset++] & 0xFF;
final long byte178 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte175 & 31) << 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;
values[valuesOffset++] = ((byte178 & 63) << 17) | (byte179 << 9) | (byte180 << 1) | (byte181 >>> 7);
final long byte182 = blocks[blocksOffset++] & 0xFF;
final long byte183 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte181 & 127) << 16) | (byte182 << 8) | byte183;
}
@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;
final long byte2 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte0 << 15) | (byte1 << 7) | (byte2 >>> 1);
final long byte3 = blocks[blocksOffset++] & 0xFF;
final long byte4 = blocks[blocksOffset++] & 0xFF;
final long byte5 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte2 & 1) << 22) | (byte3 << 14) | (byte4 << 6) | (byte5 >>> 2);
final long byte6 = blocks[blocksOffset++] & 0xFF;
final long byte7 = blocks[blocksOffset++] & 0xFF;
final long byte8 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte5 & 3) << 21) | (byte6 << 13) | (byte7 << 5) | (byte8 >>> 3);
final long byte9 = blocks[blocksOffset++] & 0xFF;
final long byte10 = blocks[blocksOffset++] & 0xFF;
final long byte11 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte8 & 7) << 20) | (byte9 << 12) | (byte10 << 4) | (byte11 >>> 4);
final long byte12 = blocks[blocksOffset++] & 0xFF;
final long byte13 = blocks[blocksOffset++] & 0xFF;
final long byte14 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte11 & 15) << 19) | (byte12 << 11) | (byte13 << 3) | (byte14 >>> 5);
final long byte15 = blocks[blocksOffset++] & 0xFF;
final long byte16 = blocks[blocksOffset++] & 0xFF;
final long byte17 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte14 & 31) << 18) | (byte15 << 10) | (byte16 << 2) | (byte17 >>> 6);
final long byte18 = blocks[blocksOffset++] & 0xFF;
final long byte19 = blocks[blocksOffset++] & 0xFF;
final long byte20 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte17 & 63) << 17) | (byte18 << 9) | (byte19 << 1) | (byte20 >>> 7);
final long byte21 = blocks[blocksOffset++] & 0xFF;
final long byte22 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte20 & 127) << 16) | (byte21 << 8) | byte22;
}
}
}

View File

@ -24,128 +24,64 @@ package org.apache.lucene.util.packed;
*/
final class BulkOperationPacked24 extends BulkOperationPacked {
public BulkOperationPacked24() {
super(24);
assert blockCount() == 3;
assert valueCount() == 8;
}
public BulkOperationPacked24() {
super(24);
assert blockCount() == 3;
assert valueCount() == 8;
}
@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 >>> 40);
values[valuesOffset++] = (int) ((block0 >>> 16) & 16777215L);
final long block1 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block0 & 65535L) << 8) | (block1 >>> 56));
values[valuesOffset++] = (int) ((block1 >>> 32) & 16777215L);
values[valuesOffset++] = (int) ((block1 >>> 8) & 16777215L);
final long block2 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block1 & 255L) << 16) | (block2 >>> 48));
values[valuesOffset++] = (int) ((block2 >>> 24) & 16777215L);
values[valuesOffset++] = (int) (block2 & 16777215L);
}
@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 >>> 40);
values[valuesOffset++] = (int) ((block0 >>> 16) & 16777215L);
final long block1 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block0 & 65535L) << 8) | (block1 >>> 56));
values[valuesOffset++] = (int) ((block1 >>> 32) & 16777215L);
values[valuesOffset++] = (int) ((block1 >>> 8) & 16777215L);
final long block2 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block1 & 255L) << 16) | (block2 >>> 48));
values[valuesOffset++] = (int) ((block2 >>> 24) & 16777215L);
values[valuesOffset++] = (int) (block2 & 16777215L);
}
}
@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;
final int byte2 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte0 << 16) | (byte1 << 8) | byte2;
final int byte3 = blocks[blocksOffset++] & 0xFF;
final int byte4 = blocks[blocksOffset++] & 0xFF;
final int byte5 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte3 << 16) | (byte4 << 8) | byte5;
final int byte6 = blocks[blocksOffset++] & 0xFF;
final int byte7 = blocks[blocksOffset++] & 0xFF;
final int byte8 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte6 << 16) | (byte7 << 8) | byte8;
final int byte9 = blocks[blocksOffset++] & 0xFF;
final int byte10 = blocks[blocksOffset++] & 0xFF;
final int byte11 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte9 << 16) | (byte10 << 8) | byte11;
final int byte12 = blocks[blocksOffset++] & 0xFF;
final int byte13 = blocks[blocksOffset++] & 0xFF;
final int byte14 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte12 << 16) | (byte13 << 8) | byte14;
final int byte15 = blocks[blocksOffset++] & 0xFF;
final int byte16 = blocks[blocksOffset++] & 0xFF;
final int byte17 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte15 << 16) | (byte16 << 8) | byte17;
final int byte18 = blocks[blocksOffset++] & 0xFF;
final int byte19 = blocks[blocksOffset++] & 0xFF;
final int byte20 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte18 << 16) | (byte19 << 8) | byte20;
final int byte21 = blocks[blocksOffset++] & 0xFF;
final int byte22 = blocks[blocksOffset++] & 0xFF;
final int byte23 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte21 << 16) | (byte22 << 8) | byte23;
}
@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;
final int byte2 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte0 << 16) | (byte1 << 8) | byte2;
}
}
@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 >>> 40;
values[valuesOffset++] = (block0 >>> 16) & 16777215L;
final long block1 = blocks[blocksOffset++];
values[valuesOffset++] = ((block0 & 65535L) << 8) | (block1 >>> 56);
values[valuesOffset++] = (block1 >>> 32) & 16777215L;
values[valuesOffset++] = (block1 >>> 8) & 16777215L;
final long block2 = blocks[blocksOffset++];
values[valuesOffset++] = ((block1 & 255L) << 16) | (block2 >>> 48);
values[valuesOffset++] = (block2 >>> 24) & 16777215L;
values[valuesOffset++] = block2 & 16777215L;
}
@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 >>> 40;
values[valuesOffset++] = (block0 >>> 16) & 16777215L;
final long block1 = blocks[blocksOffset++];
values[valuesOffset++] = ((block0 & 65535L) << 8) | (block1 >>> 56);
values[valuesOffset++] = (block1 >>> 32) & 16777215L;
values[valuesOffset++] = (block1 >>> 8) & 16777215L;
final long block2 = blocks[blocksOffset++];
values[valuesOffset++] = ((block1 & 255L) << 16) | (block2 >>> 48);
values[valuesOffset++] = (block2 >>> 24) & 16777215L;
values[valuesOffset++] = block2 & 16777215L;
}
}
@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;
final long byte2 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte0 << 16) | (byte1 << 8) | byte2;
final long byte3 = blocks[blocksOffset++] & 0xFF;
final long byte4 = blocks[blocksOffset++] & 0xFF;
final long byte5 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte3 << 16) | (byte4 << 8) | byte5;
final long byte6 = blocks[blocksOffset++] & 0xFF;
final long byte7 = blocks[blocksOffset++] & 0xFF;
final long byte8 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte6 << 16) | (byte7 << 8) | byte8;
final long byte9 = blocks[blocksOffset++] & 0xFF;
final long byte10 = blocks[blocksOffset++] & 0xFF;
final long byte11 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte9 << 16) | (byte10 << 8) | byte11;
final long byte12 = blocks[blocksOffset++] & 0xFF;
final long byte13 = blocks[blocksOffset++] & 0xFF;
final long byte14 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte12 << 16) | (byte13 << 8) | byte14;
final long byte15 = blocks[blocksOffset++] & 0xFF;
final long byte16 = blocks[blocksOffset++] & 0xFF;
final long byte17 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte15 << 16) | (byte16 << 8) | byte17;
final long byte18 = blocks[blocksOffset++] & 0xFF;
final long byte19 = blocks[blocksOffset++] & 0xFF;
final long byte20 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte18 << 16) | (byte19 << 8) | byte20;
final long byte21 = blocks[blocksOffset++] & 0xFF;
final long byte22 = blocks[blocksOffset++] & 0xFF;
final long byte23 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte21 << 16) | (byte22 << 8) | byte23;
}
@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;
final long byte2 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte0 << 16) | (byte1 << 8) | byte2;
}
}
}

View File

@ -24,352 +24,190 @@ package org.apache.lucene.util.packed;
*/
final class BulkOperationPacked3 extends BulkOperationPacked {
public BulkOperationPacked3() {
super(3);
assert blockCount() == 3;
assert valueCount() == 64;
}
public BulkOperationPacked3() {
super(3);
assert blockCount() == 3;
assert valueCount() == 64;
}
@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 >>> 61);
values[valuesOffset++] = (int) ((block0 >>> 58) & 7L);
values[valuesOffset++] = (int) ((block0 >>> 55) & 7L);
values[valuesOffset++] = (int) ((block0 >>> 52) & 7L);
values[valuesOffset++] = (int) ((block0 >>> 49) & 7L);
values[valuesOffset++] = (int) ((block0 >>> 46) & 7L);
values[valuesOffset++] = (int) ((block0 >>> 43) & 7L);
values[valuesOffset++] = (int) ((block0 >>> 40) & 7L);
values[valuesOffset++] = (int) ((block0 >>> 37) & 7L);
values[valuesOffset++] = (int) ((block0 >>> 34) & 7L);
values[valuesOffset++] = (int) ((block0 >>> 31) & 7L);
values[valuesOffset++] = (int) ((block0 >>> 28) & 7L);
values[valuesOffset++] = (int) ((block0 >>> 25) & 7L);
values[valuesOffset++] = (int) ((block0 >>> 22) & 7L);
values[valuesOffset++] = (int) ((block0 >>> 19) & 7L);
values[valuesOffset++] = (int) ((block0 >>> 16) & 7L);
values[valuesOffset++] = (int) ((block0 >>> 13) & 7L);
values[valuesOffset++] = (int) ((block0 >>> 10) & 7L);
values[valuesOffset++] = (int) ((block0 >>> 7) & 7L);
values[valuesOffset++] = (int) ((block0 >>> 4) & 7L);
values[valuesOffset++] = (int) ((block0 >>> 1) & 7L);
final long block1 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block0 & 1L) << 2) | (block1 >>> 62));
values[valuesOffset++] = (int) ((block1 >>> 59) & 7L);
values[valuesOffset++] = (int) ((block1 >>> 56) & 7L);
values[valuesOffset++] = (int) ((block1 >>> 53) & 7L);
values[valuesOffset++] = (int) ((block1 >>> 50) & 7L);
values[valuesOffset++] = (int) ((block1 >>> 47) & 7L);
values[valuesOffset++] = (int) ((block1 >>> 44) & 7L);
values[valuesOffset++] = (int) ((block1 >>> 41) & 7L);
values[valuesOffset++] = (int) ((block1 >>> 38) & 7L);
values[valuesOffset++] = (int) ((block1 >>> 35) & 7L);
values[valuesOffset++] = (int) ((block1 >>> 32) & 7L);
values[valuesOffset++] = (int) ((block1 >>> 29) & 7L);
values[valuesOffset++] = (int) ((block1 >>> 26) & 7L);
values[valuesOffset++] = (int) ((block1 >>> 23) & 7L);
values[valuesOffset++] = (int) ((block1 >>> 20) & 7L);
values[valuesOffset++] = (int) ((block1 >>> 17) & 7L);
values[valuesOffset++] = (int) ((block1 >>> 14) & 7L);
values[valuesOffset++] = (int) ((block1 >>> 11) & 7L);
values[valuesOffset++] = (int) ((block1 >>> 8) & 7L);
values[valuesOffset++] = (int) ((block1 >>> 5) & 7L);
values[valuesOffset++] = (int) ((block1 >>> 2) & 7L);
final long block2 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block1 & 3L) << 1) | (block2 >>> 63));
values[valuesOffset++] = (int) ((block2 >>> 60) & 7L);
values[valuesOffset++] = (int) ((block2 >>> 57) & 7L);
values[valuesOffset++] = (int) ((block2 >>> 54) & 7L);
values[valuesOffset++] = (int) ((block2 >>> 51) & 7L);
values[valuesOffset++] = (int) ((block2 >>> 48) & 7L);
values[valuesOffset++] = (int) ((block2 >>> 45) & 7L);
values[valuesOffset++] = (int) ((block2 >>> 42) & 7L);
values[valuesOffset++] = (int) ((block2 >>> 39) & 7L);
values[valuesOffset++] = (int) ((block2 >>> 36) & 7L);
values[valuesOffset++] = (int) ((block2 >>> 33) & 7L);
values[valuesOffset++] = (int) ((block2 >>> 30) & 7L);
values[valuesOffset++] = (int) ((block2 >>> 27) & 7L);
values[valuesOffset++] = (int) ((block2 >>> 24) & 7L);
values[valuesOffset++] = (int) ((block2 >>> 21) & 7L);
values[valuesOffset++] = (int) ((block2 >>> 18) & 7L);
values[valuesOffset++] = (int) ((block2 >>> 15) & 7L);
values[valuesOffset++] = (int) ((block2 >>> 12) & 7L);
values[valuesOffset++] = (int) ((block2 >>> 9) & 7L);
values[valuesOffset++] = (int) ((block2 >>> 6) & 7L);
values[valuesOffset++] = (int) ((block2 >>> 3) & 7L);
values[valuesOffset++] = (int) (block2 & 7L);
}
@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 >>> 61);
values[valuesOffset++] = (int) ((block0 >>> 58) & 7L);
values[valuesOffset++] = (int) ((block0 >>> 55) & 7L);
values[valuesOffset++] = (int) ((block0 >>> 52) & 7L);
values[valuesOffset++] = (int) ((block0 >>> 49) & 7L);
values[valuesOffset++] = (int) ((block0 >>> 46) & 7L);
values[valuesOffset++] = (int) ((block0 >>> 43) & 7L);
values[valuesOffset++] = (int) ((block0 >>> 40) & 7L);
values[valuesOffset++] = (int) ((block0 >>> 37) & 7L);
values[valuesOffset++] = (int) ((block0 >>> 34) & 7L);
values[valuesOffset++] = (int) ((block0 >>> 31) & 7L);
values[valuesOffset++] = (int) ((block0 >>> 28) & 7L);
values[valuesOffset++] = (int) ((block0 >>> 25) & 7L);
values[valuesOffset++] = (int) ((block0 >>> 22) & 7L);
values[valuesOffset++] = (int) ((block0 >>> 19) & 7L);
values[valuesOffset++] = (int) ((block0 >>> 16) & 7L);
values[valuesOffset++] = (int) ((block0 >>> 13) & 7L);
values[valuesOffset++] = (int) ((block0 >>> 10) & 7L);
values[valuesOffset++] = (int) ((block0 >>> 7) & 7L);
values[valuesOffset++] = (int) ((block0 >>> 4) & 7L);
values[valuesOffset++] = (int) ((block0 >>> 1) & 7L);
final long block1 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block0 & 1L) << 2) | (block1 >>> 62));
values[valuesOffset++] = (int) ((block1 >>> 59) & 7L);
values[valuesOffset++] = (int) ((block1 >>> 56) & 7L);
values[valuesOffset++] = (int) ((block1 >>> 53) & 7L);
values[valuesOffset++] = (int) ((block1 >>> 50) & 7L);
values[valuesOffset++] = (int) ((block1 >>> 47) & 7L);
values[valuesOffset++] = (int) ((block1 >>> 44) & 7L);
values[valuesOffset++] = (int) ((block1 >>> 41) & 7L);
values[valuesOffset++] = (int) ((block1 >>> 38) & 7L);
values[valuesOffset++] = (int) ((block1 >>> 35) & 7L);
values[valuesOffset++] = (int) ((block1 >>> 32) & 7L);
values[valuesOffset++] = (int) ((block1 >>> 29) & 7L);
values[valuesOffset++] = (int) ((block1 >>> 26) & 7L);
values[valuesOffset++] = (int) ((block1 >>> 23) & 7L);
values[valuesOffset++] = (int) ((block1 >>> 20) & 7L);
values[valuesOffset++] = (int) ((block1 >>> 17) & 7L);
values[valuesOffset++] = (int) ((block1 >>> 14) & 7L);
values[valuesOffset++] = (int) ((block1 >>> 11) & 7L);
values[valuesOffset++] = (int) ((block1 >>> 8) & 7L);
values[valuesOffset++] = (int) ((block1 >>> 5) & 7L);
values[valuesOffset++] = (int) ((block1 >>> 2) & 7L);
final long block2 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block1 & 3L) << 1) | (block2 >>> 63));
values[valuesOffset++] = (int) ((block2 >>> 60) & 7L);
values[valuesOffset++] = (int) ((block2 >>> 57) & 7L);
values[valuesOffset++] = (int) ((block2 >>> 54) & 7L);
values[valuesOffset++] = (int) ((block2 >>> 51) & 7L);
values[valuesOffset++] = (int) ((block2 >>> 48) & 7L);
values[valuesOffset++] = (int) ((block2 >>> 45) & 7L);
values[valuesOffset++] = (int) ((block2 >>> 42) & 7L);
values[valuesOffset++] = (int) ((block2 >>> 39) & 7L);
values[valuesOffset++] = (int) ((block2 >>> 36) & 7L);
values[valuesOffset++] = (int) ((block2 >>> 33) & 7L);
values[valuesOffset++] = (int) ((block2 >>> 30) & 7L);
values[valuesOffset++] = (int) ((block2 >>> 27) & 7L);
values[valuesOffset++] = (int) ((block2 >>> 24) & 7L);
values[valuesOffset++] = (int) ((block2 >>> 21) & 7L);
values[valuesOffset++] = (int) ((block2 >>> 18) & 7L);
values[valuesOffset++] = (int) ((block2 >>> 15) & 7L);
values[valuesOffset++] = (int) ((block2 >>> 12) & 7L);
values[valuesOffset++] = (int) ((block2 >>> 9) & 7L);
values[valuesOffset++] = (int) ((block2 >>> 6) & 7L);
values[valuesOffset++] = (int) ((block2 >>> 3) & 7L);
values[valuesOffset++] = (int) (block2 & 7L);
}
}
@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;
values[valuesOffset++] = byte0 >>> 5;
values[valuesOffset++] = (byte0 >>> 2) & 7;
final int byte1 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte0 & 3) << 1) | (byte1 >>> 7);
values[valuesOffset++] = (byte1 >>> 4) & 7;
values[valuesOffset++] = (byte1 >>> 1) & 7;
final int byte2 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte1 & 1) << 2) | (byte2 >>> 6);
values[valuesOffset++] = (byte2 >>> 3) & 7;
values[valuesOffset++] = byte2 & 7;
final int byte3 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte3 >>> 5;
values[valuesOffset++] = (byte3 >>> 2) & 7;
final int byte4 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte3 & 3) << 1) | (byte4 >>> 7);
values[valuesOffset++] = (byte4 >>> 4) & 7;
values[valuesOffset++] = (byte4 >>> 1) & 7;
final int byte5 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte4 & 1) << 2) | (byte5 >>> 6);
values[valuesOffset++] = (byte5 >>> 3) & 7;
values[valuesOffset++] = byte5 & 7;
final int byte6 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte6 >>> 5;
values[valuesOffset++] = (byte6 >>> 2) & 7;
final int byte7 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte6 & 3) << 1) | (byte7 >>> 7);
values[valuesOffset++] = (byte7 >>> 4) & 7;
values[valuesOffset++] = (byte7 >>> 1) & 7;
final int byte8 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte7 & 1) << 2) | (byte8 >>> 6);
values[valuesOffset++] = (byte8 >>> 3) & 7;
values[valuesOffset++] = byte8 & 7;
final int byte9 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte9 >>> 5;
values[valuesOffset++] = (byte9 >>> 2) & 7;
final int byte10 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte9 & 3) << 1) | (byte10 >>> 7);
values[valuesOffset++] = (byte10 >>> 4) & 7;
values[valuesOffset++] = (byte10 >>> 1) & 7;
final int byte11 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte10 & 1) << 2) | (byte11 >>> 6);
values[valuesOffset++] = (byte11 >>> 3) & 7;
values[valuesOffset++] = byte11 & 7;
final int byte12 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte12 >>> 5;
values[valuesOffset++] = (byte12 >>> 2) & 7;
final int byte13 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte12 & 3) << 1) | (byte13 >>> 7);
values[valuesOffset++] = (byte13 >>> 4) & 7;
values[valuesOffset++] = (byte13 >>> 1) & 7;
final int byte14 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte13 & 1) << 2) | (byte14 >>> 6);
values[valuesOffset++] = (byte14 >>> 3) & 7;
values[valuesOffset++] = byte14 & 7;
final int byte15 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte15 >>> 5;
values[valuesOffset++] = (byte15 >>> 2) & 7;
final int byte16 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte15 & 3) << 1) | (byte16 >>> 7);
values[valuesOffset++] = (byte16 >>> 4) & 7;
values[valuesOffset++] = (byte16 >>> 1) & 7;
final int byte17 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte16 & 1) << 2) | (byte17 >>> 6);
values[valuesOffset++] = (byte17 >>> 3) & 7;
values[valuesOffset++] = byte17 & 7;
final int byte18 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte18 >>> 5;
values[valuesOffset++] = (byte18 >>> 2) & 7;
final int byte19 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte18 & 3) << 1) | (byte19 >>> 7);
values[valuesOffset++] = (byte19 >>> 4) & 7;
values[valuesOffset++] = (byte19 >>> 1) & 7;
final int byte20 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte19 & 1) << 2) | (byte20 >>> 6);
values[valuesOffset++] = (byte20 >>> 3) & 7;
values[valuesOffset++] = byte20 & 7;
final int byte21 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte21 >>> 5;
values[valuesOffset++] = (byte21 >>> 2) & 7;
final int byte22 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte21 & 3) << 1) | (byte22 >>> 7);
values[valuesOffset++] = (byte22 >>> 4) & 7;
values[valuesOffset++] = (byte22 >>> 1) & 7;
final int byte23 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte22 & 1) << 2) | (byte23 >>> 6);
values[valuesOffset++] = (byte23 >>> 3) & 7;
values[valuesOffset++] = byte23 & 7;
}
@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;
values[valuesOffset++] = byte0 >>> 5;
values[valuesOffset++] = (byte0 >>> 2) & 7;
final int byte1 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte0 & 3) << 1) | (byte1 >>> 7);
values[valuesOffset++] = (byte1 >>> 4) & 7;
values[valuesOffset++] = (byte1 >>> 1) & 7;
final int byte2 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte1 & 1) << 2) | (byte2 >>> 6);
values[valuesOffset++] = (byte2 >>> 3) & 7;
values[valuesOffset++] = byte2 & 7;
}
}
@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 >>> 61;
values[valuesOffset++] = (block0 >>> 58) & 7L;
values[valuesOffset++] = (block0 >>> 55) & 7L;
values[valuesOffset++] = (block0 >>> 52) & 7L;
values[valuesOffset++] = (block0 >>> 49) & 7L;
values[valuesOffset++] = (block0 >>> 46) & 7L;
values[valuesOffset++] = (block0 >>> 43) & 7L;
values[valuesOffset++] = (block0 >>> 40) & 7L;
values[valuesOffset++] = (block0 >>> 37) & 7L;
values[valuesOffset++] = (block0 >>> 34) & 7L;
values[valuesOffset++] = (block0 >>> 31) & 7L;
values[valuesOffset++] = (block0 >>> 28) & 7L;
values[valuesOffset++] = (block0 >>> 25) & 7L;
values[valuesOffset++] = (block0 >>> 22) & 7L;
values[valuesOffset++] = (block0 >>> 19) & 7L;
values[valuesOffset++] = (block0 >>> 16) & 7L;
values[valuesOffset++] = (block0 >>> 13) & 7L;
values[valuesOffset++] = (block0 >>> 10) & 7L;
values[valuesOffset++] = (block0 >>> 7) & 7L;
values[valuesOffset++] = (block0 >>> 4) & 7L;
values[valuesOffset++] = (block0 >>> 1) & 7L;
final long block1 = blocks[blocksOffset++];
values[valuesOffset++] = ((block0 & 1L) << 2) | (block1 >>> 62);
values[valuesOffset++] = (block1 >>> 59) & 7L;
values[valuesOffset++] = (block1 >>> 56) & 7L;
values[valuesOffset++] = (block1 >>> 53) & 7L;
values[valuesOffset++] = (block1 >>> 50) & 7L;
values[valuesOffset++] = (block1 >>> 47) & 7L;
values[valuesOffset++] = (block1 >>> 44) & 7L;
values[valuesOffset++] = (block1 >>> 41) & 7L;
values[valuesOffset++] = (block1 >>> 38) & 7L;
values[valuesOffset++] = (block1 >>> 35) & 7L;
values[valuesOffset++] = (block1 >>> 32) & 7L;
values[valuesOffset++] = (block1 >>> 29) & 7L;
values[valuesOffset++] = (block1 >>> 26) & 7L;
values[valuesOffset++] = (block1 >>> 23) & 7L;
values[valuesOffset++] = (block1 >>> 20) & 7L;
values[valuesOffset++] = (block1 >>> 17) & 7L;
values[valuesOffset++] = (block1 >>> 14) & 7L;
values[valuesOffset++] = (block1 >>> 11) & 7L;
values[valuesOffset++] = (block1 >>> 8) & 7L;
values[valuesOffset++] = (block1 >>> 5) & 7L;
values[valuesOffset++] = (block1 >>> 2) & 7L;
final long block2 = blocks[blocksOffset++];
values[valuesOffset++] = ((block1 & 3L) << 1) | (block2 >>> 63);
values[valuesOffset++] = (block2 >>> 60) & 7L;
values[valuesOffset++] = (block2 >>> 57) & 7L;
values[valuesOffset++] = (block2 >>> 54) & 7L;
values[valuesOffset++] = (block2 >>> 51) & 7L;
values[valuesOffset++] = (block2 >>> 48) & 7L;
values[valuesOffset++] = (block2 >>> 45) & 7L;
values[valuesOffset++] = (block2 >>> 42) & 7L;
values[valuesOffset++] = (block2 >>> 39) & 7L;
values[valuesOffset++] = (block2 >>> 36) & 7L;
values[valuesOffset++] = (block2 >>> 33) & 7L;
values[valuesOffset++] = (block2 >>> 30) & 7L;
values[valuesOffset++] = (block2 >>> 27) & 7L;
values[valuesOffset++] = (block2 >>> 24) & 7L;
values[valuesOffset++] = (block2 >>> 21) & 7L;
values[valuesOffset++] = (block2 >>> 18) & 7L;
values[valuesOffset++] = (block2 >>> 15) & 7L;
values[valuesOffset++] = (block2 >>> 12) & 7L;
values[valuesOffset++] = (block2 >>> 9) & 7L;
values[valuesOffset++] = (block2 >>> 6) & 7L;
values[valuesOffset++] = (block2 >>> 3) & 7L;
values[valuesOffset++] = block2 & 7L;
}
@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 >>> 61;
values[valuesOffset++] = (block0 >>> 58) & 7L;
values[valuesOffset++] = (block0 >>> 55) & 7L;
values[valuesOffset++] = (block0 >>> 52) & 7L;
values[valuesOffset++] = (block0 >>> 49) & 7L;
values[valuesOffset++] = (block0 >>> 46) & 7L;
values[valuesOffset++] = (block0 >>> 43) & 7L;
values[valuesOffset++] = (block0 >>> 40) & 7L;
values[valuesOffset++] = (block0 >>> 37) & 7L;
values[valuesOffset++] = (block0 >>> 34) & 7L;
values[valuesOffset++] = (block0 >>> 31) & 7L;
values[valuesOffset++] = (block0 >>> 28) & 7L;
values[valuesOffset++] = (block0 >>> 25) & 7L;
values[valuesOffset++] = (block0 >>> 22) & 7L;
values[valuesOffset++] = (block0 >>> 19) & 7L;
values[valuesOffset++] = (block0 >>> 16) & 7L;
values[valuesOffset++] = (block0 >>> 13) & 7L;
values[valuesOffset++] = (block0 >>> 10) & 7L;
values[valuesOffset++] = (block0 >>> 7) & 7L;
values[valuesOffset++] = (block0 >>> 4) & 7L;
values[valuesOffset++] = (block0 >>> 1) & 7L;
final long block1 = blocks[blocksOffset++];
values[valuesOffset++] = ((block0 & 1L) << 2) | (block1 >>> 62);
values[valuesOffset++] = (block1 >>> 59) & 7L;
values[valuesOffset++] = (block1 >>> 56) & 7L;
values[valuesOffset++] = (block1 >>> 53) & 7L;
values[valuesOffset++] = (block1 >>> 50) & 7L;
values[valuesOffset++] = (block1 >>> 47) & 7L;
values[valuesOffset++] = (block1 >>> 44) & 7L;
values[valuesOffset++] = (block1 >>> 41) & 7L;
values[valuesOffset++] = (block1 >>> 38) & 7L;
values[valuesOffset++] = (block1 >>> 35) & 7L;
values[valuesOffset++] = (block1 >>> 32) & 7L;
values[valuesOffset++] = (block1 >>> 29) & 7L;
values[valuesOffset++] = (block1 >>> 26) & 7L;
values[valuesOffset++] = (block1 >>> 23) & 7L;
values[valuesOffset++] = (block1 >>> 20) & 7L;
values[valuesOffset++] = (block1 >>> 17) & 7L;
values[valuesOffset++] = (block1 >>> 14) & 7L;
values[valuesOffset++] = (block1 >>> 11) & 7L;
values[valuesOffset++] = (block1 >>> 8) & 7L;
values[valuesOffset++] = (block1 >>> 5) & 7L;
values[valuesOffset++] = (block1 >>> 2) & 7L;
final long block2 = blocks[blocksOffset++];
values[valuesOffset++] = ((block1 & 3L) << 1) | (block2 >>> 63);
values[valuesOffset++] = (block2 >>> 60) & 7L;
values[valuesOffset++] = (block2 >>> 57) & 7L;
values[valuesOffset++] = (block2 >>> 54) & 7L;
values[valuesOffset++] = (block2 >>> 51) & 7L;
values[valuesOffset++] = (block2 >>> 48) & 7L;
values[valuesOffset++] = (block2 >>> 45) & 7L;
values[valuesOffset++] = (block2 >>> 42) & 7L;
values[valuesOffset++] = (block2 >>> 39) & 7L;
values[valuesOffset++] = (block2 >>> 36) & 7L;
values[valuesOffset++] = (block2 >>> 33) & 7L;
values[valuesOffset++] = (block2 >>> 30) & 7L;
values[valuesOffset++] = (block2 >>> 27) & 7L;
values[valuesOffset++] = (block2 >>> 24) & 7L;
values[valuesOffset++] = (block2 >>> 21) & 7L;
values[valuesOffset++] = (block2 >>> 18) & 7L;
values[valuesOffset++] = (block2 >>> 15) & 7L;
values[valuesOffset++] = (block2 >>> 12) & 7L;
values[valuesOffset++] = (block2 >>> 9) & 7L;
values[valuesOffset++] = (block2 >>> 6) & 7L;
values[valuesOffset++] = (block2 >>> 3) & 7L;
values[valuesOffset++] = block2 & 7L;
}
}
@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;
values[valuesOffset++] = byte0 >>> 5;
values[valuesOffset++] = (byte0 >>> 2) & 7;
final long byte1 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte0 & 3) << 1) | (byte1 >>> 7);
values[valuesOffset++] = (byte1 >>> 4) & 7;
values[valuesOffset++] = (byte1 >>> 1) & 7;
final long byte2 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte1 & 1) << 2) | (byte2 >>> 6);
values[valuesOffset++] = (byte2 >>> 3) & 7;
values[valuesOffset++] = byte2 & 7;
final long byte3 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte3 >>> 5;
values[valuesOffset++] = (byte3 >>> 2) & 7;
final long byte4 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte3 & 3) << 1) | (byte4 >>> 7);
values[valuesOffset++] = (byte4 >>> 4) & 7;
values[valuesOffset++] = (byte4 >>> 1) & 7;
final long byte5 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte4 & 1) << 2) | (byte5 >>> 6);
values[valuesOffset++] = (byte5 >>> 3) & 7;
values[valuesOffset++] = byte5 & 7;
final long byte6 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte6 >>> 5;
values[valuesOffset++] = (byte6 >>> 2) & 7;
final long byte7 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte6 & 3) << 1) | (byte7 >>> 7);
values[valuesOffset++] = (byte7 >>> 4) & 7;
values[valuesOffset++] = (byte7 >>> 1) & 7;
final long byte8 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte7 & 1) << 2) | (byte8 >>> 6);
values[valuesOffset++] = (byte8 >>> 3) & 7;
values[valuesOffset++] = byte8 & 7;
final long byte9 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte9 >>> 5;
values[valuesOffset++] = (byte9 >>> 2) & 7;
final long byte10 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte9 & 3) << 1) | (byte10 >>> 7);
values[valuesOffset++] = (byte10 >>> 4) & 7;
values[valuesOffset++] = (byte10 >>> 1) & 7;
final long byte11 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte10 & 1) << 2) | (byte11 >>> 6);
values[valuesOffset++] = (byte11 >>> 3) & 7;
values[valuesOffset++] = byte11 & 7;
final long byte12 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte12 >>> 5;
values[valuesOffset++] = (byte12 >>> 2) & 7;
final long byte13 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte12 & 3) << 1) | (byte13 >>> 7);
values[valuesOffset++] = (byte13 >>> 4) & 7;
values[valuesOffset++] = (byte13 >>> 1) & 7;
final long byte14 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte13 & 1) << 2) | (byte14 >>> 6);
values[valuesOffset++] = (byte14 >>> 3) & 7;
values[valuesOffset++] = byte14 & 7;
final long byte15 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte15 >>> 5;
values[valuesOffset++] = (byte15 >>> 2) & 7;
final long byte16 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte15 & 3) << 1) | (byte16 >>> 7);
values[valuesOffset++] = (byte16 >>> 4) & 7;
values[valuesOffset++] = (byte16 >>> 1) & 7;
final long byte17 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte16 & 1) << 2) | (byte17 >>> 6);
values[valuesOffset++] = (byte17 >>> 3) & 7;
values[valuesOffset++] = byte17 & 7;
final long byte18 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte18 >>> 5;
values[valuesOffset++] = (byte18 >>> 2) & 7;
final long byte19 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte18 & 3) << 1) | (byte19 >>> 7);
values[valuesOffset++] = (byte19 >>> 4) & 7;
values[valuesOffset++] = (byte19 >>> 1) & 7;
final long byte20 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte19 & 1) << 2) | (byte20 >>> 6);
values[valuesOffset++] = (byte20 >>> 3) & 7;
values[valuesOffset++] = byte20 & 7;
final long byte21 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte21 >>> 5;
values[valuesOffset++] = (byte21 >>> 2) & 7;
final long byte22 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte21 & 3) << 1) | (byte22 >>> 7);
values[valuesOffset++] = (byte22 >>> 4) & 7;
values[valuesOffset++] = (byte22 >>> 1) & 7;
final long byte23 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte22 & 1) << 2) | (byte23 >>> 6);
values[valuesOffset++] = (byte23 >>> 3) & 7;
values[valuesOffset++] = byte23 & 7;
}
@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;
values[valuesOffset++] = byte0 >>> 5;
values[valuesOffset++] = (byte0 >>> 2) & 7;
final long byte1 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte0 & 3) << 1) | (byte1 >>> 7);
values[valuesOffset++] = (byte1 >>> 4) & 7;
values[valuesOffset++] = (byte1 >>> 1) & 7;
final long byte2 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte1 & 1) << 2) | (byte2 >>> 6);
values[valuesOffset++] = (byte2 >>> 3) & 7;
values[valuesOffset++] = byte2 & 7;
}
}
}

View File

@ -24,124 +24,48 @@ package org.apache.lucene.util.packed;
*/
final class BulkOperationPacked4 extends BulkOperationPacked {
public BulkOperationPacked4() {
super(4);
assert blockCount() == 1;
assert valueCount() == 16;
}
public BulkOperationPacked4() {
super(4);
assert blockCount() == 1;
assert valueCount() == 16;
}
@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 >>> 60);
values[valuesOffset++] = (int) ((block0 >>> 56) & 15L);
values[valuesOffset++] = (int) ((block0 >>> 52) & 15L);
values[valuesOffset++] = (int) ((block0 >>> 48) & 15L);
values[valuesOffset++] = (int) ((block0 >>> 44) & 15L);
values[valuesOffset++] = (int) ((block0 >>> 40) & 15L);
values[valuesOffset++] = (int) ((block0 >>> 36) & 15L);
values[valuesOffset++] = (int) ((block0 >>> 32) & 15L);
values[valuesOffset++] = (int) ((block0 >>> 28) & 15L);
values[valuesOffset++] = (int) ((block0 >>> 24) & 15L);
values[valuesOffset++] = (int) ((block0 >>> 20) & 15L);
values[valuesOffset++] = (int) ((block0 >>> 16) & 15L);
values[valuesOffset++] = (int) ((block0 >>> 12) & 15L);
values[valuesOffset++] = (int) ((block0 >>> 8) & 15L);
values[valuesOffset++] = (int) ((block0 >>> 4) & 15L);
values[valuesOffset++] = (int) (block0 & 15L);
@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 = 60; shift >= 0; shift -= 4) {
values[valuesOffset++] = (int) ((block >>> shift) & 15);
}
}
}
@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;
values[valuesOffset++] = byte0 >>> 4;
values[valuesOffset++] = byte0 & 15;
final int byte1 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte1 >>> 4;
values[valuesOffset++] = byte1 & 15;
final int byte2 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte2 >>> 4;
values[valuesOffset++] = byte2 & 15;
final int byte3 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte3 >>> 4;
values[valuesOffset++] = byte3 & 15;
final int byte4 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte4 >>> 4;
values[valuesOffset++] = byte4 & 15;
final int byte5 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte5 >>> 4;
values[valuesOffset++] = byte5 & 15;
final int byte6 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte6 >>> 4;
values[valuesOffset++] = byte6 & 15;
final int byte7 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte7 >>> 4;
values[valuesOffset++] = byte7 & 15;
@Override
public void decode(byte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) {
for (int j = 0; j < 8 * iterations; ++j) {
final byte block = blocks[blocksOffset++];
values[valuesOffset++] = (block >>> 4) & 15;
values[valuesOffset++] = block & 15;
}
}
@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 = 60; shift >= 0; shift -= 4) {
values[valuesOffset++] = (block >>> shift) & 15;
}
}
}
@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 >>> 60;
values[valuesOffset++] = (block0 >>> 56) & 15L;
values[valuesOffset++] = (block0 >>> 52) & 15L;
values[valuesOffset++] = (block0 >>> 48) & 15L;
values[valuesOffset++] = (block0 >>> 44) & 15L;
values[valuesOffset++] = (block0 >>> 40) & 15L;
values[valuesOffset++] = (block0 >>> 36) & 15L;
values[valuesOffset++] = (block0 >>> 32) & 15L;
values[valuesOffset++] = (block0 >>> 28) & 15L;
values[valuesOffset++] = (block0 >>> 24) & 15L;
values[valuesOffset++] = (block0 >>> 20) & 15L;
values[valuesOffset++] = (block0 >>> 16) & 15L;
values[valuesOffset++] = (block0 >>> 12) & 15L;
values[valuesOffset++] = (block0 >>> 8) & 15L;
values[valuesOffset++] = (block0 >>> 4) & 15L;
values[valuesOffset++] = block0 & 15L;
}
}
@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;
values[valuesOffset++] = byte0 >>> 4;
values[valuesOffset++] = byte0 & 15;
final long byte1 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte1 >>> 4;
values[valuesOffset++] = byte1 & 15;
final long byte2 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte2 >>> 4;
values[valuesOffset++] = byte2 & 15;
final long byte3 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte3 >>> 4;
values[valuesOffset++] = byte3 & 15;
final long byte4 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte4 >>> 4;
values[valuesOffset++] = byte4 & 15;
final long byte5 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte5 >>> 4;
values[valuesOffset++] = byte5 & 15;
final long byte6 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte6 >>> 4;
values[valuesOffset++] = byte6 & 15;
final long byte7 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte7 >>> 4;
values[valuesOffset++] = byte7 & 15;
}
@Override
public void decode(byte[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations) {
for (int j = 0; j < 8 * iterations; ++j) {
final byte block = blocks[blocksOffset++];
values[valuesOffset++] = (block >>> 4) & 15;
values[valuesOffset++] = block & 15;
}
}
}

View File

@ -24,388 +24,198 @@ package org.apache.lucene.util.packed;
*/
final class BulkOperationPacked5 extends BulkOperationPacked {
public BulkOperationPacked5() {
super(5);
assert blockCount() == 5;
assert valueCount() == 64;
}
public BulkOperationPacked5() {
super(5);
assert blockCount() == 5;
assert valueCount() == 64;
}
@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 >>> 59);
values[valuesOffset++] = (int) ((block0 >>> 54) & 31L);
values[valuesOffset++] = (int) ((block0 >>> 49) & 31L);
values[valuesOffset++] = (int) ((block0 >>> 44) & 31L);
values[valuesOffset++] = (int) ((block0 >>> 39) & 31L);
values[valuesOffset++] = (int) ((block0 >>> 34) & 31L);
values[valuesOffset++] = (int) ((block0 >>> 29) & 31L);
values[valuesOffset++] = (int) ((block0 >>> 24) & 31L);
values[valuesOffset++] = (int) ((block0 >>> 19) & 31L);
values[valuesOffset++] = (int) ((block0 >>> 14) & 31L);
values[valuesOffset++] = (int) ((block0 >>> 9) & 31L);
values[valuesOffset++] = (int) ((block0 >>> 4) & 31L);
final long block1 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block0 & 15L) << 1) | (block1 >>> 63));
values[valuesOffset++] = (int) ((block1 >>> 58) & 31L);
values[valuesOffset++] = (int) ((block1 >>> 53) & 31L);
values[valuesOffset++] = (int) ((block1 >>> 48) & 31L);
values[valuesOffset++] = (int) ((block1 >>> 43) & 31L);
values[valuesOffset++] = (int) ((block1 >>> 38) & 31L);
values[valuesOffset++] = (int) ((block1 >>> 33) & 31L);
values[valuesOffset++] = (int) ((block1 >>> 28) & 31L);
values[valuesOffset++] = (int) ((block1 >>> 23) & 31L);
values[valuesOffset++] = (int) ((block1 >>> 18) & 31L);
values[valuesOffset++] = (int) ((block1 >>> 13) & 31L);
values[valuesOffset++] = (int) ((block1 >>> 8) & 31L);
values[valuesOffset++] = (int) ((block1 >>> 3) & 31L);
final long block2 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block1 & 7L) << 2) | (block2 >>> 62));
values[valuesOffset++] = (int) ((block2 >>> 57) & 31L);
values[valuesOffset++] = (int) ((block2 >>> 52) & 31L);
values[valuesOffset++] = (int) ((block2 >>> 47) & 31L);
values[valuesOffset++] = (int) ((block2 >>> 42) & 31L);
values[valuesOffset++] = (int) ((block2 >>> 37) & 31L);
values[valuesOffset++] = (int) ((block2 >>> 32) & 31L);
values[valuesOffset++] = (int) ((block2 >>> 27) & 31L);
values[valuesOffset++] = (int) ((block2 >>> 22) & 31L);
values[valuesOffset++] = (int) ((block2 >>> 17) & 31L);
values[valuesOffset++] = (int) ((block2 >>> 12) & 31L);
values[valuesOffset++] = (int) ((block2 >>> 7) & 31L);
values[valuesOffset++] = (int) ((block2 >>> 2) & 31L);
final long block3 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block2 & 3L) << 3) | (block3 >>> 61));
values[valuesOffset++] = (int) ((block3 >>> 56) & 31L);
values[valuesOffset++] = (int) ((block3 >>> 51) & 31L);
values[valuesOffset++] = (int) ((block3 >>> 46) & 31L);
values[valuesOffset++] = (int) ((block3 >>> 41) & 31L);
values[valuesOffset++] = (int) ((block3 >>> 36) & 31L);
values[valuesOffset++] = (int) ((block3 >>> 31) & 31L);
values[valuesOffset++] = (int) ((block3 >>> 26) & 31L);
values[valuesOffset++] = (int) ((block3 >>> 21) & 31L);
values[valuesOffset++] = (int) ((block3 >>> 16) & 31L);
values[valuesOffset++] = (int) ((block3 >>> 11) & 31L);
values[valuesOffset++] = (int) ((block3 >>> 6) & 31L);
values[valuesOffset++] = (int) ((block3 >>> 1) & 31L);
final long block4 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block3 & 1L) << 4) | (block4 >>> 60));
values[valuesOffset++] = (int) ((block4 >>> 55) & 31L);
values[valuesOffset++] = (int) ((block4 >>> 50) & 31L);
values[valuesOffset++] = (int) ((block4 >>> 45) & 31L);
values[valuesOffset++] = (int) ((block4 >>> 40) & 31L);
values[valuesOffset++] = (int) ((block4 >>> 35) & 31L);
values[valuesOffset++] = (int) ((block4 >>> 30) & 31L);
values[valuesOffset++] = (int) ((block4 >>> 25) & 31L);
values[valuesOffset++] = (int) ((block4 >>> 20) & 31L);
values[valuesOffset++] = (int) ((block4 >>> 15) & 31L);
values[valuesOffset++] = (int) ((block4 >>> 10) & 31L);
values[valuesOffset++] = (int) ((block4 >>> 5) & 31L);
values[valuesOffset++] = (int) (block4 & 31L);
}
@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 >>> 59);
values[valuesOffset++] = (int) ((block0 >>> 54) & 31L);
values[valuesOffset++] = (int) ((block0 >>> 49) & 31L);
values[valuesOffset++] = (int) ((block0 >>> 44) & 31L);
values[valuesOffset++] = (int) ((block0 >>> 39) & 31L);
values[valuesOffset++] = (int) ((block0 >>> 34) & 31L);
values[valuesOffset++] = (int) ((block0 >>> 29) & 31L);
values[valuesOffset++] = (int) ((block0 >>> 24) & 31L);
values[valuesOffset++] = (int) ((block0 >>> 19) & 31L);
values[valuesOffset++] = (int) ((block0 >>> 14) & 31L);
values[valuesOffset++] = (int) ((block0 >>> 9) & 31L);
values[valuesOffset++] = (int) ((block0 >>> 4) & 31L);
final long block1 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block0 & 15L) << 1) | (block1 >>> 63));
values[valuesOffset++] = (int) ((block1 >>> 58) & 31L);
values[valuesOffset++] = (int) ((block1 >>> 53) & 31L);
values[valuesOffset++] = (int) ((block1 >>> 48) & 31L);
values[valuesOffset++] = (int) ((block1 >>> 43) & 31L);
values[valuesOffset++] = (int) ((block1 >>> 38) & 31L);
values[valuesOffset++] = (int) ((block1 >>> 33) & 31L);
values[valuesOffset++] = (int) ((block1 >>> 28) & 31L);
values[valuesOffset++] = (int) ((block1 >>> 23) & 31L);
values[valuesOffset++] = (int) ((block1 >>> 18) & 31L);
values[valuesOffset++] = (int) ((block1 >>> 13) & 31L);
values[valuesOffset++] = (int) ((block1 >>> 8) & 31L);
values[valuesOffset++] = (int) ((block1 >>> 3) & 31L);
final long block2 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block1 & 7L) << 2) | (block2 >>> 62));
values[valuesOffset++] = (int) ((block2 >>> 57) & 31L);
values[valuesOffset++] = (int) ((block2 >>> 52) & 31L);
values[valuesOffset++] = (int) ((block2 >>> 47) & 31L);
values[valuesOffset++] = (int) ((block2 >>> 42) & 31L);
values[valuesOffset++] = (int) ((block2 >>> 37) & 31L);
values[valuesOffset++] = (int) ((block2 >>> 32) & 31L);
values[valuesOffset++] = (int) ((block2 >>> 27) & 31L);
values[valuesOffset++] = (int) ((block2 >>> 22) & 31L);
values[valuesOffset++] = (int) ((block2 >>> 17) & 31L);
values[valuesOffset++] = (int) ((block2 >>> 12) & 31L);
values[valuesOffset++] = (int) ((block2 >>> 7) & 31L);
values[valuesOffset++] = (int) ((block2 >>> 2) & 31L);
final long block3 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block2 & 3L) << 3) | (block3 >>> 61));
values[valuesOffset++] = (int) ((block3 >>> 56) & 31L);
values[valuesOffset++] = (int) ((block3 >>> 51) & 31L);
values[valuesOffset++] = (int) ((block3 >>> 46) & 31L);
values[valuesOffset++] = (int) ((block3 >>> 41) & 31L);
values[valuesOffset++] = (int) ((block3 >>> 36) & 31L);
values[valuesOffset++] = (int) ((block3 >>> 31) & 31L);
values[valuesOffset++] = (int) ((block3 >>> 26) & 31L);
values[valuesOffset++] = (int) ((block3 >>> 21) & 31L);
values[valuesOffset++] = (int) ((block3 >>> 16) & 31L);
values[valuesOffset++] = (int) ((block3 >>> 11) & 31L);
values[valuesOffset++] = (int) ((block3 >>> 6) & 31L);
values[valuesOffset++] = (int) ((block3 >>> 1) & 31L);
final long block4 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block3 & 1L) << 4) | (block4 >>> 60));
values[valuesOffset++] = (int) ((block4 >>> 55) & 31L);
values[valuesOffset++] = (int) ((block4 >>> 50) & 31L);
values[valuesOffset++] = (int) ((block4 >>> 45) & 31L);
values[valuesOffset++] = (int) ((block4 >>> 40) & 31L);
values[valuesOffset++] = (int) ((block4 >>> 35) & 31L);
values[valuesOffset++] = (int) ((block4 >>> 30) & 31L);
values[valuesOffset++] = (int) ((block4 >>> 25) & 31L);
values[valuesOffset++] = (int) ((block4 >>> 20) & 31L);
values[valuesOffset++] = (int) ((block4 >>> 15) & 31L);
values[valuesOffset++] = (int) ((block4 >>> 10) & 31L);
values[valuesOffset++] = (int) ((block4 >>> 5) & 31L);
values[valuesOffset++] = (int) (block4 & 31L);
}
}
@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;
values[valuesOffset++] = byte0 >>> 3;
final int byte1 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte0 & 7) << 2) | (byte1 >>> 6);
values[valuesOffset++] = (byte1 >>> 1) & 31;
final int byte2 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte1 & 1) << 4) | (byte2 >>> 4);
final int byte3 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte2 & 15) << 1) | (byte3 >>> 7);
values[valuesOffset++] = (byte3 >>> 2) & 31;
final int byte4 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte3 & 3) << 3) | (byte4 >>> 5);
values[valuesOffset++] = byte4 & 31;
final int byte5 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte5 >>> 3;
final int byte6 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte5 & 7) << 2) | (byte6 >>> 6);
values[valuesOffset++] = (byte6 >>> 1) & 31;
final int byte7 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte6 & 1) << 4) | (byte7 >>> 4);
final int byte8 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte7 & 15) << 1) | (byte8 >>> 7);
values[valuesOffset++] = (byte8 >>> 2) & 31;
final int byte9 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte8 & 3) << 3) | (byte9 >>> 5);
values[valuesOffset++] = byte9 & 31;
final int byte10 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte10 >>> 3;
final int byte11 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte10 & 7) << 2) | (byte11 >>> 6);
values[valuesOffset++] = (byte11 >>> 1) & 31;
final int byte12 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte11 & 1) << 4) | (byte12 >>> 4);
final int byte13 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte12 & 15) << 1) | (byte13 >>> 7);
values[valuesOffset++] = (byte13 >>> 2) & 31;
final int byte14 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte13 & 3) << 3) | (byte14 >>> 5);
values[valuesOffset++] = byte14 & 31;
final int byte15 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte15 >>> 3;
final int byte16 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte15 & 7) << 2) | (byte16 >>> 6);
values[valuesOffset++] = (byte16 >>> 1) & 31;
final int byte17 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte16 & 1) << 4) | (byte17 >>> 4);
final int byte18 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte17 & 15) << 1) | (byte18 >>> 7);
values[valuesOffset++] = (byte18 >>> 2) & 31;
final int byte19 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte18 & 3) << 3) | (byte19 >>> 5);
values[valuesOffset++] = byte19 & 31;
final int byte20 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte20 >>> 3;
final int byte21 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte20 & 7) << 2) | (byte21 >>> 6);
values[valuesOffset++] = (byte21 >>> 1) & 31;
final int byte22 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte21 & 1) << 4) | (byte22 >>> 4);
final int byte23 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte22 & 15) << 1) | (byte23 >>> 7);
values[valuesOffset++] = (byte23 >>> 2) & 31;
final int byte24 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte23 & 3) << 3) | (byte24 >>> 5);
values[valuesOffset++] = byte24 & 31;
final int byte25 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte25 >>> 3;
final int byte26 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte25 & 7) << 2) | (byte26 >>> 6);
values[valuesOffset++] = (byte26 >>> 1) & 31;
final int byte27 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte26 & 1) << 4) | (byte27 >>> 4);
final int byte28 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte27 & 15) << 1) | (byte28 >>> 7);
values[valuesOffset++] = (byte28 >>> 2) & 31;
final int byte29 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte28 & 3) << 3) | (byte29 >>> 5);
values[valuesOffset++] = byte29 & 31;
final int byte30 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte30 >>> 3;
final int byte31 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte30 & 7) << 2) | (byte31 >>> 6);
values[valuesOffset++] = (byte31 >>> 1) & 31;
final int byte32 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte31 & 1) << 4) | (byte32 >>> 4);
final int byte33 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte32 & 15) << 1) | (byte33 >>> 7);
values[valuesOffset++] = (byte33 >>> 2) & 31;
final int byte34 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte33 & 3) << 3) | (byte34 >>> 5);
values[valuesOffset++] = byte34 & 31;
final int byte35 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte35 >>> 3;
final int byte36 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte35 & 7) << 2) | (byte36 >>> 6);
values[valuesOffset++] = (byte36 >>> 1) & 31;
final int byte37 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte36 & 1) << 4) | (byte37 >>> 4);
final int byte38 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte37 & 15) << 1) | (byte38 >>> 7);
values[valuesOffset++] = (byte38 >>> 2) & 31;
final int byte39 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte38 & 3) << 3) | (byte39 >>> 5);
values[valuesOffset++] = byte39 & 31;
}
@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;
values[valuesOffset++] = byte0 >>> 3;
final int byte1 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte0 & 7) << 2) | (byte1 >>> 6);
values[valuesOffset++] = (byte1 >>> 1) & 31;
final int byte2 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte1 & 1) << 4) | (byte2 >>> 4);
final int byte3 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte2 & 15) << 1) | (byte3 >>> 7);
values[valuesOffset++] = (byte3 >>> 2) & 31;
final int byte4 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte3 & 3) << 3) | (byte4 >>> 5);
values[valuesOffset++] = byte4 & 31;
}
}
@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 >>> 59;
values[valuesOffset++] = (block0 >>> 54) & 31L;
values[valuesOffset++] = (block0 >>> 49) & 31L;
values[valuesOffset++] = (block0 >>> 44) & 31L;
values[valuesOffset++] = (block0 >>> 39) & 31L;
values[valuesOffset++] = (block0 >>> 34) & 31L;
values[valuesOffset++] = (block0 >>> 29) & 31L;
values[valuesOffset++] = (block0 >>> 24) & 31L;
values[valuesOffset++] = (block0 >>> 19) & 31L;
values[valuesOffset++] = (block0 >>> 14) & 31L;
values[valuesOffset++] = (block0 >>> 9) & 31L;
values[valuesOffset++] = (block0 >>> 4) & 31L;
final long block1 = blocks[blocksOffset++];
values[valuesOffset++] = ((block0 & 15L) << 1) | (block1 >>> 63);
values[valuesOffset++] = (block1 >>> 58) & 31L;
values[valuesOffset++] = (block1 >>> 53) & 31L;
values[valuesOffset++] = (block1 >>> 48) & 31L;
values[valuesOffset++] = (block1 >>> 43) & 31L;
values[valuesOffset++] = (block1 >>> 38) & 31L;
values[valuesOffset++] = (block1 >>> 33) & 31L;
values[valuesOffset++] = (block1 >>> 28) & 31L;
values[valuesOffset++] = (block1 >>> 23) & 31L;
values[valuesOffset++] = (block1 >>> 18) & 31L;
values[valuesOffset++] = (block1 >>> 13) & 31L;
values[valuesOffset++] = (block1 >>> 8) & 31L;
values[valuesOffset++] = (block1 >>> 3) & 31L;
final long block2 = blocks[blocksOffset++];
values[valuesOffset++] = ((block1 & 7L) << 2) | (block2 >>> 62);
values[valuesOffset++] = (block2 >>> 57) & 31L;
values[valuesOffset++] = (block2 >>> 52) & 31L;
values[valuesOffset++] = (block2 >>> 47) & 31L;
values[valuesOffset++] = (block2 >>> 42) & 31L;
values[valuesOffset++] = (block2 >>> 37) & 31L;
values[valuesOffset++] = (block2 >>> 32) & 31L;
values[valuesOffset++] = (block2 >>> 27) & 31L;
values[valuesOffset++] = (block2 >>> 22) & 31L;
values[valuesOffset++] = (block2 >>> 17) & 31L;
values[valuesOffset++] = (block2 >>> 12) & 31L;
values[valuesOffset++] = (block2 >>> 7) & 31L;
values[valuesOffset++] = (block2 >>> 2) & 31L;
final long block3 = blocks[blocksOffset++];
values[valuesOffset++] = ((block2 & 3L) << 3) | (block3 >>> 61);
values[valuesOffset++] = (block3 >>> 56) & 31L;
values[valuesOffset++] = (block3 >>> 51) & 31L;
values[valuesOffset++] = (block3 >>> 46) & 31L;
values[valuesOffset++] = (block3 >>> 41) & 31L;
values[valuesOffset++] = (block3 >>> 36) & 31L;
values[valuesOffset++] = (block3 >>> 31) & 31L;
values[valuesOffset++] = (block3 >>> 26) & 31L;
values[valuesOffset++] = (block3 >>> 21) & 31L;
values[valuesOffset++] = (block3 >>> 16) & 31L;
values[valuesOffset++] = (block3 >>> 11) & 31L;
values[valuesOffset++] = (block3 >>> 6) & 31L;
values[valuesOffset++] = (block3 >>> 1) & 31L;
final long block4 = blocks[blocksOffset++];
values[valuesOffset++] = ((block3 & 1L) << 4) | (block4 >>> 60);
values[valuesOffset++] = (block4 >>> 55) & 31L;
values[valuesOffset++] = (block4 >>> 50) & 31L;
values[valuesOffset++] = (block4 >>> 45) & 31L;
values[valuesOffset++] = (block4 >>> 40) & 31L;
values[valuesOffset++] = (block4 >>> 35) & 31L;
values[valuesOffset++] = (block4 >>> 30) & 31L;
values[valuesOffset++] = (block4 >>> 25) & 31L;
values[valuesOffset++] = (block4 >>> 20) & 31L;
values[valuesOffset++] = (block4 >>> 15) & 31L;
values[valuesOffset++] = (block4 >>> 10) & 31L;
values[valuesOffset++] = (block4 >>> 5) & 31L;
values[valuesOffset++] = block4 & 31L;
}
@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 >>> 59;
values[valuesOffset++] = (block0 >>> 54) & 31L;
values[valuesOffset++] = (block0 >>> 49) & 31L;
values[valuesOffset++] = (block0 >>> 44) & 31L;
values[valuesOffset++] = (block0 >>> 39) & 31L;
values[valuesOffset++] = (block0 >>> 34) & 31L;
values[valuesOffset++] = (block0 >>> 29) & 31L;
values[valuesOffset++] = (block0 >>> 24) & 31L;
values[valuesOffset++] = (block0 >>> 19) & 31L;
values[valuesOffset++] = (block0 >>> 14) & 31L;
values[valuesOffset++] = (block0 >>> 9) & 31L;
values[valuesOffset++] = (block0 >>> 4) & 31L;
final long block1 = blocks[blocksOffset++];
values[valuesOffset++] = ((block0 & 15L) << 1) | (block1 >>> 63);
values[valuesOffset++] = (block1 >>> 58) & 31L;
values[valuesOffset++] = (block1 >>> 53) & 31L;
values[valuesOffset++] = (block1 >>> 48) & 31L;
values[valuesOffset++] = (block1 >>> 43) & 31L;
values[valuesOffset++] = (block1 >>> 38) & 31L;
values[valuesOffset++] = (block1 >>> 33) & 31L;
values[valuesOffset++] = (block1 >>> 28) & 31L;
values[valuesOffset++] = (block1 >>> 23) & 31L;
values[valuesOffset++] = (block1 >>> 18) & 31L;
values[valuesOffset++] = (block1 >>> 13) & 31L;
values[valuesOffset++] = (block1 >>> 8) & 31L;
values[valuesOffset++] = (block1 >>> 3) & 31L;
final long block2 = blocks[blocksOffset++];
values[valuesOffset++] = ((block1 & 7L) << 2) | (block2 >>> 62);
values[valuesOffset++] = (block2 >>> 57) & 31L;
values[valuesOffset++] = (block2 >>> 52) & 31L;
values[valuesOffset++] = (block2 >>> 47) & 31L;
values[valuesOffset++] = (block2 >>> 42) & 31L;
values[valuesOffset++] = (block2 >>> 37) & 31L;
values[valuesOffset++] = (block2 >>> 32) & 31L;
values[valuesOffset++] = (block2 >>> 27) & 31L;
values[valuesOffset++] = (block2 >>> 22) & 31L;
values[valuesOffset++] = (block2 >>> 17) & 31L;
values[valuesOffset++] = (block2 >>> 12) & 31L;
values[valuesOffset++] = (block2 >>> 7) & 31L;
values[valuesOffset++] = (block2 >>> 2) & 31L;
final long block3 = blocks[blocksOffset++];
values[valuesOffset++] = ((block2 & 3L) << 3) | (block3 >>> 61);
values[valuesOffset++] = (block3 >>> 56) & 31L;
values[valuesOffset++] = (block3 >>> 51) & 31L;
values[valuesOffset++] = (block3 >>> 46) & 31L;
values[valuesOffset++] = (block3 >>> 41) & 31L;
values[valuesOffset++] = (block3 >>> 36) & 31L;
values[valuesOffset++] = (block3 >>> 31) & 31L;
values[valuesOffset++] = (block3 >>> 26) & 31L;
values[valuesOffset++] = (block3 >>> 21) & 31L;
values[valuesOffset++] = (block3 >>> 16) & 31L;
values[valuesOffset++] = (block3 >>> 11) & 31L;
values[valuesOffset++] = (block3 >>> 6) & 31L;
values[valuesOffset++] = (block3 >>> 1) & 31L;
final long block4 = blocks[blocksOffset++];
values[valuesOffset++] = ((block3 & 1L) << 4) | (block4 >>> 60);
values[valuesOffset++] = (block4 >>> 55) & 31L;
values[valuesOffset++] = (block4 >>> 50) & 31L;
values[valuesOffset++] = (block4 >>> 45) & 31L;
values[valuesOffset++] = (block4 >>> 40) & 31L;
values[valuesOffset++] = (block4 >>> 35) & 31L;
values[valuesOffset++] = (block4 >>> 30) & 31L;
values[valuesOffset++] = (block4 >>> 25) & 31L;
values[valuesOffset++] = (block4 >>> 20) & 31L;
values[valuesOffset++] = (block4 >>> 15) & 31L;
values[valuesOffset++] = (block4 >>> 10) & 31L;
values[valuesOffset++] = (block4 >>> 5) & 31L;
values[valuesOffset++] = block4 & 31L;
}
}
@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;
values[valuesOffset++] = byte0 >>> 3;
final long byte1 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte0 & 7) << 2) | (byte1 >>> 6);
values[valuesOffset++] = (byte1 >>> 1) & 31;
final long byte2 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte1 & 1) << 4) | (byte2 >>> 4);
final long byte3 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte2 & 15) << 1) | (byte3 >>> 7);
values[valuesOffset++] = (byte3 >>> 2) & 31;
final long byte4 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte3 & 3) << 3) | (byte4 >>> 5);
values[valuesOffset++] = byte4 & 31;
final long byte5 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte5 >>> 3;
final long byte6 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte5 & 7) << 2) | (byte6 >>> 6);
values[valuesOffset++] = (byte6 >>> 1) & 31;
final long byte7 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte6 & 1) << 4) | (byte7 >>> 4);
final long byte8 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte7 & 15) << 1) | (byte8 >>> 7);
values[valuesOffset++] = (byte8 >>> 2) & 31;
final long byte9 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte8 & 3) << 3) | (byte9 >>> 5);
values[valuesOffset++] = byte9 & 31;
final long byte10 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte10 >>> 3;
final long byte11 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte10 & 7) << 2) | (byte11 >>> 6);
values[valuesOffset++] = (byte11 >>> 1) & 31;
final long byte12 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte11 & 1) << 4) | (byte12 >>> 4);
final long byte13 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte12 & 15) << 1) | (byte13 >>> 7);
values[valuesOffset++] = (byte13 >>> 2) & 31;
final long byte14 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte13 & 3) << 3) | (byte14 >>> 5);
values[valuesOffset++] = byte14 & 31;
final long byte15 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte15 >>> 3;
final long byte16 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte15 & 7) << 2) | (byte16 >>> 6);
values[valuesOffset++] = (byte16 >>> 1) & 31;
final long byte17 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte16 & 1) << 4) | (byte17 >>> 4);
final long byte18 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte17 & 15) << 1) | (byte18 >>> 7);
values[valuesOffset++] = (byte18 >>> 2) & 31;
final long byte19 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte18 & 3) << 3) | (byte19 >>> 5);
values[valuesOffset++] = byte19 & 31;
final long byte20 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte20 >>> 3;
final long byte21 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte20 & 7) << 2) | (byte21 >>> 6);
values[valuesOffset++] = (byte21 >>> 1) & 31;
final long byte22 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte21 & 1) << 4) | (byte22 >>> 4);
final long byte23 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte22 & 15) << 1) | (byte23 >>> 7);
values[valuesOffset++] = (byte23 >>> 2) & 31;
final long byte24 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte23 & 3) << 3) | (byte24 >>> 5);
values[valuesOffset++] = byte24 & 31;
final long byte25 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte25 >>> 3;
final long byte26 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte25 & 7) << 2) | (byte26 >>> 6);
values[valuesOffset++] = (byte26 >>> 1) & 31;
final long byte27 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte26 & 1) << 4) | (byte27 >>> 4);
final long byte28 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte27 & 15) << 1) | (byte28 >>> 7);
values[valuesOffset++] = (byte28 >>> 2) & 31;
final long byte29 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte28 & 3) << 3) | (byte29 >>> 5);
values[valuesOffset++] = byte29 & 31;
final long byte30 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte30 >>> 3;
final long byte31 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte30 & 7) << 2) | (byte31 >>> 6);
values[valuesOffset++] = (byte31 >>> 1) & 31;
final long byte32 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte31 & 1) << 4) | (byte32 >>> 4);
final long byte33 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte32 & 15) << 1) | (byte33 >>> 7);
values[valuesOffset++] = (byte33 >>> 2) & 31;
final long byte34 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte33 & 3) << 3) | (byte34 >>> 5);
values[valuesOffset++] = byte34 & 31;
final long byte35 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte35 >>> 3;
final long byte36 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte35 & 7) << 2) | (byte36 >>> 6);
values[valuesOffset++] = (byte36 >>> 1) & 31;
final long byte37 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte36 & 1) << 4) | (byte37 >>> 4);
final long byte38 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte37 & 15) << 1) | (byte38 >>> 7);
values[valuesOffset++] = (byte38 >>> 2) & 31;
final long byte39 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte38 & 3) << 3) | (byte39 >>> 5);
values[valuesOffset++] = byte39 & 31;
}
@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;
values[valuesOffset++] = byte0 >>> 3;
final long byte1 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte0 & 7) << 2) | (byte1 >>> 6);
values[valuesOffset++] = (byte1 >>> 1) & 31;
final long byte2 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte1 & 1) << 4) | (byte2 >>> 4);
final long byte3 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte2 & 15) << 1) | (byte3 >>> 7);
values[valuesOffset++] = (byte3 >>> 2) & 31;
final long byte4 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte3 & 3) << 3) | (byte4 >>> 5);
values[valuesOffset++] = byte4 & 31;
}
}
}

View File

@ -24,224 +24,118 @@ package org.apache.lucene.util.packed;
*/
final class BulkOperationPacked6 extends BulkOperationPacked {
public BulkOperationPacked6() {
super(6);
assert blockCount() == 3;
assert valueCount() == 32;
}
public BulkOperationPacked6() {
super(6);
assert blockCount() == 3;
assert valueCount() == 32;
}
@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 >>> 58);
values[valuesOffset++] = (int) ((block0 >>> 52) & 63L);
values[valuesOffset++] = (int) ((block0 >>> 46) & 63L);
values[valuesOffset++] = (int) ((block0 >>> 40) & 63L);
values[valuesOffset++] = (int) ((block0 >>> 34) & 63L);
values[valuesOffset++] = (int) ((block0 >>> 28) & 63L);
values[valuesOffset++] = (int) ((block0 >>> 22) & 63L);
values[valuesOffset++] = (int) ((block0 >>> 16) & 63L);
values[valuesOffset++] = (int) ((block0 >>> 10) & 63L);
values[valuesOffset++] = (int) ((block0 >>> 4) & 63L);
final long block1 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block0 & 15L) << 2) | (block1 >>> 62));
values[valuesOffset++] = (int) ((block1 >>> 56) & 63L);
values[valuesOffset++] = (int) ((block1 >>> 50) & 63L);
values[valuesOffset++] = (int) ((block1 >>> 44) & 63L);
values[valuesOffset++] = (int) ((block1 >>> 38) & 63L);
values[valuesOffset++] = (int) ((block1 >>> 32) & 63L);
values[valuesOffset++] = (int) ((block1 >>> 26) & 63L);
values[valuesOffset++] = (int) ((block1 >>> 20) & 63L);
values[valuesOffset++] = (int) ((block1 >>> 14) & 63L);
values[valuesOffset++] = (int) ((block1 >>> 8) & 63L);
values[valuesOffset++] = (int) ((block1 >>> 2) & 63L);
final long block2 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block1 & 3L) << 4) | (block2 >>> 60));
values[valuesOffset++] = (int) ((block2 >>> 54) & 63L);
values[valuesOffset++] = (int) ((block2 >>> 48) & 63L);
values[valuesOffset++] = (int) ((block2 >>> 42) & 63L);
values[valuesOffset++] = (int) ((block2 >>> 36) & 63L);
values[valuesOffset++] = (int) ((block2 >>> 30) & 63L);
values[valuesOffset++] = (int) ((block2 >>> 24) & 63L);
values[valuesOffset++] = (int) ((block2 >>> 18) & 63L);
values[valuesOffset++] = (int) ((block2 >>> 12) & 63L);
values[valuesOffset++] = (int) ((block2 >>> 6) & 63L);
values[valuesOffset++] = (int) (block2 & 63L);
}
@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 >>> 58);
values[valuesOffset++] = (int) ((block0 >>> 52) & 63L);
values[valuesOffset++] = (int) ((block0 >>> 46) & 63L);
values[valuesOffset++] = (int) ((block0 >>> 40) & 63L);
values[valuesOffset++] = (int) ((block0 >>> 34) & 63L);
values[valuesOffset++] = (int) ((block0 >>> 28) & 63L);
values[valuesOffset++] = (int) ((block0 >>> 22) & 63L);
values[valuesOffset++] = (int) ((block0 >>> 16) & 63L);
values[valuesOffset++] = (int) ((block0 >>> 10) & 63L);
values[valuesOffset++] = (int) ((block0 >>> 4) & 63L);
final long block1 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block0 & 15L) << 2) | (block1 >>> 62));
values[valuesOffset++] = (int) ((block1 >>> 56) & 63L);
values[valuesOffset++] = (int) ((block1 >>> 50) & 63L);
values[valuesOffset++] = (int) ((block1 >>> 44) & 63L);
values[valuesOffset++] = (int) ((block1 >>> 38) & 63L);
values[valuesOffset++] = (int) ((block1 >>> 32) & 63L);
values[valuesOffset++] = (int) ((block1 >>> 26) & 63L);
values[valuesOffset++] = (int) ((block1 >>> 20) & 63L);
values[valuesOffset++] = (int) ((block1 >>> 14) & 63L);
values[valuesOffset++] = (int) ((block1 >>> 8) & 63L);
values[valuesOffset++] = (int) ((block1 >>> 2) & 63L);
final long block2 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block1 & 3L) << 4) | (block2 >>> 60));
values[valuesOffset++] = (int) ((block2 >>> 54) & 63L);
values[valuesOffset++] = (int) ((block2 >>> 48) & 63L);
values[valuesOffset++] = (int) ((block2 >>> 42) & 63L);
values[valuesOffset++] = (int) ((block2 >>> 36) & 63L);
values[valuesOffset++] = (int) ((block2 >>> 30) & 63L);
values[valuesOffset++] = (int) ((block2 >>> 24) & 63L);
values[valuesOffset++] = (int) ((block2 >>> 18) & 63L);
values[valuesOffset++] = (int) ((block2 >>> 12) & 63L);
values[valuesOffset++] = (int) ((block2 >>> 6) & 63L);
values[valuesOffset++] = (int) (block2 & 63L);
}
}
@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;
values[valuesOffset++] = byte0 >>> 2;
final int byte1 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte0 & 3) << 4) | (byte1 >>> 4);
final int byte2 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte1 & 15) << 2) | (byte2 >>> 6);
values[valuesOffset++] = byte2 & 63;
final int byte3 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte3 >>> 2;
final int byte4 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte3 & 3) << 4) | (byte4 >>> 4);
final int byte5 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte4 & 15) << 2) | (byte5 >>> 6);
values[valuesOffset++] = byte5 & 63;
final int byte6 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte6 >>> 2;
final int byte7 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte6 & 3) << 4) | (byte7 >>> 4);
final int byte8 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte7 & 15) << 2) | (byte8 >>> 6);
values[valuesOffset++] = byte8 & 63;
final int byte9 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte9 >>> 2;
final int byte10 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte9 & 3) << 4) | (byte10 >>> 4);
final int byte11 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte10 & 15) << 2) | (byte11 >>> 6);
values[valuesOffset++] = byte11 & 63;
final int byte12 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte12 >>> 2;
final int byte13 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte12 & 3) << 4) | (byte13 >>> 4);
final int byte14 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte13 & 15) << 2) | (byte14 >>> 6);
values[valuesOffset++] = byte14 & 63;
final int byte15 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte15 >>> 2;
final int byte16 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte15 & 3) << 4) | (byte16 >>> 4);
final int byte17 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte16 & 15) << 2) | (byte17 >>> 6);
values[valuesOffset++] = byte17 & 63;
final int byte18 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte18 >>> 2;
final int byte19 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte18 & 3) << 4) | (byte19 >>> 4);
final int byte20 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte19 & 15) << 2) | (byte20 >>> 6);
values[valuesOffset++] = byte20 & 63;
final int byte21 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte21 >>> 2;
final int byte22 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte21 & 3) << 4) | (byte22 >>> 4);
final int byte23 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte22 & 15) << 2) | (byte23 >>> 6);
values[valuesOffset++] = byte23 & 63;
}
@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;
values[valuesOffset++] = byte0 >>> 2;
final int byte1 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte0 & 3) << 4) | (byte1 >>> 4);
final int byte2 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte1 & 15) << 2) | (byte2 >>> 6);
values[valuesOffset++] = byte2 & 63;
}
}
@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 >>> 58;
values[valuesOffset++] = (block0 >>> 52) & 63L;
values[valuesOffset++] = (block0 >>> 46) & 63L;
values[valuesOffset++] = (block0 >>> 40) & 63L;
values[valuesOffset++] = (block0 >>> 34) & 63L;
values[valuesOffset++] = (block0 >>> 28) & 63L;
values[valuesOffset++] = (block0 >>> 22) & 63L;
values[valuesOffset++] = (block0 >>> 16) & 63L;
values[valuesOffset++] = (block0 >>> 10) & 63L;
values[valuesOffset++] = (block0 >>> 4) & 63L;
final long block1 = blocks[blocksOffset++];
values[valuesOffset++] = ((block0 & 15L) << 2) | (block1 >>> 62);
values[valuesOffset++] = (block1 >>> 56) & 63L;
values[valuesOffset++] = (block1 >>> 50) & 63L;
values[valuesOffset++] = (block1 >>> 44) & 63L;
values[valuesOffset++] = (block1 >>> 38) & 63L;
values[valuesOffset++] = (block1 >>> 32) & 63L;
values[valuesOffset++] = (block1 >>> 26) & 63L;
values[valuesOffset++] = (block1 >>> 20) & 63L;
values[valuesOffset++] = (block1 >>> 14) & 63L;
values[valuesOffset++] = (block1 >>> 8) & 63L;
values[valuesOffset++] = (block1 >>> 2) & 63L;
final long block2 = blocks[blocksOffset++];
values[valuesOffset++] = ((block1 & 3L) << 4) | (block2 >>> 60);
values[valuesOffset++] = (block2 >>> 54) & 63L;
values[valuesOffset++] = (block2 >>> 48) & 63L;
values[valuesOffset++] = (block2 >>> 42) & 63L;
values[valuesOffset++] = (block2 >>> 36) & 63L;
values[valuesOffset++] = (block2 >>> 30) & 63L;
values[valuesOffset++] = (block2 >>> 24) & 63L;
values[valuesOffset++] = (block2 >>> 18) & 63L;
values[valuesOffset++] = (block2 >>> 12) & 63L;
values[valuesOffset++] = (block2 >>> 6) & 63L;
values[valuesOffset++] = block2 & 63L;
}
@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 >>> 58;
values[valuesOffset++] = (block0 >>> 52) & 63L;
values[valuesOffset++] = (block0 >>> 46) & 63L;
values[valuesOffset++] = (block0 >>> 40) & 63L;
values[valuesOffset++] = (block0 >>> 34) & 63L;
values[valuesOffset++] = (block0 >>> 28) & 63L;
values[valuesOffset++] = (block0 >>> 22) & 63L;
values[valuesOffset++] = (block0 >>> 16) & 63L;
values[valuesOffset++] = (block0 >>> 10) & 63L;
values[valuesOffset++] = (block0 >>> 4) & 63L;
final long block1 = blocks[blocksOffset++];
values[valuesOffset++] = ((block0 & 15L) << 2) | (block1 >>> 62);
values[valuesOffset++] = (block1 >>> 56) & 63L;
values[valuesOffset++] = (block1 >>> 50) & 63L;
values[valuesOffset++] = (block1 >>> 44) & 63L;
values[valuesOffset++] = (block1 >>> 38) & 63L;
values[valuesOffset++] = (block1 >>> 32) & 63L;
values[valuesOffset++] = (block1 >>> 26) & 63L;
values[valuesOffset++] = (block1 >>> 20) & 63L;
values[valuesOffset++] = (block1 >>> 14) & 63L;
values[valuesOffset++] = (block1 >>> 8) & 63L;
values[valuesOffset++] = (block1 >>> 2) & 63L;
final long block2 = blocks[blocksOffset++];
values[valuesOffset++] = ((block1 & 3L) << 4) | (block2 >>> 60);
values[valuesOffset++] = (block2 >>> 54) & 63L;
values[valuesOffset++] = (block2 >>> 48) & 63L;
values[valuesOffset++] = (block2 >>> 42) & 63L;
values[valuesOffset++] = (block2 >>> 36) & 63L;
values[valuesOffset++] = (block2 >>> 30) & 63L;
values[valuesOffset++] = (block2 >>> 24) & 63L;
values[valuesOffset++] = (block2 >>> 18) & 63L;
values[valuesOffset++] = (block2 >>> 12) & 63L;
values[valuesOffset++] = (block2 >>> 6) & 63L;
values[valuesOffset++] = block2 & 63L;
}
}
@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;
values[valuesOffset++] = byte0 >>> 2;
final long byte1 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte0 & 3) << 4) | (byte1 >>> 4);
final long byte2 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte1 & 15) << 2) | (byte2 >>> 6);
values[valuesOffset++] = byte2 & 63;
final long byte3 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte3 >>> 2;
final long byte4 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte3 & 3) << 4) | (byte4 >>> 4);
final long byte5 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte4 & 15) << 2) | (byte5 >>> 6);
values[valuesOffset++] = byte5 & 63;
final long byte6 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte6 >>> 2;
final long byte7 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte6 & 3) << 4) | (byte7 >>> 4);
final long byte8 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte7 & 15) << 2) | (byte8 >>> 6);
values[valuesOffset++] = byte8 & 63;
final long byte9 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte9 >>> 2;
final long byte10 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte9 & 3) << 4) | (byte10 >>> 4);
final long byte11 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte10 & 15) << 2) | (byte11 >>> 6);
values[valuesOffset++] = byte11 & 63;
final long byte12 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte12 >>> 2;
final long byte13 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte12 & 3) << 4) | (byte13 >>> 4);
final long byte14 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte13 & 15) << 2) | (byte14 >>> 6);
values[valuesOffset++] = byte14 & 63;
final long byte15 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte15 >>> 2;
final long byte16 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte15 & 3) << 4) | (byte16 >>> 4);
final long byte17 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte16 & 15) << 2) | (byte17 >>> 6);
values[valuesOffset++] = byte17 & 63;
final long byte18 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte18 >>> 2;
final long byte19 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte18 & 3) << 4) | (byte19 >>> 4);
final long byte20 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte19 & 15) << 2) | (byte20 >>> 6);
values[valuesOffset++] = byte20 & 63;
final long byte21 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte21 >>> 2;
final long byte22 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte21 & 3) << 4) | (byte22 >>> 4);
final long byte23 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte22 & 15) << 2) | (byte23 >>> 6);
values[valuesOffset++] = byte23 & 63;
}
@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;
values[valuesOffset++] = byte0 >>> 2;
final long byte1 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte0 & 3) << 4) | (byte1 >>> 4);
final long byte2 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte1 & 15) << 2) | (byte2 >>> 6);
values[valuesOffset++] = byte2 & 63;
}
}
}

View File

@ -24,424 +24,206 @@ package org.apache.lucene.util.packed;
*/
final class BulkOperationPacked7 extends BulkOperationPacked {
public BulkOperationPacked7() {
super(7);
assert blockCount() == 7;
assert valueCount() == 64;
}
public BulkOperationPacked7() {
super(7);
assert blockCount() == 7;
assert valueCount() == 64;
}
@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 >>> 57);
values[valuesOffset++] = (int) ((block0 >>> 50) & 127L);
values[valuesOffset++] = (int) ((block0 >>> 43) & 127L);
values[valuesOffset++] = (int) ((block0 >>> 36) & 127L);
values[valuesOffset++] = (int) ((block0 >>> 29) & 127L);
values[valuesOffset++] = (int) ((block0 >>> 22) & 127L);
values[valuesOffset++] = (int) ((block0 >>> 15) & 127L);
values[valuesOffset++] = (int) ((block0 >>> 8) & 127L);
values[valuesOffset++] = (int) ((block0 >>> 1) & 127L);
final long block1 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block0 & 1L) << 6) | (block1 >>> 58));
values[valuesOffset++] = (int) ((block1 >>> 51) & 127L);
values[valuesOffset++] = (int) ((block1 >>> 44) & 127L);
values[valuesOffset++] = (int) ((block1 >>> 37) & 127L);
values[valuesOffset++] = (int) ((block1 >>> 30) & 127L);
values[valuesOffset++] = (int) ((block1 >>> 23) & 127L);
values[valuesOffset++] = (int) ((block1 >>> 16) & 127L);
values[valuesOffset++] = (int) ((block1 >>> 9) & 127L);
values[valuesOffset++] = (int) ((block1 >>> 2) & 127L);
final long block2 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block1 & 3L) << 5) | (block2 >>> 59));
values[valuesOffset++] = (int) ((block2 >>> 52) & 127L);
values[valuesOffset++] = (int) ((block2 >>> 45) & 127L);
values[valuesOffset++] = (int) ((block2 >>> 38) & 127L);
values[valuesOffset++] = (int) ((block2 >>> 31) & 127L);
values[valuesOffset++] = (int) ((block2 >>> 24) & 127L);
values[valuesOffset++] = (int) ((block2 >>> 17) & 127L);
values[valuesOffset++] = (int) ((block2 >>> 10) & 127L);
values[valuesOffset++] = (int) ((block2 >>> 3) & 127L);
final long block3 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block2 & 7L) << 4) | (block3 >>> 60));
values[valuesOffset++] = (int) ((block3 >>> 53) & 127L);
values[valuesOffset++] = (int) ((block3 >>> 46) & 127L);
values[valuesOffset++] = (int) ((block3 >>> 39) & 127L);
values[valuesOffset++] = (int) ((block3 >>> 32) & 127L);
values[valuesOffset++] = (int) ((block3 >>> 25) & 127L);
values[valuesOffset++] = (int) ((block3 >>> 18) & 127L);
values[valuesOffset++] = (int) ((block3 >>> 11) & 127L);
values[valuesOffset++] = (int) ((block3 >>> 4) & 127L);
final long block4 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block3 & 15L) << 3) | (block4 >>> 61));
values[valuesOffset++] = (int) ((block4 >>> 54) & 127L);
values[valuesOffset++] = (int) ((block4 >>> 47) & 127L);
values[valuesOffset++] = (int) ((block4 >>> 40) & 127L);
values[valuesOffset++] = (int) ((block4 >>> 33) & 127L);
values[valuesOffset++] = (int) ((block4 >>> 26) & 127L);
values[valuesOffset++] = (int) ((block4 >>> 19) & 127L);
values[valuesOffset++] = (int) ((block4 >>> 12) & 127L);
values[valuesOffset++] = (int) ((block4 >>> 5) & 127L);
final long block5 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block4 & 31L) << 2) | (block5 >>> 62));
values[valuesOffset++] = (int) ((block5 >>> 55) & 127L);
values[valuesOffset++] = (int) ((block5 >>> 48) & 127L);
values[valuesOffset++] = (int) ((block5 >>> 41) & 127L);
values[valuesOffset++] = (int) ((block5 >>> 34) & 127L);
values[valuesOffset++] = (int) ((block5 >>> 27) & 127L);
values[valuesOffset++] = (int) ((block5 >>> 20) & 127L);
values[valuesOffset++] = (int) ((block5 >>> 13) & 127L);
values[valuesOffset++] = (int) ((block5 >>> 6) & 127L);
final long block6 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block5 & 63L) << 1) | (block6 >>> 63));
values[valuesOffset++] = (int) ((block6 >>> 56) & 127L);
values[valuesOffset++] = (int) ((block6 >>> 49) & 127L);
values[valuesOffset++] = (int) ((block6 >>> 42) & 127L);
values[valuesOffset++] = (int) ((block6 >>> 35) & 127L);
values[valuesOffset++] = (int) ((block6 >>> 28) & 127L);
values[valuesOffset++] = (int) ((block6 >>> 21) & 127L);
values[valuesOffset++] = (int) ((block6 >>> 14) & 127L);
values[valuesOffset++] = (int) ((block6 >>> 7) & 127L);
values[valuesOffset++] = (int) (block6 & 127L);
}
@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 >>> 57);
values[valuesOffset++] = (int) ((block0 >>> 50) & 127L);
values[valuesOffset++] = (int) ((block0 >>> 43) & 127L);
values[valuesOffset++] = (int) ((block0 >>> 36) & 127L);
values[valuesOffset++] = (int) ((block0 >>> 29) & 127L);
values[valuesOffset++] = (int) ((block0 >>> 22) & 127L);
values[valuesOffset++] = (int) ((block0 >>> 15) & 127L);
values[valuesOffset++] = (int) ((block0 >>> 8) & 127L);
values[valuesOffset++] = (int) ((block0 >>> 1) & 127L);
final long block1 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block0 & 1L) << 6) | (block1 >>> 58));
values[valuesOffset++] = (int) ((block1 >>> 51) & 127L);
values[valuesOffset++] = (int) ((block1 >>> 44) & 127L);
values[valuesOffset++] = (int) ((block1 >>> 37) & 127L);
values[valuesOffset++] = (int) ((block1 >>> 30) & 127L);
values[valuesOffset++] = (int) ((block1 >>> 23) & 127L);
values[valuesOffset++] = (int) ((block1 >>> 16) & 127L);
values[valuesOffset++] = (int) ((block1 >>> 9) & 127L);
values[valuesOffset++] = (int) ((block1 >>> 2) & 127L);
final long block2 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block1 & 3L) << 5) | (block2 >>> 59));
values[valuesOffset++] = (int) ((block2 >>> 52) & 127L);
values[valuesOffset++] = (int) ((block2 >>> 45) & 127L);
values[valuesOffset++] = (int) ((block2 >>> 38) & 127L);
values[valuesOffset++] = (int) ((block2 >>> 31) & 127L);
values[valuesOffset++] = (int) ((block2 >>> 24) & 127L);
values[valuesOffset++] = (int) ((block2 >>> 17) & 127L);
values[valuesOffset++] = (int) ((block2 >>> 10) & 127L);
values[valuesOffset++] = (int) ((block2 >>> 3) & 127L);
final long block3 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block2 & 7L) << 4) | (block3 >>> 60));
values[valuesOffset++] = (int) ((block3 >>> 53) & 127L);
values[valuesOffset++] = (int) ((block3 >>> 46) & 127L);
values[valuesOffset++] = (int) ((block3 >>> 39) & 127L);
values[valuesOffset++] = (int) ((block3 >>> 32) & 127L);
values[valuesOffset++] = (int) ((block3 >>> 25) & 127L);
values[valuesOffset++] = (int) ((block3 >>> 18) & 127L);
values[valuesOffset++] = (int) ((block3 >>> 11) & 127L);
values[valuesOffset++] = (int) ((block3 >>> 4) & 127L);
final long block4 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block3 & 15L) << 3) | (block4 >>> 61));
values[valuesOffset++] = (int) ((block4 >>> 54) & 127L);
values[valuesOffset++] = (int) ((block4 >>> 47) & 127L);
values[valuesOffset++] = (int) ((block4 >>> 40) & 127L);
values[valuesOffset++] = (int) ((block4 >>> 33) & 127L);
values[valuesOffset++] = (int) ((block4 >>> 26) & 127L);
values[valuesOffset++] = (int) ((block4 >>> 19) & 127L);
values[valuesOffset++] = (int) ((block4 >>> 12) & 127L);
values[valuesOffset++] = (int) ((block4 >>> 5) & 127L);
final long block5 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block4 & 31L) << 2) | (block5 >>> 62));
values[valuesOffset++] = (int) ((block5 >>> 55) & 127L);
values[valuesOffset++] = (int) ((block5 >>> 48) & 127L);
values[valuesOffset++] = (int) ((block5 >>> 41) & 127L);
values[valuesOffset++] = (int) ((block5 >>> 34) & 127L);
values[valuesOffset++] = (int) ((block5 >>> 27) & 127L);
values[valuesOffset++] = (int) ((block5 >>> 20) & 127L);
values[valuesOffset++] = (int) ((block5 >>> 13) & 127L);
values[valuesOffset++] = (int) ((block5 >>> 6) & 127L);
final long block6 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block5 & 63L) << 1) | (block6 >>> 63));
values[valuesOffset++] = (int) ((block6 >>> 56) & 127L);
values[valuesOffset++] = (int) ((block6 >>> 49) & 127L);
values[valuesOffset++] = (int) ((block6 >>> 42) & 127L);
values[valuesOffset++] = (int) ((block6 >>> 35) & 127L);
values[valuesOffset++] = (int) ((block6 >>> 28) & 127L);
values[valuesOffset++] = (int) ((block6 >>> 21) & 127L);
values[valuesOffset++] = (int) ((block6 >>> 14) & 127L);
values[valuesOffset++] = (int) ((block6 >>> 7) & 127L);
values[valuesOffset++] = (int) (block6 & 127L);
}
}
@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;
values[valuesOffset++] = byte0 >>> 1;
final int byte1 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte0 & 1) << 6) | (byte1 >>> 2);
final int byte2 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte1 & 3) << 5) | (byte2 >>> 3);
final int byte3 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte2 & 7) << 4) | (byte3 >>> 4);
final int byte4 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte3 & 15) << 3) | (byte4 >>> 5);
final int byte5 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte4 & 31) << 2) | (byte5 >>> 6);
final int byte6 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte5 & 63) << 1) | (byte6 >>> 7);
values[valuesOffset++] = byte6 & 127;
final int byte7 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte7 >>> 1;
final int byte8 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte7 & 1) << 6) | (byte8 >>> 2);
final int byte9 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte8 & 3) << 5) | (byte9 >>> 3);
final int byte10 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte9 & 7) << 4) | (byte10 >>> 4);
final int byte11 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte10 & 15) << 3) | (byte11 >>> 5);
final int byte12 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte11 & 31) << 2) | (byte12 >>> 6);
final int byte13 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte12 & 63) << 1) | (byte13 >>> 7);
values[valuesOffset++] = byte13 & 127;
final int byte14 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte14 >>> 1;
final int byte15 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte14 & 1) << 6) | (byte15 >>> 2);
final int byte16 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte15 & 3) << 5) | (byte16 >>> 3);
final int byte17 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte16 & 7) << 4) | (byte17 >>> 4);
final int byte18 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte17 & 15) << 3) | (byte18 >>> 5);
final int byte19 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte18 & 31) << 2) | (byte19 >>> 6);
final int byte20 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte19 & 63) << 1) | (byte20 >>> 7);
values[valuesOffset++] = byte20 & 127;
final int byte21 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte21 >>> 1;
final int byte22 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte21 & 1) << 6) | (byte22 >>> 2);
final int byte23 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte22 & 3) << 5) | (byte23 >>> 3);
final int byte24 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte23 & 7) << 4) | (byte24 >>> 4);
final int byte25 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte24 & 15) << 3) | (byte25 >>> 5);
final int byte26 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte25 & 31) << 2) | (byte26 >>> 6);
final int byte27 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte26 & 63) << 1) | (byte27 >>> 7);
values[valuesOffset++] = byte27 & 127;
final int byte28 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte28 >>> 1;
final int byte29 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte28 & 1) << 6) | (byte29 >>> 2);
final int byte30 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte29 & 3) << 5) | (byte30 >>> 3);
final int byte31 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte30 & 7) << 4) | (byte31 >>> 4);
final int byte32 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte31 & 15) << 3) | (byte32 >>> 5);
final int byte33 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte32 & 31) << 2) | (byte33 >>> 6);
final int byte34 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte33 & 63) << 1) | (byte34 >>> 7);
values[valuesOffset++] = byte34 & 127;
final int byte35 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte35 >>> 1;
final int byte36 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte35 & 1) << 6) | (byte36 >>> 2);
final int byte37 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte36 & 3) << 5) | (byte37 >>> 3);
final int byte38 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte37 & 7) << 4) | (byte38 >>> 4);
final int byte39 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte38 & 15) << 3) | (byte39 >>> 5);
final int byte40 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte39 & 31) << 2) | (byte40 >>> 6);
final int byte41 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte40 & 63) << 1) | (byte41 >>> 7);
values[valuesOffset++] = byte41 & 127;
final int byte42 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte42 >>> 1;
final int byte43 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte42 & 1) << 6) | (byte43 >>> 2);
final int byte44 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte43 & 3) << 5) | (byte44 >>> 3);
final int byte45 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte44 & 7) << 4) | (byte45 >>> 4);
final int byte46 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte45 & 15) << 3) | (byte46 >>> 5);
final int byte47 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte46 & 31) << 2) | (byte47 >>> 6);
final int byte48 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte47 & 63) << 1) | (byte48 >>> 7);
values[valuesOffset++] = byte48 & 127;
final int byte49 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte49 >>> 1;
final int byte50 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte49 & 1) << 6) | (byte50 >>> 2);
final int byte51 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte50 & 3) << 5) | (byte51 >>> 3);
final int byte52 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte51 & 7) << 4) | (byte52 >>> 4);
final int byte53 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte52 & 15) << 3) | (byte53 >>> 5);
final int byte54 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte53 & 31) << 2) | (byte54 >>> 6);
final int byte55 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte54 & 63) << 1) | (byte55 >>> 7);
values[valuesOffset++] = byte55 & 127;
}
@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;
values[valuesOffset++] = byte0 >>> 1;
final int byte1 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte0 & 1) << 6) | (byte1 >>> 2);
final int byte2 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte1 & 3) << 5) | (byte2 >>> 3);
final int byte3 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte2 & 7) << 4) | (byte3 >>> 4);
final int byte4 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte3 & 15) << 3) | (byte4 >>> 5);
final int byte5 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte4 & 31) << 2) | (byte5 >>> 6);
final int byte6 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte5 & 63) << 1) | (byte6 >>> 7);
values[valuesOffset++] = byte6 & 127;
}
}
@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 >>> 57;
values[valuesOffset++] = (block0 >>> 50) & 127L;
values[valuesOffset++] = (block0 >>> 43) & 127L;
values[valuesOffset++] = (block0 >>> 36) & 127L;
values[valuesOffset++] = (block0 >>> 29) & 127L;
values[valuesOffset++] = (block0 >>> 22) & 127L;
values[valuesOffset++] = (block0 >>> 15) & 127L;
values[valuesOffset++] = (block0 >>> 8) & 127L;
values[valuesOffset++] = (block0 >>> 1) & 127L;
final long block1 = blocks[blocksOffset++];
values[valuesOffset++] = ((block0 & 1L) << 6) | (block1 >>> 58);
values[valuesOffset++] = (block1 >>> 51) & 127L;
values[valuesOffset++] = (block1 >>> 44) & 127L;
values[valuesOffset++] = (block1 >>> 37) & 127L;
values[valuesOffset++] = (block1 >>> 30) & 127L;
values[valuesOffset++] = (block1 >>> 23) & 127L;
values[valuesOffset++] = (block1 >>> 16) & 127L;
values[valuesOffset++] = (block1 >>> 9) & 127L;
values[valuesOffset++] = (block1 >>> 2) & 127L;
final long block2 = blocks[blocksOffset++];
values[valuesOffset++] = ((block1 & 3L) << 5) | (block2 >>> 59);
values[valuesOffset++] = (block2 >>> 52) & 127L;
values[valuesOffset++] = (block2 >>> 45) & 127L;
values[valuesOffset++] = (block2 >>> 38) & 127L;
values[valuesOffset++] = (block2 >>> 31) & 127L;
values[valuesOffset++] = (block2 >>> 24) & 127L;
values[valuesOffset++] = (block2 >>> 17) & 127L;
values[valuesOffset++] = (block2 >>> 10) & 127L;
values[valuesOffset++] = (block2 >>> 3) & 127L;
final long block3 = blocks[blocksOffset++];
values[valuesOffset++] = ((block2 & 7L) << 4) | (block3 >>> 60);
values[valuesOffset++] = (block3 >>> 53) & 127L;
values[valuesOffset++] = (block3 >>> 46) & 127L;
values[valuesOffset++] = (block3 >>> 39) & 127L;
values[valuesOffset++] = (block3 >>> 32) & 127L;
values[valuesOffset++] = (block3 >>> 25) & 127L;
values[valuesOffset++] = (block3 >>> 18) & 127L;
values[valuesOffset++] = (block3 >>> 11) & 127L;
values[valuesOffset++] = (block3 >>> 4) & 127L;
final long block4 = blocks[blocksOffset++];
values[valuesOffset++] = ((block3 & 15L) << 3) | (block4 >>> 61);
values[valuesOffset++] = (block4 >>> 54) & 127L;
values[valuesOffset++] = (block4 >>> 47) & 127L;
values[valuesOffset++] = (block4 >>> 40) & 127L;
values[valuesOffset++] = (block4 >>> 33) & 127L;
values[valuesOffset++] = (block4 >>> 26) & 127L;
values[valuesOffset++] = (block4 >>> 19) & 127L;
values[valuesOffset++] = (block4 >>> 12) & 127L;
values[valuesOffset++] = (block4 >>> 5) & 127L;
final long block5 = blocks[blocksOffset++];
values[valuesOffset++] = ((block4 & 31L) << 2) | (block5 >>> 62);
values[valuesOffset++] = (block5 >>> 55) & 127L;
values[valuesOffset++] = (block5 >>> 48) & 127L;
values[valuesOffset++] = (block5 >>> 41) & 127L;
values[valuesOffset++] = (block5 >>> 34) & 127L;
values[valuesOffset++] = (block5 >>> 27) & 127L;
values[valuesOffset++] = (block5 >>> 20) & 127L;
values[valuesOffset++] = (block5 >>> 13) & 127L;
values[valuesOffset++] = (block5 >>> 6) & 127L;
final long block6 = blocks[blocksOffset++];
values[valuesOffset++] = ((block5 & 63L) << 1) | (block6 >>> 63);
values[valuesOffset++] = (block6 >>> 56) & 127L;
values[valuesOffset++] = (block6 >>> 49) & 127L;
values[valuesOffset++] = (block6 >>> 42) & 127L;
values[valuesOffset++] = (block6 >>> 35) & 127L;
values[valuesOffset++] = (block6 >>> 28) & 127L;
values[valuesOffset++] = (block6 >>> 21) & 127L;
values[valuesOffset++] = (block6 >>> 14) & 127L;
values[valuesOffset++] = (block6 >>> 7) & 127L;
values[valuesOffset++] = block6 & 127L;
}
@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 >>> 57;
values[valuesOffset++] = (block0 >>> 50) & 127L;
values[valuesOffset++] = (block0 >>> 43) & 127L;
values[valuesOffset++] = (block0 >>> 36) & 127L;
values[valuesOffset++] = (block0 >>> 29) & 127L;
values[valuesOffset++] = (block0 >>> 22) & 127L;
values[valuesOffset++] = (block0 >>> 15) & 127L;
values[valuesOffset++] = (block0 >>> 8) & 127L;
values[valuesOffset++] = (block0 >>> 1) & 127L;
final long block1 = blocks[blocksOffset++];
values[valuesOffset++] = ((block0 & 1L) << 6) | (block1 >>> 58);
values[valuesOffset++] = (block1 >>> 51) & 127L;
values[valuesOffset++] = (block1 >>> 44) & 127L;
values[valuesOffset++] = (block1 >>> 37) & 127L;
values[valuesOffset++] = (block1 >>> 30) & 127L;
values[valuesOffset++] = (block1 >>> 23) & 127L;
values[valuesOffset++] = (block1 >>> 16) & 127L;
values[valuesOffset++] = (block1 >>> 9) & 127L;
values[valuesOffset++] = (block1 >>> 2) & 127L;
final long block2 = blocks[blocksOffset++];
values[valuesOffset++] = ((block1 & 3L) << 5) | (block2 >>> 59);
values[valuesOffset++] = (block2 >>> 52) & 127L;
values[valuesOffset++] = (block2 >>> 45) & 127L;
values[valuesOffset++] = (block2 >>> 38) & 127L;
values[valuesOffset++] = (block2 >>> 31) & 127L;
values[valuesOffset++] = (block2 >>> 24) & 127L;
values[valuesOffset++] = (block2 >>> 17) & 127L;
values[valuesOffset++] = (block2 >>> 10) & 127L;
values[valuesOffset++] = (block2 >>> 3) & 127L;
final long block3 = blocks[blocksOffset++];
values[valuesOffset++] = ((block2 & 7L) << 4) | (block3 >>> 60);
values[valuesOffset++] = (block3 >>> 53) & 127L;
values[valuesOffset++] = (block3 >>> 46) & 127L;
values[valuesOffset++] = (block3 >>> 39) & 127L;
values[valuesOffset++] = (block3 >>> 32) & 127L;
values[valuesOffset++] = (block3 >>> 25) & 127L;
values[valuesOffset++] = (block3 >>> 18) & 127L;
values[valuesOffset++] = (block3 >>> 11) & 127L;
values[valuesOffset++] = (block3 >>> 4) & 127L;
final long block4 = blocks[blocksOffset++];
values[valuesOffset++] = ((block3 & 15L) << 3) | (block4 >>> 61);
values[valuesOffset++] = (block4 >>> 54) & 127L;
values[valuesOffset++] = (block4 >>> 47) & 127L;
values[valuesOffset++] = (block4 >>> 40) & 127L;
values[valuesOffset++] = (block4 >>> 33) & 127L;
values[valuesOffset++] = (block4 >>> 26) & 127L;
values[valuesOffset++] = (block4 >>> 19) & 127L;
values[valuesOffset++] = (block4 >>> 12) & 127L;
values[valuesOffset++] = (block4 >>> 5) & 127L;
final long block5 = blocks[blocksOffset++];
values[valuesOffset++] = ((block4 & 31L) << 2) | (block5 >>> 62);
values[valuesOffset++] = (block5 >>> 55) & 127L;
values[valuesOffset++] = (block5 >>> 48) & 127L;
values[valuesOffset++] = (block5 >>> 41) & 127L;
values[valuesOffset++] = (block5 >>> 34) & 127L;
values[valuesOffset++] = (block5 >>> 27) & 127L;
values[valuesOffset++] = (block5 >>> 20) & 127L;
values[valuesOffset++] = (block5 >>> 13) & 127L;
values[valuesOffset++] = (block5 >>> 6) & 127L;
final long block6 = blocks[blocksOffset++];
values[valuesOffset++] = ((block5 & 63L) << 1) | (block6 >>> 63);
values[valuesOffset++] = (block6 >>> 56) & 127L;
values[valuesOffset++] = (block6 >>> 49) & 127L;
values[valuesOffset++] = (block6 >>> 42) & 127L;
values[valuesOffset++] = (block6 >>> 35) & 127L;
values[valuesOffset++] = (block6 >>> 28) & 127L;
values[valuesOffset++] = (block6 >>> 21) & 127L;
values[valuesOffset++] = (block6 >>> 14) & 127L;
values[valuesOffset++] = (block6 >>> 7) & 127L;
values[valuesOffset++] = block6 & 127L;
}
}
@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;
values[valuesOffset++] = byte0 >>> 1;
final long byte1 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte0 & 1) << 6) | (byte1 >>> 2);
final long byte2 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte1 & 3) << 5) | (byte2 >>> 3);
final long byte3 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte2 & 7) << 4) | (byte3 >>> 4);
final long byte4 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte3 & 15) << 3) | (byte4 >>> 5);
final long byte5 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte4 & 31) << 2) | (byte5 >>> 6);
final long byte6 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte5 & 63) << 1) | (byte6 >>> 7);
values[valuesOffset++] = byte6 & 127;
final long byte7 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte7 >>> 1;
final long byte8 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte7 & 1) << 6) | (byte8 >>> 2);
final long byte9 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte8 & 3) << 5) | (byte9 >>> 3);
final long byte10 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte9 & 7) << 4) | (byte10 >>> 4);
final long byte11 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte10 & 15) << 3) | (byte11 >>> 5);
final long byte12 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte11 & 31) << 2) | (byte12 >>> 6);
final long byte13 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte12 & 63) << 1) | (byte13 >>> 7);
values[valuesOffset++] = byte13 & 127;
final long byte14 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte14 >>> 1;
final long byte15 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte14 & 1) << 6) | (byte15 >>> 2);
final long byte16 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte15 & 3) << 5) | (byte16 >>> 3);
final long byte17 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte16 & 7) << 4) | (byte17 >>> 4);
final long byte18 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte17 & 15) << 3) | (byte18 >>> 5);
final long byte19 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte18 & 31) << 2) | (byte19 >>> 6);
final long byte20 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte19 & 63) << 1) | (byte20 >>> 7);
values[valuesOffset++] = byte20 & 127;
final long byte21 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte21 >>> 1;
final long byte22 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte21 & 1) << 6) | (byte22 >>> 2);
final long byte23 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte22 & 3) << 5) | (byte23 >>> 3);
final long byte24 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte23 & 7) << 4) | (byte24 >>> 4);
final long byte25 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte24 & 15) << 3) | (byte25 >>> 5);
final long byte26 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte25 & 31) << 2) | (byte26 >>> 6);
final long byte27 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte26 & 63) << 1) | (byte27 >>> 7);
values[valuesOffset++] = byte27 & 127;
final long byte28 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte28 >>> 1;
final long byte29 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte28 & 1) << 6) | (byte29 >>> 2);
final long byte30 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte29 & 3) << 5) | (byte30 >>> 3);
final long byte31 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte30 & 7) << 4) | (byte31 >>> 4);
final long byte32 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte31 & 15) << 3) | (byte32 >>> 5);
final long byte33 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte32 & 31) << 2) | (byte33 >>> 6);
final long byte34 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte33 & 63) << 1) | (byte34 >>> 7);
values[valuesOffset++] = byte34 & 127;
final long byte35 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte35 >>> 1;
final long byte36 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte35 & 1) << 6) | (byte36 >>> 2);
final long byte37 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte36 & 3) << 5) | (byte37 >>> 3);
final long byte38 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte37 & 7) << 4) | (byte38 >>> 4);
final long byte39 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte38 & 15) << 3) | (byte39 >>> 5);
final long byte40 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte39 & 31) << 2) | (byte40 >>> 6);
final long byte41 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte40 & 63) << 1) | (byte41 >>> 7);
values[valuesOffset++] = byte41 & 127;
final long byte42 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte42 >>> 1;
final long byte43 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte42 & 1) << 6) | (byte43 >>> 2);
final long byte44 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte43 & 3) << 5) | (byte44 >>> 3);
final long byte45 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte44 & 7) << 4) | (byte45 >>> 4);
final long byte46 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte45 & 15) << 3) | (byte46 >>> 5);
final long byte47 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte46 & 31) << 2) | (byte47 >>> 6);
final long byte48 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte47 & 63) << 1) | (byte48 >>> 7);
values[valuesOffset++] = byte48 & 127;
final long byte49 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte49 >>> 1;
final long byte50 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte49 & 1) << 6) | (byte50 >>> 2);
final long byte51 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte50 & 3) << 5) | (byte51 >>> 3);
final long byte52 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte51 & 7) << 4) | (byte52 >>> 4);
final long byte53 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte52 & 15) << 3) | (byte53 >>> 5);
final long byte54 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte53 & 31) << 2) | (byte54 >>> 6);
final long byte55 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte54 & 63) << 1) | (byte55 >>> 7);
values[valuesOffset++] = byte55 & 127;
}
@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;
values[valuesOffset++] = byte0 >>> 1;
final long byte1 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte0 & 1) << 6) | (byte1 >>> 2);
final long byte2 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte1 & 3) << 5) | (byte2 >>> 3);
final long byte3 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte2 & 7) << 4) | (byte3 >>> 4);
final long byte4 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte3 & 15) << 3) | (byte4 >>> 5);
final long byte5 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte4 & 31) << 2) | (byte5 >>> 6);
final long byte6 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte5 & 63) << 1) | (byte6 >>> 7);
values[valuesOffset++] = byte6 & 127;
}
}
}

View File

@ -24,92 +24,44 @@ package org.apache.lucene.util.packed;
*/
final class BulkOperationPacked8 extends BulkOperationPacked {
public BulkOperationPacked8() {
super(8);
assert blockCount() == 1;
assert valueCount() == 8;
}
public BulkOperationPacked8() {
super(8);
assert blockCount() == 1;
assert valueCount() == 8;
}
@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 >>> 56);
values[valuesOffset++] = (int) ((block0 >>> 48) & 255L);
values[valuesOffset++] = (int) ((block0 >>> 40) & 255L);
values[valuesOffset++] = (int) ((block0 >>> 32) & 255L);
values[valuesOffset++] = (int) ((block0 >>> 24) & 255L);
values[valuesOffset++] = (int) ((block0 >>> 16) & 255L);
values[valuesOffset++] = (int) ((block0 >>> 8) & 255L);
values[valuesOffset++] = (int) (block0 & 255L);
@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 = 56; shift >= 0; shift -= 8) {
values[valuesOffset++] = (int) ((block >>> shift) & 255);
}
}
}
@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;
values[valuesOffset++] = byte0;
final int byte1 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte1;
final int byte2 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte2;
final int byte3 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte3;
final int byte4 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte4;
final int byte5 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte5;
final int byte6 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte6;
final int byte7 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte7;
@Override
public void decode(byte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) {
for (int j = 0; j < 8 * iterations; ++j) {
values[valuesOffset++] = blocks[blocksOffset++] & 0xFF;
}
}
@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 = 56; shift >= 0; shift -= 8) {
values[valuesOffset++] = (block >>> shift) & 255;
}
}
}
@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 >>> 56;
values[valuesOffset++] = (block0 >>> 48) & 255L;
values[valuesOffset++] = (block0 >>> 40) & 255L;
values[valuesOffset++] = (block0 >>> 32) & 255L;
values[valuesOffset++] = (block0 >>> 24) & 255L;
values[valuesOffset++] = (block0 >>> 16) & 255L;
values[valuesOffset++] = (block0 >>> 8) & 255L;
values[valuesOffset++] = block0 & 255L;
}
}
@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;
values[valuesOffset++] = byte0;
final long byte1 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte1;
final long byte2 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte2;
final long byte3 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte3;
final long byte4 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte4;
final long byte5 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte5;
final long byte6 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte6;
final long byte7 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte7;
}
@Override
public void decode(byte[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations) {
for (int j = 0; j < 8 * iterations; ++j) {
values[valuesOffset++] = blocks[blocksOffset++] & 0xFF;
}
}
}

View File

@ -24,460 +24,214 @@ package org.apache.lucene.util.packed;
*/
final class BulkOperationPacked9 extends BulkOperationPacked {
public BulkOperationPacked9() {
super(9);
assert blockCount() == 9;
assert valueCount() == 64;
}
public BulkOperationPacked9() {
super(9);
assert blockCount() == 9;
assert valueCount() == 64;
}
@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 >>> 55);
values[valuesOffset++] = (int) ((block0 >>> 46) & 511L);
values[valuesOffset++] = (int) ((block0 >>> 37) & 511L);
values[valuesOffset++] = (int) ((block0 >>> 28) & 511L);
values[valuesOffset++] = (int) ((block0 >>> 19) & 511L);
values[valuesOffset++] = (int) ((block0 >>> 10) & 511L);
values[valuesOffset++] = (int) ((block0 >>> 1) & 511L);
final long block1 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block0 & 1L) << 8) | (block1 >>> 56));
values[valuesOffset++] = (int) ((block1 >>> 47) & 511L);
values[valuesOffset++] = (int) ((block1 >>> 38) & 511L);
values[valuesOffset++] = (int) ((block1 >>> 29) & 511L);
values[valuesOffset++] = (int) ((block1 >>> 20) & 511L);
values[valuesOffset++] = (int) ((block1 >>> 11) & 511L);
values[valuesOffset++] = (int) ((block1 >>> 2) & 511L);
final long block2 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block1 & 3L) << 7) | (block2 >>> 57));
values[valuesOffset++] = (int) ((block2 >>> 48) & 511L);
values[valuesOffset++] = (int) ((block2 >>> 39) & 511L);
values[valuesOffset++] = (int) ((block2 >>> 30) & 511L);
values[valuesOffset++] = (int) ((block2 >>> 21) & 511L);
values[valuesOffset++] = (int) ((block2 >>> 12) & 511L);
values[valuesOffset++] = (int) ((block2 >>> 3) & 511L);
final long block3 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block2 & 7L) << 6) | (block3 >>> 58));
values[valuesOffset++] = (int) ((block3 >>> 49) & 511L);
values[valuesOffset++] = (int) ((block3 >>> 40) & 511L);
values[valuesOffset++] = (int) ((block3 >>> 31) & 511L);
values[valuesOffset++] = (int) ((block3 >>> 22) & 511L);
values[valuesOffset++] = (int) ((block3 >>> 13) & 511L);
values[valuesOffset++] = (int) ((block3 >>> 4) & 511L);
final long block4 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block3 & 15L) << 5) | (block4 >>> 59));
values[valuesOffset++] = (int) ((block4 >>> 50) & 511L);
values[valuesOffset++] = (int) ((block4 >>> 41) & 511L);
values[valuesOffset++] = (int) ((block4 >>> 32) & 511L);
values[valuesOffset++] = (int) ((block4 >>> 23) & 511L);
values[valuesOffset++] = (int) ((block4 >>> 14) & 511L);
values[valuesOffset++] = (int) ((block4 >>> 5) & 511L);
final long block5 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block4 & 31L) << 4) | (block5 >>> 60));
values[valuesOffset++] = (int) ((block5 >>> 51) & 511L);
values[valuesOffset++] = (int) ((block5 >>> 42) & 511L);
values[valuesOffset++] = (int) ((block5 >>> 33) & 511L);
values[valuesOffset++] = (int) ((block5 >>> 24) & 511L);
values[valuesOffset++] = (int) ((block5 >>> 15) & 511L);
values[valuesOffset++] = (int) ((block5 >>> 6) & 511L);
final long block6 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block5 & 63L) << 3) | (block6 >>> 61));
values[valuesOffset++] = (int) ((block6 >>> 52) & 511L);
values[valuesOffset++] = (int) ((block6 >>> 43) & 511L);
values[valuesOffset++] = (int) ((block6 >>> 34) & 511L);
values[valuesOffset++] = (int) ((block6 >>> 25) & 511L);
values[valuesOffset++] = (int) ((block6 >>> 16) & 511L);
values[valuesOffset++] = (int) ((block6 >>> 7) & 511L);
final long block7 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block6 & 127L) << 2) | (block7 >>> 62));
values[valuesOffset++] = (int) ((block7 >>> 53) & 511L);
values[valuesOffset++] = (int) ((block7 >>> 44) & 511L);
values[valuesOffset++] = (int) ((block7 >>> 35) & 511L);
values[valuesOffset++] = (int) ((block7 >>> 26) & 511L);
values[valuesOffset++] = (int) ((block7 >>> 17) & 511L);
values[valuesOffset++] = (int) ((block7 >>> 8) & 511L);
final long block8 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block7 & 255L) << 1) | (block8 >>> 63));
values[valuesOffset++] = (int) ((block8 >>> 54) & 511L);
values[valuesOffset++] = (int) ((block8 >>> 45) & 511L);
values[valuesOffset++] = (int) ((block8 >>> 36) & 511L);
values[valuesOffset++] = (int) ((block8 >>> 27) & 511L);
values[valuesOffset++] = (int) ((block8 >>> 18) & 511L);
values[valuesOffset++] = (int) ((block8 >>> 9) & 511L);
values[valuesOffset++] = (int) (block8 & 511L);
}
@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 >>> 55);
values[valuesOffset++] = (int) ((block0 >>> 46) & 511L);
values[valuesOffset++] = (int) ((block0 >>> 37) & 511L);
values[valuesOffset++] = (int) ((block0 >>> 28) & 511L);
values[valuesOffset++] = (int) ((block0 >>> 19) & 511L);
values[valuesOffset++] = (int) ((block0 >>> 10) & 511L);
values[valuesOffset++] = (int) ((block0 >>> 1) & 511L);
final long block1 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block0 & 1L) << 8) | (block1 >>> 56));
values[valuesOffset++] = (int) ((block1 >>> 47) & 511L);
values[valuesOffset++] = (int) ((block1 >>> 38) & 511L);
values[valuesOffset++] = (int) ((block1 >>> 29) & 511L);
values[valuesOffset++] = (int) ((block1 >>> 20) & 511L);
values[valuesOffset++] = (int) ((block1 >>> 11) & 511L);
values[valuesOffset++] = (int) ((block1 >>> 2) & 511L);
final long block2 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block1 & 3L) << 7) | (block2 >>> 57));
values[valuesOffset++] = (int) ((block2 >>> 48) & 511L);
values[valuesOffset++] = (int) ((block2 >>> 39) & 511L);
values[valuesOffset++] = (int) ((block2 >>> 30) & 511L);
values[valuesOffset++] = (int) ((block2 >>> 21) & 511L);
values[valuesOffset++] = (int) ((block2 >>> 12) & 511L);
values[valuesOffset++] = (int) ((block2 >>> 3) & 511L);
final long block3 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block2 & 7L) << 6) | (block3 >>> 58));
values[valuesOffset++] = (int) ((block3 >>> 49) & 511L);
values[valuesOffset++] = (int) ((block3 >>> 40) & 511L);
values[valuesOffset++] = (int) ((block3 >>> 31) & 511L);
values[valuesOffset++] = (int) ((block3 >>> 22) & 511L);
values[valuesOffset++] = (int) ((block3 >>> 13) & 511L);
values[valuesOffset++] = (int) ((block3 >>> 4) & 511L);
final long block4 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block3 & 15L) << 5) | (block4 >>> 59));
values[valuesOffset++] = (int) ((block4 >>> 50) & 511L);
values[valuesOffset++] = (int) ((block4 >>> 41) & 511L);
values[valuesOffset++] = (int) ((block4 >>> 32) & 511L);
values[valuesOffset++] = (int) ((block4 >>> 23) & 511L);
values[valuesOffset++] = (int) ((block4 >>> 14) & 511L);
values[valuesOffset++] = (int) ((block4 >>> 5) & 511L);
final long block5 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block4 & 31L) << 4) | (block5 >>> 60));
values[valuesOffset++] = (int) ((block5 >>> 51) & 511L);
values[valuesOffset++] = (int) ((block5 >>> 42) & 511L);
values[valuesOffset++] = (int) ((block5 >>> 33) & 511L);
values[valuesOffset++] = (int) ((block5 >>> 24) & 511L);
values[valuesOffset++] = (int) ((block5 >>> 15) & 511L);
values[valuesOffset++] = (int) ((block5 >>> 6) & 511L);
final long block6 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block5 & 63L) << 3) | (block6 >>> 61));
values[valuesOffset++] = (int) ((block6 >>> 52) & 511L);
values[valuesOffset++] = (int) ((block6 >>> 43) & 511L);
values[valuesOffset++] = (int) ((block6 >>> 34) & 511L);
values[valuesOffset++] = (int) ((block6 >>> 25) & 511L);
values[valuesOffset++] = (int) ((block6 >>> 16) & 511L);
values[valuesOffset++] = (int) ((block6 >>> 7) & 511L);
final long block7 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block6 & 127L) << 2) | (block7 >>> 62));
values[valuesOffset++] = (int) ((block7 >>> 53) & 511L);
values[valuesOffset++] = (int) ((block7 >>> 44) & 511L);
values[valuesOffset++] = (int) ((block7 >>> 35) & 511L);
values[valuesOffset++] = (int) ((block7 >>> 26) & 511L);
values[valuesOffset++] = (int) ((block7 >>> 17) & 511L);
values[valuesOffset++] = (int) ((block7 >>> 8) & 511L);
final long block8 = blocks[blocksOffset++];
values[valuesOffset++] = (int) (((block7 & 255L) << 1) | (block8 >>> 63));
values[valuesOffset++] = (int) ((block8 >>> 54) & 511L);
values[valuesOffset++] = (int) ((block8 >>> 45) & 511L);
values[valuesOffset++] = (int) ((block8 >>> 36) & 511L);
values[valuesOffset++] = (int) ((block8 >>> 27) & 511L);
values[valuesOffset++] = (int) ((block8 >>> 18) & 511L);
values[valuesOffset++] = (int) ((block8 >>> 9) & 511L);
values[valuesOffset++] = (int) (block8 & 511L);
}
}
@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 << 1) | (byte1 >>> 7);
final int byte2 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte1 & 127) << 2) | (byte2 >>> 6);
final int byte3 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte2 & 63) << 3) | (byte3 >>> 5);
final int byte4 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte3 & 31) << 4) | (byte4 >>> 4);
final int byte5 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte4 & 15) << 5) | (byte5 >>> 3);
final int byte6 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte5 & 7) << 6) | (byte6 >>> 2);
final int byte7 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte6 & 3) << 7) | (byte7 >>> 1);
final int byte8 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte7 & 1) << 8) | byte8;
final int byte9 = blocks[blocksOffset++] & 0xFF;
final int byte10 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte9 << 1) | (byte10 >>> 7);
final int byte11 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte10 & 127) << 2) | (byte11 >>> 6);
final int byte12 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte11 & 63) << 3) | (byte12 >>> 5);
final int byte13 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte12 & 31) << 4) | (byte13 >>> 4);
final int byte14 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte13 & 15) << 5) | (byte14 >>> 3);
final int byte15 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte14 & 7) << 6) | (byte15 >>> 2);
final int byte16 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte15 & 3) << 7) | (byte16 >>> 1);
final int byte17 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte16 & 1) << 8) | byte17;
final int byte18 = blocks[blocksOffset++] & 0xFF;
final int byte19 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte18 << 1) | (byte19 >>> 7);
final int byte20 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte19 & 127) << 2) | (byte20 >>> 6);
final int byte21 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte20 & 63) << 3) | (byte21 >>> 5);
final int byte22 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte21 & 31) << 4) | (byte22 >>> 4);
final int byte23 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte22 & 15) << 5) | (byte23 >>> 3);
final int byte24 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte23 & 7) << 6) | (byte24 >>> 2);
final int byte25 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte24 & 3) << 7) | (byte25 >>> 1);
final int byte26 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte25 & 1) << 8) | byte26;
final int byte27 = blocks[blocksOffset++] & 0xFF;
final int byte28 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte27 << 1) | (byte28 >>> 7);
final int byte29 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte28 & 127) << 2) | (byte29 >>> 6);
final int byte30 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte29 & 63) << 3) | (byte30 >>> 5);
final int byte31 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte30 & 31) << 4) | (byte31 >>> 4);
final int byte32 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte31 & 15) << 5) | (byte32 >>> 3);
final int byte33 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte32 & 7) << 6) | (byte33 >>> 2);
final int byte34 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte33 & 3) << 7) | (byte34 >>> 1);
final int byte35 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte34 & 1) << 8) | byte35;
final int byte36 = blocks[blocksOffset++] & 0xFF;
final int byte37 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte36 << 1) | (byte37 >>> 7);
final int byte38 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte37 & 127) << 2) | (byte38 >>> 6);
final int byte39 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte38 & 63) << 3) | (byte39 >>> 5);
final int byte40 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte39 & 31) << 4) | (byte40 >>> 4);
final int byte41 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte40 & 15) << 5) | (byte41 >>> 3);
final int byte42 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte41 & 7) << 6) | (byte42 >>> 2);
final int byte43 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte42 & 3) << 7) | (byte43 >>> 1);
final int byte44 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte43 & 1) << 8) | byte44;
final int byte45 = blocks[blocksOffset++] & 0xFF;
final int byte46 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte45 << 1) | (byte46 >>> 7);
final int byte47 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte46 & 127) << 2) | (byte47 >>> 6);
final int byte48 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte47 & 63) << 3) | (byte48 >>> 5);
final int byte49 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte48 & 31) << 4) | (byte49 >>> 4);
final int byte50 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte49 & 15) << 5) | (byte50 >>> 3);
final int byte51 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte50 & 7) << 6) | (byte51 >>> 2);
final int byte52 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte51 & 3) << 7) | (byte52 >>> 1);
final int byte53 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte52 & 1) << 8) | byte53;
final int byte54 = blocks[blocksOffset++] & 0xFF;
final int byte55 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte54 << 1) | (byte55 >>> 7);
final int byte56 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte55 & 127) << 2) | (byte56 >>> 6);
final int byte57 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte56 & 63) << 3) | (byte57 >>> 5);
final int byte58 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte57 & 31) << 4) | (byte58 >>> 4);
final int byte59 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte58 & 15) << 5) | (byte59 >>> 3);
final int byte60 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte59 & 7) << 6) | (byte60 >>> 2);
final int byte61 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte60 & 3) << 7) | (byte61 >>> 1);
final int byte62 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte61 & 1) << 8) | byte62;
final int byte63 = blocks[blocksOffset++] & 0xFF;
final int byte64 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte63 << 1) | (byte64 >>> 7);
final int byte65 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte64 & 127) << 2) | (byte65 >>> 6);
final int byte66 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte65 & 63) << 3) | (byte66 >>> 5);
final int byte67 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte66 & 31) << 4) | (byte67 >>> 4);
final int byte68 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte67 & 15) << 5) | (byte68 >>> 3);
final int byte69 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte68 & 7) << 6) | (byte69 >>> 2);
final int byte70 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte69 & 3) << 7) | (byte70 >>> 1);
final int byte71 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte70 & 1) << 8) | byte71;
}
@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 << 1) | (byte1 >>> 7);
final int byte2 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte1 & 127) << 2) | (byte2 >>> 6);
final int byte3 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte2 & 63) << 3) | (byte3 >>> 5);
final int byte4 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte3 & 31) << 4) | (byte4 >>> 4);
final int byte5 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte4 & 15) << 5) | (byte5 >>> 3);
final int byte6 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte5 & 7) << 6) | (byte6 >>> 2);
final int byte7 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte6 & 3) << 7) | (byte7 >>> 1);
final int byte8 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte7 & 1) << 8) | byte8;
}
}
@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 >>> 55;
values[valuesOffset++] = (block0 >>> 46) & 511L;
values[valuesOffset++] = (block0 >>> 37) & 511L;
values[valuesOffset++] = (block0 >>> 28) & 511L;
values[valuesOffset++] = (block0 >>> 19) & 511L;
values[valuesOffset++] = (block0 >>> 10) & 511L;
values[valuesOffset++] = (block0 >>> 1) & 511L;
final long block1 = blocks[blocksOffset++];
values[valuesOffset++] = ((block0 & 1L) << 8) | (block1 >>> 56);
values[valuesOffset++] = (block1 >>> 47) & 511L;
values[valuesOffset++] = (block1 >>> 38) & 511L;
values[valuesOffset++] = (block1 >>> 29) & 511L;
values[valuesOffset++] = (block1 >>> 20) & 511L;
values[valuesOffset++] = (block1 >>> 11) & 511L;
values[valuesOffset++] = (block1 >>> 2) & 511L;
final long block2 = blocks[blocksOffset++];
values[valuesOffset++] = ((block1 & 3L) << 7) | (block2 >>> 57);
values[valuesOffset++] = (block2 >>> 48) & 511L;
values[valuesOffset++] = (block2 >>> 39) & 511L;
values[valuesOffset++] = (block2 >>> 30) & 511L;
values[valuesOffset++] = (block2 >>> 21) & 511L;
values[valuesOffset++] = (block2 >>> 12) & 511L;
values[valuesOffset++] = (block2 >>> 3) & 511L;
final long block3 = blocks[blocksOffset++];
values[valuesOffset++] = ((block2 & 7L) << 6) | (block3 >>> 58);
values[valuesOffset++] = (block3 >>> 49) & 511L;
values[valuesOffset++] = (block3 >>> 40) & 511L;
values[valuesOffset++] = (block3 >>> 31) & 511L;
values[valuesOffset++] = (block3 >>> 22) & 511L;
values[valuesOffset++] = (block3 >>> 13) & 511L;
values[valuesOffset++] = (block3 >>> 4) & 511L;
final long block4 = blocks[blocksOffset++];
values[valuesOffset++] = ((block3 & 15L) << 5) | (block4 >>> 59);
values[valuesOffset++] = (block4 >>> 50) & 511L;
values[valuesOffset++] = (block4 >>> 41) & 511L;
values[valuesOffset++] = (block4 >>> 32) & 511L;
values[valuesOffset++] = (block4 >>> 23) & 511L;
values[valuesOffset++] = (block4 >>> 14) & 511L;
values[valuesOffset++] = (block4 >>> 5) & 511L;
final long block5 = blocks[blocksOffset++];
values[valuesOffset++] = ((block4 & 31L) << 4) | (block5 >>> 60);
values[valuesOffset++] = (block5 >>> 51) & 511L;
values[valuesOffset++] = (block5 >>> 42) & 511L;
values[valuesOffset++] = (block5 >>> 33) & 511L;
values[valuesOffset++] = (block5 >>> 24) & 511L;
values[valuesOffset++] = (block5 >>> 15) & 511L;
values[valuesOffset++] = (block5 >>> 6) & 511L;
final long block6 = blocks[blocksOffset++];
values[valuesOffset++] = ((block5 & 63L) << 3) | (block6 >>> 61);
values[valuesOffset++] = (block6 >>> 52) & 511L;
values[valuesOffset++] = (block6 >>> 43) & 511L;
values[valuesOffset++] = (block6 >>> 34) & 511L;
values[valuesOffset++] = (block6 >>> 25) & 511L;
values[valuesOffset++] = (block6 >>> 16) & 511L;
values[valuesOffset++] = (block6 >>> 7) & 511L;
final long block7 = blocks[blocksOffset++];
values[valuesOffset++] = ((block6 & 127L) << 2) | (block7 >>> 62);
values[valuesOffset++] = (block7 >>> 53) & 511L;
values[valuesOffset++] = (block7 >>> 44) & 511L;
values[valuesOffset++] = (block7 >>> 35) & 511L;
values[valuesOffset++] = (block7 >>> 26) & 511L;
values[valuesOffset++] = (block7 >>> 17) & 511L;
values[valuesOffset++] = (block7 >>> 8) & 511L;
final long block8 = blocks[blocksOffset++];
values[valuesOffset++] = ((block7 & 255L) << 1) | (block8 >>> 63);
values[valuesOffset++] = (block8 >>> 54) & 511L;
values[valuesOffset++] = (block8 >>> 45) & 511L;
values[valuesOffset++] = (block8 >>> 36) & 511L;
values[valuesOffset++] = (block8 >>> 27) & 511L;
values[valuesOffset++] = (block8 >>> 18) & 511L;
values[valuesOffset++] = (block8 >>> 9) & 511L;
values[valuesOffset++] = block8 & 511L;
}
@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 >>> 55;
values[valuesOffset++] = (block0 >>> 46) & 511L;
values[valuesOffset++] = (block0 >>> 37) & 511L;
values[valuesOffset++] = (block0 >>> 28) & 511L;
values[valuesOffset++] = (block0 >>> 19) & 511L;
values[valuesOffset++] = (block0 >>> 10) & 511L;
values[valuesOffset++] = (block0 >>> 1) & 511L;
final long block1 = blocks[blocksOffset++];
values[valuesOffset++] = ((block0 & 1L) << 8) | (block1 >>> 56);
values[valuesOffset++] = (block1 >>> 47) & 511L;
values[valuesOffset++] = (block1 >>> 38) & 511L;
values[valuesOffset++] = (block1 >>> 29) & 511L;
values[valuesOffset++] = (block1 >>> 20) & 511L;
values[valuesOffset++] = (block1 >>> 11) & 511L;
values[valuesOffset++] = (block1 >>> 2) & 511L;
final long block2 = blocks[blocksOffset++];
values[valuesOffset++] = ((block1 & 3L) << 7) | (block2 >>> 57);
values[valuesOffset++] = (block2 >>> 48) & 511L;
values[valuesOffset++] = (block2 >>> 39) & 511L;
values[valuesOffset++] = (block2 >>> 30) & 511L;
values[valuesOffset++] = (block2 >>> 21) & 511L;
values[valuesOffset++] = (block2 >>> 12) & 511L;
values[valuesOffset++] = (block2 >>> 3) & 511L;
final long block3 = blocks[blocksOffset++];
values[valuesOffset++] = ((block2 & 7L) << 6) | (block3 >>> 58);
values[valuesOffset++] = (block3 >>> 49) & 511L;
values[valuesOffset++] = (block3 >>> 40) & 511L;
values[valuesOffset++] = (block3 >>> 31) & 511L;
values[valuesOffset++] = (block3 >>> 22) & 511L;
values[valuesOffset++] = (block3 >>> 13) & 511L;
values[valuesOffset++] = (block3 >>> 4) & 511L;
final long block4 = blocks[blocksOffset++];
values[valuesOffset++] = ((block3 & 15L) << 5) | (block4 >>> 59);
values[valuesOffset++] = (block4 >>> 50) & 511L;
values[valuesOffset++] = (block4 >>> 41) & 511L;
values[valuesOffset++] = (block4 >>> 32) & 511L;
values[valuesOffset++] = (block4 >>> 23) & 511L;
values[valuesOffset++] = (block4 >>> 14) & 511L;
values[valuesOffset++] = (block4 >>> 5) & 511L;
final long block5 = blocks[blocksOffset++];
values[valuesOffset++] = ((block4 & 31L) << 4) | (block5 >>> 60);
values[valuesOffset++] = (block5 >>> 51) & 511L;
values[valuesOffset++] = (block5 >>> 42) & 511L;
values[valuesOffset++] = (block5 >>> 33) & 511L;
values[valuesOffset++] = (block5 >>> 24) & 511L;
values[valuesOffset++] = (block5 >>> 15) & 511L;
values[valuesOffset++] = (block5 >>> 6) & 511L;
final long block6 = blocks[blocksOffset++];
values[valuesOffset++] = ((block5 & 63L) << 3) | (block6 >>> 61);
values[valuesOffset++] = (block6 >>> 52) & 511L;
values[valuesOffset++] = (block6 >>> 43) & 511L;
values[valuesOffset++] = (block6 >>> 34) & 511L;
values[valuesOffset++] = (block6 >>> 25) & 511L;
values[valuesOffset++] = (block6 >>> 16) & 511L;
values[valuesOffset++] = (block6 >>> 7) & 511L;
final long block7 = blocks[blocksOffset++];
values[valuesOffset++] = ((block6 & 127L) << 2) | (block7 >>> 62);
values[valuesOffset++] = (block7 >>> 53) & 511L;
values[valuesOffset++] = (block7 >>> 44) & 511L;
values[valuesOffset++] = (block7 >>> 35) & 511L;
values[valuesOffset++] = (block7 >>> 26) & 511L;
values[valuesOffset++] = (block7 >>> 17) & 511L;
values[valuesOffset++] = (block7 >>> 8) & 511L;
final long block8 = blocks[blocksOffset++];
values[valuesOffset++] = ((block7 & 255L) << 1) | (block8 >>> 63);
values[valuesOffset++] = (block8 >>> 54) & 511L;
values[valuesOffset++] = (block8 >>> 45) & 511L;
values[valuesOffset++] = (block8 >>> 36) & 511L;
values[valuesOffset++] = (block8 >>> 27) & 511L;
values[valuesOffset++] = (block8 >>> 18) & 511L;
values[valuesOffset++] = (block8 >>> 9) & 511L;
values[valuesOffset++] = block8 & 511L;
}
}
@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 << 1) | (byte1 >>> 7);
final long byte2 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte1 & 127) << 2) | (byte2 >>> 6);
final long byte3 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte2 & 63) << 3) | (byte3 >>> 5);
final long byte4 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte3 & 31) << 4) | (byte4 >>> 4);
final long byte5 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte4 & 15) << 5) | (byte5 >>> 3);
final long byte6 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte5 & 7) << 6) | (byte6 >>> 2);
final long byte7 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte6 & 3) << 7) | (byte7 >>> 1);
final long byte8 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte7 & 1) << 8) | byte8;
final long byte9 = blocks[blocksOffset++] & 0xFF;
final long byte10 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte9 << 1) | (byte10 >>> 7);
final long byte11 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte10 & 127) << 2) | (byte11 >>> 6);
final long byte12 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte11 & 63) << 3) | (byte12 >>> 5);
final long byte13 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte12 & 31) << 4) | (byte13 >>> 4);
final long byte14 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte13 & 15) << 5) | (byte14 >>> 3);
final long byte15 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte14 & 7) << 6) | (byte15 >>> 2);
final long byte16 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte15 & 3) << 7) | (byte16 >>> 1);
final long byte17 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte16 & 1) << 8) | byte17;
final long byte18 = blocks[blocksOffset++] & 0xFF;
final long byte19 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte18 << 1) | (byte19 >>> 7);
final long byte20 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte19 & 127) << 2) | (byte20 >>> 6);
final long byte21 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte20 & 63) << 3) | (byte21 >>> 5);
final long byte22 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte21 & 31) << 4) | (byte22 >>> 4);
final long byte23 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte22 & 15) << 5) | (byte23 >>> 3);
final long byte24 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte23 & 7) << 6) | (byte24 >>> 2);
final long byte25 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte24 & 3) << 7) | (byte25 >>> 1);
final long byte26 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte25 & 1) << 8) | byte26;
final long byte27 = blocks[blocksOffset++] & 0xFF;
final long byte28 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte27 << 1) | (byte28 >>> 7);
final long byte29 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte28 & 127) << 2) | (byte29 >>> 6);
final long byte30 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte29 & 63) << 3) | (byte30 >>> 5);
final long byte31 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte30 & 31) << 4) | (byte31 >>> 4);
final long byte32 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte31 & 15) << 5) | (byte32 >>> 3);
final long byte33 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte32 & 7) << 6) | (byte33 >>> 2);
final long byte34 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte33 & 3) << 7) | (byte34 >>> 1);
final long byte35 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte34 & 1) << 8) | byte35;
final long byte36 = blocks[blocksOffset++] & 0xFF;
final long byte37 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte36 << 1) | (byte37 >>> 7);
final long byte38 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte37 & 127) << 2) | (byte38 >>> 6);
final long byte39 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte38 & 63) << 3) | (byte39 >>> 5);
final long byte40 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte39 & 31) << 4) | (byte40 >>> 4);
final long byte41 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte40 & 15) << 5) | (byte41 >>> 3);
final long byte42 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte41 & 7) << 6) | (byte42 >>> 2);
final long byte43 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte42 & 3) << 7) | (byte43 >>> 1);
final long byte44 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte43 & 1) << 8) | byte44;
final long byte45 = blocks[blocksOffset++] & 0xFF;
final long byte46 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte45 << 1) | (byte46 >>> 7);
final long byte47 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte46 & 127) << 2) | (byte47 >>> 6);
final long byte48 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte47 & 63) << 3) | (byte48 >>> 5);
final long byte49 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte48 & 31) << 4) | (byte49 >>> 4);
final long byte50 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte49 & 15) << 5) | (byte50 >>> 3);
final long byte51 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte50 & 7) << 6) | (byte51 >>> 2);
final long byte52 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte51 & 3) << 7) | (byte52 >>> 1);
final long byte53 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte52 & 1) << 8) | byte53;
final long byte54 = blocks[blocksOffset++] & 0xFF;
final long byte55 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte54 << 1) | (byte55 >>> 7);
final long byte56 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte55 & 127) << 2) | (byte56 >>> 6);
final long byte57 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte56 & 63) << 3) | (byte57 >>> 5);
final long byte58 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte57 & 31) << 4) | (byte58 >>> 4);
final long byte59 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte58 & 15) << 5) | (byte59 >>> 3);
final long byte60 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte59 & 7) << 6) | (byte60 >>> 2);
final long byte61 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte60 & 3) << 7) | (byte61 >>> 1);
final long byte62 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte61 & 1) << 8) | byte62;
final long byte63 = blocks[blocksOffset++] & 0xFF;
final long byte64 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = (byte63 << 1) | (byte64 >>> 7);
final long byte65 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte64 & 127) << 2) | (byte65 >>> 6);
final long byte66 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte65 & 63) << 3) | (byte66 >>> 5);
final long byte67 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte66 & 31) << 4) | (byte67 >>> 4);
final long byte68 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte67 & 15) << 5) | (byte68 >>> 3);
final long byte69 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte68 & 7) << 6) | (byte69 >>> 2);
final long byte70 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte69 & 3) << 7) | (byte70 >>> 1);
final long byte71 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte70 & 1) << 8) | byte71;
}
@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 << 1) | (byte1 >>> 7);
final long byte2 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte1 & 127) << 2) | (byte2 >>> 6);
final long byte3 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte2 & 63) << 3) | (byte3 >>> 5);
final long byte4 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte3 & 31) << 4) | (byte4 >>> 4);
final long byte5 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte4 & 15) << 5) | (byte5 >>> 3);
final long byte6 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte5 & 7) << 6) | (byte6 >>> 2);
final long byte7 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte6 & 3) << 7) | (byte7 >>> 1);
final long byte8 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = ((byte7 & 1) << 8) | byte8;
}
}
}

View File

@ -20,7 +20,7 @@ package org.apache.lucene.util.packed;
/**
* Non-specialized {@link BulkOperation} for {@link PackedInts.Format#PACKED_SINGLE_BLOCK}.
*/
class BulkOperationPackedSingleBlock extends BulkOperation {
final class BulkOperationPackedSingleBlock extends BulkOperation {
private static final int BLOCK_COUNT = 1;

View File

@ -1,337 +0,0 @@
// 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 BulkOperationPackedSingleBlock1 extends BulkOperationPackedSingleBlock {
public BulkOperationPackedSingleBlock1() {
super(1);
}
@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 block = blocks[blocksOffset++];
values[valuesOffset++] = (int) (block & 1L);
values[valuesOffset++] = (int) ((block >>> 1) & 1L);
values[valuesOffset++] = (int) ((block >>> 2) & 1L);
values[valuesOffset++] = (int) ((block >>> 3) & 1L);
values[valuesOffset++] = (int) ((block >>> 4) & 1L);
values[valuesOffset++] = (int) ((block >>> 5) & 1L);
values[valuesOffset++] = (int) ((block >>> 6) & 1L);
values[valuesOffset++] = (int) ((block >>> 7) & 1L);
values[valuesOffset++] = (int) ((block >>> 8) & 1L);
values[valuesOffset++] = (int) ((block >>> 9) & 1L);
values[valuesOffset++] = (int) ((block >>> 10) & 1L);
values[valuesOffset++] = (int) ((block >>> 11) & 1L);
values[valuesOffset++] = (int) ((block >>> 12) & 1L);
values[valuesOffset++] = (int) ((block >>> 13) & 1L);
values[valuesOffset++] = (int) ((block >>> 14) & 1L);
values[valuesOffset++] = (int) ((block >>> 15) & 1L);
values[valuesOffset++] = (int) ((block >>> 16) & 1L);
values[valuesOffset++] = (int) ((block >>> 17) & 1L);
values[valuesOffset++] = (int) ((block >>> 18) & 1L);
values[valuesOffset++] = (int) ((block >>> 19) & 1L);
values[valuesOffset++] = (int) ((block >>> 20) & 1L);
values[valuesOffset++] = (int) ((block >>> 21) & 1L);
values[valuesOffset++] = (int) ((block >>> 22) & 1L);
values[valuesOffset++] = (int) ((block >>> 23) & 1L);
values[valuesOffset++] = (int) ((block >>> 24) & 1L);
values[valuesOffset++] = (int) ((block >>> 25) & 1L);
values[valuesOffset++] = (int) ((block >>> 26) & 1L);
values[valuesOffset++] = (int) ((block >>> 27) & 1L);
values[valuesOffset++] = (int) ((block >>> 28) & 1L);
values[valuesOffset++] = (int) ((block >>> 29) & 1L);
values[valuesOffset++] = (int) ((block >>> 30) & 1L);
values[valuesOffset++] = (int) ((block >>> 31) & 1L);
values[valuesOffset++] = (int) ((block >>> 32) & 1L);
values[valuesOffset++] = (int) ((block >>> 33) & 1L);
values[valuesOffset++] = (int) ((block >>> 34) & 1L);
values[valuesOffset++] = (int) ((block >>> 35) & 1L);
values[valuesOffset++] = (int) ((block >>> 36) & 1L);
values[valuesOffset++] = (int) ((block >>> 37) & 1L);
values[valuesOffset++] = (int) ((block >>> 38) & 1L);
values[valuesOffset++] = (int) ((block >>> 39) & 1L);
values[valuesOffset++] = (int) ((block >>> 40) & 1L);
values[valuesOffset++] = (int) ((block >>> 41) & 1L);
values[valuesOffset++] = (int) ((block >>> 42) & 1L);
values[valuesOffset++] = (int) ((block >>> 43) & 1L);
values[valuesOffset++] = (int) ((block >>> 44) & 1L);
values[valuesOffset++] = (int) ((block >>> 45) & 1L);
values[valuesOffset++] = (int) ((block >>> 46) & 1L);
values[valuesOffset++] = (int) ((block >>> 47) & 1L);
values[valuesOffset++] = (int) ((block >>> 48) & 1L);
values[valuesOffset++] = (int) ((block >>> 49) & 1L);
values[valuesOffset++] = (int) ((block >>> 50) & 1L);
values[valuesOffset++] = (int) ((block >>> 51) & 1L);
values[valuesOffset++] = (int) ((block >>> 52) & 1L);
values[valuesOffset++] = (int) ((block >>> 53) & 1L);
values[valuesOffset++] = (int) ((block >>> 54) & 1L);
values[valuesOffset++] = (int) ((block >>> 55) & 1L);
values[valuesOffset++] = (int) ((block >>> 56) & 1L);
values[valuesOffset++] = (int) ((block >>> 57) & 1L);
values[valuesOffset++] = (int) ((block >>> 58) & 1L);
values[valuesOffset++] = (int) ((block >>> 59) & 1L);
values[valuesOffset++] = (int) ((block >>> 60) & 1L);
values[valuesOffset++] = (int) ((block >>> 61) & 1L);
values[valuesOffset++] = (int) ((block >>> 62) & 1L);
values[valuesOffset++] = (int) (block >>> 63);
}
}
@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 byte7 = blocks[blocksOffset++] & 0xFF;
final int byte6 = blocks[blocksOffset++] & 0xFF;
final int byte5 = blocks[blocksOffset++] & 0xFF;
final int byte4 = blocks[blocksOffset++] & 0xFF;
final int byte3 = blocks[blocksOffset++] & 0xFF;
final int byte2 = blocks[blocksOffset++] & 0xFF;
final int byte1 = blocks[blocksOffset++] & 0xFF;
final int byte0 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte0 & 1;
values[valuesOffset++] = (byte0 >>> 1) & 1;
values[valuesOffset++] = (byte0 >>> 2) & 1;
values[valuesOffset++] = (byte0 >>> 3) & 1;
values[valuesOffset++] = (byte0 >>> 4) & 1;
values[valuesOffset++] = (byte0 >>> 5) & 1;
values[valuesOffset++] = (byte0 >>> 6) & 1;
values[valuesOffset++] = byte0 >>> 7;
values[valuesOffset++] = byte1 & 1;
values[valuesOffset++] = (byte1 >>> 1) & 1;
values[valuesOffset++] = (byte1 >>> 2) & 1;
values[valuesOffset++] = (byte1 >>> 3) & 1;
values[valuesOffset++] = (byte1 >>> 4) & 1;
values[valuesOffset++] = (byte1 >>> 5) & 1;
values[valuesOffset++] = (byte1 >>> 6) & 1;
values[valuesOffset++] = byte1 >>> 7;
values[valuesOffset++] = byte2 & 1;
values[valuesOffset++] = (byte2 >>> 1) & 1;
values[valuesOffset++] = (byte2 >>> 2) & 1;
values[valuesOffset++] = (byte2 >>> 3) & 1;
values[valuesOffset++] = (byte2 >>> 4) & 1;
values[valuesOffset++] = (byte2 >>> 5) & 1;
values[valuesOffset++] = (byte2 >>> 6) & 1;
values[valuesOffset++] = byte2 >>> 7;
values[valuesOffset++] = byte3 & 1;
values[valuesOffset++] = (byte3 >>> 1) & 1;
values[valuesOffset++] = (byte3 >>> 2) & 1;
values[valuesOffset++] = (byte3 >>> 3) & 1;
values[valuesOffset++] = (byte3 >>> 4) & 1;
values[valuesOffset++] = (byte3 >>> 5) & 1;
values[valuesOffset++] = (byte3 >>> 6) & 1;
values[valuesOffset++] = byte3 >>> 7;
values[valuesOffset++] = byte4 & 1;
values[valuesOffset++] = (byte4 >>> 1) & 1;
values[valuesOffset++] = (byte4 >>> 2) & 1;
values[valuesOffset++] = (byte4 >>> 3) & 1;
values[valuesOffset++] = (byte4 >>> 4) & 1;
values[valuesOffset++] = (byte4 >>> 5) & 1;
values[valuesOffset++] = (byte4 >>> 6) & 1;
values[valuesOffset++] = byte4 >>> 7;
values[valuesOffset++] = byte5 & 1;
values[valuesOffset++] = (byte5 >>> 1) & 1;
values[valuesOffset++] = (byte5 >>> 2) & 1;
values[valuesOffset++] = (byte5 >>> 3) & 1;
values[valuesOffset++] = (byte5 >>> 4) & 1;
values[valuesOffset++] = (byte5 >>> 5) & 1;
values[valuesOffset++] = (byte5 >>> 6) & 1;
values[valuesOffset++] = byte5 >>> 7;
values[valuesOffset++] = byte6 & 1;
values[valuesOffset++] = (byte6 >>> 1) & 1;
values[valuesOffset++] = (byte6 >>> 2) & 1;
values[valuesOffset++] = (byte6 >>> 3) & 1;
values[valuesOffset++] = (byte6 >>> 4) & 1;
values[valuesOffset++] = (byte6 >>> 5) & 1;
values[valuesOffset++] = (byte6 >>> 6) & 1;
values[valuesOffset++] = byte6 >>> 7;
values[valuesOffset++] = byte7 & 1;
values[valuesOffset++] = (byte7 >>> 1) & 1;
values[valuesOffset++] = (byte7 >>> 2) & 1;
values[valuesOffset++] = (byte7 >>> 3) & 1;
values[valuesOffset++] = (byte7 >>> 4) & 1;
values[valuesOffset++] = (byte7 >>> 5) & 1;
values[valuesOffset++] = (byte7 >>> 6) & 1;
values[valuesOffset++] = byte7 >>> 7;
}
}
@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 block = blocks[blocksOffset++];
values[valuesOffset++] = block & 1L;
values[valuesOffset++] = (block >>> 1) & 1L;
values[valuesOffset++] = (block >>> 2) & 1L;
values[valuesOffset++] = (block >>> 3) & 1L;
values[valuesOffset++] = (block >>> 4) & 1L;
values[valuesOffset++] = (block >>> 5) & 1L;
values[valuesOffset++] = (block >>> 6) & 1L;
values[valuesOffset++] = (block >>> 7) & 1L;
values[valuesOffset++] = (block >>> 8) & 1L;
values[valuesOffset++] = (block >>> 9) & 1L;
values[valuesOffset++] = (block >>> 10) & 1L;
values[valuesOffset++] = (block >>> 11) & 1L;
values[valuesOffset++] = (block >>> 12) & 1L;
values[valuesOffset++] = (block >>> 13) & 1L;
values[valuesOffset++] = (block >>> 14) & 1L;
values[valuesOffset++] = (block >>> 15) & 1L;
values[valuesOffset++] = (block >>> 16) & 1L;
values[valuesOffset++] = (block >>> 17) & 1L;
values[valuesOffset++] = (block >>> 18) & 1L;
values[valuesOffset++] = (block >>> 19) & 1L;
values[valuesOffset++] = (block >>> 20) & 1L;
values[valuesOffset++] = (block >>> 21) & 1L;
values[valuesOffset++] = (block >>> 22) & 1L;
values[valuesOffset++] = (block >>> 23) & 1L;
values[valuesOffset++] = (block >>> 24) & 1L;
values[valuesOffset++] = (block >>> 25) & 1L;
values[valuesOffset++] = (block >>> 26) & 1L;
values[valuesOffset++] = (block >>> 27) & 1L;
values[valuesOffset++] = (block >>> 28) & 1L;
values[valuesOffset++] = (block >>> 29) & 1L;
values[valuesOffset++] = (block >>> 30) & 1L;
values[valuesOffset++] = (block >>> 31) & 1L;
values[valuesOffset++] = (block >>> 32) & 1L;
values[valuesOffset++] = (block >>> 33) & 1L;
values[valuesOffset++] = (block >>> 34) & 1L;
values[valuesOffset++] = (block >>> 35) & 1L;
values[valuesOffset++] = (block >>> 36) & 1L;
values[valuesOffset++] = (block >>> 37) & 1L;
values[valuesOffset++] = (block >>> 38) & 1L;
values[valuesOffset++] = (block >>> 39) & 1L;
values[valuesOffset++] = (block >>> 40) & 1L;
values[valuesOffset++] = (block >>> 41) & 1L;
values[valuesOffset++] = (block >>> 42) & 1L;
values[valuesOffset++] = (block >>> 43) & 1L;
values[valuesOffset++] = (block >>> 44) & 1L;
values[valuesOffset++] = (block >>> 45) & 1L;
values[valuesOffset++] = (block >>> 46) & 1L;
values[valuesOffset++] = (block >>> 47) & 1L;
values[valuesOffset++] = (block >>> 48) & 1L;
values[valuesOffset++] = (block >>> 49) & 1L;
values[valuesOffset++] = (block >>> 50) & 1L;
values[valuesOffset++] = (block >>> 51) & 1L;
values[valuesOffset++] = (block >>> 52) & 1L;
values[valuesOffset++] = (block >>> 53) & 1L;
values[valuesOffset++] = (block >>> 54) & 1L;
values[valuesOffset++] = (block >>> 55) & 1L;
values[valuesOffset++] = (block >>> 56) & 1L;
values[valuesOffset++] = (block >>> 57) & 1L;
values[valuesOffset++] = (block >>> 58) & 1L;
values[valuesOffset++] = (block >>> 59) & 1L;
values[valuesOffset++] = (block >>> 60) & 1L;
values[valuesOffset++] = (block >>> 61) & 1L;
values[valuesOffset++] = (block >>> 62) & 1L;
values[valuesOffset++] = block >>> 63;
}
}
@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 int byte7 = blocks[blocksOffset++] & 0xFF;
final int byte6 = blocks[blocksOffset++] & 0xFF;
final int byte5 = blocks[blocksOffset++] & 0xFF;
final int byte4 = blocks[blocksOffset++] & 0xFF;
final int byte3 = blocks[blocksOffset++] & 0xFF;
final int byte2 = blocks[blocksOffset++] & 0xFF;
final int byte1 = blocks[blocksOffset++] & 0xFF;
final int byte0 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte0 & 1;
values[valuesOffset++] = (byte0 >>> 1) & 1;
values[valuesOffset++] = (byte0 >>> 2) & 1;
values[valuesOffset++] = (byte0 >>> 3) & 1;
values[valuesOffset++] = (byte0 >>> 4) & 1;
values[valuesOffset++] = (byte0 >>> 5) & 1;
values[valuesOffset++] = (byte0 >>> 6) & 1;
values[valuesOffset++] = byte0 >>> 7;
values[valuesOffset++] = byte1 & 1;
values[valuesOffset++] = (byte1 >>> 1) & 1;
values[valuesOffset++] = (byte1 >>> 2) & 1;
values[valuesOffset++] = (byte1 >>> 3) & 1;
values[valuesOffset++] = (byte1 >>> 4) & 1;
values[valuesOffset++] = (byte1 >>> 5) & 1;
values[valuesOffset++] = (byte1 >>> 6) & 1;
values[valuesOffset++] = byte1 >>> 7;
values[valuesOffset++] = byte2 & 1;
values[valuesOffset++] = (byte2 >>> 1) & 1;
values[valuesOffset++] = (byte2 >>> 2) & 1;
values[valuesOffset++] = (byte2 >>> 3) & 1;
values[valuesOffset++] = (byte2 >>> 4) & 1;
values[valuesOffset++] = (byte2 >>> 5) & 1;
values[valuesOffset++] = (byte2 >>> 6) & 1;
values[valuesOffset++] = byte2 >>> 7;
values[valuesOffset++] = byte3 & 1;
values[valuesOffset++] = (byte3 >>> 1) & 1;
values[valuesOffset++] = (byte3 >>> 2) & 1;
values[valuesOffset++] = (byte3 >>> 3) & 1;
values[valuesOffset++] = (byte3 >>> 4) & 1;
values[valuesOffset++] = (byte3 >>> 5) & 1;
values[valuesOffset++] = (byte3 >>> 6) & 1;
values[valuesOffset++] = byte3 >>> 7;
values[valuesOffset++] = byte4 & 1;
values[valuesOffset++] = (byte4 >>> 1) & 1;
values[valuesOffset++] = (byte4 >>> 2) & 1;
values[valuesOffset++] = (byte4 >>> 3) & 1;
values[valuesOffset++] = (byte4 >>> 4) & 1;
values[valuesOffset++] = (byte4 >>> 5) & 1;
values[valuesOffset++] = (byte4 >>> 6) & 1;
values[valuesOffset++] = byte4 >>> 7;
values[valuesOffset++] = byte5 & 1;
values[valuesOffset++] = (byte5 >>> 1) & 1;
values[valuesOffset++] = (byte5 >>> 2) & 1;
values[valuesOffset++] = (byte5 >>> 3) & 1;
values[valuesOffset++] = (byte5 >>> 4) & 1;
values[valuesOffset++] = (byte5 >>> 5) & 1;
values[valuesOffset++] = (byte5 >>> 6) & 1;
values[valuesOffset++] = byte5 >>> 7;
values[valuesOffset++] = byte6 & 1;
values[valuesOffset++] = (byte6 >>> 1) & 1;
values[valuesOffset++] = (byte6 >>> 2) & 1;
values[valuesOffset++] = (byte6 >>> 3) & 1;
values[valuesOffset++] = (byte6 >>> 4) & 1;
values[valuesOffset++] = (byte6 >>> 5) & 1;
values[valuesOffset++] = (byte6 >>> 6) & 1;
values[valuesOffset++] = byte6 >>> 7;
values[valuesOffset++] = byte7 & 1;
values[valuesOffset++] = (byte7 >>> 1) & 1;
values[valuesOffset++] = (byte7 >>> 2) & 1;
values[valuesOffset++] = (byte7 >>> 3) & 1;
values[valuesOffset++] = (byte7 >>> 4) & 1;
values[valuesOffset++] = (byte7 >>> 5) & 1;
values[valuesOffset++] = (byte7 >>> 6) & 1;
values[valuesOffset++] = byte7 >>> 7;
}
}
}

View File

@ -1,105 +0,0 @@
// 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 BulkOperationPackedSingleBlock10 extends BulkOperationPackedSingleBlock {
public BulkOperationPackedSingleBlock10() {
super(10);
}
@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 block = blocks[blocksOffset++];
values[valuesOffset++] = (int) (block & 1023L);
values[valuesOffset++] = (int) ((block >>> 10) & 1023L);
values[valuesOffset++] = (int) ((block >>> 20) & 1023L);
values[valuesOffset++] = (int) ((block >>> 30) & 1023L);
values[valuesOffset++] = (int) ((block >>> 40) & 1023L);
values[valuesOffset++] = (int) (block >>> 50);
}
}
@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 byte7 = blocks[blocksOffset++] & 0xFF;
final int byte6 = blocks[blocksOffset++] & 0xFF;
final int byte5 = blocks[blocksOffset++] & 0xFF;
final int byte4 = blocks[blocksOffset++] & 0xFF;
final int byte3 = blocks[blocksOffset++] & 0xFF;
final int byte2 = blocks[blocksOffset++] & 0xFF;
final int byte1 = blocks[blocksOffset++] & 0xFF;
final int byte0 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte0 | ((byte1 & 3) << 8);
values[valuesOffset++] = (byte1 >>> 2) | ((byte2 & 15) << 6);
values[valuesOffset++] = (byte2 >>> 4) | ((byte3 & 63) << 4);
values[valuesOffset++] = (byte3 >>> 6) | (byte4 << 2);
values[valuesOffset++] = byte5 | ((byte6 & 3) << 8);
values[valuesOffset++] = (byte6 >>> 2) | ((byte7 & 15) << 6);
}
}
@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 block = blocks[blocksOffset++];
values[valuesOffset++] = block & 1023L;
values[valuesOffset++] = (block >>> 10) & 1023L;
values[valuesOffset++] = (block >>> 20) & 1023L;
values[valuesOffset++] = (block >>> 30) & 1023L;
values[valuesOffset++] = (block >>> 40) & 1023L;
values[valuesOffset++] = block >>> 50;
}
}
@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 int byte7 = blocks[blocksOffset++] & 0xFF;
final int byte6 = blocks[blocksOffset++] & 0xFF;
final int byte5 = blocks[blocksOffset++] & 0xFF;
final int byte4 = blocks[blocksOffset++] & 0xFF;
final int byte3 = blocks[blocksOffset++] & 0xFF;
final int byte2 = blocks[blocksOffset++] & 0xFF;
final int byte1 = blocks[blocksOffset++] & 0xFF;
final int byte0 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte0 | ((byte1 & 3) << 8);
values[valuesOffset++] = (byte1 >>> 2) | ((byte2 & 15) << 6);
values[valuesOffset++] = (byte2 >>> 4) | ((byte3 & 63) << 4);
values[valuesOffset++] = (byte3 >>> 6) | (byte4 << 2);
values[valuesOffset++] = byte5 | ((byte6 & 3) << 8);
values[valuesOffset++] = (byte6 >>> 2) | ((byte7 & 15) << 6);
}
}
}

View File

@ -1,101 +0,0 @@
// 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 BulkOperationPackedSingleBlock12 extends BulkOperationPackedSingleBlock {
public BulkOperationPackedSingleBlock12() {
super(12);
}
@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 block = blocks[blocksOffset++];
values[valuesOffset++] = (int) (block & 4095L);
values[valuesOffset++] = (int) ((block >>> 12) & 4095L);
values[valuesOffset++] = (int) ((block >>> 24) & 4095L);
values[valuesOffset++] = (int) ((block >>> 36) & 4095L);
values[valuesOffset++] = (int) (block >>> 48);
}
}
@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 byte7 = blocks[blocksOffset++] & 0xFF;
final int byte6 = blocks[blocksOffset++] & 0xFF;
final int byte5 = blocks[blocksOffset++] & 0xFF;
final int byte4 = blocks[blocksOffset++] & 0xFF;
final int byte3 = blocks[blocksOffset++] & 0xFF;
final int byte2 = blocks[blocksOffset++] & 0xFF;
final int byte1 = blocks[blocksOffset++] & 0xFF;
final int byte0 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte0 | ((byte1 & 15) << 8);
values[valuesOffset++] = (byte1 >>> 4) | (byte2 << 4);
values[valuesOffset++] = byte3 | ((byte4 & 15) << 8);
values[valuesOffset++] = (byte4 >>> 4) | (byte5 << 4);
values[valuesOffset++] = byte6 | ((byte7 & 15) << 8);
}
}
@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 block = blocks[blocksOffset++];
values[valuesOffset++] = block & 4095L;
values[valuesOffset++] = (block >>> 12) & 4095L;
values[valuesOffset++] = (block >>> 24) & 4095L;
values[valuesOffset++] = (block >>> 36) & 4095L;
values[valuesOffset++] = block >>> 48;
}
}
@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 int byte7 = blocks[blocksOffset++] & 0xFF;
final int byte6 = blocks[blocksOffset++] & 0xFF;
final int byte5 = blocks[blocksOffset++] & 0xFF;
final int byte4 = blocks[blocksOffset++] & 0xFF;
final int byte3 = blocks[blocksOffset++] & 0xFF;
final int byte2 = blocks[blocksOffset++] & 0xFF;
final int byte1 = blocks[blocksOffset++] & 0xFF;
final int byte0 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte0 | ((byte1 & 15) << 8);
values[valuesOffset++] = (byte1 >>> 4) | (byte2 << 4);
values[valuesOffset++] = byte3 | ((byte4 & 15) << 8);
values[valuesOffset++] = (byte4 >>> 4) | (byte5 << 4);
values[valuesOffset++] = byte6 | ((byte7 & 15) << 8);
}
}
}

View File

@ -1,97 +0,0 @@
// 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 BulkOperationPackedSingleBlock16 extends BulkOperationPackedSingleBlock {
public BulkOperationPackedSingleBlock16() {
super(16);
}
@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 block = blocks[blocksOffset++];
values[valuesOffset++] = (int) (block & 65535L);
values[valuesOffset++] = (int) ((block >>> 16) & 65535L);
values[valuesOffset++] = (int) ((block >>> 32) & 65535L);
values[valuesOffset++] = (int) (block >>> 48);
}
}
@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 byte7 = blocks[blocksOffset++] & 0xFF;
final int byte6 = blocks[blocksOffset++] & 0xFF;
final int byte5 = blocks[blocksOffset++] & 0xFF;
final int byte4 = blocks[blocksOffset++] & 0xFF;
final int byte3 = blocks[blocksOffset++] & 0xFF;
final int byte2 = blocks[blocksOffset++] & 0xFF;
final int byte1 = blocks[blocksOffset++] & 0xFF;
final int byte0 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte0 | (byte1 << 8);
values[valuesOffset++] = byte2 | (byte3 << 8);
values[valuesOffset++] = byte4 | (byte5 << 8);
values[valuesOffset++] = byte6 | (byte7 << 8);
}
}
@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 block = blocks[blocksOffset++];
values[valuesOffset++] = block & 65535L;
values[valuesOffset++] = (block >>> 16) & 65535L;
values[valuesOffset++] = (block >>> 32) & 65535L;
values[valuesOffset++] = block >>> 48;
}
}
@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 int byte7 = blocks[blocksOffset++] & 0xFF;
final int byte6 = blocks[blocksOffset++] & 0xFF;
final int byte5 = blocks[blocksOffset++] & 0xFF;
final int byte4 = blocks[blocksOffset++] & 0xFF;
final int byte3 = blocks[blocksOffset++] & 0xFF;
final int byte2 = blocks[blocksOffset++] & 0xFF;
final int byte1 = blocks[blocksOffset++] & 0xFF;
final int byte0 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte0 | (byte1 << 8);
values[valuesOffset++] = byte2 | (byte3 << 8);
values[valuesOffset++] = byte4 | (byte5 << 8);
values[valuesOffset++] = byte6 | (byte7 << 8);
}
}
}

View File

@ -1,209 +0,0 @@
// 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 BulkOperationPackedSingleBlock2 extends BulkOperationPackedSingleBlock {
public BulkOperationPackedSingleBlock2() {
super(2);
}
@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 block = blocks[blocksOffset++];
values[valuesOffset++] = (int) (block & 3L);
values[valuesOffset++] = (int) ((block >>> 2) & 3L);
values[valuesOffset++] = (int) ((block >>> 4) & 3L);
values[valuesOffset++] = (int) ((block >>> 6) & 3L);
values[valuesOffset++] = (int) ((block >>> 8) & 3L);
values[valuesOffset++] = (int) ((block >>> 10) & 3L);
values[valuesOffset++] = (int) ((block >>> 12) & 3L);
values[valuesOffset++] = (int) ((block >>> 14) & 3L);
values[valuesOffset++] = (int) ((block >>> 16) & 3L);
values[valuesOffset++] = (int) ((block >>> 18) & 3L);
values[valuesOffset++] = (int) ((block >>> 20) & 3L);
values[valuesOffset++] = (int) ((block >>> 22) & 3L);
values[valuesOffset++] = (int) ((block >>> 24) & 3L);
values[valuesOffset++] = (int) ((block >>> 26) & 3L);
values[valuesOffset++] = (int) ((block >>> 28) & 3L);
values[valuesOffset++] = (int) ((block >>> 30) & 3L);
values[valuesOffset++] = (int) ((block >>> 32) & 3L);
values[valuesOffset++] = (int) ((block >>> 34) & 3L);
values[valuesOffset++] = (int) ((block >>> 36) & 3L);
values[valuesOffset++] = (int) ((block >>> 38) & 3L);
values[valuesOffset++] = (int) ((block >>> 40) & 3L);
values[valuesOffset++] = (int) ((block >>> 42) & 3L);
values[valuesOffset++] = (int) ((block >>> 44) & 3L);
values[valuesOffset++] = (int) ((block >>> 46) & 3L);
values[valuesOffset++] = (int) ((block >>> 48) & 3L);
values[valuesOffset++] = (int) ((block >>> 50) & 3L);
values[valuesOffset++] = (int) ((block >>> 52) & 3L);
values[valuesOffset++] = (int) ((block >>> 54) & 3L);
values[valuesOffset++] = (int) ((block >>> 56) & 3L);
values[valuesOffset++] = (int) ((block >>> 58) & 3L);
values[valuesOffset++] = (int) ((block >>> 60) & 3L);
values[valuesOffset++] = (int) (block >>> 62);
}
}
@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 byte7 = blocks[blocksOffset++] & 0xFF;
final int byte6 = blocks[blocksOffset++] & 0xFF;
final int byte5 = blocks[blocksOffset++] & 0xFF;
final int byte4 = blocks[blocksOffset++] & 0xFF;
final int byte3 = blocks[blocksOffset++] & 0xFF;
final int byte2 = blocks[blocksOffset++] & 0xFF;
final int byte1 = blocks[blocksOffset++] & 0xFF;
final int byte0 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte0 & 3;
values[valuesOffset++] = (byte0 >>> 2) & 3;
values[valuesOffset++] = (byte0 >>> 4) & 3;
values[valuesOffset++] = byte0 >>> 6;
values[valuesOffset++] = byte1 & 3;
values[valuesOffset++] = (byte1 >>> 2) & 3;
values[valuesOffset++] = (byte1 >>> 4) & 3;
values[valuesOffset++] = byte1 >>> 6;
values[valuesOffset++] = byte2 & 3;
values[valuesOffset++] = (byte2 >>> 2) & 3;
values[valuesOffset++] = (byte2 >>> 4) & 3;
values[valuesOffset++] = byte2 >>> 6;
values[valuesOffset++] = byte3 & 3;
values[valuesOffset++] = (byte3 >>> 2) & 3;
values[valuesOffset++] = (byte3 >>> 4) & 3;
values[valuesOffset++] = byte3 >>> 6;
values[valuesOffset++] = byte4 & 3;
values[valuesOffset++] = (byte4 >>> 2) & 3;
values[valuesOffset++] = (byte4 >>> 4) & 3;
values[valuesOffset++] = byte4 >>> 6;
values[valuesOffset++] = byte5 & 3;
values[valuesOffset++] = (byte5 >>> 2) & 3;
values[valuesOffset++] = (byte5 >>> 4) & 3;
values[valuesOffset++] = byte5 >>> 6;
values[valuesOffset++] = byte6 & 3;
values[valuesOffset++] = (byte6 >>> 2) & 3;
values[valuesOffset++] = (byte6 >>> 4) & 3;
values[valuesOffset++] = byte6 >>> 6;
values[valuesOffset++] = byte7 & 3;
values[valuesOffset++] = (byte7 >>> 2) & 3;
values[valuesOffset++] = (byte7 >>> 4) & 3;
values[valuesOffset++] = byte7 >>> 6;
}
}
@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 block = blocks[blocksOffset++];
values[valuesOffset++] = block & 3L;
values[valuesOffset++] = (block >>> 2) & 3L;
values[valuesOffset++] = (block >>> 4) & 3L;
values[valuesOffset++] = (block >>> 6) & 3L;
values[valuesOffset++] = (block >>> 8) & 3L;
values[valuesOffset++] = (block >>> 10) & 3L;
values[valuesOffset++] = (block >>> 12) & 3L;
values[valuesOffset++] = (block >>> 14) & 3L;
values[valuesOffset++] = (block >>> 16) & 3L;
values[valuesOffset++] = (block >>> 18) & 3L;
values[valuesOffset++] = (block >>> 20) & 3L;
values[valuesOffset++] = (block >>> 22) & 3L;
values[valuesOffset++] = (block >>> 24) & 3L;
values[valuesOffset++] = (block >>> 26) & 3L;
values[valuesOffset++] = (block >>> 28) & 3L;
values[valuesOffset++] = (block >>> 30) & 3L;
values[valuesOffset++] = (block >>> 32) & 3L;
values[valuesOffset++] = (block >>> 34) & 3L;
values[valuesOffset++] = (block >>> 36) & 3L;
values[valuesOffset++] = (block >>> 38) & 3L;
values[valuesOffset++] = (block >>> 40) & 3L;
values[valuesOffset++] = (block >>> 42) & 3L;
values[valuesOffset++] = (block >>> 44) & 3L;
values[valuesOffset++] = (block >>> 46) & 3L;
values[valuesOffset++] = (block >>> 48) & 3L;
values[valuesOffset++] = (block >>> 50) & 3L;
values[valuesOffset++] = (block >>> 52) & 3L;
values[valuesOffset++] = (block >>> 54) & 3L;
values[valuesOffset++] = (block >>> 56) & 3L;
values[valuesOffset++] = (block >>> 58) & 3L;
values[valuesOffset++] = (block >>> 60) & 3L;
values[valuesOffset++] = block >>> 62;
}
}
@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 int byte7 = blocks[blocksOffset++] & 0xFF;
final int byte6 = blocks[blocksOffset++] & 0xFF;
final int byte5 = blocks[blocksOffset++] & 0xFF;
final int byte4 = blocks[blocksOffset++] & 0xFF;
final int byte3 = blocks[blocksOffset++] & 0xFF;
final int byte2 = blocks[blocksOffset++] & 0xFF;
final int byte1 = blocks[blocksOffset++] & 0xFF;
final int byte0 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte0 & 3;
values[valuesOffset++] = (byte0 >>> 2) & 3;
values[valuesOffset++] = (byte0 >>> 4) & 3;
values[valuesOffset++] = byte0 >>> 6;
values[valuesOffset++] = byte1 & 3;
values[valuesOffset++] = (byte1 >>> 2) & 3;
values[valuesOffset++] = (byte1 >>> 4) & 3;
values[valuesOffset++] = byte1 >>> 6;
values[valuesOffset++] = byte2 & 3;
values[valuesOffset++] = (byte2 >>> 2) & 3;
values[valuesOffset++] = (byte2 >>> 4) & 3;
values[valuesOffset++] = byte2 >>> 6;
values[valuesOffset++] = byte3 & 3;
values[valuesOffset++] = (byte3 >>> 2) & 3;
values[valuesOffset++] = (byte3 >>> 4) & 3;
values[valuesOffset++] = byte3 >>> 6;
values[valuesOffset++] = byte4 & 3;
values[valuesOffset++] = (byte4 >>> 2) & 3;
values[valuesOffset++] = (byte4 >>> 4) & 3;
values[valuesOffset++] = byte4 >>> 6;
values[valuesOffset++] = byte5 & 3;
values[valuesOffset++] = (byte5 >>> 2) & 3;
values[valuesOffset++] = (byte5 >>> 4) & 3;
values[valuesOffset++] = byte5 >>> 6;
values[valuesOffset++] = byte6 & 3;
values[valuesOffset++] = (byte6 >>> 2) & 3;
values[valuesOffset++] = (byte6 >>> 4) & 3;
values[valuesOffset++] = byte6 >>> 6;
values[valuesOffset++] = byte7 & 3;
values[valuesOffset++] = (byte7 >>> 2) & 3;
values[valuesOffset++] = (byte7 >>> 4) & 3;
values[valuesOffset++] = byte7 >>> 6;
}
}
}

View File

@ -1,93 +0,0 @@
// 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 BulkOperationPackedSingleBlock21 extends BulkOperationPackedSingleBlock {
public BulkOperationPackedSingleBlock21() {
super(21);
}
@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 block = blocks[blocksOffset++];
values[valuesOffset++] = (int) (block & 2097151L);
values[valuesOffset++] = (int) ((block >>> 21) & 2097151L);
values[valuesOffset++] = (int) (block >>> 42);
}
}
@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 byte7 = blocks[blocksOffset++] & 0xFF;
final int byte6 = blocks[blocksOffset++] & 0xFF;
final int byte5 = blocks[blocksOffset++] & 0xFF;
final int byte4 = blocks[blocksOffset++] & 0xFF;
final int byte3 = blocks[blocksOffset++] & 0xFF;
final int byte2 = blocks[blocksOffset++] & 0xFF;
final int byte1 = blocks[blocksOffset++] & 0xFF;
final int byte0 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte0 | (byte1 << 8) | ((byte2 & 31) << 16);
values[valuesOffset++] = (byte2 >>> 5) | (byte3 << 3) | (byte4 << 11) | ((byte5 & 3) << 19);
values[valuesOffset++] = (byte5 >>> 2) | (byte6 << 6) | ((byte7 & 127) << 14);
}
}
@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 block = blocks[blocksOffset++];
values[valuesOffset++] = block & 2097151L;
values[valuesOffset++] = (block >>> 21) & 2097151L;
values[valuesOffset++] = block >>> 42;
}
}
@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 int byte7 = blocks[blocksOffset++] & 0xFF;
final int byte6 = blocks[blocksOffset++] & 0xFF;
final int byte5 = blocks[blocksOffset++] & 0xFF;
final int byte4 = blocks[blocksOffset++] & 0xFF;
final int byte3 = blocks[blocksOffset++] & 0xFF;
final int byte2 = blocks[blocksOffset++] & 0xFF;
final int byte1 = blocks[blocksOffset++] & 0xFF;
final int byte0 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte0 | (byte1 << 8) | ((byte2 & 31) << 16);
values[valuesOffset++] = (byte2 >>> 5) | (byte3 << 3) | (byte4 << 11) | ((byte5 & 3) << 19);
values[valuesOffset++] = (byte5 >>> 2) | (byte6 << 6) | ((byte7 & 127) << 14);
}
}
}

View File

@ -1,165 +0,0 @@
// 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 BulkOperationPackedSingleBlock3 extends BulkOperationPackedSingleBlock {
public BulkOperationPackedSingleBlock3() {
super(3);
}
@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 block = blocks[blocksOffset++];
values[valuesOffset++] = (int) (block & 7L);
values[valuesOffset++] = (int) ((block >>> 3) & 7L);
values[valuesOffset++] = (int) ((block >>> 6) & 7L);
values[valuesOffset++] = (int) ((block >>> 9) & 7L);
values[valuesOffset++] = (int) ((block >>> 12) & 7L);
values[valuesOffset++] = (int) ((block >>> 15) & 7L);
values[valuesOffset++] = (int) ((block >>> 18) & 7L);
values[valuesOffset++] = (int) ((block >>> 21) & 7L);
values[valuesOffset++] = (int) ((block >>> 24) & 7L);
values[valuesOffset++] = (int) ((block >>> 27) & 7L);
values[valuesOffset++] = (int) ((block >>> 30) & 7L);
values[valuesOffset++] = (int) ((block >>> 33) & 7L);
values[valuesOffset++] = (int) ((block >>> 36) & 7L);
values[valuesOffset++] = (int) ((block >>> 39) & 7L);
values[valuesOffset++] = (int) ((block >>> 42) & 7L);
values[valuesOffset++] = (int) ((block >>> 45) & 7L);
values[valuesOffset++] = (int) ((block >>> 48) & 7L);
values[valuesOffset++] = (int) ((block >>> 51) & 7L);
values[valuesOffset++] = (int) ((block >>> 54) & 7L);
values[valuesOffset++] = (int) ((block >>> 57) & 7L);
values[valuesOffset++] = (int) (block >>> 60);
}
}
@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 byte7 = blocks[blocksOffset++] & 0xFF;
final int byte6 = blocks[blocksOffset++] & 0xFF;
final int byte5 = blocks[blocksOffset++] & 0xFF;
final int byte4 = blocks[blocksOffset++] & 0xFF;
final int byte3 = blocks[blocksOffset++] & 0xFF;
final int byte2 = blocks[blocksOffset++] & 0xFF;
final int byte1 = blocks[blocksOffset++] & 0xFF;
final int byte0 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte0 & 7;
values[valuesOffset++] = (byte0 >>> 3) & 7;
values[valuesOffset++] = (byte0 >>> 6) | ((byte1 & 1) << 2);
values[valuesOffset++] = (byte1 >>> 1) & 7;
values[valuesOffset++] = (byte1 >>> 4) & 7;
values[valuesOffset++] = (byte1 >>> 7) | ((byte2 & 3) << 1);
values[valuesOffset++] = (byte2 >>> 2) & 7;
values[valuesOffset++] = byte2 >>> 5;
values[valuesOffset++] = byte3 & 7;
values[valuesOffset++] = (byte3 >>> 3) & 7;
values[valuesOffset++] = (byte3 >>> 6) | ((byte4 & 1) << 2);
values[valuesOffset++] = (byte4 >>> 1) & 7;
values[valuesOffset++] = (byte4 >>> 4) & 7;
values[valuesOffset++] = (byte4 >>> 7) | ((byte5 & 3) << 1);
values[valuesOffset++] = (byte5 >>> 2) & 7;
values[valuesOffset++] = byte5 >>> 5;
values[valuesOffset++] = byte6 & 7;
values[valuesOffset++] = (byte6 >>> 3) & 7;
values[valuesOffset++] = (byte6 >>> 6) | ((byte7 & 1) << 2);
values[valuesOffset++] = (byte7 >>> 1) & 7;
values[valuesOffset++] = (byte7 >>> 4) & 7;
}
}
@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 block = blocks[blocksOffset++];
values[valuesOffset++] = block & 7L;
values[valuesOffset++] = (block >>> 3) & 7L;
values[valuesOffset++] = (block >>> 6) & 7L;
values[valuesOffset++] = (block >>> 9) & 7L;
values[valuesOffset++] = (block >>> 12) & 7L;
values[valuesOffset++] = (block >>> 15) & 7L;
values[valuesOffset++] = (block >>> 18) & 7L;
values[valuesOffset++] = (block >>> 21) & 7L;
values[valuesOffset++] = (block >>> 24) & 7L;
values[valuesOffset++] = (block >>> 27) & 7L;
values[valuesOffset++] = (block >>> 30) & 7L;
values[valuesOffset++] = (block >>> 33) & 7L;
values[valuesOffset++] = (block >>> 36) & 7L;
values[valuesOffset++] = (block >>> 39) & 7L;
values[valuesOffset++] = (block >>> 42) & 7L;
values[valuesOffset++] = (block >>> 45) & 7L;
values[valuesOffset++] = (block >>> 48) & 7L;
values[valuesOffset++] = (block >>> 51) & 7L;
values[valuesOffset++] = (block >>> 54) & 7L;
values[valuesOffset++] = (block >>> 57) & 7L;
values[valuesOffset++] = block >>> 60;
}
}
@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 int byte7 = blocks[blocksOffset++] & 0xFF;
final int byte6 = blocks[blocksOffset++] & 0xFF;
final int byte5 = blocks[blocksOffset++] & 0xFF;
final int byte4 = blocks[blocksOffset++] & 0xFF;
final int byte3 = blocks[blocksOffset++] & 0xFF;
final int byte2 = blocks[blocksOffset++] & 0xFF;
final int byte1 = blocks[blocksOffset++] & 0xFF;
final int byte0 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte0 & 7;
values[valuesOffset++] = (byte0 >>> 3) & 7;
values[valuesOffset++] = (byte0 >>> 6) | ((byte1 & 1) << 2);
values[valuesOffset++] = (byte1 >>> 1) & 7;
values[valuesOffset++] = (byte1 >>> 4) & 7;
values[valuesOffset++] = (byte1 >>> 7) | ((byte2 & 3) << 1);
values[valuesOffset++] = (byte2 >>> 2) & 7;
values[valuesOffset++] = byte2 >>> 5;
values[valuesOffset++] = byte3 & 7;
values[valuesOffset++] = (byte3 >>> 3) & 7;
values[valuesOffset++] = (byte3 >>> 6) | ((byte4 & 1) << 2);
values[valuesOffset++] = (byte4 >>> 1) & 7;
values[valuesOffset++] = (byte4 >>> 4) & 7;
values[valuesOffset++] = (byte4 >>> 7) | ((byte5 & 3) << 1);
values[valuesOffset++] = (byte5 >>> 2) & 7;
values[valuesOffset++] = byte5 >>> 5;
values[valuesOffset++] = byte6 & 7;
values[valuesOffset++] = (byte6 >>> 3) & 7;
values[valuesOffset++] = (byte6 >>> 6) | ((byte7 & 1) << 2);
values[valuesOffset++] = (byte7 >>> 1) & 7;
values[valuesOffset++] = (byte7 >>> 4) & 7;
}
}
}

View File

@ -1,145 +0,0 @@
// 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 BulkOperationPackedSingleBlock4 extends BulkOperationPackedSingleBlock {
public BulkOperationPackedSingleBlock4() {
super(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 block = blocks[blocksOffset++];
values[valuesOffset++] = (int) (block & 15L);
values[valuesOffset++] = (int) ((block >>> 4) & 15L);
values[valuesOffset++] = (int) ((block >>> 8) & 15L);
values[valuesOffset++] = (int) ((block >>> 12) & 15L);
values[valuesOffset++] = (int) ((block >>> 16) & 15L);
values[valuesOffset++] = (int) ((block >>> 20) & 15L);
values[valuesOffset++] = (int) ((block >>> 24) & 15L);
values[valuesOffset++] = (int) ((block >>> 28) & 15L);
values[valuesOffset++] = (int) ((block >>> 32) & 15L);
values[valuesOffset++] = (int) ((block >>> 36) & 15L);
values[valuesOffset++] = (int) ((block >>> 40) & 15L);
values[valuesOffset++] = (int) ((block >>> 44) & 15L);
values[valuesOffset++] = (int) ((block >>> 48) & 15L);
values[valuesOffset++] = (int) ((block >>> 52) & 15L);
values[valuesOffset++] = (int) ((block >>> 56) & 15L);
values[valuesOffset++] = (int) (block >>> 60);
}
}
@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 byte7 = blocks[blocksOffset++] & 0xFF;
final int byte6 = blocks[blocksOffset++] & 0xFF;
final int byte5 = blocks[blocksOffset++] & 0xFF;
final int byte4 = blocks[blocksOffset++] & 0xFF;
final int byte3 = blocks[blocksOffset++] & 0xFF;
final int byte2 = blocks[blocksOffset++] & 0xFF;
final int byte1 = blocks[blocksOffset++] & 0xFF;
final int byte0 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte0 & 15;
values[valuesOffset++] = byte0 >>> 4;
values[valuesOffset++] = byte1 & 15;
values[valuesOffset++] = byte1 >>> 4;
values[valuesOffset++] = byte2 & 15;
values[valuesOffset++] = byte2 >>> 4;
values[valuesOffset++] = byte3 & 15;
values[valuesOffset++] = byte3 >>> 4;
values[valuesOffset++] = byte4 & 15;
values[valuesOffset++] = byte4 >>> 4;
values[valuesOffset++] = byte5 & 15;
values[valuesOffset++] = byte5 >>> 4;
values[valuesOffset++] = byte6 & 15;
values[valuesOffset++] = byte6 >>> 4;
values[valuesOffset++] = byte7 & 15;
values[valuesOffset++] = byte7 >>> 4;
}
}
@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 block = blocks[blocksOffset++];
values[valuesOffset++] = block & 15L;
values[valuesOffset++] = (block >>> 4) & 15L;
values[valuesOffset++] = (block >>> 8) & 15L;
values[valuesOffset++] = (block >>> 12) & 15L;
values[valuesOffset++] = (block >>> 16) & 15L;
values[valuesOffset++] = (block >>> 20) & 15L;
values[valuesOffset++] = (block >>> 24) & 15L;
values[valuesOffset++] = (block >>> 28) & 15L;
values[valuesOffset++] = (block >>> 32) & 15L;
values[valuesOffset++] = (block >>> 36) & 15L;
values[valuesOffset++] = (block >>> 40) & 15L;
values[valuesOffset++] = (block >>> 44) & 15L;
values[valuesOffset++] = (block >>> 48) & 15L;
values[valuesOffset++] = (block >>> 52) & 15L;
values[valuesOffset++] = (block >>> 56) & 15L;
values[valuesOffset++] = block >>> 60;
}
}
@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 int byte7 = blocks[blocksOffset++] & 0xFF;
final int byte6 = blocks[blocksOffset++] & 0xFF;
final int byte5 = blocks[blocksOffset++] & 0xFF;
final int byte4 = blocks[blocksOffset++] & 0xFF;
final int byte3 = blocks[blocksOffset++] & 0xFF;
final int byte2 = blocks[blocksOffset++] & 0xFF;
final int byte1 = blocks[blocksOffset++] & 0xFF;
final int byte0 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte0 & 15;
values[valuesOffset++] = byte0 >>> 4;
values[valuesOffset++] = byte1 & 15;
values[valuesOffset++] = byte1 >>> 4;
values[valuesOffset++] = byte2 & 15;
values[valuesOffset++] = byte2 >>> 4;
values[valuesOffset++] = byte3 & 15;
values[valuesOffset++] = byte3 >>> 4;
values[valuesOffset++] = byte4 & 15;
values[valuesOffset++] = byte4 >>> 4;
values[valuesOffset++] = byte5 & 15;
values[valuesOffset++] = byte5 >>> 4;
values[valuesOffset++] = byte6 & 15;
values[valuesOffset++] = byte6 >>> 4;
values[valuesOffset++] = byte7 & 15;
values[valuesOffset++] = byte7 >>> 4;
}
}
}

View File

@ -1,129 +0,0 @@
// 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 BulkOperationPackedSingleBlock5 extends BulkOperationPackedSingleBlock {
public BulkOperationPackedSingleBlock5() {
super(5);
}
@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 block = blocks[blocksOffset++];
values[valuesOffset++] = (int) (block & 31L);
values[valuesOffset++] = (int) ((block >>> 5) & 31L);
values[valuesOffset++] = (int) ((block >>> 10) & 31L);
values[valuesOffset++] = (int) ((block >>> 15) & 31L);
values[valuesOffset++] = (int) ((block >>> 20) & 31L);
values[valuesOffset++] = (int) ((block >>> 25) & 31L);
values[valuesOffset++] = (int) ((block >>> 30) & 31L);
values[valuesOffset++] = (int) ((block >>> 35) & 31L);
values[valuesOffset++] = (int) ((block >>> 40) & 31L);
values[valuesOffset++] = (int) ((block >>> 45) & 31L);
values[valuesOffset++] = (int) ((block >>> 50) & 31L);
values[valuesOffset++] = (int) (block >>> 55);
}
}
@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 byte7 = blocks[blocksOffset++] & 0xFF;
final int byte6 = blocks[blocksOffset++] & 0xFF;
final int byte5 = blocks[blocksOffset++] & 0xFF;
final int byte4 = blocks[blocksOffset++] & 0xFF;
final int byte3 = blocks[blocksOffset++] & 0xFF;
final int byte2 = blocks[blocksOffset++] & 0xFF;
final int byte1 = blocks[blocksOffset++] & 0xFF;
final int byte0 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte0 & 31;
values[valuesOffset++] = (byte0 >>> 5) | ((byte1 & 3) << 3);
values[valuesOffset++] = (byte1 >>> 2) & 31;
values[valuesOffset++] = (byte1 >>> 7) | ((byte2 & 15) << 1);
values[valuesOffset++] = (byte2 >>> 4) | ((byte3 & 1) << 4);
values[valuesOffset++] = (byte3 >>> 1) & 31;
values[valuesOffset++] = (byte3 >>> 6) | ((byte4 & 7) << 2);
values[valuesOffset++] = byte4 >>> 3;
values[valuesOffset++] = byte5 & 31;
values[valuesOffset++] = (byte5 >>> 5) | ((byte6 & 3) << 3);
values[valuesOffset++] = (byte6 >>> 2) & 31;
values[valuesOffset++] = (byte6 >>> 7) | ((byte7 & 15) << 1);
}
}
@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 block = blocks[blocksOffset++];
values[valuesOffset++] = block & 31L;
values[valuesOffset++] = (block >>> 5) & 31L;
values[valuesOffset++] = (block >>> 10) & 31L;
values[valuesOffset++] = (block >>> 15) & 31L;
values[valuesOffset++] = (block >>> 20) & 31L;
values[valuesOffset++] = (block >>> 25) & 31L;
values[valuesOffset++] = (block >>> 30) & 31L;
values[valuesOffset++] = (block >>> 35) & 31L;
values[valuesOffset++] = (block >>> 40) & 31L;
values[valuesOffset++] = (block >>> 45) & 31L;
values[valuesOffset++] = (block >>> 50) & 31L;
values[valuesOffset++] = block >>> 55;
}
}
@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 int byte7 = blocks[blocksOffset++] & 0xFF;
final int byte6 = blocks[blocksOffset++] & 0xFF;
final int byte5 = blocks[blocksOffset++] & 0xFF;
final int byte4 = blocks[blocksOffset++] & 0xFF;
final int byte3 = blocks[blocksOffset++] & 0xFF;
final int byte2 = blocks[blocksOffset++] & 0xFF;
final int byte1 = blocks[blocksOffset++] & 0xFF;
final int byte0 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte0 & 31;
values[valuesOffset++] = (byte0 >>> 5) | ((byte1 & 3) << 3);
values[valuesOffset++] = (byte1 >>> 2) & 31;
values[valuesOffset++] = (byte1 >>> 7) | ((byte2 & 15) << 1);
values[valuesOffset++] = (byte2 >>> 4) | ((byte3 & 1) << 4);
values[valuesOffset++] = (byte3 >>> 1) & 31;
values[valuesOffset++] = (byte3 >>> 6) | ((byte4 & 7) << 2);
values[valuesOffset++] = byte4 >>> 3;
values[valuesOffset++] = byte5 & 31;
values[valuesOffset++] = (byte5 >>> 5) | ((byte6 & 3) << 3);
values[valuesOffset++] = (byte6 >>> 2) & 31;
values[valuesOffset++] = (byte6 >>> 7) | ((byte7 & 15) << 1);
}
}
}

View File

@ -1,121 +0,0 @@
// 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 BulkOperationPackedSingleBlock6 extends BulkOperationPackedSingleBlock {
public BulkOperationPackedSingleBlock6() {
super(6);
}
@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 block = blocks[blocksOffset++];
values[valuesOffset++] = (int) (block & 63L);
values[valuesOffset++] = (int) ((block >>> 6) & 63L);
values[valuesOffset++] = (int) ((block >>> 12) & 63L);
values[valuesOffset++] = (int) ((block >>> 18) & 63L);
values[valuesOffset++] = (int) ((block >>> 24) & 63L);
values[valuesOffset++] = (int) ((block >>> 30) & 63L);
values[valuesOffset++] = (int) ((block >>> 36) & 63L);
values[valuesOffset++] = (int) ((block >>> 42) & 63L);
values[valuesOffset++] = (int) ((block >>> 48) & 63L);
values[valuesOffset++] = (int) (block >>> 54);
}
}
@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 byte7 = blocks[blocksOffset++] & 0xFF;
final int byte6 = blocks[blocksOffset++] & 0xFF;
final int byte5 = blocks[blocksOffset++] & 0xFF;
final int byte4 = blocks[blocksOffset++] & 0xFF;
final int byte3 = blocks[blocksOffset++] & 0xFF;
final int byte2 = blocks[blocksOffset++] & 0xFF;
final int byte1 = blocks[blocksOffset++] & 0xFF;
final int byte0 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte0 & 63;
values[valuesOffset++] = (byte0 >>> 6) | ((byte1 & 15) << 2);
values[valuesOffset++] = (byte1 >>> 4) | ((byte2 & 3) << 4);
values[valuesOffset++] = byte2 >>> 2;
values[valuesOffset++] = byte3 & 63;
values[valuesOffset++] = (byte3 >>> 6) | ((byte4 & 15) << 2);
values[valuesOffset++] = (byte4 >>> 4) | ((byte5 & 3) << 4);
values[valuesOffset++] = byte5 >>> 2;
values[valuesOffset++] = byte6 & 63;
values[valuesOffset++] = (byte6 >>> 6) | ((byte7 & 15) << 2);
}
}
@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 block = blocks[blocksOffset++];
values[valuesOffset++] = block & 63L;
values[valuesOffset++] = (block >>> 6) & 63L;
values[valuesOffset++] = (block >>> 12) & 63L;
values[valuesOffset++] = (block >>> 18) & 63L;
values[valuesOffset++] = (block >>> 24) & 63L;
values[valuesOffset++] = (block >>> 30) & 63L;
values[valuesOffset++] = (block >>> 36) & 63L;
values[valuesOffset++] = (block >>> 42) & 63L;
values[valuesOffset++] = (block >>> 48) & 63L;
values[valuesOffset++] = block >>> 54;
}
}
@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 int byte7 = blocks[blocksOffset++] & 0xFF;
final int byte6 = blocks[blocksOffset++] & 0xFF;
final int byte5 = blocks[blocksOffset++] & 0xFF;
final int byte4 = blocks[blocksOffset++] & 0xFF;
final int byte3 = blocks[blocksOffset++] & 0xFF;
final int byte2 = blocks[blocksOffset++] & 0xFF;
final int byte1 = blocks[blocksOffset++] & 0xFF;
final int byte0 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte0 & 63;
values[valuesOffset++] = (byte0 >>> 6) | ((byte1 & 15) << 2);
values[valuesOffset++] = (byte1 >>> 4) | ((byte2 & 3) << 4);
values[valuesOffset++] = byte2 >>> 2;
values[valuesOffset++] = byte3 & 63;
values[valuesOffset++] = (byte3 >>> 6) | ((byte4 & 15) << 2);
values[valuesOffset++] = (byte4 >>> 4) | ((byte5 & 3) << 4);
values[valuesOffset++] = byte5 >>> 2;
values[valuesOffset++] = byte6 & 63;
values[valuesOffset++] = (byte6 >>> 6) | ((byte7 & 15) << 2);
}
}
}

View File

@ -1,117 +0,0 @@
// 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 BulkOperationPackedSingleBlock7 extends BulkOperationPackedSingleBlock {
public BulkOperationPackedSingleBlock7() {
super(7);
}
@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 block = blocks[blocksOffset++];
values[valuesOffset++] = (int) (block & 127L);
values[valuesOffset++] = (int) ((block >>> 7) & 127L);
values[valuesOffset++] = (int) ((block >>> 14) & 127L);
values[valuesOffset++] = (int) ((block >>> 21) & 127L);
values[valuesOffset++] = (int) ((block >>> 28) & 127L);
values[valuesOffset++] = (int) ((block >>> 35) & 127L);
values[valuesOffset++] = (int) ((block >>> 42) & 127L);
values[valuesOffset++] = (int) ((block >>> 49) & 127L);
values[valuesOffset++] = (int) (block >>> 56);
}
}
@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 byte7 = blocks[blocksOffset++] & 0xFF;
final int byte6 = blocks[blocksOffset++] & 0xFF;
final int byte5 = blocks[blocksOffset++] & 0xFF;
final int byte4 = blocks[blocksOffset++] & 0xFF;
final int byte3 = blocks[blocksOffset++] & 0xFF;
final int byte2 = blocks[blocksOffset++] & 0xFF;
final int byte1 = blocks[blocksOffset++] & 0xFF;
final int byte0 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte0 & 127;
values[valuesOffset++] = (byte0 >>> 7) | ((byte1 & 63) << 1);
values[valuesOffset++] = (byte1 >>> 6) | ((byte2 & 31) << 2);
values[valuesOffset++] = (byte2 >>> 5) | ((byte3 & 15) << 3);
values[valuesOffset++] = (byte3 >>> 4) | ((byte4 & 7) << 4);
values[valuesOffset++] = (byte4 >>> 3) | ((byte5 & 3) << 5);
values[valuesOffset++] = (byte5 >>> 2) | ((byte6 & 1) << 6);
values[valuesOffset++] = byte6 >>> 1;
values[valuesOffset++] = byte7 & 127;
}
}
@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 block = blocks[blocksOffset++];
values[valuesOffset++] = block & 127L;
values[valuesOffset++] = (block >>> 7) & 127L;
values[valuesOffset++] = (block >>> 14) & 127L;
values[valuesOffset++] = (block >>> 21) & 127L;
values[valuesOffset++] = (block >>> 28) & 127L;
values[valuesOffset++] = (block >>> 35) & 127L;
values[valuesOffset++] = (block >>> 42) & 127L;
values[valuesOffset++] = (block >>> 49) & 127L;
values[valuesOffset++] = block >>> 56;
}
}
@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 int byte7 = blocks[blocksOffset++] & 0xFF;
final int byte6 = blocks[blocksOffset++] & 0xFF;
final int byte5 = blocks[blocksOffset++] & 0xFF;
final int byte4 = blocks[blocksOffset++] & 0xFF;
final int byte3 = blocks[blocksOffset++] & 0xFF;
final int byte2 = blocks[blocksOffset++] & 0xFF;
final int byte1 = blocks[blocksOffset++] & 0xFF;
final int byte0 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte0 & 127;
values[valuesOffset++] = (byte0 >>> 7) | ((byte1 & 63) << 1);
values[valuesOffset++] = (byte1 >>> 6) | ((byte2 & 31) << 2);
values[valuesOffset++] = (byte2 >>> 5) | ((byte3 & 15) << 3);
values[valuesOffset++] = (byte3 >>> 4) | ((byte4 & 7) << 4);
values[valuesOffset++] = (byte4 >>> 3) | ((byte5 & 3) << 5);
values[valuesOffset++] = (byte5 >>> 2) | ((byte6 & 1) << 6);
values[valuesOffset++] = byte6 >>> 1;
values[valuesOffset++] = byte7 & 127;
}
}
}

View File

@ -1,113 +0,0 @@
// 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 BulkOperationPackedSingleBlock8 extends BulkOperationPackedSingleBlock {
public BulkOperationPackedSingleBlock8() {
super(8);
}
@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 block = blocks[blocksOffset++];
values[valuesOffset++] = (int) (block & 255L);
values[valuesOffset++] = (int) ((block >>> 8) & 255L);
values[valuesOffset++] = (int) ((block >>> 16) & 255L);
values[valuesOffset++] = (int) ((block >>> 24) & 255L);
values[valuesOffset++] = (int) ((block >>> 32) & 255L);
values[valuesOffset++] = (int) ((block >>> 40) & 255L);
values[valuesOffset++] = (int) ((block >>> 48) & 255L);
values[valuesOffset++] = (int) (block >>> 56);
}
}
@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 byte7 = blocks[blocksOffset++] & 0xFF;
final int byte6 = blocks[blocksOffset++] & 0xFF;
final int byte5 = blocks[blocksOffset++] & 0xFF;
final int byte4 = blocks[blocksOffset++] & 0xFF;
final int byte3 = blocks[blocksOffset++] & 0xFF;
final int byte2 = blocks[blocksOffset++] & 0xFF;
final int byte1 = blocks[blocksOffset++] & 0xFF;
final int byte0 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte0;
values[valuesOffset++] = byte1;
values[valuesOffset++] = byte2;
values[valuesOffset++] = byte3;
values[valuesOffset++] = byte4;
values[valuesOffset++] = byte5;
values[valuesOffset++] = byte6;
values[valuesOffset++] = byte7;
}
}
@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 block = blocks[blocksOffset++];
values[valuesOffset++] = block & 255L;
values[valuesOffset++] = (block >>> 8) & 255L;
values[valuesOffset++] = (block >>> 16) & 255L;
values[valuesOffset++] = (block >>> 24) & 255L;
values[valuesOffset++] = (block >>> 32) & 255L;
values[valuesOffset++] = (block >>> 40) & 255L;
values[valuesOffset++] = (block >>> 48) & 255L;
values[valuesOffset++] = block >>> 56;
}
}
@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 int byte7 = blocks[blocksOffset++] & 0xFF;
final int byte6 = blocks[blocksOffset++] & 0xFF;
final int byte5 = blocks[blocksOffset++] & 0xFF;
final int byte4 = blocks[blocksOffset++] & 0xFF;
final int byte3 = blocks[blocksOffset++] & 0xFF;
final int byte2 = blocks[blocksOffset++] & 0xFF;
final int byte1 = blocks[blocksOffset++] & 0xFF;
final int byte0 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte0;
values[valuesOffset++] = byte1;
values[valuesOffset++] = byte2;
values[valuesOffset++] = byte3;
values[valuesOffset++] = byte4;
values[valuesOffset++] = byte5;
values[valuesOffset++] = byte6;
values[valuesOffset++] = byte7;
}
}
}

View File

@ -1,109 +0,0 @@
// 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 BulkOperationPackedSingleBlock9 extends BulkOperationPackedSingleBlock {
public BulkOperationPackedSingleBlock9() {
super(9);
}
@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 block = blocks[blocksOffset++];
values[valuesOffset++] = (int) (block & 511L);
values[valuesOffset++] = (int) ((block >>> 9) & 511L);
values[valuesOffset++] = (int) ((block >>> 18) & 511L);
values[valuesOffset++] = (int) ((block >>> 27) & 511L);
values[valuesOffset++] = (int) ((block >>> 36) & 511L);
values[valuesOffset++] = (int) ((block >>> 45) & 511L);
values[valuesOffset++] = (int) (block >>> 54);
}
}
@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 byte7 = blocks[blocksOffset++] & 0xFF;
final int byte6 = blocks[blocksOffset++] & 0xFF;
final int byte5 = blocks[blocksOffset++] & 0xFF;
final int byte4 = blocks[blocksOffset++] & 0xFF;
final int byte3 = blocks[blocksOffset++] & 0xFF;
final int byte2 = blocks[blocksOffset++] & 0xFF;
final int byte1 = blocks[blocksOffset++] & 0xFF;
final int byte0 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte0 | ((byte1 & 1) << 8);
values[valuesOffset++] = (byte1 >>> 1) | ((byte2 & 3) << 7);
values[valuesOffset++] = (byte2 >>> 2) | ((byte3 & 7) << 6);
values[valuesOffset++] = (byte3 >>> 3) | ((byte4 & 15) << 5);
values[valuesOffset++] = (byte4 >>> 4) | ((byte5 & 31) << 4);
values[valuesOffset++] = (byte5 >>> 5) | ((byte6 & 63) << 3);
values[valuesOffset++] = (byte6 >>> 6) | ((byte7 & 127) << 2);
}
}
@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 block = blocks[blocksOffset++];
values[valuesOffset++] = block & 511L;
values[valuesOffset++] = (block >>> 9) & 511L;
values[valuesOffset++] = (block >>> 18) & 511L;
values[valuesOffset++] = (block >>> 27) & 511L;
values[valuesOffset++] = (block >>> 36) & 511L;
values[valuesOffset++] = (block >>> 45) & 511L;
values[valuesOffset++] = block >>> 54;
}
}
@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 int byte7 = blocks[blocksOffset++] & 0xFF;
final int byte6 = blocks[blocksOffset++] & 0xFF;
final int byte5 = blocks[blocksOffset++] & 0xFF;
final int byte4 = blocks[blocksOffset++] & 0xFF;
final int byte3 = blocks[blocksOffset++] & 0xFF;
final int byte2 = blocks[blocksOffset++] & 0xFF;
final int byte1 = blocks[blocksOffset++] & 0xFF;
final int byte0 = blocks[blocksOffset++] & 0xFF;
values[valuesOffset++] = byte0 | ((byte1 & 1) << 8);
values[valuesOffset++] = (byte1 >>> 1) | ((byte2 & 3) << 7);
values[valuesOffset++] = (byte2 >>> 2) | ((byte3 & 7) << 6);
values[valuesOffset++] = (byte3 >>> 3) | ((byte4 & 15) << 5);
values[valuesOffset++] = (byte4 >>> 4) | ((byte5 & 31) << 4);
values[valuesOffset++] = (byte5 >>> 5) | ((byte6 & 63) << 3);
values[valuesOffset++] = (byte6 >>> 6) | ((byte7 & 127) << 2);
}
}
}

View File

@ -86,6 +86,9 @@ FOOTER="""
}
"""
def is_power_of_two(n):
return n & (n - 1) == 0
def casts(typ):
cast_start = "(%s) (" %typ
cast_end = ")"
@ -118,104 +121,25 @@ def get_type(bits):
else:
assert False
def packed64singleblock(bpv, f):
values = 64 / bpv
f.write("\n")
f.write(" public BulkOperationPackedSingleBlock%d() {\n" %bpv)
f.write(" super(%d);\n" %bpv)
f.write(" }\n\n")
p64sb_decode(bpv, f, 32)
p64sb_decode(bpv, f, 64)
def p64sb_decode(bpv, f, bits):
values = 64 / bpv
typ = get_type(bits)
cast_start, cast_end = casts(typ)
f.write(" @Override\n")
f.write(" public void decode(long[] blocks, int blocksOffset, %s[] values, int valuesOffset, int iterations) {\n" %typ)
if bits < bpv:
f.write(" throw new UnsupportedOperationException();\n")
f.write(" }\n\n")
return
f.write(" assert blocksOffset + iterations * blockCount() <= blocks.length;\n")
f.write(" assert valuesOffset + iterations * valueCount() <= values.length;\n")
f.write(" for (int i = 0; i < iterations; ++i) {\n")
f.write(" final long block = blocks[blocksOffset++];\n")
mask = (1 << bpv) - 1
for i in xrange(values):
block_offset = i / values
offset_in_block = i % values
if i == 0:
f.write(" values[valuesOffset++] = %sblock & %dL%s;\n" %(cast_start, mask, cast_end))
elif i == values - 1:
f.write(" values[valuesOffset++] = %sblock >>> %d%s;\n" %(cast_start, i * bpv, cast_end))
else:
f.write(" values[valuesOffset++] = %s(block >>> %d) & %dL%s;\n" %(cast_start, i * bpv, mask, cast_end))
f.write(" }\n")
f.write(" }\n\n")
f.write(" @Override\n")
f.write(" public void decode(byte[] blocks, int blocksOffset, %s[] values, int valuesOffset, int iterations) {\n" %typ)
if bits < bpv:
f.write(" throw new UnsupportedOperationException();\n")
f.write(" }\n\n")
f.write(" assert blocksOffset + 8 * iterations * blockCount() <= blocks.length;\n")
f.write(" assert valuesOffset + iterations * valueCount() <= values.length;\n")
f.write(" for (int i = 0; i < iterations; ++i) {\n")
if bpv >= 32 and bits > 32:
for i in xrange(7, -1, -1):
f.write(" final long byte%d = blocks[blocksOffset++] & 0xFF;\n" %i)
else:
for i in xrange(7, -1, -1):
f.write(" final int byte%d = blocks[blocksOffset++] & 0xFF;\n" %i)
for i in xrange(values):
byte_start = (i * bpv) / 8
bit_start = (i * bpv) % 8
byte_end = ((i + 1) * bpv - 1) / 8
bit_end = ((i + 1) * bpv - 1) % 8
f.write(" values[valuesOffset++] =")
if byte_start == byte_end:
# only one byte
if bit_start == 0:
if bit_end == 7:
f.write(" byte%d" %byte_start)
else:
f.write(" byte%d & %d" %(byte_start, mask))
else:
if bit_end == 7:
f.write(" byte%d >>> %d" %(byte_start, bit_start))
else:
f.write(" (byte%d >>> %d) & %d" %(byte_start, bit_start, mask))
else:
if bit_start == 0:
f.write(" byte%d" %byte_start)
else:
f.write(" (byte%d >>> %d)" %(byte_start, bit_start))
for b in xrange(byte_start + 1, byte_end):
f.write(" | (byte%d << %d)" %(b, 8 * (b - byte_start) - bit_start))
if bit_end == 7:
f.write(" | (byte%d << %d)" %(byte_end, 8 * (byte_end - byte_start) - bit_start))
else:
f.write(" | ((byte%d & %d) << %d)" %(byte_end, 2 ** (bit_end + 1) - 1, 8 * (byte_end - byte_start) - bit_start))
f.write(";\n")
f.write(" }\n")
f.write(" }\n\n")
def packed64(bpv, f):
def block_value_count(bpv, bits=64):
blocks = bpv
values = blocks * 64 / bpv
values = blocks * bits / bpv
while blocks % 2 == 0 and values % 2 == 0:
blocks /= 2
values /= 2
assert values * bpv == 64 * blocks, "%d values, %d blocks, %d bits per value" %(values, blocks, bpv)
assert values * bpv == bits * blocks, "%d values, %d blocks, %d bits per value" %(values, blocks, bpv)
return (blocks, values)
def packed64(bpv, f):
blocks, values = block_value_count(bpv)
mask = (1 << bpv) - 1
f.write("\n")
f.write(" public BulkOperationPacked%d() {\n" %bpv)
f.write(" super(%d);\n" %bpv)
f.write(" assert blockCount() == %d;\n" %blocks)
f.write(" assert valueCount() == %d;\n" %values)
f.write(" }\n\n")
f.write(" public BulkOperationPacked%d() {\n" %bpv)
f.write(" super(%d);\n" %bpv)
f.write(" assert blockCount() == %d;\n" %blocks)
f.write(" assert valueCount() == %d;\n" %values)
f.write(" }\n\n")
if bpv == 64:
f.write(""" @Override
@ -239,94 +163,118 @@ def packed64(bpv, f):
}
""")
else:
p64_decode(bpv, f, 32, values)
p64_decode(bpv, f, 64, values)
p64_decode(bpv, f, 32)
p64_decode(bpv, f, 64)
def p64_decode(bpv, f, bits, values):
def p64_decode(bpv, f, bits):
blocks, values = block_value_count(bpv)
typ = get_type(bits)
cast_start, cast_end = casts(typ)
f.write(" @Override\n")
f.write(" public void decode(long[] blocks, int blocksOffset, %s[] values, int valuesOffset, int iterations) {\n" %typ)
f.write(" @Override\n")
f.write(" public void decode(long[] blocks, int blocksOffset, %s[] values, int valuesOffset, int iterations) {\n" %typ)
if bits < bpv:
f.write(" throw new UnsupportedOperationException();\n")
f.write(" throw new UnsupportedOperationException();\n")
else:
f.write(" assert blocksOffset + iterations * blockCount() <= blocks.length;\n")
f.write(" assert valuesOffset + iterations * valueCount() <= values.length;\n")
f.write(" for (int i = 0; i < iterations; ++i) {\n")
f.write(" for (int i = 0; i < iterations; ++i) {\n")
mask = (1 << bpv) - 1
for i in xrange(0, values):
block_offset = i * bpv / 64
bit_offset = (i * bpv) % 64
if bit_offset == 0:
# start of block
f.write(" final long block%d = blocks[blocksOffset++];\n" %block_offset);
f.write(" values[valuesOffset++] = %sblock%d >>> %d%s;\n" %(cast_start, block_offset, 64 - bpv, cast_end))
elif bit_offset + bpv == 64:
# end of block
f.write(" values[valuesOffset++] = %sblock%d & %dL%s;\n" %(cast_start, block_offset, mask, cast_end))
elif bit_offset + bpv < 64:
# middle of block
f.write(" values[valuesOffset++] = %s(block%d >>> %d) & %dL%s;\n" %(cast_start, block_offset, 64 - bit_offset - bpv, mask, cast_end))
else:
# value spans across 2 blocks
mask1 = (1 << (64 - bit_offset)) -1
shift1 = bit_offset + bpv - 64
shift2 = 64 - shift1
f.write(" final long block%d = blocks[blocksOffset++];\n" %(block_offset + 1));
f.write(" values[valuesOffset++] = %s((block%d & %dL) << %d) | (block%d >>> %d)%s;\n" %(cast_start, block_offset, mask1, shift1, block_offset + 1, shift2, cast_end))
f.write(" }\n")
f.write(" }\n\n")
f.write(" @Override\n")
f.write(" public void decode(byte[] blocks, int blocksOffset, %s[] values, int valuesOffset, int iterations) {\n" %typ)
if is_power_of_two(bpv):
f.write(" final long block = blocks[blocksOffset++];\n")
f.write(" for (int shift = %d; shift >= 0; shift -= %d) {\n" %(64 - bpv, bpv))
f.write(" values[valuesOffset++] = %s(block >>> shift) & %d%s;\n" %(cast_start, mask, cast_end))
f.write(" }\n")
else:
for i in xrange(0, values):
block_offset = i * bpv / 64
bit_offset = (i * bpv) % 64
if bit_offset == 0:
# start of block
f.write(" final long block%d = blocks[blocksOffset++];\n" %block_offset);
f.write(" values[valuesOffset++] = %sblock%d >>> %d%s;\n" %(cast_start, block_offset, 64 - bpv, cast_end))
elif bit_offset + bpv == 64:
# end of block
f.write(" values[valuesOffset++] = %sblock%d & %dL%s;\n" %(cast_start, block_offset, mask, cast_end))
elif bit_offset + bpv < 64:
# middle of block
f.write(" values[valuesOffset++] = %s(block%d >>> %d) & %dL%s;\n" %(cast_start, block_offset, 64 - bit_offset - bpv, mask, cast_end))
else:
# value spans across 2 blocks
mask1 = (1 << (64 - bit_offset)) -1
shift1 = bit_offset + bpv - 64
shift2 = 64 - shift1
f.write(" final long block%d = blocks[blocksOffset++];\n" %(block_offset + 1));
f.write(" values[valuesOffset++] = %s((block%d & %dL) << %d) | (block%d >>> %d)%s;\n" %(cast_start, block_offset, mask1, shift1, block_offset + 1, shift2, cast_end))
f.write(" }\n")
f.write(" }\n\n")
byte_blocks, byte_values = block_value_count(bpv, 8)
f.write(" @Override\n")
f.write(" public void decode(byte[] blocks, int blocksOffset, %s[] values, int valuesOffset, int iterations) {\n" %typ)
if bits < bpv:
f.write(" throw new UnsupportedOperationException();\n")
f.write(" throw new UnsupportedOperationException();\n")
else:
f.write(" assert blocksOffset + 8 * iterations * blockCount() <= blocks.length;\n")
f.write(" assert valuesOffset + iterations * valueCount() <= values.length;\n")
f.write(" for (int i = 0; i < iterations; ++i) {\n")
blocks = values * bpv / 8
for i in xrange(0, values):
byte_start = i * bpv / 8
bit_start = (i * bpv) % 8
byte_end = ((i + 1) * bpv - 1) / 8
bit_end = ((i + 1) * bpv - 1) % 8
shift = lambda b: 8 * (byte_end - b - 1) + 1 + bit_end
if bit_start == 0:
f.write(" final %s byte%d = blocks[blocksOffset++] & 0xFF;\n" %(typ, byte_start))
for b in xrange(byte_start + 1, byte_end + 1):
f.write(" final %s byte%d = blocks[blocksOffset++] & 0xFF;\n" %(typ, b))
f.write(" values[valuesOffset++] =")
if byte_start == byte_end:
if is_power_of_two(bpv) and bpv < 8:
f.write(" for (int j = 0; j < 8 * iterations; ++j) {\n")
f.write(" final byte block = blocks[blocksOffset++];\n")
for shift in xrange(8 - bpv, 0, -bpv):
f.write(" values[valuesOffset++] = (block >>> %d) & %d;\n" %(shift, mask))
f.write(" values[valuesOffset++] = block & %d;\n" %mask)
f.write(" }\n")
elif bpv == 8:
f.write(" for (int j = 0; j < 8 * iterations; ++j) {\n")
f.write(" values[valuesOffset++] = blocks[blocksOffset++] & 0xFF;\n")
f.write(" }\n")
elif is_power_of_two(bpv) and bpv > 8:
f.write(" for (int j = 0; j < %d * iterations; ++j) {\n" %(64 / bpv))
m = bits <= 32 and "0xFF" or "0xFFL"
f.write(" values[valuesOffset++] =")
for i in xrange(bpv / 8 - 1):
f.write(" ((blocks[blocksOffset++] & %s) << %d) |" %(m, bpv - 8))
f.write(" (blocks[blocksOffset++] & %s);\n" %m)
f.write(" }\n")
else:
f.write(" for (int i = 0; i < 8 * iterations; ++i) {\n")
for i in xrange(0, byte_values):
byte_start = i * bpv / 8
bit_start = (i * bpv) % 8
byte_end = ((i + 1) * bpv - 1) / 8
bit_end = ((i + 1) * bpv - 1) % 8
shift = lambda b: 8 * (byte_end - b - 1) + 1 + bit_end
if bit_start == 0:
if bit_end == 7:
f.write(" byte%d" %byte_start)
f.write(" final %s byte%d = blocks[blocksOffset++] & 0xFF;\n" %(typ, byte_start))
for b in xrange(byte_start + 1, byte_end + 1):
f.write(" final %s byte%d = blocks[blocksOffset++] & 0xFF;\n" %(typ, b))
f.write(" values[valuesOffset++] =")
if byte_start == byte_end:
if bit_start == 0:
if bit_end == 7:
f.write(" byte%d" %byte_start)
else:
f.write(" byte%d >>> %d" %(byte_start, 7 - bit_end))
else:
f.write(" byte%d >>> %d" %(byte_start, 7 - bit_end))
if bit_end == 7:
f.write(" byte%d & %d" %(byte_start, 2 ** (8 - bit_start) - 1))
else:
f.write(" (byte%d >>> %d) & %d" %(byte_start, 7 - bit_end, 2 ** (bit_end - bit_start + 1) - 1))
else:
if bit_end == 7:
f.write(" byte%d & %d" %(byte_start, 2 ** (8 - bit_start) - 1))
if bit_start == 0:
f.write(" (byte%d << %d)" %(byte_start, shift(byte_start)))
else:
f.write(" (byte%d >>> %d) & %d" %(byte_start, 7 - bit_end, 2 ** (bit_end - bit_start + 1) - 1))
else:
if bit_start == 0:
f.write(" (byte%d << %d)" %(byte_start, shift(byte_start)))
else:
f.write(" ((byte%d & %d) << %d)" %(byte_start, 2 ** (8 - bit_start) - 1, shift(byte_start)))
for b in xrange(byte_start + 1, byte_end):
f.write(" | (byte%d << %d)" %(b, shift(b)))
if bit_end == 7:
f.write(" | byte%d" %byte_end)
else:
f.write(" | (byte%d >>> %d)" %(byte_end, 7 - bit_end))
f.write(";\n")
f.write(" }\n")
f.write(" }\n\n")
f.write(" ((byte%d & %d) << %d)" %(byte_start, 2 ** (8 - bit_start) - 1, shift(byte_start)))
for b in xrange(byte_start + 1, byte_end):
f.write(" | (byte%d << %d)" %(b, shift(b)))
if bit_end == 7:
f.write(" | byte%d" %byte_end)
else:
f.write(" | (byte%d >>> %d)" %(byte_end, 7 - bit_end))
f.write(";\n")
f.write(" }\n")
f.write(" }\n\n")
if __name__ == '__main__':
p64_bpv = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 16, 21, 32]
f = open(OUTPUT_FILE, 'w')
f.write(HEADER)
f.write('\n')
@ -363,19 +311,7 @@ if __name__ == '__main__':
f.write(' private static final BulkOperation[] packedSingleBlockBulkOps = new BulkOperation[] {\n')
for bpv in xrange(1, max(PACKED_64_SINGLE_BLOCK_BPV)+1):
if bpv in PACKED_64_SINGLE_BLOCK_BPV:
if bpv > MAX_SPECIALIZED_BITS_PER_VALUE:
f.write(' new BulkOperationPackedSingleBlock(%d),\n' % bpv)
continue
f2 = open('BulkOperationPackedSingleBlock%d.java' % bpv, 'w')
f2.write(HEADER)
f2.write('''/**
* Efficient sequential read/write of packed integers.
*/\n''')
f2.write('final class BulkOperationPackedSingleBlock%d extends BulkOperationPackedSingleBlock {\n' % bpv)
packed64singleblock(bpv,f2)
f2.write('}\n')
f2.close()
f.write(' new BulkOperationPackedSingleBlock%d(),\n' % bpv)
f.write(' new BulkOperationPackedSingleBlock(%d),\n' % bpv)
else:
f.write(' null,\n')
f.write(' };\n')

View File

@ -223,7 +223,7 @@ public class TestNumericQueryParser extends LuceneTestCase {
field = new DoubleField(type.name(), 0.0, ft);
break;
default:
assert false;
fail();
field = null;
}
numericFieldMap.put(type.name(), field);

View File

@ -67,10 +67,41 @@ public class GeohashPrefixTree extends SpatialPrefixTree {
@Override
public int getLevelForDistance(double dist) {
final int level = GeohashUtils.lookupHashLenForWidthHeight(dist, dist);
final int level = lookupHashLenForWidthHeight(dist, dist);
return Math.max(Math.min(level, maxLevels), 1);
}
/* TODO temporarily in-lined GeoHashUtils.lookupHashLenForWidthHeight() is fixed in Spatial4j 0.3 */
/**
* Return the longest geohash length that will have a width & height >= specified arguments.
*/
private static int lookupHashLenForWidthHeight(double lonErr, double latErr) {
//loop through hash length arrays from beginning till we find one.
for(int len = 1; len <= GeohashUtils.MAX_PRECISION; len++) {
double latHeight = hashLenToLatHeight[len];
double lonWidth = hashLenToLonWidth[len];
if (latHeight < latErr && lonWidth < lonErr)
return len;
}
return GeohashUtils.MAX_PRECISION;
}
/** See the table at http://en.wikipedia.org/wiki/Geohash */
private static final double[] hashLenToLatHeight, hashLenToLonWidth;
static {
hashLenToLatHeight = new double[GeohashUtils.MAX_PRECISION +1];
hashLenToLonWidth = new double[GeohashUtils.MAX_PRECISION +1];
hashLenToLatHeight[0] = 90*2;
hashLenToLonWidth[0] = 180*2;
boolean even = false;
for(int i = 1; i <= GeohashUtils.MAX_PRECISION; i++) {
hashLenToLatHeight[i] = hashLenToLatHeight[i-1]/(even?8:4);
hashLenToLonWidth[i] = hashLenToLonWidth[i-1]/(even?4:8);
even = ! even;
}
}
@Override
public Node getNode(Point p, int level) {
return new GhCell(GeohashUtils.encodeLatLon(p.getY(), p.getX(), level));//args are lat,lon (y,x)

View File

@ -122,10 +122,10 @@ public class QuadPrefixTree extends SpatialPrefixTree {
@Override
public int getLevelForDistance(double dist) {
for (int i = 1; i < maxLevels; i++) {
for (int i = 0; i < maxLevels-1; i++) {
//note: level[i] is actually a lookup for level i+1
if(dist > levelW[i] || dist > levelH[i]) {
return i;
if(dist > levelW[i] && dist > levelH[i]) {
return i+1;
}
}
return maxLevels;

View File

@ -18,7 +18,9 @@ package org.apache.lucene.spatial.prefix.tree;
*/
import com.spatial4j.core.context.SpatialContext;
import com.spatial4j.core.shape.Circle;
import com.spatial4j.core.shape.Point;
import com.spatial4j.core.shape.Rectangle;
import com.spatial4j.core.shape.Shape;
import java.nio.charset.Charset;
@ -66,30 +68,35 @@ public abstract class SpatialPrefixTree {
* See {@link org.apache.lucene.spatial.query.SpatialArgs#getDistPrecision()}.
* A grid level looked up via {@link #getLevelForDistance(double)} is returned.
*
* @param precision 0-0.5
* @return 1-maxLevels
* @param precision 0 to 0.5
* @return 1 to maxLevels
*/
public int getMaxLevelForPrecision(Shape shape, double precision) {
if (precision < 0 || precision > 0.5) {
throw new IllegalArgumentException("Precision " + precision + " must be between [0-0.5]");
throw new IllegalArgumentException("Precision " + precision + " must be between [0 to 0.5]");
}
if (precision == 0 || shape instanceof Point) {
return maxLevels;
}
double bboxArea = shape.getBoundingBox().getArea();
if (bboxArea == 0) {
return maxLevels;
}
double avgSideLenFromCenter = Math.sqrt(bboxArea) / 2;
return getLevelForDistance(avgSideLenFromCenter * precision);
Rectangle bbox = shape.getBoundingBox();
//The diagonal distance should be the same computed from any opposite corner,
// and this is the longest distance that might be occurring within the shape.
double diagonalDist = ctx.getDistCalc().distance(
ctx.makePoint(bbox.getMinX(), bbox.getMinY()), bbox.getMaxX(), bbox.getMaxY());
//convert to degrees //TODO not needed in Spatial4j 0.3
diagonalDist = ctx.getDistCalc().distanceToDegrees(diagonalDist);
return getLevelForDistance(diagonalDist * 0.5 * precision);
}
/**
* Returns the level of the smallest grid size with a side length that is greater or equal to the provided
* distance.
* Returns the level of the largest grid in which its longest side is less
* than or equal to the provided distance (in degrees). Consequently {@code
* dist} acts as an error epsilon declaring the amount of detail needed in the
* grid, such that you can get a grid with just the right amount of
* precision.
*
* @param dist >= 0
* @return level [1-maxLevels]
* @return level [1 to maxLevels]
*/
public abstract int getLevelForDistance(double dist);

View File

@ -85,12 +85,14 @@ public class SpatialArgs {
}
/**
* The fraction of the distance from the center of the query shape to its nearest edge
* that is considered acceptable error. The algorithm for computing the distance to the
* nearest edge is actually a little different. It normalizes the shape to a square
* given it's bounding box area:
* <pre>sqrt(shape.bbox.area)/2</pre>
* And the error distance is beyond the shape such that the shape is a minimum shape.
* A measure of acceptable error of the shape. It is specified as the
* fraction of the distance from the center of the query shape to its furthest
* bounding box corner. This effectively inflates the size of the shape but
* should not shrink it.
* <p/>
* The default is {@link #DEFAULT_DIST_PRECISION}
*
* @return 0 to 0.5
*/
public Double getDistPrecision() {
return distPrecision;

View File

@ -69,6 +69,45 @@ public class TestRecursivePrefixTreeStrategy extends StrategyTestCase {
}
}
@Test
public void testOneMeterPrecision() {
init(GeohashPrefixTree.getMaxLevelsPossible());
GeohashPrefixTree grid = (GeohashPrefixTree) ((RecursivePrefixTreeStrategy) strategy).getGrid();
//DWS: I know this to be true. 11 is needed for one meter
assertEquals(11, grid.getLevelForDistance(ctx.getDistCalc().distanceToDegrees(0.001)));
}
@Test
public void testPrecision() throws IOException{
init(GeohashPrefixTree.getMaxLevelsPossible());
Point iPt = ctx.makePoint(2.8028712999999925, 48.3708044);//lon, lat
addDocument(newDoc("iPt", iPt));
commit();
Point qPt = ctx.makePoint(2.4632387000000335, 48.6003516);
final double DIST = 35.75;//35.7499...
assertEquals(DIST, ctx.getDistCalc().distance(iPt, qPt), 0.001);
//distPrec will affect the query shape precision. The indexed precision
// was set to nearly zilch via init(GeohashPrefixTree.getMaxLevelsPossible());
final double distPrec = 0.025; //the suggested default, by the way
final double distMult = 1+distPrec;
assertTrue(35.74*distMult >= DIST);
checkHits(q(qPt, 35.74, distPrec), 1, null);
assertTrue(30*distMult < DIST);
checkHits(q(qPt, 30, distPrec), 0, null);
assertTrue(33*distMult < DIST);
checkHits(q(qPt, 33, distPrec), 0, null);
assertTrue(34*distMult < DIST);
checkHits(q(qPt, 34, distPrec), 0, null);
}
@Test
public void geohashRecursiveRandom() throws IOException {
init(12);
@ -105,9 +144,9 @@ public class TestRecursivePrefixTreeStrategy extends StrategyTestCase {
qcYoff + clusterCenter.getY());
double[] distRange = calcDistRange(queryCenter,clusterCenter,sideDegree);
//4.1 query a small box getting nothing
checkHits(queryCenter, distRange[0]*0.99, 0, null);
checkHits(q(queryCenter, distRange[0]*0.99), 0, null);
//4.2 Query a large box enclosing the cluster, getting everything
checkHits(queryCenter, distRange[1]*1.01, points.size(), null);
checkHits(q(queryCenter, distRange[1]*1.01), points.size(), null);
//4.3 Query a medium box getting some (calculate the correct solution and verify)
double queryDist = distRange[0] + (distRange[1]-distRange[0])/2;//average
@ -122,7 +161,7 @@ public class TestRecursivePrefixTreeStrategy extends StrategyTestCase {
ids = Arrays.copyOf(ids, ids_sz);
//assert ids_sz > 0 (can't because randomness keeps us from being able to)
checkHits(queryCenter, queryDist, ids.length, ids);
checkHits(q(queryCenter, queryDist), ids.length, ids);
}
}
@ -132,13 +171,20 @@ public class TestRecursivePrefixTreeStrategy extends StrategyTestCase {
}//randomTest()
//TODO can we use super.runTestQueries() ?
private void checkHits(Point pt, double dist, int assertNumFound, int[] assertIds) {
private SpatialArgs q(Point pt, double dist) {
return q(pt, dist, 0.0);
}
private SpatialArgs q(Point pt, double dist, double distPrec) {
Shape shape = ctx.makeCircle(pt,dist);
SpatialArgs args = new SpatialArgs(SpatialOperation.Intersects,shape);
args.setDistPrecision(0.0);
args.setDistPrecision(distPrec);
return args;
}
private void checkHits(SpatialArgs args, int assertNumFound, int[] assertIds) {
SearchResults got = executeQuery(strategy.makeQuery(args), 100);
assertEquals(""+shape,assertNumFound,got.numFound);
assertEquals("" + args, assertNumFound, got.numFound);
if (assertIds != null) {
Set<Integer> gotIds = new HashSet<Integer>();
for (SearchResult result : got.results) {
@ -150,7 +196,6 @@ public class TestRecursivePrefixTreeStrategy extends StrategyTestCase {
}
}
//
private Document newDoc(String id, Shape shape) {
Document doc = new Document();
doc.add(new StringField("id", id, Field.Store.YES));

View File

@ -114,7 +114,7 @@ public class Lucene40WithOrds extends PostingsFormat {
FieldsProducer ret = new BlockTermsReader(indexReader,
state.dir,
state.fieldInfos,
state.segmentInfo.name,
state.segmentInfo,
postings,
state.context,
TERMS_CACHE_SIZE,

View File

@ -183,7 +183,7 @@ public class MockFixedIntBlockPostingsFormat extends PostingsFormat {
FieldsProducer ret = new BlockTermsReader(indexReader,
state.dir,
state.fieldInfos,
state.segmentInfo.name,
state.segmentInfo,
postingsReader,
state.context,
1024,

View File

@ -207,7 +207,7 @@ public class MockVariableIntBlockPostingsFormat extends PostingsFormat {
FieldsProducer ret = new BlockTermsReader(indexReader,
state.dir,
state.fieldInfos,
state.segmentInfo.name,
state.segmentInfo,
postingsReader,
state.context,
1024,

View File

@ -328,7 +328,7 @@ public class MockRandomPostingsFormat extends PostingsFormat {
try {
fields = new BlockTreeTermsReader(state.dir,
state.fieldInfos,
state.segmentInfo.name,
state.segmentInfo,
postingsReader,
state.context,
state.segmentSuffix,
@ -398,7 +398,7 @@ public class MockRandomPostingsFormat extends PostingsFormat {
fields = new BlockTermsReader(indexReader,
state.dir,
state.fieldInfos,
state.segmentInfo.name,
state.segmentInfo,
postingsReader,
state.context,
termsCacheSize,

View File

@ -107,7 +107,7 @@ public class MockSepPostingsFormat extends PostingsFormat {
FieldsProducer ret = new BlockTermsReader(indexReader,
state.dir,
state.fieldInfos,
state.segmentInfo.name,
state.segmentInfo,
postingsReader,
state.context,
1024,

View File

@ -81,7 +81,7 @@ public class NestedPulsingPostingsFormat extends PostingsFormat {
pulsingReaderInner = new PulsingPostingsReader(docsReader);
pulsingReader = new PulsingPostingsReader(pulsingReaderInner);
FieldsProducer ret = new BlockTreeTermsReader(
state.dir, state.fieldInfos, state.segmentInfo.name,
state.dir, state.fieldInfos, state.segmentInfo,
pulsingReader,
state.context,
state.segmentSuffix,

View File

@ -37,7 +37,15 @@ Apache ZooKeeper 3.3.6
Upgrading from Solr 4.0.0-BETA
----------------------
In order to better support distributed search mode, the TermVectorComponent's response format has been changed so that if the schema defines a uniqueKeyField, then that field value is used as the "key" for each document in it's response section, instead of the internal lucene doc id. Users w/o a uniqueKeyField will continue to see the same response format. See SOLR-3229 for more details.
In order to better support distributed search mode, the TermVectorComponent's
response format has been changed so that if the schema defines a
uniqueKeyField, then that field value is used as the "key" for each document in
it's response section, instead of the internal lucene doc id. Users w/o a
uniqueKeyField will continue to see the same response format. See SOLR-3229
for more details.
If you are using SolrCloud's distributed update request capabilities and a non
string type id field, you must re-index.
Detailed Change List
----------------------
@ -48,6 +56,11 @@ New Features
* SOLR-3670: New CountFieldValuesUpdateProcessorFactory makes it easy to index
the number of values in another field for later use at query time. (hossman)
* SOLR-2768: new "mod(x,y)" function for computing the modulus of two value
sources. (hossman)
* SOLR-3238: Numerous small improvements to the Admin UI (steffkes)
Optimizations
----------------------
@ -125,6 +138,13 @@ Other Changes
* SOLR-3751: Add defensive checks for SolrCloud updates and requests that ensure
the local state matches what we can tell the request expected. (Mark Miller)
* SOLR-3773: Hash based on the external String id rather than the indexed
representation for distributed updates. (Michael Garski, yonik, Mark Miller)
* SOLR-3780: Maven build: Make solrj tests run separately from solr-core.
(Steve Rowe)
================== 4.0.0-BETA ===================

View File

@ -145,7 +145,22 @@ public class ExtractingRequestHandlerTest extends SolrTestCaseJ4 {
assertU(commit());
assertQ(req("stream_name:version_control.xml"), "//*[@numFound='1']");
loadLocal("extraction/word2003.doc", "fmap.created", "extractedDate", "fmap.producer", "extractedProducer",
"fmap.creator", "extractedCreator", "fmap.Keywords", "extractedKeywords",
"fmap.Author", "extractedAuthor",
"literal.id", "four",
"uprefix", "ignored_",
"fmap.content", "extractedContent",
"fmap.language", "extractedLanguage",
"fmap.Last-Modified", "extractedDate"
);
assertQ(req("title:\"Word 2003 Title\""), "//*[@numFound='0']");
// There is already a PDF file with this content:
assertQ(req("extractedContent:\"This is a test of PDF and Word extraction in Solr, it is only a test\""), "//*[@numFound='1']");
assertU(commit());
assertQ(req("title:\"Word 2003 Title\""), "//*[@numFound='1']");
// now 2 of them:
assertQ(req("extractedContent:\"This is a test of PDF and Word extraction in Solr, it is only a test\""), "//*[@numFound='2']");
}
@ -163,8 +178,7 @@ public class ExtractingRequestHandlerTest extends SolrTestCaseJ4 {
//"fmap.content_type", "abcxyz",
"commit", "true" // test immediate commit
);
assertTrue(false);
fail("Should throw SolrException");
} catch (SolrException e) {
//do nothing
} finally {

View File

@ -24,7 +24,6 @@ import org.apache.lucene.index.StoredDocument;
import org.apache.lucene.index.Term;
import org.apache.lucene.util.BytesRef;
import org.apache.solr.client.solrj.SolrResponse;
import org.apache.solr.client.solrj.util.ClientUtils;
import org.apache.solr.cloud.CloudDescriptor;
import org.apache.solr.cloud.ZkController;
import org.apache.solr.common.SolrDocument;
@ -38,7 +37,6 @@ import org.apache.solr.common.params.SolrParams;
import org.apache.solr.common.util.Hash;
import org.apache.solr.common.util.NamedList;
import org.apache.solr.common.util.StrUtils;
import org.apache.solr.core.CoreDescriptor;
import org.apache.solr.core.SolrCore;
import org.apache.solr.request.SolrQueryRequest;
import org.apache.solr.response.SolrQueryResponse;
@ -352,8 +350,6 @@ public class RealTimeGetComponent extends SearchComponent
// if shards=... then use that
if (zkController != null && params.get("shards") == null) {
SchemaField sf = rb.req.getSchema().getUniqueKeyField();
CloudDescriptor cloudDescriptor = rb.req.getCore().getCoreDescriptor().getCloudDescriptor();
String collection = cloudDescriptor.getCollectionName();
@ -362,9 +358,7 @@ public class RealTimeGetComponent extends SearchComponent
Map<String, List<String>> shardToId = new HashMap<String, List<String>>();
for (String id : allIds) {
BytesRef br = new BytesRef();
sf.getType().readableToIndexed(id, br);
int hash = Hash.murmurhash3_x86_32(br.bytes, br.offset, br.length, 0);
int hash = Hash.murmurhash3_x86_32(id, 0, id.length(), 0);
String shard = clusterState.getShard(hash, collection);
List<String> idsForShard = shardToId.get(shard);

View File

@ -177,6 +177,23 @@ public abstract class ValueSourceParser implements NamedListInitializedPlugin {
return new DivFloatFunction(a, b);
}
});
addParser("mod", new ValueSourceParser() {
@Override
public ValueSource parse(FunctionQParser fp) throws ParseException {
ValueSource a = fp.parseValueSource();
ValueSource b = fp.parseValueSource();
return new DualFloatFunction(a, b) {
@Override
protected String name() {
return "mod";
}
@Override
protected float func(int doc, FunctionValues aVals, FunctionValues bVals) {
return aVals.floatVal(doc) % bVals.floatVal(doc);
}
};
}
});
addParser("map", new ValueSourceParser() {
@Override
public ValueSource parse(FunctionQParser fp) throws ParseException {

View File

@ -19,7 +19,6 @@ package org.apache.solr.update;
import org.apache.lucene.document.Document;
import org.apache.lucene.index.Term;
import org.apache.lucene.search.Query;
import org.apache.lucene.util.BytesRef;
import org.apache.solr.common.SolrException;
import org.apache.solr.common.SolrInputDocument;
@ -28,8 +27,6 @@ import org.apache.solr.request.SolrQueryRequest;
import org.apache.solr.schema.IndexSchema;
import org.apache.solr.schema.SchemaField;
import java.util.List;
/**
*
*/
@ -118,6 +115,35 @@ public class AddUpdateCommand extends UpdateCommand {
return "(null)";
}
/**
* @return String id to hash
*/
public String getHashableId() {
String id = null;
IndexSchema schema = req.getSchema();
SchemaField sf = schema.getUniqueKeyField();
if (sf != null) {
if (solrDoc != null) {
SolrInputField field = solrDoc.getField(sf.getName());
int count = field == null ? 0 : field.getValueCount();
if (count == 0) {
if (overwrite) {
throw new SolrException(SolrException.ErrorCode.BAD_REQUEST,
"Document is missing mandatory uniqueKey field: "
+ sf.getName());
}
} else if (count > 1) {
throw new SolrException(SolrException.ErrorCode.BAD_REQUEST,
"Document contains multiple values for uniqueKey field: " + field);
} else {
return field.getFirstValue().toString();
}
}
}
return id;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder(super.toString());

View File

@ -1064,13 +1064,13 @@ public class DistributedUpdateProcessor extends UpdateRequestProcessor {
// make the hash pluggable of course.
// The hash also needs to be pluggable
private int hash(AddUpdateCommand cmd) {
BytesRef br = cmd.getIndexedId();
return Hash.murmurhash3_x86_32(br.bytes, br.offset, br.length, 0);
String hashableId = cmd.getHashableId();
return Hash.murmurhash3_x86_32(hashableId, 0, hashableId.length(), 0);
}
private int hash(DeleteUpdateCommand cmd) {
BytesRef br = cmd.getIndexedId();
return Hash.murmurhash3_x86_32(br.bytes, br.offset, br.length, 0);
return Hash.murmurhash3_x86_32(cmd.getId(), 0, cmd.getId().length(), 0);
}
// RetryNodes are used in the case of 'forward to leader' where we want

View File

@ -206,6 +206,16 @@
</analyzer>
</fieldType>
<fieldType name="text_fr" class="solr.TextField" positionIncrementGap="100">
<analyzer>
<tokenizer class="solr.StandardTokenizerFactory"/>
<!-- removes l', etc -->
<filter class="solr.ElisionFilterFactory" ignoreCase="true" />
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.FrenchLightStemFilterFactory"/>
</analyzer>
</fieldType>
<fieldType name="int" class="solr.TrieIntField" precisionStep="4" omitNorms="true" positionIncrementGap="0"/>
<fieldType name="float" class="solr.TrieFloatField" precisionStep="4" omitNorms="true" positionIncrementGap="0"/>
@ -250,6 +260,7 @@
<dynamicField name="*_folding" type="text_folding" indexed="true" stored="true"/>
<dynamicField name="*_stemming" type="text_stemming" indexed="true" stored="true"/>
<dynamicField name="*_keyword" type="text_keyword" indexed="true" stored="true"/>
<dynamicField name="*_fr" type="text_fr" indexed="true" stored="true"/>
</fields>

View File

@ -34,16 +34,16 @@ import org.apache.solr.common.params.CommonParams;
import org.apache.solr.common.params.ModifiableSolrParams;
import org.apache.solr.servlet.SolrDispatchFilter;
import com.carrotsearch.randomizedtesting.annotations.ThreadLeakAction;
import com.carrotsearch.randomizedtesting.annotations.ThreadLeakAction.Action;
/**
* This test simply does a bunch of basic things in solrcloud mode and asserts things
* work as expected.
*/
@ThreadLeakAction({Action.WARN})
public class BasicDistributedZk2Test extends AbstractFullDistribZkTestBase {
public BasicDistributedZk2Test() {
super();
}
/*
* (non-Javadoc)
*

View File

@ -70,11 +70,15 @@ import org.apache.solr.common.util.NamedList;
import org.apache.solr.update.SolrCmdDistributor.Request;
import org.apache.solr.util.DefaultSolrThreadFactory;
import com.carrotsearch.randomizedtesting.annotations.ThreadLeakAction;
import com.carrotsearch.randomizedtesting.annotations.ThreadLeakAction.Action;
/**
* This test simply does a bunch of basic things in solrcloud mode and asserts things
* work as expected.
*/
@Slow
@ThreadLeakAction({Action.WARN})
public class BasicDistributedZkTest extends AbstractDistribZkTestBase {
private static final String DEFAULT_COLLECTION = "collection1";

View File

@ -329,6 +329,13 @@ public class QueryEqualityTest extends SolrTestCaseJ4 {
"div(field(foo_i), sub(4,bar_i))");
}
public void testFuncMod() throws Exception {
assertFuncEquals("mod(5,4)", "mod(5, 4)");
assertFuncEquals("mod(foo_i,4)", "mod(foo_i, 4)",
"mod(field('foo_i'), 4)");
assertFuncEquals("mod(foo_i,sub(4,field('bar_i')))",
"mod(field(foo_i), sub(4,bar_i))");
}
public void testFuncMap() throws Exception {
assertFuncEquals("map(field(foo_i), 0, 45, 100)",
"map(foo_i, 0.0, 45, 100)");

View File

@ -0,0 +1,52 @@
package org.apache.solr.search;
import org.apache.solr.SolrTestCaseJ4;
import org.junit.BeforeClass;
import org.junit.Test;
/**
* 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.
*/
public class TestElisionMultitermQuery extends SolrTestCaseJ4 {
public String getCoreName() {
return "basic";
}
@BeforeClass
public static void beforeTests() throws Exception {
initCore("solrconfig-basic.xml", "schema-folding.xml");
assertU(adoc("id", "1", "text_fr", "l'Auberge"));
assertU(adoc("id", "2", "text_fr", "Auberge"));
assertU(adoc("id", "3", "text_fr", "other"));
assertU(commit());
}
@Test
public void testElisionMultitermQuery() {
assertQ(req("q", "text_fr:auberge"), "//result[@numFound='2']");
assertQ(req("q", "text_fr:Auberge"), "//result[@numFound='2']");
assertQ(req("q", "text_fr:l'auberge"), "//result[@numFound='2']");
assertQ(req("q", "text_fr:l'Auberge"), "//result[@numFound='2']");
assertQ(req("q", "text_fr:aub*"), "//result[@numFound='2']");
assertQ(req("q", "text_fr:Aub*"), "//result[@numFound='2']");
assertQ(req("q", "text_fr:l'aub*"), "//result[@numFound='2']");
assertQ(req("q", "text_fr:l'Aub*"), "//result[@numFound='2']");
}
}