From 35285cf29597d03b3c5bd692e5f8352f32c81d4d Mon Sep 17 00:00:00 2001 From: Michael McCandless Date: Sat, 25 Aug 2012 22:11:56 +0000 Subject: [PATCH 01/81] fix typo itsself -> itself git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1377363 13f79535-47bb-0310-9956-ffa450edef68 --- lucene/CHANGES.txt | 4 ++-- lucene/MIGRATE.txt | 4 ++-- lucene/core/src/java/org/apache/lucene/search/DocIdSet.java | 2 +- .../src/java/org/apache/lucene/search/NumericRangeQuery.java | 2 +- .../src/test/org/apache/lucene/util/TestNumericUtils.java | 4 ++-- lucene/site/xsl/index.xsl | 2 +- solr/CHANGES.txt | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt index 59627be4bb6..7818dbc779c 100644 --- a/lucene/CHANGES.txt +++ b/lucene/CHANGES.txt @@ -883,7 +883,7 @@ API Changes * LUCENE-3866: IndexReaderContext.leaves() is now the preferred way to access atomic sub-readers of any kind of IndexReader (for AtomicReaders it returns - itsself as only leaf with docBase=0). (Uwe Schindler) + itself as only leaf with docBase=0). (Uwe Schindler) New features @@ -2306,7 +2306,7 @@ Changes in backwards compatibility policy (Mike McCandless, Shai Erera) * LUCENE-3084: MergePolicy.OneMerge.segments was changed from - SegmentInfos to a List. SegmentInfos itsself was changed + SegmentInfos to a List. SegmentInfos itself was changed to no longer extend Vector (to update code that is using Vector-API, use the new asList() and asSet() methods returning unmodifiable collections; modifying SegmentInfos is now only possible through diff --git a/lucene/MIGRATE.txt b/lucene/MIGRATE.txt index 352bb71ddd3..291d586dc28 100644 --- a/lucene/MIGRATE.txt +++ b/lucene/MIGRATE.txt @@ -318,9 +318,9 @@ FieldCache, use them with care! The method IndexReader#getSequentialSubReaders() was moved to CompositeReader (see LUCENE-2858, LUCENE-3733) and made protected. It is solely used by -CompositeReader itsself to build its reader tree. To get all atomic leaves +CompositeReader itself to build its reader tree. To get all atomic leaves of a reader, use IndexReader#leaves(), which also provides the doc base -of each leave. Readers that are already atomic return itsself as leaf with +of each leave. Readers that are already atomic return itself as leaf with doc base 0. To emulate Lucene 3.x getSequentialSubReaders(), use getContext().children(). diff --git a/lucene/core/src/java/org/apache/lucene/search/DocIdSet.java b/lucene/core/src/java/org/apache/lucene/search/DocIdSet.java index 6345e6aaf36..cccd1f4a9bd 100644 --- a/lucene/core/src/java/org/apache/lucene/search/DocIdSet.java +++ b/lucene/core/src/java/org/apache/lucene/search/DocIdSet.java @@ -72,7 +72,7 @@ public abstract class DocIdSet { * external disk access (as {@link Bits} interface cannot throw * {@link IOException}). This is generally true for bit sets * like {@link org.apache.lucene.util.FixedBitSet}, which return - * itsself if they are used as {@code DocIdSet}. + * itself if they are used as {@code DocIdSet}. */ public Bits bits() throws IOException { return null; diff --git a/lucene/core/src/java/org/apache/lucene/search/NumericRangeQuery.java b/lucene/core/src/java/org/apache/lucene/search/NumericRangeQuery.java index 8dbb146507f..5e351976ab8 100644 --- a/lucene/core/src/java/org/apache/lucene/search/NumericRangeQuery.java +++ b/lucene/core/src/java/org/apache/lucene/search/NumericRangeQuery.java @@ -289,7 +289,7 @@ public final class NumericRangeQuery extends MultiTermQuery { @Override @SuppressWarnings("unchecked") protected TermsEnum getTermsEnum(final Terms terms, AttributeSource atts) throws IOException { - // very strange: java.lang.Number itsself is not Comparable, but all subclasses used here are + // very strange: java.lang.Number itself is not Comparable, but all subclasses used here are if (min != null && max != null && ((Comparable) min).compareTo(max) > 0) { return TermsEnum.EMPTY; } diff --git a/lucene/core/src/test/org/apache/lucene/util/TestNumericUtils.java b/lucene/core/src/test/org/apache/lucene/util/TestNumericUtils.java index eda91b019d5..9153a1b0db9 100644 --- a/lucene/core/src/test/org/apache/lucene/util/TestNumericUtils.java +++ b/lucene/core/src/test/org/apache/lucene/util/TestNumericUtils.java @@ -449,7 +449,7 @@ public class TestNumericUtils extends LuceneTestCase { // a inverse range should produce no sub-ranges assertLongRangeSplit(9500L, -5000L, 4, false, Collections.emptyList(), Collections.emptyList()); - // a 0-length range should reproduce the range itsself + // a 0-length range should reproduce the range itself assertLongRangeSplit(9500L, 9500L, 4, false, Arrays.asList( 0x800000000000251cL,0x800000000000251cL ), Arrays.asList( @@ -557,7 +557,7 @@ public class TestNumericUtils extends LuceneTestCase { // a inverse range should produce no sub-ranges assertIntRangeSplit(9500, -5000, 4, false, Collections.emptyList(), Collections.emptyList()); - // a 0-length range should reproduce the range itsself + // a 0-length range should reproduce the range itself assertIntRangeSplit(9500, 9500, 4, false, Arrays.asList( 0x8000251c,0x8000251c ), Arrays.asList( diff --git a/lucene/site/xsl/index.xsl b/lucene/site/xsl/index.xsl index c4ac01da8dc..f729eca10de 100644 --- a/lucene/site/xsl/index.xsl +++ b/lucene/site/xsl/index.xsl @@ -26,7 +26,7 @@ diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index 69d7e81903e..88a75309f7e 100644 --- a/solr/CHANGES.txt +++ b/solr/CHANGES.txt @@ -1690,7 +1690,7 @@ Bug Fixes * SOLR-2625: TermVectorComponent throws NPE if TF-IDF option is used without DF option. (Daniel Erenrich, Simon Willnauer) -* SOLR-2631: PingRequestHandler should not allow to ping itsself using "qt" +* SOLR-2631: PingRequestHandler should not allow to ping itself using "qt" param to prevent infinite loop. (Edoardo Tosca, Uwe Schindler) * SOLR-2636: Fix explain functionality for negative queries. (Tom Hill via yonik) From 50f38aa1ab59db1257dcff05e05de8691c16a955 Mon Sep 17 00:00:00 2001 From: Uwe Schindler Date: Sun, 26 Aug 2012 08:22:34 +0000 Subject: [PATCH 02/81] Fix test failure because of CFS files expected git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1377384 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/lucene/index/TestBackwardsCompatibility.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lucene/core/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java b/lucene/core/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java index 5cc5cc18f8e..40885cd444d 100644 --- a/lucene/core/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java +++ b/lucene/core/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java @@ -561,7 +561,10 @@ public class TestBackwardsCompatibility extends LuceneTestCase { Directory dir = newFSDirectory(outputDir); LogMergePolicy mergePolicy = newLogMergePolicy(true, 10); - mergePolicy.setNoCFSRatio(1); // This test expects all of its segments to be in CFS + + // This test expects all of its segments to be in CFS: + mergePolicy.setNoCFSRatio(1.0); + mergePolicy.setMaxCFSSegmentSizeMB(Double.POSITIVE_INFINITY); IndexWriter writer = new IndexWriter( dir, From ccd6a2ca54d81cf01875e1082395e2209d23adaa Mon Sep 17 00:00:00 2001 From: Uwe Schindler Date: Sun, 26 Aug 2012 09:31:40 +0000 Subject: [PATCH 03/81] Fix more test to not fail when rarely() selects a maximum segment size git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1377397 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/test/org/apache/lucene/index/TestAddIndexes.java | 7 ++++--- .../apache/lucene/index/TestBackwardsCompatibility.java | 1 + .../org/apache/lucene/index/TestIndexFileDeleter.java | 5 ++++- .../src/test/org/apache/lucene/index/TestIndexWriter.java | 5 ++++- .../org/apache/lucene/index/TestIndexWriterConfig.java | 8 ++++---- .../apache/lucene/index/TestIndexWriterExceptions.java | 5 ++++- .../test/org/apache/lucene/index/TestIndexSplitter.java | 3 ++- 7 files changed, 23 insertions(+), 11 deletions(-) diff --git a/lucene/core/src/test/org/apache/lucene/index/TestAddIndexes.java b/lucene/core/src/test/org/apache/lucene/index/TestAddIndexes.java index faf1096ddca..fcbd41415e9 100755 --- a/lucene/core/src/test/org/apache/lucene/index/TestAddIndexes.java +++ b/lucene/core/src/test/org/apache/lucene/index/TestAddIndexes.java @@ -1106,10 +1106,11 @@ public class TestAddIndexes extends LuceneTestCase { IndexReader[] readers = new IndexReader[] { DirectoryReader.open(dirs[0]), DirectoryReader.open(dirs[1]) }; Directory dir = new MockDirectoryWrapper(random(), new RAMDirectory()); - IndexWriterConfig conf = new IndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random())).setMergePolicy(newLogMergePolicy()); + IndexWriterConfig conf = new IndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random())).setMergePolicy(newLogMergePolicy(true)); LogMergePolicy lmp = (LogMergePolicy) conf.getMergePolicy(); - lmp.setUseCompoundFile(true); - lmp.setNoCFSRatio(1.0); // Force creation of CFS + // Force creation of CFS: + lmp.setNoCFSRatio(1.0); + lmp.setMaxCFSSegmentSizeMB(Double.POSITIVE_INFINITY); IndexWriter w3 = new IndexWriter(dir, conf); w3.addIndexes(readers); w3.close(); diff --git a/lucene/core/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java b/lucene/core/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java index 40885cd444d..7b7e3d299fa 100644 --- a/lucene/core/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java +++ b/lucene/core/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java @@ -510,6 +510,7 @@ public class TestBackwardsCompatibility extends LuceneTestCase { LogByteSizeMergePolicy mp = new LogByteSizeMergePolicy(); mp.setUseCompoundFile(doCFS); mp.setNoCFSRatio(1.0); + mp.setMaxCFSSegmentSizeMB(Double.POSITIVE_INFINITY); // TODO: remove randomness IndexWriterConfig conf = new IndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random())) .setMaxBufferedDocs(10).setMergePolicy(mp); diff --git a/lucene/core/src/test/org/apache/lucene/index/TestIndexFileDeleter.java b/lucene/core/src/test/org/apache/lucene/index/TestIndexFileDeleter.java index 040af7c0325..79a1d8bd501 100644 --- a/lucene/core/src/test/org/apache/lucene/index/TestIndexFileDeleter.java +++ b/lucene/core/src/test/org/apache/lucene/index/TestIndexFileDeleter.java @@ -45,7 +45,10 @@ public class TestIndexFileDeleter extends LuceneTestCase { } LogMergePolicy mergePolicy = newLogMergePolicy(true, 10); - mergePolicy.setNoCFSRatio(1); // This test expects all of its segments to be in CFS + + // This test expects all of its segments to be in CFS + mergePolicy.setNoCFSRatio(1.0); + mergePolicy.setMaxCFSSegmentSizeMB(Double.POSITIVE_INFINITY); IndexWriter writer = new IndexWriter( dir, diff --git a/lucene/core/src/test/org/apache/lucene/index/TestIndexWriter.java b/lucene/core/src/test/org/apache/lucene/index/TestIndexWriter.java index 78934660a8e..8f968afb0ed 100644 --- a/lucene/core/src/test/org/apache/lucene/index/TestIndexWriter.java +++ b/lucene/core/src/test/org/apache/lucene/index/TestIndexWriter.java @@ -1275,7 +1275,10 @@ public class TestIndexWriter extends LuceneTestCase { Directory dir = newMockDirectory(); // relies on windows semantics LogMergePolicy mergePolicy = newLogMergePolicy(true); - mergePolicy.setNoCFSRatio(1); // This test expects all of its segments to be in CFS + + // This test expects all of its segments to be in CFS + mergePolicy.setNoCFSRatio(1.0); + mergePolicy.setMaxCFSSegmentSizeMB(Double.POSITIVE_INFINITY); IndexWriter w = new IndexWriter( dir, diff --git a/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterConfig.java b/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterConfig.java index 10c66afb3dc..c05e16631b5 100644 --- a/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterConfig.java +++ b/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterConfig.java @@ -331,15 +331,15 @@ public class TestIndexWriterConfig extends LuceneTestCase { public void testLiveChangeToCFS() throws Exception { Directory dir = newDirectory(); IndexWriterConfig iwc = new IndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random())); - iwc.setMergePolicy(newLogMergePolicy()); + iwc.setMergePolicy(newLogMergePolicy(true)); // Start false: ((LogMergePolicy) iwc.getMergePolicy()).setUseCompoundFile(false); IndexWriter w = new IndexWriter(dir, iwc); - // Change to true: - ((LogMergePolicy) w.getConfig().getMergePolicy()).setNoCFSRatio(1.0); - ((LogMergePolicy) w.getConfig().getMergePolicy()).setUseCompoundFile(true); + LogMergePolicy lmp = ((LogMergePolicy) w.getConfig().getMergePolicy()); + lmp.setNoCFSRatio(1.0); + lmp.setMaxCFSSegmentSizeMB(Double.POSITIVE_INFINITY); Document doc = new Document(); doc.add(newStringField("field", "foo", Store.NO)); diff --git a/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterExceptions.java b/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterExceptions.java index c57ff3d0a60..376974fb39e 100644 --- a/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterExceptions.java +++ b/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterExceptions.java @@ -1134,7 +1134,10 @@ public class TestIndexWriterExceptions extends LuceneTestCase { newIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random())). setMergePolicy(newLogMergePolicy(true)) ); - ((LogMergePolicy) writer.getConfig().getMergePolicy()).setNoCFSRatio(1.0); + LogMergePolicy lmp = (LogMergePolicy) writer.getConfig().getMergePolicy(); + // Force creation of CFS: + lmp.setNoCFSRatio(1.0); + lmp.setMaxCFSSegmentSizeMB(Double.POSITIVE_INFINITY); // add 100 documents for (int i = 0; i < 100; i++) { diff --git a/lucene/misc/src/test/org/apache/lucene/index/TestIndexSplitter.java b/lucene/misc/src/test/org/apache/lucene/index/TestIndexSplitter.java index 643c11f8442..4ade4638959 100644 --- a/lucene/misc/src/test/org/apache/lucene/index/TestIndexSplitter.java +++ b/lucene/misc/src/test/org/apache/lucene/index/TestIndexSplitter.java @@ -36,7 +36,8 @@ public class TestIndexSplitter extends LuceneTestCase { Directory fsDir = newFSDirectory(dir); LogMergePolicy mergePolicy = new LogByteSizeMergePolicy(); - mergePolicy.setNoCFSRatio(1); + mergePolicy.setNoCFSRatio(1.0); + mergePolicy.setMaxCFSSegmentSizeMB(Double.POSITIVE_INFINITY); IndexWriter iw = new IndexWriter( fsDir, new IndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random())). From 6fbeade64b90842736b905313c9e20a8643a5dc5 Mon Sep 17 00:00:00 2001 From: Uwe Schindler Date: Sun, 26 Aug 2012 09:49:55 +0000 Subject: [PATCH 04/81] sorry! git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1377405 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/test/org/apache/lucene/index/TestIndexWriterConfig.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterConfig.java b/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterConfig.java index c05e16631b5..093d3b63922 100644 --- a/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterConfig.java +++ b/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterConfig.java @@ -337,9 +337,11 @@ public class TestIndexWriterConfig extends LuceneTestCase { ((LogMergePolicy) iwc.getMergePolicy()).setUseCompoundFile(false); IndexWriter w = new IndexWriter(dir, iwc); + // Change to true: LogMergePolicy lmp = ((LogMergePolicy) w.getConfig().getMergePolicy()); lmp.setNoCFSRatio(1.0); lmp.setMaxCFSSegmentSizeMB(Double.POSITIVE_INFINITY); + lmp.setUseCompoundFile(true); Document doc = new Document(); doc.add(newStringField("field", "foo", Store.NO)); From 71a58d78a4faf84daab1d64bea37ee69e2510506 Mon Sep 17 00:00:00 2001 From: Sami Siren Date: Mon, 27 Aug 2012 06:48:03 +0000 Subject: [PATCH 05/81] SOLR-3731: increase sleep git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1377579 13f79535-47bb-0310-9956-ffa450edef68 --- solr/core/src/test/org/apache/solr/cloud/OverseerTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solr/core/src/test/org/apache/solr/cloud/OverseerTest.java b/solr/core/src/test/org/apache/solr/cloud/OverseerTest.java index 1880b84c3d9..80436404007 100644 --- a/solr/core/src/test/org/apache/solr/cloud/OverseerTest.java +++ b/solr/core/src/test/org/apache/solr/cloud/OverseerTest.java @@ -143,7 +143,7 @@ public class OverseerTest extends SolrTestCaseJ4 { elector.joinElection(ctx); return shardId; } - Thread.sleep(200); + Thread.sleep(400); } return null; } From dc4b2cc7b672faf8ee933110a232758c60d59c56 Mon Sep 17 00:00:00 2001 From: Uwe Schindler Date: Mon, 27 Aug 2012 12:58:16 +0000 Subject: [PATCH 06/81] Make log output nicer git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1377663 13f79535-47bb-0310-9956-ffa450edef68 --- lucene/common-build.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lucene/common-build.xml b/lucene/common-build.xml index e0080fcefea..bb9b887a820 100644 --- a/lucene/common-build.xml +++ b/lucene/common-build.xml @@ -1697,7 +1697,7 @@ ${tests-output}/junit4-*.suites - per-JVM executed suites From 8e48cb3157a4b55577fba89d39fcfd72da43d4b8 Mon Sep 17 00:00:00 2001 From: Martijn van Groningen Date: Mon, 27 Aug 2012 14:22:13 +0000 Subject: [PATCH 07/81] LUCENE-4224: Add in-order scorer to query time joining and the out-of-order scorer throws an UOE git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1377691 13f79535-47bb-0310-9956-ffa450edef68 --- lucene/CHANGES.txt | 3 + .../search/join/TermsIncludingScoreQuery.java | 107 ++++++++++++++- .../lucene/search/join/TestJoinUtil.java | 124 +++++++++++------- 3 files changed, 181 insertions(+), 53 deletions(-) diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt index 7818dbc779c..8d5a3489243 100644 --- a/lucene/CHANGES.txt +++ b/lucene/CHANGES.txt @@ -110,6 +110,9 @@ Bug Fixes containing non-BMP Unicode characters. (Dawid Weiss, Robert Muir, Mike McCandless) +* LUCENE-4224: Add in-order scorer to query time joining and the + out-of-order scorer throws an UOE. (Martijn van Groningen, Robert Muir) + Optimizations * LUCENE-4317: Improve reuse of internal TokenStreams and StringReader diff --git a/lucene/join/src/java/org/apache/lucene/search/join/TermsIncludingScoreQuery.java b/lucene/join/src/java/org/apache/lucene/search/join/TermsIncludingScoreQuery.java index da5b72f225b..368c018b7e2 100644 --- a/lucene/join/src/java/org/apache/lucene/search/join/TermsIncludingScoreQuery.java +++ b/lucene/join/src/java/org/apache/lucene/search/join/TermsIncludingScoreQuery.java @@ -99,9 +99,9 @@ class TermsIncludingScoreQuery extends Query { private TermsEnum segmentTermsEnum; public Explanation explain(AtomicReaderContext context, int doc) throws IOException { - SVInnerScorer scorer = (SVInnerScorer) scorer(context, true, false, context.reader().getLiveDocs()); + SVInnerScorer scorer = (SVInnerScorer) scorer(context, false, false, context.reader().getLiveDocs()); if (scorer != null) { - if (scorer.advance(doc) == doc) { + if (scorer.advanceForExplainOnly(doc) == doc) { return scorer.explain(); } } @@ -127,7 +127,13 @@ class TermsIncludingScoreQuery extends Query { } segmentTermsEnum = terms.iterator(segmentTermsEnum); - if (multipleValuesPerDocument) { + if (scoreDocsInOrder) { + if (multipleValuesPerDocument) { + return new MVInOrderScorer(this, acceptDocs, segmentTermsEnum, context.reader().maxDoc()); + } else { + return new SVInOrderScorer(this, acceptDocs, segmentTermsEnum, context.reader().maxDoc()); + } + } else if (multipleValuesPerDocument) { return new MVInnerScorer(this, acceptDocs, segmentTermsEnum, context.reader().maxDoc()); } else { return new SVInnerScorer(this, acceptDocs, segmentTermsEnum); @@ -182,8 +188,7 @@ class TermsIncludingScoreQuery extends Query { } scoreUpto = upto; - TermsEnum.SeekStatus status = termsEnum.seekCeil(terms.get(ords[upto++], spare), true); - if (status == TermsEnum.SeekStatus.FOUND) { + if (termsEnum.seekExact(terms.get(ords[upto++], spare), true)) { docsEnum = reuse = termsEnum.docs(acceptDocs, reuse, 0); } } while (docsEnum == null); @@ -192,6 +197,10 @@ class TermsIncludingScoreQuery extends Query { } public int advance(int target) throws IOException { + throw new UnsupportedOperationException("advance() isn't supported because doc ids are emitted out of order"); + } + + private int advanceForExplainOnly(int target) throws IOException { int docId; do { docId = nextDoc(); @@ -251,8 +260,7 @@ class TermsIncludingScoreQuery extends Query { } scoreUpto = upto; - TermsEnum.SeekStatus status = termsEnum.seekCeil(terms.get(ords[upto++], spare), true); - if (status == TermsEnum.SeekStatus.FOUND) { + if (termsEnum.seekExact(terms.get(ords[upto++], spare), true)) { docsEnum = reuse = termsEnum.docs(acceptDocs, reuse, 0); } } while (docsEnum == null); @@ -274,4 +282,89 @@ class TermsIncludingScoreQuery extends Query { } } + class SVInOrderScorer extends Scorer { + + final DocIdSetIterator matchingDocsIterator; + final float[] scores; + + int currentDoc = -1; + + SVInOrderScorer(Weight weight, Bits acceptDocs, TermsEnum termsEnum, int maxDoc) throws IOException { + super(weight); + FixedBitSet matchingDocs = new FixedBitSet(maxDoc); + this.scores = new float[maxDoc]; + fillDocsAndScores(matchingDocs, acceptDocs, termsEnum); + this.matchingDocsIterator = matchingDocs.iterator(); + } + + protected void fillDocsAndScores(FixedBitSet matchingDocs, Bits acceptDocs, TermsEnum termsEnum) throws IOException { + BytesRef spare = new BytesRef(); + DocsEnum docsEnum = null; + for (int i = 0; i < terms.size(); i++) { + if (termsEnum.seekExact(terms.get(ords[i], spare), true)) { + docsEnum = termsEnum.docs(acceptDocs, docsEnum, 0); + float score = TermsIncludingScoreQuery.this.scores[ords[i]]; + for (int doc = docsEnum.nextDoc(); doc != DocIdSetIterator.NO_MORE_DOCS; doc = docsEnum.nextDoc()) { + matchingDocs.set(doc); + // In the case the same doc is also related to a another doc, a score might be overwritten. I think this + // can only happen in a many-to-many relation + scores[doc] = score; + } + } + } + } + + public float score() throws IOException { + return scores[currentDoc]; + } + + public float freq() throws IOException { + return 1; + } + + public int docID() { + return currentDoc; + } + + public int nextDoc() throws IOException { + return currentDoc = matchingDocsIterator.nextDoc(); + } + + public int advance(int target) throws IOException { + return currentDoc = matchingDocsIterator.advance(target); + } + } + + // This scorer deals with the fact that a document can have more than one score from multiple related documents. + class MVInOrderScorer extends SVInOrderScorer { + + MVInOrderScorer(Weight weight, Bits acceptDocs, TermsEnum termsEnum, int maxDoc) throws IOException { + super(weight, acceptDocs, termsEnum, maxDoc); + } + + @Override + protected void fillDocsAndScores(FixedBitSet matchingDocs, Bits acceptDocs, TermsEnum termsEnum) throws IOException { + BytesRef spare = new BytesRef(); + DocsEnum docsEnum = null; + for (int i = 0; i < terms.size(); i++) { + if (termsEnum.seekExact(terms.get(ords[i], spare), true)) { + docsEnum = termsEnum.docs(acceptDocs, docsEnum, 0); + float score = TermsIncludingScoreQuery.this.scores[ords[i]]; + for (int doc = docsEnum.nextDoc(); doc != DocIdSetIterator.NO_MORE_DOCS; doc = docsEnum.nextDoc()) { + // I prefer this: + /*if (scores[doc] < score) { + scores[doc] = score; + matchingDocs.set(doc); + }*/ + // But this behaves the same as MVInnerScorer and only then the tests will pass: + if (!matchingDocs.get(doc)) { + scores[doc] = score; + matchingDocs.set(doc); + } + } + } + } + } + } + } diff --git a/lucene/join/src/test/org/apache/lucene/search/join/TestJoinUtil.java b/lucene/join/src/test/org/apache/lucene/search/join/TestJoinUtil.java index fe33f91b26f..2d428761358 100644 --- a/lucene/join/src/test/org/apache/lucene/search/join/TestJoinUtil.java +++ b/lucene/join/src/test/org/apache/lucene/search/join/TestJoinUtil.java @@ -22,13 +22,17 @@ import org.apache.lucene.analysis.MockTokenizer; import org.apache.lucene.document.Document; import org.apache.lucene.document.Field; import org.apache.lucene.document.TextField; +import org.apache.lucene.index.AtomicReader; import org.apache.lucene.index.AtomicReaderContext; import org.apache.lucene.index.DocTermOrds; import org.apache.lucene.index.DocsEnum; import org.apache.lucene.index.IndexReader; import org.apache.lucene.index.MultiFields; import org.apache.lucene.index.RandomIndexWriter; +import org.apache.lucene.index.ReaderUtil; +import org.apache.lucene.index.SlowCompositeReaderWrapper; import org.apache.lucene.index.Term; +import org.apache.lucene.index.Terms; import org.apache.lucene.index.TermsEnum; import org.apache.lucene.search.Collector; import org.apache.lucene.search.DocIdSetIterator; @@ -53,7 +57,6 @@ import org.junit.Test; import java.io.IOException; import java.util.*; -@Slow public class TestJoinUtil extends LuceneTestCase { public void testSimple() throws Exception { @@ -229,6 +232,7 @@ public class TestJoinUtil extends LuceneTestCase { } @Test + @Slow public void testSingleValueRandomJoin() throws Exception { int maxIndexIter = _TestUtil.nextInt(random(), 6, 12); int maxSearchIter = _TestUtil.nextInt(random(), 13, 26); @@ -236,6 +240,7 @@ public class TestJoinUtil extends LuceneTestCase { } @Test + @Slow // This test really takes more time, that is why the number of iterations are smaller. public void testMultiValueRandomJoin() throws Exception { int maxIndexIter = _TestUtil.nextInt(random(), 3, 6); @@ -254,7 +259,8 @@ public class TestJoinUtil extends LuceneTestCase { dir, newIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random(), MockTokenizer.KEYWORD, false)).setMergePolicy(newLogMergePolicy()) ); - IndexIterationContext context = createContext(numberOfDocumentsToIndex, w, multipleValuesPerDocument); + final boolean scoreDocsInOrder = TestJoinUtil.random().nextBoolean(); + IndexIterationContext context = createContext(numberOfDocumentsToIndex, w, multipleValuesPerDocument, scoreDocsInOrder); IndexReader topLevelReader = w.getReader(); w.close(); @@ -310,7 +316,7 @@ public class TestJoinUtil extends LuceneTestCase { } public boolean acceptsDocsOutOfOrder() { - return topScoreDocCollector.acceptsDocsOutOfOrder(); + return scoreDocsInOrder; } }); // Asserting bit set... @@ -354,11 +360,11 @@ public class TestJoinUtil extends LuceneTestCase { } } - private IndexIterationContext createContext(int nDocs, RandomIndexWriter writer, boolean multipleValuesPerDocument) throws IOException { - return createContext(nDocs, writer, writer, multipleValuesPerDocument); + private IndexIterationContext createContext(int nDocs, RandomIndexWriter writer, boolean multipleValuesPerDocument, boolean scoreDocsInOrder) throws IOException { + return createContext(nDocs, writer, writer, multipleValuesPerDocument, scoreDocsInOrder); } - private IndexIterationContext createContext(int nDocs, RandomIndexWriter fromWriter, RandomIndexWriter toWriter, boolean multipleValuesPerDocument) throws IOException { + private IndexIterationContext createContext(int nDocs, RandomIndexWriter fromWriter, RandomIndexWriter toWriter, boolean multipleValuesPerDocument, boolean scoreDocsInOrder) throws IOException { IndexIterationContext context = new IndexIterationContext(); int numRandomValues = nDocs / 2; context.randomUniqueValues = new String[numRandomValues]; @@ -541,55 +547,81 @@ public class TestJoinUtil extends LuceneTestCase { final Map docToJoinScore = new HashMap(); if (multipleValuesPerDocument) { - toSearcher.search(new MatchAllDocsQuery(), new Collector() { + if (scoreDocsInOrder) { + AtomicReader slowCompositeReader = SlowCompositeReaderWrapper.wrap(toSearcher.getIndexReader()); + Terms terms = slowCompositeReader.terms(toField); + if (terms != null) { + DocsEnum docsEnum = null; + TermsEnum termsEnum = null; + SortedSet joinValues = new TreeSet(BytesRef.getUTF8SortedAsUnicodeComparator()); + joinValues.addAll(joinValueToJoinScores.keySet()); + for (BytesRef joinValue : joinValues) { + termsEnum = terms.iterator(termsEnum); + if (termsEnum.seekExact(joinValue, true)) { + docsEnum = termsEnum.docs(slowCompositeReader.getLiveDocs(), docsEnum, 0); + JoinScore joinScore = joinValueToJoinScores.get(joinValue); - private DocTermOrds docTermOrds; - private TermsEnum docTermsEnum; - private DocTermOrds.TermOrdsIterator reuse; - private int docBase; - - public void collect(int doc) throws IOException { - if (docTermOrds.isEmpty()) { - return; + for (int doc = docsEnum.nextDoc(); doc != DocIdSetIterator.NO_MORE_DOCS; doc = docsEnum.nextDoc()) { + // First encountered join value determines the score. + // Something to keep in mind for many-to-many relations. + if (!docToJoinScore.containsKey(doc)) { + docToJoinScore.put(doc, joinScore); + } + } + } } + } + } else { + toSearcher.search(new MatchAllDocsQuery(), new Collector() { - reuse = docTermOrds.lookup(doc, reuse); - int[] buffer = new int[5]; + private DocTermOrds docTermOrds; + private TermsEnum docTermsEnum; + private DocTermOrds.TermOrdsIterator reuse; + private int docBase; - int chunk; - do { - chunk = reuse.read(buffer); - if (chunk == 0) { + public void collect(int doc) throws IOException { + if (docTermOrds.isEmpty()) { return; } - for (int idx = 0; idx < chunk; idx++) { - int key = buffer[idx]; - docTermsEnum.seekExact((long) key); - JoinScore joinScore = joinValueToJoinScores.get(docTermsEnum.term()); - if (joinScore == null) { - continue; - } - Integer basedDoc = docBase + doc; - // First encountered join value determines the score. - // Something to keep in mind for many-to-many relations. - if (!docToJoinScore.containsKey(basedDoc)) { - docToJoinScore.put(basedDoc, joinScore); - } - } - } while (chunk >= buffer.length); - } + reuse = docTermOrds.lookup(doc, reuse); + int[] buffer = new int[5]; - public void setNextReader(AtomicReaderContext context) throws IOException { - docBase = context.docBase; - docTermOrds = FieldCache.DEFAULT.getDocTermOrds(context.reader(), toField); - docTermsEnum = docTermOrds.getOrdTermsEnum(context.reader()); - reuse = null; - } + int chunk; + do { + chunk = reuse.read(buffer); + if (chunk == 0) { + return; + } - public boolean acceptsDocsOutOfOrder() {return false;} - public void setScorer(Scorer scorer) {} - }); + for (int idx = 0; idx < chunk; idx++) { + int key = buffer[idx]; + docTermsEnum.seekExact((long) key); + JoinScore joinScore = joinValueToJoinScores.get(docTermsEnum.term()); + if (joinScore == null) { + continue; + } + Integer basedDoc = docBase + doc; + // First encountered join value determines the score. + // Something to keep in mind for many-to-many relations. + if (!docToJoinScore.containsKey(basedDoc)) { + docToJoinScore.put(basedDoc, joinScore); + } + } + } while (chunk >= buffer.length); + } + + public void setNextReader(AtomicReaderContext context) throws IOException { + docBase = context.docBase; + docTermOrds = FieldCache.DEFAULT.getDocTermOrds(context.reader(), toField); + docTermsEnum = docTermOrds.getOrdTermsEnum(context.reader()); + reuse = null; + } + + public boolean acceptsDocsOutOfOrder() {return false;} + public void setScorer(Scorer scorer) {} + }); + } } else { toSearcher.search(new MatchAllDocsQuery(), new Collector() { From 458fcb444614f522938ca0f83ce96f4df004c41f Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Mon, 27 Aug 2012 14:47:19 +0000 Subject: [PATCH 08/81] LUCENE-3923: fail the build on wrong svn:eol-style git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1377702 13f79535-47bb-0310-9956-ffa450edef68 --- build.xml | 8 +- dev-tools/idea/.idea/libraries/HSQLDB.xml | 16 +- lucene/build.xml | 10 + .../bloom/BloomFilteringPostingsFormat.java | 970 +++++++++--------- .../apache/lucene/codecs/bloom/package.html | 48 +- .../apache/lucene/util/hash/HashFunction.java | 168 +-- .../apache/lucene/util/hash/MurmurHash2.java | 210 ++-- .../org/apache/lucene/util/hash/package.html | 48 +- .../org.apache.lucene.util.hash.HashFunction | 32 +- .../lucene/spatial/bbox/package-info.java | 48 +- .../src/test-files/data/simple-bbox.txt | 10 +- .../src/test-files/simple-Queries-BBox.txt | 26 +- .../lucene/spatial/bbox/TestBBoxStrategy.java | 120 +-- .../TestBloomFilteredLucene40Postings.java | 154 +-- .../apache/lucene/codecs/bloom/package.html | 50 +- lucene/tools/src/java/lucene-solr.antlib.xml | 3 + .../lucene/validation/SVNEolCheckTask.java | 126 +++ .../org/apache/solr/logging/CircularList.java | 308 +++--- .../org/apache/solr/logging/LogWatcher.java | 212 ++-- .../org/apache/solr/logging/LoggerInfo.java | 134 +-- .../org/apache/solr/logging/jul/JulInfo.java | 138 +-- .../apache/solr/logging/jul/JulWatcher.java | 336 +++--- .../solr/logging/jul/RecordHandler.java | 92 +- solr/example/cloud-scripts/zkcli.bat | 24 +- 24 files changed, 1718 insertions(+), 1573 deletions(-) create mode 100644 lucene/tools/src/java/org/apache/lucene/validation/SVNEolCheckTask.java diff --git a/build.xml b/build.xml index 8da4c40328c..33a9a9bca40 100644 --- a/build.xml +++ b/build.xml @@ -74,6 +74,12 @@ The following files contain @author tags or nocommits:${line.separator}${validate.patternsFound} + + + + + + @@ -256,7 +262,7 @@ - + diff --git a/dev-tools/idea/.idea/libraries/HSQLDB.xml b/dev-tools/idea/.idea/libraries/HSQLDB.xml index e5d6017f81b..4eb35d50715 100644 --- a/dev-tools/idea/.idea/libraries/HSQLDB.xml +++ b/dev-tools/idea/.idea/libraries/HSQLDB.xml @@ -1,9 +1,9 @@ - - - - - - - - + + + + + + + + \ No newline at end of file diff --git a/lucene/build.xml b/lucene/build.xml index 8d9c2986ca9..d6ed8074af0 100644 --- a/lucene/build.xml +++ b/lucene/build.xml @@ -198,6 +198,16 @@ + + + + + + + + + + diff --git a/lucene/core/src/java/org/apache/lucene/codecs/bloom/BloomFilteringPostingsFormat.java b/lucene/core/src/java/org/apache/lucene/codecs/bloom/BloomFilteringPostingsFormat.java index 35d4a8ee501..72cd94d40f0 100644 --- a/lucene/core/src/java/org/apache/lucene/codecs/bloom/BloomFilteringPostingsFormat.java +++ b/lucene/core/src/java/org/apache/lucene/codecs/bloom/BloomFilteringPostingsFormat.java @@ -1,485 +1,485 @@ -package org.apache.lucene.codecs.bloom; - -/** - * 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. - */ - -import java.io.IOException; -import java.util.ArrayList; -import java.util.Comparator; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; - -import org.apache.lucene.codecs.CodecUtil; -import org.apache.lucene.codecs.FieldsConsumer; -import org.apache.lucene.codecs.FieldsProducer; -import org.apache.lucene.codecs.PostingsConsumer; -import org.apache.lucene.codecs.PostingsFormat; -import org.apache.lucene.codecs.TermStats; -import org.apache.lucene.codecs.TermsConsumer; -import org.apache.lucene.index.DocsAndPositionsEnum; -import org.apache.lucene.index.DocsEnum; -import org.apache.lucene.index.FieldInfo; -import org.apache.lucene.index.IndexFileNames; -import org.apache.lucene.index.SegmentReadState; -import org.apache.lucene.index.SegmentWriteState; -import org.apache.lucene.index.Terms; -import org.apache.lucene.index.TermsEnum; -import org.apache.lucene.store.DataOutput; -import org.apache.lucene.store.IndexInput; -import org.apache.lucene.store.IndexOutput; -import org.apache.lucene.util.Bits; -import org.apache.lucene.util.BytesRef; -import org.apache.lucene.util.FuzzySet; -import org.apache.lucene.util.FuzzySet.ContainsResult; -import org.apache.lucene.util.IOUtils; -import org.apache.lucene.util.automaton.CompiledAutomaton; -import org.apache.lucene.util.hash.MurmurHash2; - -/** - *

- * A {@link PostingsFormat} useful for low doc-frequency fields such as primary - * keys. Bloom filters are maintained in a ".blm" file which offers "fast-fail" - * for reads in segments known to have no record of the key. A choice of - * delegate PostingsFormat is used to record all other Postings data. - *

- *

- * A choice of {@link BloomFilterFactory} can be passed to tailor Bloom Filter - * settings on a per-field basis. The default configuration is - * {@link DefaultBloomFilterFactory} which allocates a ~8mb bitset and hashes - * values using {@link MurmurHash2}. This should be suitable for most purposes. - *

- *

- * The format of the blm file is as follows: - *

- *
    - *
  • BloomFilter (.blm) --> Header, DelegatePostingsFormatName, - * NumFilteredFields, FilterNumFilteredFields
  • - *
  • Filter --> FieldNumber, FuzzySet
  • - *
  • FuzzySet -->See {@link FuzzySet#serialize(DataOutput)}
  • - *
  • Header --> {@link CodecUtil#writeHeader CodecHeader}
  • - *
  • DelegatePostingsFormatName --> {@link DataOutput#writeString(String) - * String} The name of a ServiceProvider registered {@link PostingsFormat}
  • - *
  • NumFilteredFields --> {@link DataOutput#writeInt Uint32}
  • - *
  • FieldNumber --> {@link DataOutput#writeInt Uint32} The number of the - * field in this segment
  • - *
- * @lucene.experimental - */ -public class BloomFilteringPostingsFormat extends PostingsFormat { - - public static final String BLOOM_CODEC_NAME = "BloomFilter"; - public static final int BLOOM_CODEC_VERSION = 1; - - /** Extension of Bloom Filters file */ - static final String BLOOM_EXTENSION = "blm"; - - BloomFilterFactory bloomFilterFactory = new DefaultBloomFilterFactory(); - private PostingsFormat delegatePostingsFormat; - - /** - * Creates Bloom filters for a selection of fields created in the index. This - * is recorded as a set of Bitsets held as a segment summary in an additional - * "blm" file. This PostingsFormat delegates to a choice of delegate - * PostingsFormat for encoding all other postings data. - * - * @param delegatePostingsFormat - * The PostingsFormat that records all the non-bloom filter data i.e. - * postings info. - * @param bloomFilterFactory - * The {@link BloomFilterFactory} responsible for sizing BloomFilters - * appropriately - */ - public BloomFilteringPostingsFormat(PostingsFormat delegatePostingsFormat, - BloomFilterFactory bloomFilterFactory) { - super(BLOOM_CODEC_NAME); - this.delegatePostingsFormat = delegatePostingsFormat; - this.bloomFilterFactory = bloomFilterFactory; - } - - /** - * Creates Bloom filters for a selection of fields created in the index. This - * is recorded as a set of Bitsets held as a segment summary in an additional - * "blm" file. This PostingsFormat delegates to a choice of delegate - * PostingsFormat for encoding all other postings data. This choice of - * constructor defaults to the {@link DefaultBloomFilterFactory} for - * configuring per-field BloomFilters. - * - * @param delegatePostingsFormat - * The PostingsFormat that records all the non-bloom filter data i.e. - * postings info. - */ - public BloomFilteringPostingsFormat(PostingsFormat delegatePostingsFormat) { - this(delegatePostingsFormat, new DefaultBloomFilterFactory()); - } - - // Used only by core Lucene at read-time via Service Provider instantiation - - // do not use at Write-time in application code. - public BloomFilteringPostingsFormat() { - super(BLOOM_CODEC_NAME); - } - - public FieldsConsumer fieldsConsumer(SegmentWriteState state) - throws IOException { - if (delegatePostingsFormat == null) { - throw new UnsupportedOperationException("Error - " + getClass().getName() - + " has been constructed without a choice of PostingsFormat"); - } - return new BloomFilteredFieldsConsumer( - delegatePostingsFormat.fieldsConsumer(state), state, - delegatePostingsFormat); - } - - public FieldsProducer fieldsProducer(SegmentReadState state) - throws IOException { - return new BloomFilteredFieldsProducer(state); - } - - public class BloomFilteredFieldsProducer extends FieldsProducer { - private FieldsProducer delegateFieldsProducer; - HashMap bloomsByFieldName = new HashMap(); - - public BloomFilteredFieldsProducer(SegmentReadState state) - throws IOException { - - String bloomFileName = IndexFileNames.segmentFileName( - state.segmentInfo.name, state.segmentSuffix, BLOOM_EXTENSION); - IndexInput bloomIn = null; - try { - bloomIn = state.dir.openInput(bloomFileName, state.context); - CodecUtil.checkHeader(bloomIn, BLOOM_CODEC_NAME, BLOOM_CODEC_VERSION, - BLOOM_CODEC_VERSION); - // // Load the hash function used in the BloomFilter - // hashFunction = HashFunction.forName(bloomIn.readString()); - // Load the delegate postings format - PostingsFormat delegatePostingsFormat = PostingsFormat.forName(bloomIn - .readString()); - - this.delegateFieldsProducer = delegatePostingsFormat - .fieldsProducer(state); - int numBlooms = bloomIn.readInt(); - for (int i = 0; i < numBlooms; i++) { - int fieldNum = bloomIn.readInt(); - FuzzySet bloom = FuzzySet.deserialize(bloomIn); - FieldInfo fieldInfo = state.fieldInfos.fieldInfo(fieldNum); - bloomsByFieldName.put(fieldInfo.name, bloom); - } - } finally { - IOUtils.close(bloomIn); - } - - } - - public Iterator iterator() { - return delegateFieldsProducer.iterator(); - } - - public void close() throws IOException { - delegateFieldsProducer.close(); - } - - public Terms terms(String field) throws IOException { - FuzzySet filter = bloomsByFieldName.get(field); - if (filter == null) { - return delegateFieldsProducer.terms(field); - } else { - Terms result = delegateFieldsProducer.terms(field); - if (result == null) { - return null; - } - return new BloomFilteredTerms(result, filter); - } - } - - public int size() { - return delegateFieldsProducer.size(); - } - - class BloomFilteredTerms extends Terms { - private Terms delegateTerms; - private FuzzySet filter; - - public BloomFilteredTerms(Terms terms, FuzzySet filter) { - this.delegateTerms = terms; - this.filter = filter; - } - - @Override - public TermsEnum intersect(CompiledAutomaton compiled, - final BytesRef startTerm) throws IOException { - return delegateTerms.intersect(compiled, startTerm); - } - - @Override - public TermsEnum iterator(TermsEnum reuse) throws IOException { - TermsEnum result; - if ((reuse != null) && (reuse instanceof BloomFilteredTermsEnum)) { - // recycle the existing BloomFilteredTermsEnum by asking the delegate - // to recycle its contained TermsEnum - BloomFilteredTermsEnum bfte = (BloomFilteredTermsEnum) reuse; - if (bfte.filter == filter) { - bfte.delegateTermsEnum = delegateTerms - .iterator(bfte.delegateTermsEnum); - return bfte; - } - } - // We have been handed something we cannot reuse (either null, wrong - // class or wrong filter) so allocate a new object - result = new BloomFilteredTermsEnum(delegateTerms.iterator(reuse), - filter); - return result; - } - - @Override - public Comparator getComparator() throws IOException { - return delegateTerms.getComparator(); - } - - @Override - public long size() throws IOException { - return delegateTerms.size(); - } - - @Override - public long getSumTotalTermFreq() throws IOException { - return delegateTerms.getSumTotalTermFreq(); - } - - @Override - public long getSumDocFreq() throws IOException { - return delegateTerms.getSumDocFreq(); - } - - @Override - public int getDocCount() throws IOException { - return delegateTerms.getDocCount(); - } - - @Override - public boolean hasOffsets() { - return delegateTerms.hasOffsets(); - } - - @Override - public boolean hasPositions() { - return delegateTerms.hasPositions(); - } - - @Override - public boolean hasPayloads() { - return delegateTerms.hasPayloads(); - } - } - - class BloomFilteredTermsEnum extends TermsEnum { - - TermsEnum delegateTermsEnum; - private FuzzySet filter; - - public BloomFilteredTermsEnum(TermsEnum iterator, FuzzySet filter) { - this.delegateTermsEnum = iterator; - this.filter = filter; - } - - @Override - public final BytesRef next() throws IOException { - return delegateTermsEnum.next(); - } - - @Override - public final Comparator getComparator() { - return delegateTermsEnum.getComparator(); - } - - @Override - public final boolean seekExact(BytesRef text, boolean useCache) - throws IOException { - // The magical fail-fast speed up that is the entire point of all of - // this code - save a disk seek if there is a match on an in-memory - // structure - // that may occasionally give a false positive but guaranteed no false - // negatives - if (filter.contains(text) == ContainsResult.NO) { - return false; - } - return delegateTermsEnum.seekExact(text, useCache); - } - - @Override - public final SeekStatus seekCeil(BytesRef text, boolean useCache) - throws IOException { - return delegateTermsEnum.seekCeil(text, useCache); - } - - @Override - public final void seekExact(long ord) throws IOException { - delegateTermsEnum.seekExact(ord); - } - - @Override - public final BytesRef term() throws IOException { - return delegateTermsEnum.term(); - } - - @Override - public final long ord() throws IOException { - return delegateTermsEnum.ord(); - } - - @Override - public final int docFreq() throws IOException { - return delegateTermsEnum.docFreq(); - } - - @Override - public final long totalTermFreq() throws IOException { - return delegateTermsEnum.totalTermFreq(); - } - - - @Override - public DocsAndPositionsEnum docsAndPositions(Bits liveDocs, - DocsAndPositionsEnum reuse, int flags) throws IOException { - return delegateTermsEnum.docsAndPositions(liveDocs, reuse, flags); - } - - @Override - public DocsEnum docs(Bits liveDocs, DocsEnum reuse, int flags) - throws IOException { - return delegateTermsEnum.docs(liveDocs, reuse, flags); - } - - - } - - } - - class BloomFilteredFieldsConsumer extends FieldsConsumer { - private FieldsConsumer delegateFieldsConsumer; - private Map bloomFilters = new HashMap(); - private SegmentWriteState state; - - // private PostingsFormat delegatePostingsFormat; - - public BloomFilteredFieldsConsumer(FieldsConsumer fieldsConsumer, - SegmentWriteState state, PostingsFormat delegatePostingsFormat) { - this.delegateFieldsConsumer = fieldsConsumer; - // this.delegatePostingsFormat=delegatePostingsFormat; - this.state = state; - } - - @Override - public TermsConsumer addField(FieldInfo field) throws IOException { - FuzzySet bloomFilter = bloomFilterFactory.getSetForField(state,field); - if (bloomFilter != null) { - assert bloomFilters.containsKey(field) == false; - bloomFilters.put(field, bloomFilter); - return new WrappedTermsConsumer(delegateFieldsConsumer.addField(field),bloomFilter); - } else { - // No, use the unfiltered fieldsConsumer - we are not interested in - // recording any term Bitsets. - return delegateFieldsConsumer.addField(field); - } - } - - @Override - public void close() throws IOException { - delegateFieldsConsumer.close(); - // Now we are done accumulating values for these fields - List> nonSaturatedBlooms = new ArrayList>(); - - for (Entry entry : bloomFilters.entrySet()) { - FuzzySet bloomFilter = entry.getValue(); - if(!bloomFilterFactory.isSaturated(bloomFilter,entry.getKey())){ - nonSaturatedBlooms.add(entry); - } - } - String bloomFileName = IndexFileNames.segmentFileName( - state.segmentInfo.name, state.segmentSuffix, BLOOM_EXTENSION); - IndexOutput bloomOutput = null; - try { - bloomOutput = state.directory - .createOutput(bloomFileName, state.context); - CodecUtil.writeHeader(bloomOutput, BLOOM_CODEC_NAME, - BLOOM_CODEC_VERSION); - // remember the name of the postings format we will delegate to - bloomOutput.writeString(delegatePostingsFormat.getName()); - - // First field in the output file is the number of fields+blooms saved - bloomOutput.writeInt(nonSaturatedBlooms.size()); - for (Entry entry : nonSaturatedBlooms) { - FieldInfo fieldInfo = entry.getKey(); - FuzzySet bloomFilter = entry.getValue(); - bloomOutput.writeInt(fieldInfo.number); - saveAppropriatelySizedBloomFilter(bloomOutput, bloomFilter, fieldInfo); - } - } finally { - IOUtils.close(bloomOutput); - } - //We are done with large bitsets so no need to keep them hanging around - bloomFilters.clear(); - } - - private void saveAppropriatelySizedBloomFilter(IndexOutput bloomOutput, - FuzzySet bloomFilter, FieldInfo fieldInfo) throws IOException { - - FuzzySet rightSizedSet = bloomFilterFactory.downsize(fieldInfo, - bloomFilter); - if (rightSizedSet == null) { - rightSizedSet = bloomFilter; - } - rightSizedSet.serialize(bloomOutput); - } - - } - - class WrappedTermsConsumer extends TermsConsumer { - private TermsConsumer delegateTermsConsumer; - private FuzzySet bloomFilter; - - public WrappedTermsConsumer(TermsConsumer termsConsumer,FuzzySet bloomFilter) { - this.delegateTermsConsumer = termsConsumer; - this.bloomFilter = bloomFilter; - } - - public PostingsConsumer startTerm(BytesRef text) throws IOException { - return delegateTermsConsumer.startTerm(text); - } - - public void finishTerm(BytesRef text, TermStats stats) throws IOException { - - // Record this term in our BloomFilter - if (stats.docFreq > 0) { - bloomFilter.addValue(text); - } - delegateTermsConsumer.finishTerm(text, stats); - } - - public void finish(long sumTotalTermFreq, long sumDocFreq, int docCount) - throws IOException { - delegateTermsConsumer.finish(sumTotalTermFreq, sumDocFreq, docCount); - } - - public Comparator getComparator() throws IOException { - return delegateTermsConsumer.getComparator(); - } - - } - -} +package org.apache.lucene.codecs.bloom; + +/** + * 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. + */ + +import java.io.IOException; +import java.util.ArrayList; +import java.util.Comparator; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; + +import org.apache.lucene.codecs.CodecUtil; +import org.apache.lucene.codecs.FieldsConsumer; +import org.apache.lucene.codecs.FieldsProducer; +import org.apache.lucene.codecs.PostingsConsumer; +import org.apache.lucene.codecs.PostingsFormat; +import org.apache.lucene.codecs.TermStats; +import org.apache.lucene.codecs.TermsConsumer; +import org.apache.lucene.index.DocsAndPositionsEnum; +import org.apache.lucene.index.DocsEnum; +import org.apache.lucene.index.FieldInfo; +import org.apache.lucene.index.IndexFileNames; +import org.apache.lucene.index.SegmentReadState; +import org.apache.lucene.index.SegmentWriteState; +import org.apache.lucene.index.Terms; +import org.apache.lucene.index.TermsEnum; +import org.apache.lucene.store.DataOutput; +import org.apache.lucene.store.IndexInput; +import org.apache.lucene.store.IndexOutput; +import org.apache.lucene.util.Bits; +import org.apache.lucene.util.BytesRef; +import org.apache.lucene.util.FuzzySet; +import org.apache.lucene.util.FuzzySet.ContainsResult; +import org.apache.lucene.util.IOUtils; +import org.apache.lucene.util.automaton.CompiledAutomaton; +import org.apache.lucene.util.hash.MurmurHash2; + +/** + *

+ * A {@link PostingsFormat} useful for low doc-frequency fields such as primary + * keys. Bloom filters are maintained in a ".blm" file which offers "fast-fail" + * for reads in segments known to have no record of the key. A choice of + * delegate PostingsFormat is used to record all other Postings data. + *

+ *

+ * A choice of {@link BloomFilterFactory} can be passed to tailor Bloom Filter + * settings on a per-field basis. The default configuration is + * {@link DefaultBloomFilterFactory} which allocates a ~8mb bitset and hashes + * values using {@link MurmurHash2}. This should be suitable for most purposes. + *

+ *

+ * The format of the blm file is as follows: + *

+ *
    + *
  • BloomFilter (.blm) --> Header, DelegatePostingsFormatName, + * NumFilteredFields, FilterNumFilteredFields
  • + *
  • Filter --> FieldNumber, FuzzySet
  • + *
  • FuzzySet -->See {@link FuzzySet#serialize(DataOutput)}
  • + *
  • Header --> {@link CodecUtil#writeHeader CodecHeader}
  • + *
  • DelegatePostingsFormatName --> {@link DataOutput#writeString(String) + * String} The name of a ServiceProvider registered {@link PostingsFormat}
  • + *
  • NumFilteredFields --> {@link DataOutput#writeInt Uint32}
  • + *
  • FieldNumber --> {@link DataOutput#writeInt Uint32} The number of the + * field in this segment
  • + *
+ * @lucene.experimental + */ +public class BloomFilteringPostingsFormat extends PostingsFormat { + + public static final String BLOOM_CODEC_NAME = "BloomFilter"; + public static final int BLOOM_CODEC_VERSION = 1; + + /** Extension of Bloom Filters file */ + static final String BLOOM_EXTENSION = "blm"; + + BloomFilterFactory bloomFilterFactory = new DefaultBloomFilterFactory(); + private PostingsFormat delegatePostingsFormat; + + /** + * Creates Bloom filters for a selection of fields created in the index. This + * is recorded as a set of Bitsets held as a segment summary in an additional + * "blm" file. This PostingsFormat delegates to a choice of delegate + * PostingsFormat for encoding all other postings data. + * + * @param delegatePostingsFormat + * The PostingsFormat that records all the non-bloom filter data i.e. + * postings info. + * @param bloomFilterFactory + * The {@link BloomFilterFactory} responsible for sizing BloomFilters + * appropriately + */ + public BloomFilteringPostingsFormat(PostingsFormat delegatePostingsFormat, + BloomFilterFactory bloomFilterFactory) { + super(BLOOM_CODEC_NAME); + this.delegatePostingsFormat = delegatePostingsFormat; + this.bloomFilterFactory = bloomFilterFactory; + } + + /** + * Creates Bloom filters for a selection of fields created in the index. This + * is recorded as a set of Bitsets held as a segment summary in an additional + * "blm" file. This PostingsFormat delegates to a choice of delegate + * PostingsFormat for encoding all other postings data. This choice of + * constructor defaults to the {@link DefaultBloomFilterFactory} for + * configuring per-field BloomFilters. + * + * @param delegatePostingsFormat + * The PostingsFormat that records all the non-bloom filter data i.e. + * postings info. + */ + public BloomFilteringPostingsFormat(PostingsFormat delegatePostingsFormat) { + this(delegatePostingsFormat, new DefaultBloomFilterFactory()); + } + + // Used only by core Lucene at read-time via Service Provider instantiation - + // do not use at Write-time in application code. + public BloomFilteringPostingsFormat() { + super(BLOOM_CODEC_NAME); + } + + public FieldsConsumer fieldsConsumer(SegmentWriteState state) + throws IOException { + if (delegatePostingsFormat == null) { + throw new UnsupportedOperationException("Error - " + getClass().getName() + + " has been constructed without a choice of PostingsFormat"); + } + return new BloomFilteredFieldsConsumer( + delegatePostingsFormat.fieldsConsumer(state), state, + delegatePostingsFormat); + } + + public FieldsProducer fieldsProducer(SegmentReadState state) + throws IOException { + return new BloomFilteredFieldsProducer(state); + } + + public class BloomFilteredFieldsProducer extends FieldsProducer { + private FieldsProducer delegateFieldsProducer; + HashMap bloomsByFieldName = new HashMap(); + + public BloomFilteredFieldsProducer(SegmentReadState state) + throws IOException { + + String bloomFileName = IndexFileNames.segmentFileName( + state.segmentInfo.name, state.segmentSuffix, BLOOM_EXTENSION); + IndexInput bloomIn = null; + try { + bloomIn = state.dir.openInput(bloomFileName, state.context); + CodecUtil.checkHeader(bloomIn, BLOOM_CODEC_NAME, BLOOM_CODEC_VERSION, + BLOOM_CODEC_VERSION); + // // Load the hash function used in the BloomFilter + // hashFunction = HashFunction.forName(bloomIn.readString()); + // Load the delegate postings format + PostingsFormat delegatePostingsFormat = PostingsFormat.forName(bloomIn + .readString()); + + this.delegateFieldsProducer = delegatePostingsFormat + .fieldsProducer(state); + int numBlooms = bloomIn.readInt(); + for (int i = 0; i < numBlooms; i++) { + int fieldNum = bloomIn.readInt(); + FuzzySet bloom = FuzzySet.deserialize(bloomIn); + FieldInfo fieldInfo = state.fieldInfos.fieldInfo(fieldNum); + bloomsByFieldName.put(fieldInfo.name, bloom); + } + } finally { + IOUtils.close(bloomIn); + } + + } + + public Iterator iterator() { + return delegateFieldsProducer.iterator(); + } + + public void close() throws IOException { + delegateFieldsProducer.close(); + } + + public Terms terms(String field) throws IOException { + FuzzySet filter = bloomsByFieldName.get(field); + if (filter == null) { + return delegateFieldsProducer.terms(field); + } else { + Terms result = delegateFieldsProducer.terms(field); + if (result == null) { + return null; + } + return new BloomFilteredTerms(result, filter); + } + } + + public int size() { + return delegateFieldsProducer.size(); + } + + class BloomFilteredTerms extends Terms { + private Terms delegateTerms; + private FuzzySet filter; + + public BloomFilteredTerms(Terms terms, FuzzySet filter) { + this.delegateTerms = terms; + this.filter = filter; + } + + @Override + public TermsEnum intersect(CompiledAutomaton compiled, + final BytesRef startTerm) throws IOException { + return delegateTerms.intersect(compiled, startTerm); + } + + @Override + public TermsEnum iterator(TermsEnum reuse) throws IOException { + TermsEnum result; + if ((reuse != null) && (reuse instanceof BloomFilteredTermsEnum)) { + // recycle the existing BloomFilteredTermsEnum by asking the delegate + // to recycle its contained TermsEnum + BloomFilteredTermsEnum bfte = (BloomFilteredTermsEnum) reuse; + if (bfte.filter == filter) { + bfte.delegateTermsEnum = delegateTerms + .iterator(bfte.delegateTermsEnum); + return bfte; + } + } + // We have been handed something we cannot reuse (either null, wrong + // class or wrong filter) so allocate a new object + result = new BloomFilteredTermsEnum(delegateTerms.iterator(reuse), + filter); + return result; + } + + @Override + public Comparator getComparator() throws IOException { + return delegateTerms.getComparator(); + } + + @Override + public long size() throws IOException { + return delegateTerms.size(); + } + + @Override + public long getSumTotalTermFreq() throws IOException { + return delegateTerms.getSumTotalTermFreq(); + } + + @Override + public long getSumDocFreq() throws IOException { + return delegateTerms.getSumDocFreq(); + } + + @Override + public int getDocCount() throws IOException { + return delegateTerms.getDocCount(); + } + + @Override + public boolean hasOffsets() { + return delegateTerms.hasOffsets(); + } + + @Override + public boolean hasPositions() { + return delegateTerms.hasPositions(); + } + + @Override + public boolean hasPayloads() { + return delegateTerms.hasPayloads(); + } + } + + class BloomFilteredTermsEnum extends TermsEnum { + + TermsEnum delegateTermsEnum; + private FuzzySet filter; + + public BloomFilteredTermsEnum(TermsEnum iterator, FuzzySet filter) { + this.delegateTermsEnum = iterator; + this.filter = filter; + } + + @Override + public final BytesRef next() throws IOException { + return delegateTermsEnum.next(); + } + + @Override + public final Comparator getComparator() { + return delegateTermsEnum.getComparator(); + } + + @Override + public final boolean seekExact(BytesRef text, boolean useCache) + throws IOException { + // The magical fail-fast speed up that is the entire point of all of + // this code - save a disk seek if there is a match on an in-memory + // structure + // that may occasionally give a false positive but guaranteed no false + // negatives + if (filter.contains(text) == ContainsResult.NO) { + return false; + } + return delegateTermsEnum.seekExact(text, useCache); + } + + @Override + public final SeekStatus seekCeil(BytesRef text, boolean useCache) + throws IOException { + return delegateTermsEnum.seekCeil(text, useCache); + } + + @Override + public final void seekExact(long ord) throws IOException { + delegateTermsEnum.seekExact(ord); + } + + @Override + public final BytesRef term() throws IOException { + return delegateTermsEnum.term(); + } + + @Override + public final long ord() throws IOException { + return delegateTermsEnum.ord(); + } + + @Override + public final int docFreq() throws IOException { + return delegateTermsEnum.docFreq(); + } + + @Override + public final long totalTermFreq() throws IOException { + return delegateTermsEnum.totalTermFreq(); + } + + + @Override + public DocsAndPositionsEnum docsAndPositions(Bits liveDocs, + DocsAndPositionsEnum reuse, int flags) throws IOException { + return delegateTermsEnum.docsAndPositions(liveDocs, reuse, flags); + } + + @Override + public DocsEnum docs(Bits liveDocs, DocsEnum reuse, int flags) + throws IOException { + return delegateTermsEnum.docs(liveDocs, reuse, flags); + } + + + } + + } + + class BloomFilteredFieldsConsumer extends FieldsConsumer { + private FieldsConsumer delegateFieldsConsumer; + private Map bloomFilters = new HashMap(); + private SegmentWriteState state; + + // private PostingsFormat delegatePostingsFormat; + + public BloomFilteredFieldsConsumer(FieldsConsumer fieldsConsumer, + SegmentWriteState state, PostingsFormat delegatePostingsFormat) { + this.delegateFieldsConsumer = fieldsConsumer; + // this.delegatePostingsFormat=delegatePostingsFormat; + this.state = state; + } + + @Override + public TermsConsumer addField(FieldInfo field) throws IOException { + FuzzySet bloomFilter = bloomFilterFactory.getSetForField(state,field); + if (bloomFilter != null) { + assert bloomFilters.containsKey(field) == false; + bloomFilters.put(field, bloomFilter); + return new WrappedTermsConsumer(delegateFieldsConsumer.addField(field),bloomFilter); + } else { + // No, use the unfiltered fieldsConsumer - we are not interested in + // recording any term Bitsets. + return delegateFieldsConsumer.addField(field); + } + } + + @Override + public void close() throws IOException { + delegateFieldsConsumer.close(); + // Now we are done accumulating values for these fields + List> nonSaturatedBlooms = new ArrayList>(); + + for (Entry entry : bloomFilters.entrySet()) { + FuzzySet bloomFilter = entry.getValue(); + if(!bloomFilterFactory.isSaturated(bloomFilter,entry.getKey())){ + nonSaturatedBlooms.add(entry); + } + } + String bloomFileName = IndexFileNames.segmentFileName( + state.segmentInfo.name, state.segmentSuffix, BLOOM_EXTENSION); + IndexOutput bloomOutput = null; + try { + bloomOutput = state.directory + .createOutput(bloomFileName, state.context); + CodecUtil.writeHeader(bloomOutput, BLOOM_CODEC_NAME, + BLOOM_CODEC_VERSION); + // remember the name of the postings format we will delegate to + bloomOutput.writeString(delegatePostingsFormat.getName()); + + // First field in the output file is the number of fields+blooms saved + bloomOutput.writeInt(nonSaturatedBlooms.size()); + for (Entry entry : nonSaturatedBlooms) { + FieldInfo fieldInfo = entry.getKey(); + FuzzySet bloomFilter = entry.getValue(); + bloomOutput.writeInt(fieldInfo.number); + saveAppropriatelySizedBloomFilter(bloomOutput, bloomFilter, fieldInfo); + } + } finally { + IOUtils.close(bloomOutput); + } + //We are done with large bitsets so no need to keep them hanging around + bloomFilters.clear(); + } + + private void saveAppropriatelySizedBloomFilter(IndexOutput bloomOutput, + FuzzySet bloomFilter, FieldInfo fieldInfo) throws IOException { + + FuzzySet rightSizedSet = bloomFilterFactory.downsize(fieldInfo, + bloomFilter); + if (rightSizedSet == null) { + rightSizedSet = bloomFilter; + } + rightSizedSet.serialize(bloomOutput); + } + + } + + class WrappedTermsConsumer extends TermsConsumer { + private TermsConsumer delegateTermsConsumer; + private FuzzySet bloomFilter; + + public WrappedTermsConsumer(TermsConsumer termsConsumer,FuzzySet bloomFilter) { + this.delegateTermsConsumer = termsConsumer; + this.bloomFilter = bloomFilter; + } + + public PostingsConsumer startTerm(BytesRef text) throws IOException { + return delegateTermsConsumer.startTerm(text); + } + + public void finishTerm(BytesRef text, TermStats stats) throws IOException { + + // Record this term in our BloomFilter + if (stats.docFreq > 0) { + bloomFilter.addValue(text); + } + delegateTermsConsumer.finishTerm(text, stats); + } + + public void finish(long sumTotalTermFreq, long sumDocFreq, int docCount) + throws IOException { + delegateTermsConsumer.finish(sumTotalTermFreq, sumDocFreq, docCount); + } + + public Comparator getComparator() throws IOException { + return delegateTermsConsumer.getComparator(); + } + + } + +} diff --git a/lucene/core/src/java/org/apache/lucene/codecs/bloom/package.html b/lucene/core/src/java/org/apache/lucene/codecs/bloom/package.html index 2d9b335173b..a0c591ae4e7 100644 --- a/lucene/core/src/java/org/apache/lucene/codecs/bloom/package.html +++ b/lucene/core/src/java/org/apache/lucene/codecs/bloom/package.html @@ -1,25 +1,25 @@ - - - - - - - -Codec PostingsFormat for fast access to low-frequency terms such as primary key fields. - + + + + + + + +Codec PostingsFormat for fast access to low-frequency terms such as primary key fields. + \ No newline at end of file diff --git a/lucene/core/src/java/org/apache/lucene/util/hash/HashFunction.java b/lucene/core/src/java/org/apache/lucene/util/hash/HashFunction.java index 1d940ad3734..e25a5d993af 100644 --- a/lucene/core/src/java/org/apache/lucene/util/hash/HashFunction.java +++ b/lucene/core/src/java/org/apache/lucene/util/hash/HashFunction.java @@ -1,84 +1,84 @@ -package org.apache.lucene.util.hash; -/** - * 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. - */ -import java.util.Set; - -import org.apache.lucene.util.BytesRef; -import org.apache.lucene.util.NamedSPILoader; - - -/** - * Base class for hashing functions that can be referred to by name. - * Subclasses are expected to provide threadsafe implementations of the hash function - * on the range of bytes referenced in the provided {@link BytesRef} - * @lucene.experimental - */ -public abstract class HashFunction implements NamedSPILoader.NamedSPI { - - /** - * Hashes the contents of the referenced bytes - * @param bytes the data to be hashed - * @return the hash of the bytes referenced by bytes.offset and length bytes.length - */ - public abstract int hash(BytesRef bytes); - - private static final NamedSPILoader loader = - new NamedSPILoader(HashFunction.class); - - private final String name; - - public HashFunction(String name) { - NamedSPILoader.checkServiceName(name); - this.name = name; - } - - /** Returns this codec's name */ - @Override - public final String getName() { - return name; - } - - /** looks up a hash function by name */ - public static HashFunction forName(String name) { - return loader.lookup(name); - } - - /** returns a list of all available hash function names */ - public static Set availableHashFunctionNames() { - return loader.availableServices(); - } - - /** - * Reloads the hash function list from the given {@link ClassLoader}. - * Changes to the function list are visible after the method ends, all - * iterators ({@link #availableHashFunctionNames()},...) stay consistent. - * - *

NOTE: Only new functions are added, existing ones are - * never removed or replaced. - * - *

This method is expensive and should only be called for discovery - * of new functions on the given classpath/classloader! - */ - public static void reloadHashFunctions(ClassLoader classloader) { - loader.reload(classloader); - } - - @Override - public String toString() { - return name; - } -} +package org.apache.lucene.util.hash; +/** + * 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. + */ +import java.util.Set; + +import org.apache.lucene.util.BytesRef; +import org.apache.lucene.util.NamedSPILoader; + + +/** + * Base class for hashing functions that can be referred to by name. + * Subclasses are expected to provide threadsafe implementations of the hash function + * on the range of bytes referenced in the provided {@link BytesRef} + * @lucene.experimental + */ +public abstract class HashFunction implements NamedSPILoader.NamedSPI { + + /** + * Hashes the contents of the referenced bytes + * @param bytes the data to be hashed + * @return the hash of the bytes referenced by bytes.offset and length bytes.length + */ + public abstract int hash(BytesRef bytes); + + private static final NamedSPILoader loader = + new NamedSPILoader(HashFunction.class); + + private final String name; + + public HashFunction(String name) { + NamedSPILoader.checkServiceName(name); + this.name = name; + } + + /** Returns this codec's name */ + @Override + public final String getName() { + return name; + } + + /** looks up a hash function by name */ + public static HashFunction forName(String name) { + return loader.lookup(name); + } + + /** returns a list of all available hash function names */ + public static Set availableHashFunctionNames() { + return loader.availableServices(); + } + + /** + * Reloads the hash function list from the given {@link ClassLoader}. + * Changes to the function list are visible after the method ends, all + * iterators ({@link #availableHashFunctionNames()},...) stay consistent. + * + *

NOTE: Only new functions are added, existing ones are + * never removed or replaced. + * + *

This method is expensive and should only be called for discovery + * of new functions on the given classpath/classloader! + */ + public static void reloadHashFunctions(ClassLoader classloader) { + loader.reload(classloader); + } + + @Override + public String toString() { + return name; + } +} diff --git a/lucene/core/src/java/org/apache/lucene/util/hash/MurmurHash2.java b/lucene/core/src/java/org/apache/lucene/util/hash/MurmurHash2.java index 50b85aca943..6f8b946a914 100644 --- a/lucene/core/src/java/org/apache/lucene/util/hash/MurmurHash2.java +++ b/lucene/core/src/java/org/apache/lucene/util/hash/MurmurHash2.java @@ -1,105 +1,105 @@ -package org.apache.lucene.util.hash; -/** - * 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. - */ - -import org.apache.lucene.util.BytesRef; - -/** - * This is a very fast, non-cryptographic hash suitable for general hash-based - * lookup. See http://murmurhash.googlepages.com/ for more details. - *

- * The C version of MurmurHash 2.0 found at that site was ported to Java by - * Andrzej Bialecki (ab at getopt org). - *

- *

- * The code from getopt.org was adapted by Mark Harwood in the form here as one of a pluggable choice of - * hashing functions as the core function had to be adapted to work with BytesRefs with offsets and lengths - * rather than raw byte arrays. - *

- * @lucene.experimental - */ -public class MurmurHash2 extends HashFunction{ - - - public static final String HASH_NAME="MurmurHash2"; - - public MurmurHash2() { - super(HASH_NAME); - } - - public static int hash(byte[] data, int seed, int offset, int len) { - int m = 0x5bd1e995; - int r = 24; - int h = seed ^ len; - int len_4 = len >> 2; - for (int i = 0; i < len_4; i++) { - int i_4 = offset + (i << 2); - int k = data[i_4 + 3]; - k = k << 8; - k = k | (data[i_4 + 2] & 0xff); - k = k << 8; - k = k | (data[i_4 + 1] & 0xff); - k = k << 8; - k = k | (data[i_4 + 0] & 0xff); - k *= m; - k ^= k >>> r; - k *= m; - h *= m; - h ^= k; - } - int len_m = len_4 << 2; - int left = len - len_m; - if (left != 0) { - if (left >= 3) { - h ^= data[offset + len - 3] << 16; - } - if (left >= 2) { - h ^= data[offset + len - 2] << 8; - } - if (left >= 1) { - h ^= data[offset + len - 1]; - } - h *= m; - } - h ^= h >>> 13; - h *= m; - h ^= h >>> 15; - return h; - } - - /** - * Generates 32 bit hash from byte array with default seed value. - * - * @param data - * byte array to hash - * @param offset - * the start position in the array to hash - * @param len - * length of the array elements to hash - * @return 32 bit hash of the given array - */ - public static final int hash32(final byte[] data, int offset, int len) { - return MurmurHash2.hash(data, 0x9747b28c, offset, len); - } - - - @Override - public final int hash(BytesRef br) { - return hash32(br.bytes, br.offset, br.length); - } - -} +package org.apache.lucene.util.hash; +/** + * 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. + */ + +import org.apache.lucene.util.BytesRef; + +/** + * This is a very fast, non-cryptographic hash suitable for general hash-based + * lookup. See http://murmurhash.googlepages.com/ for more details. + *

+ * The C version of MurmurHash 2.0 found at that site was ported to Java by + * Andrzej Bialecki (ab at getopt org). + *

+ *

+ * The code from getopt.org was adapted by Mark Harwood in the form here as one of a pluggable choice of + * hashing functions as the core function had to be adapted to work with BytesRefs with offsets and lengths + * rather than raw byte arrays. + *

+ * @lucene.experimental + */ +public class MurmurHash2 extends HashFunction{ + + + public static final String HASH_NAME="MurmurHash2"; + + public MurmurHash2() { + super(HASH_NAME); + } + + public static int hash(byte[] data, int seed, int offset, int len) { + int m = 0x5bd1e995; + int r = 24; + int h = seed ^ len; + int len_4 = len >> 2; + for (int i = 0; i < len_4; i++) { + int i_4 = offset + (i << 2); + int k = data[i_4 + 3]; + k = k << 8; + k = k | (data[i_4 + 2] & 0xff); + k = k << 8; + k = k | (data[i_4 + 1] & 0xff); + k = k << 8; + k = k | (data[i_4 + 0] & 0xff); + k *= m; + k ^= k >>> r; + k *= m; + h *= m; + h ^= k; + } + int len_m = len_4 << 2; + int left = len - len_m; + if (left != 0) { + if (left >= 3) { + h ^= data[offset + len - 3] << 16; + } + if (left >= 2) { + h ^= data[offset + len - 2] << 8; + } + if (left >= 1) { + h ^= data[offset + len - 1]; + } + h *= m; + } + h ^= h >>> 13; + h *= m; + h ^= h >>> 15; + return h; + } + + /** + * Generates 32 bit hash from byte array with default seed value. + * + * @param data + * byte array to hash + * @param offset + * the start position in the array to hash + * @param len + * length of the array elements to hash + * @return 32 bit hash of the given array + */ + public static final int hash32(final byte[] data, int offset, int len) { + return MurmurHash2.hash(data, 0x9747b28c, offset, len); + } + + + @Override + public final int hash(BytesRef br) { + return hash32(br.bytes, br.offset, br.length); + } + +} diff --git a/lucene/core/src/java/org/apache/lucene/util/hash/package.html b/lucene/core/src/java/org/apache/lucene/util/hash/package.html index 174f92e21b0..a9ef65a8878 100644 --- a/lucene/core/src/java/org/apache/lucene/util/hash/package.html +++ b/lucene/core/src/java/org/apache/lucene/util/hash/package.html @@ -1,25 +1,25 @@ - - - - - - - -Hashing functions load-able via SPI service - + + + + + + + +Hashing functions load-able via SPI service + \ No newline at end of file diff --git a/lucene/core/src/resources/META-INF/services/org.apache.lucene.util.hash.HashFunction b/lucene/core/src/resources/META-INF/services/org.apache.lucene.util.hash.HashFunction index eee5167895f..4b2f1ed0c00 100644 --- a/lucene/core/src/resources/META-INF/services/org.apache.lucene.util.hash.HashFunction +++ b/lucene/core/src/resources/META-INF/services/org.apache.lucene.util.hash.HashFunction @@ -1,16 +1,16 @@ -# 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. - -org.apache.lucene.util.hash.MurmurHash2 +# 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. + +org.apache.lucene.util.hash.MurmurHash2 diff --git a/lucene/spatial/src/java/org/apache/lucene/spatial/bbox/package-info.java b/lucene/spatial/src/java/org/apache/lucene/spatial/bbox/package-info.java index 312ad0dc8fb..d67148b2f13 100644 --- a/lucene/spatial/src/java/org/apache/lucene/spatial/bbox/package-info.java +++ b/lucene/spatial/src/java/org/apache/lucene/spatial/bbox/package-info.java @@ -1,24 +1,24 @@ -/* - * 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. - */ - -/** - * Bounding Box Spatial Strategy - * - * Index a shape extent using 4 numeric fields and a flag to say if it crosses the dateline - */ -package org.apache.lucene.spatial.bbox; - +/* + * 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. + */ + +/** + * Bounding Box Spatial Strategy + * + * Index a shape extent using 4 numeric fields and a flag to say if it crosses the dateline + */ +package org.apache.lucene.spatial.bbox; + diff --git a/lucene/spatial/src/test-files/data/simple-bbox.txt b/lucene/spatial/src/test-files/data/simple-bbox.txt index dc097a61d30..11d08930507 100644 --- a/lucene/spatial/src/test-files/data/simple-bbox.txt +++ b/lucene/spatial/src/test-files/data/simple-bbox.txt @@ -1,5 +1,5 @@ -#id name shape -C5 CenterAt5 -5 -5 5 5 -C10 CenterAt10 -10 -10 10 10 -NW15 NorthWest 15 15 20 20 - +#id name shape +C5 CenterAt5 -5 -5 5 5 +C10 CenterAt10 -10 -10 10 10 +NW15 NorthWest 15 15 20 20 + diff --git a/lucene/spatial/src/test-files/simple-Queries-BBox.txt b/lucene/spatial/src/test-files/simple-Queries-BBox.txt index 3cd323bc300..77c844558f8 100644 --- a/lucene/spatial/src/test-files/simple-Queries-BBox.txt +++ b/lucene/spatial/src/test-files/simple-Queries-BBox.txt @@ -1,13 +1,13 @@ -C5 @ IsWithin(-6 -6 6 6) -C5 @ BBoxWithin(-6 -6 6 6) -C10 @ Contains(-6 -6 6 6) -C10 @ IsEqualTo(-10 -10 10 10) -C5 C10 @ Intersects(-2 -2 2 2) -C5 C10 @ Overlaps(-2 -2 2 2) -C5 C10 @ BBoxIntersects(-2 -2 2 2) -NW15 @ IsDisjointTo(-10 -10 10 10) - - - - - +C5 @ IsWithin(-6 -6 6 6) +C5 @ BBoxWithin(-6 -6 6 6) +C10 @ Contains(-6 -6 6 6) +C10 @ IsEqualTo(-10 -10 10 10) +C5 C10 @ Intersects(-2 -2 2 2) +C5 C10 @ Overlaps(-2 -2 2 2) +C5 C10 @ BBoxIntersects(-2 -2 2 2) +NW15 @ IsDisjointTo(-10 -10 10 10) + + + + + diff --git a/lucene/spatial/src/test/org/apache/lucene/spatial/bbox/TestBBoxStrategy.java b/lucene/spatial/src/test/org/apache/lucene/spatial/bbox/TestBBoxStrategy.java index a75930d805e..4f7e9367195 100644 --- a/lucene/spatial/src/test/org/apache/lucene/spatial/bbox/TestBBoxStrategy.java +++ b/lucene/spatial/src/test/org/apache/lucene/spatial/bbox/TestBBoxStrategy.java @@ -1,60 +1,60 @@ -package org.apache.lucene.spatial.bbox; - -/* - * 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. - */ - -import com.spatial4j.core.context.simple.SimpleSpatialContext; -import org.apache.lucene.spatial.SpatialMatchConcern; -import org.apache.lucene.spatial.StrategyTestCase; -import org.junit.Before; -import org.junit.Test; - -import java.io.IOException; - -public class TestBBoxStrategy extends StrategyTestCase { - - @Before - @Override - public void setUp() throws Exception { - super.setUp(); - this.ctx = SimpleSpatialContext.GEO_KM; - this.strategy = new BBoxStrategy(ctx, "bbox"); - } - - @Test - public void testBasicOperaions() throws IOException { - getAddAndVerifyIndexedDocuments(DATA_SIMPLE_BBOX); - - executeQueries(SpatialMatchConcern.EXACT, QTEST_Simple_Queries_BBox); - } - - @Test - public void testStatesBBox() throws IOException { - getAddAndVerifyIndexedDocuments(DATA_STATES_BBOX); - - executeQueries(SpatialMatchConcern.FILTER, QTEST_States_IsWithin_BBox); - executeQueries(SpatialMatchConcern.FILTER, QTEST_States_Intersects_BBox); - } - - @Test - public void testCitiesWithinBBox() throws IOException { - getAddAndVerifyIndexedDocuments(DATA_WORLD_CITIES_POINTS); - - executeQueries(SpatialMatchConcern.FILTER, QTEST_Cities_IsWithin_BBox); - } - -} +package org.apache.lucene.spatial.bbox; + +/* + * 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. + */ + +import com.spatial4j.core.context.simple.SimpleSpatialContext; +import org.apache.lucene.spatial.SpatialMatchConcern; +import org.apache.lucene.spatial.StrategyTestCase; +import org.junit.Before; +import org.junit.Test; + +import java.io.IOException; + +public class TestBBoxStrategy extends StrategyTestCase { + + @Before + @Override + public void setUp() throws Exception { + super.setUp(); + this.ctx = SimpleSpatialContext.GEO_KM; + this.strategy = new BBoxStrategy(ctx, "bbox"); + } + + @Test + public void testBasicOperaions() throws IOException { + getAddAndVerifyIndexedDocuments(DATA_SIMPLE_BBOX); + + executeQueries(SpatialMatchConcern.EXACT, QTEST_Simple_Queries_BBox); + } + + @Test + public void testStatesBBox() throws IOException { + getAddAndVerifyIndexedDocuments(DATA_STATES_BBOX); + + executeQueries(SpatialMatchConcern.FILTER, QTEST_States_IsWithin_BBox); + executeQueries(SpatialMatchConcern.FILTER, QTEST_States_Intersects_BBox); + } + + @Test + public void testCitiesWithinBBox() throws IOException { + getAddAndVerifyIndexedDocuments(DATA_WORLD_CITIES_POINTS); + + executeQueries(SpatialMatchConcern.FILTER, QTEST_Cities_IsWithin_BBox); + } + +} diff --git a/lucene/test-framework/src/java/org/apache/lucene/codecs/bloom/TestBloomFilteredLucene40Postings.java b/lucene/test-framework/src/java/org/apache/lucene/codecs/bloom/TestBloomFilteredLucene40Postings.java index 286ad88759b..df83975b7a9 100644 --- a/lucene/test-framework/src/java/org/apache/lucene/codecs/bloom/TestBloomFilteredLucene40Postings.java +++ b/lucene/test-framework/src/java/org/apache/lucene/codecs/bloom/TestBloomFilteredLucene40Postings.java @@ -1,77 +1,77 @@ -package org.apache.lucene.codecs.bloom; - -/** - * 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. - */ - -import java.io.IOException; - -import org.apache.lucene.codecs.FieldsConsumer; -import org.apache.lucene.codecs.FieldsProducer; -import org.apache.lucene.codecs.PostingsFormat; -import org.apache.lucene.codecs.bloom.BloomFilteringPostingsFormat; -import org.apache.lucene.codecs.lucene40.Lucene40PostingsFormat; -import org.apache.lucene.index.FieldInfo; -import org.apache.lucene.index.SegmentReadState; -import org.apache.lucene.index.SegmentWriteState; -import org.apache.lucene.util.FuzzySet; -import org.apache.lucene.util.hash.MurmurHash2; - -/** - * A class used for testing {@link BloomFilteringPostingsFormat} with a concrete - * delegate (Lucene40). Creates a Bloom filter on ALL fields and with tiny - * amounts of memory reserved for the filter. DO NOT USE IN A PRODUCTION - * APPLICATION This is not a realistic application of Bloom Filters as they - * ordinarily are larger and operate on only primary key type fields. - */ -public class TestBloomFilteredLucene40Postings extends PostingsFormat { - - private BloomFilteringPostingsFormat delegate; - - // Special class used to avoid OOM exceptions where Junit tests create many - // fields. - static class LowMemoryBloomFactory extends BloomFilterFactory { - @Override - public FuzzySet getSetForField(SegmentWriteState state,FieldInfo info) { - return FuzzySet.createSetBasedOnMaxMemory(1024, new MurmurHash2()); - } - - @Override - public boolean isSaturated(FuzzySet bloomFilter, FieldInfo fieldInfo) { - // For test purposes always maintain the BloomFilter - even past the point - // of usefulness when all bits are set - return false; - } - } - - public TestBloomFilteredLucene40Postings() { - super("TestBloomFilteredLucene40Postings"); - delegate = new BloomFilteringPostingsFormat(new Lucene40PostingsFormat(), - new LowMemoryBloomFactory()); - } - - @Override - public FieldsConsumer fieldsConsumer(SegmentWriteState state) - throws IOException { - return delegate.fieldsConsumer(state); - } - - @Override - public FieldsProducer fieldsProducer(SegmentReadState state) - throws IOException { - return delegate.fieldsProducer(state); - } -} +package org.apache.lucene.codecs.bloom; + +/** + * 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. + */ + +import java.io.IOException; + +import org.apache.lucene.codecs.FieldsConsumer; +import org.apache.lucene.codecs.FieldsProducer; +import org.apache.lucene.codecs.PostingsFormat; +import org.apache.lucene.codecs.bloom.BloomFilteringPostingsFormat; +import org.apache.lucene.codecs.lucene40.Lucene40PostingsFormat; +import org.apache.lucene.index.FieldInfo; +import org.apache.lucene.index.SegmentReadState; +import org.apache.lucene.index.SegmentWriteState; +import org.apache.lucene.util.FuzzySet; +import org.apache.lucene.util.hash.MurmurHash2; + +/** + * A class used for testing {@link BloomFilteringPostingsFormat} with a concrete + * delegate (Lucene40). Creates a Bloom filter on ALL fields and with tiny + * amounts of memory reserved for the filter. DO NOT USE IN A PRODUCTION + * APPLICATION This is not a realistic application of Bloom Filters as they + * ordinarily are larger and operate on only primary key type fields. + */ +public class TestBloomFilteredLucene40Postings extends PostingsFormat { + + private BloomFilteringPostingsFormat delegate; + + // Special class used to avoid OOM exceptions where Junit tests create many + // fields. + static class LowMemoryBloomFactory extends BloomFilterFactory { + @Override + public FuzzySet getSetForField(SegmentWriteState state,FieldInfo info) { + return FuzzySet.createSetBasedOnMaxMemory(1024, new MurmurHash2()); + } + + @Override + public boolean isSaturated(FuzzySet bloomFilter, FieldInfo fieldInfo) { + // For test purposes always maintain the BloomFilter - even past the point + // of usefulness when all bits are set + return false; + } + } + + public TestBloomFilteredLucene40Postings() { + super("TestBloomFilteredLucene40Postings"); + delegate = new BloomFilteringPostingsFormat(new Lucene40PostingsFormat(), + new LowMemoryBloomFactory()); + } + + @Override + public FieldsConsumer fieldsConsumer(SegmentWriteState state) + throws IOException { + return delegate.fieldsConsumer(state); + } + + @Override + public FieldsProducer fieldsProducer(SegmentReadState state) + throws IOException { + return delegate.fieldsProducer(state); + } +} diff --git a/lucene/test-framework/src/java/org/apache/lucene/codecs/bloom/package.html b/lucene/test-framework/src/java/org/apache/lucene/codecs/bloom/package.html index 862537461f7..60bbdccf77c 100644 --- a/lucene/test-framework/src/java/org/apache/lucene/codecs/bloom/package.html +++ b/lucene/test-framework/src/java/org/apache/lucene/codecs/bloom/package.html @@ -1,25 +1,25 @@ - - - - - - - -Support for generating test indexes using the BloomFilteringPostingsFormat - - + + + + + + + +Support for generating test indexes using the BloomFilteringPostingsFormat + + diff --git a/lucene/tools/src/java/lucene-solr.antlib.xml b/lucene/tools/src/java/lucene-solr.antlib.xml index f18d8a3287b..f3ae1c23f3d 100644 --- a/lucene/tools/src/java/lucene-solr.antlib.xml +++ b/lucene/tools/src/java/lucene-solr.antlib.xml @@ -21,4 +21,7 @@ + diff --git a/lucene/tools/src/java/org/apache/lucene/validation/SVNEolCheckTask.java b/lucene/tools/src/java/org/apache/lucene/validation/SVNEolCheckTask.java new file mode 100644 index 00000000000..83a6e685ad6 --- /dev/null +++ b/lucene/tools/src/java/org/apache/lucene/validation/SVNEolCheckTask.java @@ -0,0 +1,126 @@ +package org.apache.lucene.validation; + +/* + * 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. + */ + +import java.io.BufferedReader; +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.nio.charset.Charset; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; + +import org.apache.tools.ant.BuildException; +import org.apache.tools.ant.Task; +import org.apache.tools.ant.types.Resource; +import org.apache.tools.ant.types.ResourceCollection; +import org.apache.tools.ant.types.resources.FileResource; +import org.apache.tools.ant.types.resources.Resources; + +/** + * Checks all files to ensure they have svn:eol-style, or + * have a binary svn:mime-type. + *

+ * TODO: check that this value is actually correct, not just present. + *

+ * WARNING: slow! + */ +public class SVNEolCheckTask extends Task { + + private final Resources files = new Resources(); + + private String svnExecutable; + + /** Set of files to check */ + public void add(ResourceCollection rc) { + files.add(rc); + } + + /** svn.exe executable */ + public void setSvnExecutable(String svnExecutable) { + this.svnExecutable = svnExecutable; + } + + @Override + public void execute() throws BuildException { + if (svnExecutable == null) { + throw new BuildException("svnExecutable parameter must be set!"); + } + boolean success = true; + files.setProject(getProject()); + Iterator iter = (Iterator) files.iterator(); + while (iter.hasNext()) { + Resource r = iter.next(); + if (!(r instanceof FileResource)) { + throw new BuildException("Only filesystem resource are supported: " + r.getName() + + ", was: " + r.getClass().getName()); + } + + File f = ((FileResource) r).getFile(); + List cmd = new ArrayList(); + cmd.add(svnExecutable); + cmd.add("pget"); + cmd.add("svn:eol-style"); + cmd.add(f.getAbsolutePath()); + String eolStyle = exec(cmd); + if (eolStyle.isEmpty()) { + cmd.clear(); + cmd.add(svnExecutable); + cmd.add("pget"); + cmd.add("svn:mime-type"); + cmd.add(f.getAbsolutePath()); + String binProp = exec(cmd); + if (!binProp.startsWith("application/") && !binProp.startsWith("image/")) { + success = false; + log(r.getName() + " missing svn:eol-style (or binary svn:mime-type)."); + } + } + } + if (!success) { + throw new BuildException("Some svn properties are missing"); + } + } + + private String exec(List cmd) throws BuildException { + ProcessBuilder pb = new ProcessBuilder(cmd); + pb.redirectErrorStream(true); + BufferedReader r = null; + StringBuilder sb = new StringBuilder(); + try { + Process p = pb.start(); + InputStream is = p.getInputStream(); + r = new BufferedReader(new InputStreamReader(is, Charset.defaultCharset())); + int ch; + while ((ch = r.read()) > 0) { + sb.append((char)ch); + } + p.waitFor(); + return sb.toString(); + } catch (Exception e) { + throw new BuildException(e); + } finally { + if (r != null) { + try { + r.close(); + } catch (IOException e) {} + } + } + } +} diff --git a/solr/core/src/java/org/apache/solr/logging/CircularList.java b/solr/core/src/java/org/apache/solr/logging/CircularList.java index fba31f23c49..6e4641e03e6 100644 --- a/solr/core/src/java/org/apache/solr/logging/CircularList.java +++ b/solr/core/src/java/org/apache/solr/logging/CircularList.java @@ -1,154 +1,154 @@ -/* - * 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. - */ - -package org.apache.solr.logging; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -/** - * FIFO Circular List. - * - * Once the size is reached, it will overwrite previous entries - * - */ -public class CircularList implements Iterable -{ - private T[] data; - private int head=0; - private int tail=0; - private int size=0; - - @SuppressWarnings("unchecked") - public CircularList(int size) { - data = (T[])new Object[size]; - } - - @SuppressWarnings("unchecked") - public synchronized void resize(int newsize) { - if(newsize==this.size) return; - - T[] vals = (T[])new Object[newsize]; - int i = 0; - if(newsize>size) { - for(i=0; i= size || index < 0) - throw new IndexOutOfBoundsException("Index: "+index+", Size: "+size); - } - - public T get(int index) { - checkIndex(index); - return data[convert(index)]; - } - - public synchronized void add(T o) { - data[tail] = o; - tail = (tail+1)%data.length; - if( size == data.length ) { - head = (head+1)%data.length; - } - size++; - if( size > data.length ) { - size = data.length; - } - } - - public synchronized void clear() { - for( int i=0; i toList() - { - ArrayList list = new ArrayList( size ); - for( int i=0; i 0 ) { - str.append( "," ); - } - str.append( data[convert(i)] ); - } - str.append( "]" ); - return str.toString(); - } - - @Override - public Iterator iterator() { - return new Iterator() { - int idx = 0; - - @Override - public boolean hasNext() { - return idx implements Iterable +{ + private T[] data; + private int head=0; + private int tail=0; + private int size=0; + + @SuppressWarnings("unchecked") + public CircularList(int size) { + data = (T[])new Object[size]; + } + + @SuppressWarnings("unchecked") + public synchronized void resize(int newsize) { + if(newsize==this.size) return; + + T[] vals = (T[])new Object[newsize]; + int i = 0; + if(newsize>size) { + for(i=0; i= size || index < 0) + throw new IndexOutOfBoundsException("Index: "+index+", Size: "+size); + } + + public T get(int index) { + checkIndex(index); + return data[convert(index)]; + } + + public synchronized void add(T o) { + data[tail] = o; + tail = (tail+1)%data.length; + if( size == data.length ) { + head = (head+1)%data.length; + } + size++; + if( size > data.length ) { + size = data.length; + } + } + + public synchronized void clear() { + for( int i=0; i toList() + { + ArrayList list = new ArrayList( size ); + for( int i=0; i 0 ) { + str.append( "," ); + } + str.append( data[convert(i)] ); + } + str.append( "]" ); + return str.toString(); + } + + @Override + public Iterator iterator() { + return new Iterator() { + int idx = 0; + + @Override + public boolean hasNext() { + return idx { - - protected CircularList history; - protected long last = -1; - - /** - * @return The implementation name - */ - public abstract String getName(); - - /** - * @return The valid level names for this framework - */ - public abstract List getAllLevels(); - - /** - * Sets the log level within this framework - */ - public abstract void setLogLevel(String category, String level); - - /** - * @return all registered loggers - */ - public abstract Collection getAllLoggers(); - - public abstract void setThreshold(String level); - public abstract String getThreshold(); - - public void add(E event, long timstamp) { - history.add(event); - last = timstamp; - } - - public long getLastEvent() { - return last; - } - - public int getHistorySize() { - return (history==null) ? -1 : history.getBufferSize(); - } - - public SolrDocumentList getHistory(long since, AtomicBoolean found) { - if(history==null) { - return null; - } - - SolrDocumentList docs = new SolrDocumentList(); - Iterator iter = history.iterator(); - while(iter.hasNext()) { - E e = iter.next(); - long ts = getTimestamp(e); - if(ts == since) { - if(found!=null) { - found.set(true); - } - } - if(ts>since) { - docs.add(toSolrDocument(e)); - } - } - docs.setNumFound(docs.size()); // make it not look too funny - return docs; - } - - public abstract long getTimestamp(E event); - public abstract SolrDocument toSolrDocument(E event); - - public abstract void registerListener(ListenerConfig cfg, CoreContainer container); - - public void reset() { - history.clear(); - last = -1; - } +/* + * 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. + */ + +package org.apache.solr.logging; + +import java.util.Collection; +import java.util.Iterator; +import java.util.List; +import java.util.concurrent.atomic.AtomicBoolean; + +import org.apache.solr.common.SolrDocument; +import org.apache.solr.common.SolrDocumentList; +import org.apache.solr.core.CoreContainer; + +/** + * A Class to monitor Logging events and hold N events in memory + * + * This is abstract so we can support both JUL and Log4j (and other logging platforms) + */ +public abstract class LogWatcher { + + protected CircularList history; + protected long last = -1; + + /** + * @return The implementation name + */ + public abstract String getName(); + + /** + * @return The valid level names for this framework + */ + public abstract List getAllLevels(); + + /** + * Sets the log level within this framework + */ + public abstract void setLogLevel(String category, String level); + + /** + * @return all registered loggers + */ + public abstract Collection getAllLoggers(); + + public abstract void setThreshold(String level); + public abstract String getThreshold(); + + public void add(E event, long timstamp) { + history.add(event); + last = timstamp; + } + + public long getLastEvent() { + return last; + } + + public int getHistorySize() { + return (history==null) ? -1 : history.getBufferSize(); + } + + public SolrDocumentList getHistory(long since, AtomicBoolean found) { + if(history==null) { + return null; + } + + SolrDocumentList docs = new SolrDocumentList(); + Iterator iter = history.iterator(); + while(iter.hasNext()) { + E e = iter.next(); + long ts = getTimestamp(e); + if(ts == since) { + if(found!=null) { + found.set(true); + } + } + if(ts>since) { + docs.add(toSolrDocument(e)); + } + } + docs.setNumFound(docs.size()); // make it not look too funny + return docs; + } + + public abstract long getTimestamp(E event); + public abstract SolrDocument toSolrDocument(E event); + + public abstract void registerListener(ListenerConfig cfg, CoreContainer container); + + public void reset() { + history.clear(); + last = -1; + } } \ No newline at end of file diff --git a/solr/core/src/java/org/apache/solr/logging/LoggerInfo.java b/solr/core/src/java/org/apache/solr/logging/LoggerInfo.java index f493761114f..2151b328f70 100644 --- a/solr/core/src/java/org/apache/solr/logging/LoggerInfo.java +++ b/solr/core/src/java/org/apache/solr/logging/LoggerInfo.java @@ -1,68 +1,68 @@ -/* - * 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. - */ - -package org.apache.solr.logging; - -import org.apache.solr.common.util.SimpleOrderedMap; - -/** - * Wrapper class for Logger implementaions - */ -public abstract class LoggerInfo implements Comparable { - public static final String ROOT_NAME = "root"; - - protected final String name; - protected String level; - - public LoggerInfo(String name) { - this.name = name; - } - - public String getLevel() { - return level; - } - - public String getName() { - return name; - } - - public abstract boolean isSet(); - - public SimpleOrderedMap getInfo() { - SimpleOrderedMap info = new SimpleOrderedMap(); - info.add("name", getName()); - info.add("level", getLevel()); - info.add("set", isSet()); - return info; - } - - @Override - public int compareTo(LoggerInfo other) { - if (this.equals(other)) - return 0; - - String tN = this.getName(); - String oN = other.getName(); - - if(ROOT_NAME.equals(tN)) - return -1; - if(ROOT_NAME.equals(oN)) - return 1; - - return tN.compareTo(oN); - } +/* + * 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. + */ + +package org.apache.solr.logging; + +import org.apache.solr.common.util.SimpleOrderedMap; + +/** + * Wrapper class for Logger implementaions + */ +public abstract class LoggerInfo implements Comparable { + public static final String ROOT_NAME = "root"; + + protected final String name; + protected String level; + + public LoggerInfo(String name) { + this.name = name; + } + + public String getLevel() { + return level; + } + + public String getName() { + return name; + } + + public abstract boolean isSet(); + + public SimpleOrderedMap getInfo() { + SimpleOrderedMap info = new SimpleOrderedMap(); + info.add("name", getName()); + info.add("level", getLevel()); + info.add("set", isSet()); + return info; + } + + @Override + public int compareTo(LoggerInfo other) { + if (this.equals(other)) + return 0; + + String tN = this.getName(); + String oN = other.getName(); + + if(ROOT_NAME.equals(tN)) + return -1; + if(ROOT_NAME.equals(oN)) + return 1; + + return tN.compareTo(oN); + } } \ No newline at end of file diff --git a/solr/core/src/java/org/apache/solr/logging/jul/JulInfo.java b/solr/core/src/java/org/apache/solr/logging/jul/JulInfo.java index 9c9d36513ad..3d410fc98d6 100644 --- a/solr/core/src/java/org/apache/solr/logging/jul/JulInfo.java +++ b/solr/core/src/java/org/apache/solr/logging/jul/JulInfo.java @@ -1,70 +1,70 @@ -/* - * 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. - */ -package org.apache.solr.logging.jul; - -import java.util.logging.Level; -import java.util.logging.Logger; - -import org.apache.solr.logging.LoggerInfo; - -public class JulInfo extends LoggerInfo { - private static final Level[] LEVELS = { - null, // aka unset - Level.FINEST, - Level.FINE, - Level.CONFIG, - Level.INFO, - Level.WARNING, - Level.SEVERE, - Level.OFF - // Level.ALL -- ignore. It is useless. - }; - - final Logger logger; - - public JulInfo(String name, Logger logger) { - super(name); - this.logger = logger; - } - - @Override - public String getLevel() { - if(logger==null) { - return null; - } - Level level = logger.getLevel(); - if (level != null) { - return level.getName(); - } - for (Level l : LEVELS) { - if (l == null) { - // avoid NPE - continue; - } - if (logger.isLoggable(l)) { - // return first level loggable - return l.getName(); - } - } - return Level.OFF.getName(); - } - - @Override - public boolean isSet() { - return (logger!=null && logger.getLevel()!=null); - } +/* + * 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. + */ +package org.apache.solr.logging.jul; + +import java.util.logging.Level; +import java.util.logging.Logger; + +import org.apache.solr.logging.LoggerInfo; + +public class JulInfo extends LoggerInfo { + private static final Level[] LEVELS = { + null, // aka unset + Level.FINEST, + Level.FINE, + Level.CONFIG, + Level.INFO, + Level.WARNING, + Level.SEVERE, + Level.OFF + // Level.ALL -- ignore. It is useless. + }; + + final Logger logger; + + public JulInfo(String name, Logger logger) { + super(name); + this.logger = logger; + } + + @Override + public String getLevel() { + if(logger==null) { + return null; + } + Level level = logger.getLevel(); + if (level != null) { + return level.getName(); + } + for (Level l : LEVELS) { + if (l == null) { + // avoid NPE + continue; + } + if (logger.isLoggable(l)) { + // return first level loggable + return l.getName(); + } + } + return Level.OFF.getName(); + } + + @Override + public boolean isSet() { + return (logger!=null && logger.getLevel()!=null); + } } \ No newline at end of file diff --git a/solr/core/src/java/org/apache/solr/logging/jul/JulWatcher.java b/solr/core/src/java/org/apache/solr/logging/jul/JulWatcher.java index 25e72a5076f..88128801594 100644 --- a/solr/core/src/java/org/apache/solr/logging/jul/JulWatcher.java +++ b/solr/core/src/java/org/apache/solr/logging/jul/JulWatcher.java @@ -1,169 +1,169 @@ -/* - * 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. - */ -package org.apache.solr.logging.jul; - -import java.util.Arrays; -import java.util.Collection; -import java.util.Date; -import java.util.Enumeration; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.logging.Level; -import java.util.logging.LogManager; -import java.util.logging.LogRecord; -import java.util.logging.Logger; - -import org.apache.solr.common.SolrDocument; -import org.apache.solr.core.CoreContainer; -import org.apache.solr.logging.CircularList; -import org.apache.solr.logging.ListenerConfig; -import org.apache.solr.logging.LoggerInfo; -import org.apache.solr.logging.LogWatcher; - -import com.google.common.base.Throwables; - -public class JulWatcher extends LogWatcher { - - final String name; - RecordHandler handler = null; - - public JulWatcher(String name) { - this.name = name; - } - - @Override - public String getName() { - return "JUL ("+name+")"; - } - - - @Override - public List getAllLevels() { - return Arrays.asList( - Level.FINEST.getName(), - Level.FINER.getName(), - Level.FINE.getName(), - Level.CONFIG.getName(), - Level.INFO.getName(), - Level.WARNING.getName(), - Level.SEVERE.getName(), - Level.OFF.getName() ); - } - - @Override - public void setLogLevel(String category, String level) { - if(LoggerInfo.ROOT_NAME.equals(category)) { - category = ""; - } - - Logger log = LogManager.getLogManager().getLogger(category); - if(level==null||"unset".equals(level)||"null".equals(level)) { - if(log!=null) { - log.setLevel(null); - } - } - else { - if(log==null) { - log = Logger.getLogger(category); // create it - } - log.setLevel(Level.parse(level)); - } - } - - @Override - public Collection getAllLoggers() { - LogManager manager = LogManager.getLogManager(); - - Logger root = manager.getLogger(""); - Map map = new HashMap(); - Enumeration names = manager.getLoggerNames(); - while (names.hasMoreElements()) { - String name = names.nextElement(); - Logger logger = Logger.getLogger(name); - if( logger == root) { - continue; - } - map.put(name, new JulInfo(name, logger)); - - while (true) { - int dot = name.lastIndexOf("."); - if (dot < 0) - break; - name = name.substring(0, dot); - if(!map.containsKey(name)) { - map.put(name, new JulInfo(name, null)); - } - } - } - map.put(LoggerInfo.ROOT_NAME, new JulInfo(LoggerInfo.ROOT_NAME, root)); - return map.values(); - } - - @Override - public void setThreshold(String level) { - if(handler==null) { - throw new IllegalStateException("Must have an handler"); - } - handler.setLevel( Level.parse(level) ); - } - - @Override - public String getThreshold() { - if(handler==null) { - throw new IllegalStateException("Must have an handler"); - } - return handler.getLevel().toString(); - } - - @Override - public void registerListener(ListenerConfig cfg, CoreContainer container) { - if(history!=null) { - throw new IllegalStateException("History already registered"); - } - history = new CircularList(cfg.size); - handler = new RecordHandler(this); - if(cfg.threshold != null) { - handler.setLevel(Level.parse(cfg.threshold)); - } - else { - handler.setLevel(Level.WARNING); - } - - Logger log = LogManager.getLogManager().getLogger(""); - log.addHandler(handler); - } - - @Override - public long getTimestamp(LogRecord event) { - return event.getMillis(); - } - - @Override - public SolrDocument toSolrDocument(LogRecord event) { - SolrDocument doc = new SolrDocument(); - doc.setField("time", new Date(event.getMillis())); - doc.setField("level", event.getLevel().toString()); - doc.setField("logger", event.getLoggerName()); - doc.setField("message", event.getMessage().toString()); - Throwable t = event.getThrown(); - if(t!=null) { - doc.setField("trace", Throwables.getStackTraceAsString(t)); - } - return doc; - } +/* + * 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. + */ +package org.apache.solr.logging.jul; + +import java.util.Arrays; +import java.util.Collection; +import java.util.Date; +import java.util.Enumeration; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.logging.Level; +import java.util.logging.LogManager; +import java.util.logging.LogRecord; +import java.util.logging.Logger; + +import org.apache.solr.common.SolrDocument; +import org.apache.solr.core.CoreContainer; +import org.apache.solr.logging.CircularList; +import org.apache.solr.logging.ListenerConfig; +import org.apache.solr.logging.LoggerInfo; +import org.apache.solr.logging.LogWatcher; + +import com.google.common.base.Throwables; + +public class JulWatcher extends LogWatcher { + + final String name; + RecordHandler handler = null; + + public JulWatcher(String name) { + this.name = name; + } + + @Override + public String getName() { + return "JUL ("+name+")"; + } + + + @Override + public List getAllLevels() { + return Arrays.asList( + Level.FINEST.getName(), + Level.FINER.getName(), + Level.FINE.getName(), + Level.CONFIG.getName(), + Level.INFO.getName(), + Level.WARNING.getName(), + Level.SEVERE.getName(), + Level.OFF.getName() ); + } + + @Override + public void setLogLevel(String category, String level) { + if(LoggerInfo.ROOT_NAME.equals(category)) { + category = ""; + } + + Logger log = LogManager.getLogManager().getLogger(category); + if(level==null||"unset".equals(level)||"null".equals(level)) { + if(log!=null) { + log.setLevel(null); + } + } + else { + if(log==null) { + log = Logger.getLogger(category); // create it + } + log.setLevel(Level.parse(level)); + } + } + + @Override + public Collection getAllLoggers() { + LogManager manager = LogManager.getLogManager(); + + Logger root = manager.getLogger(""); + Map map = new HashMap(); + Enumeration names = manager.getLoggerNames(); + while (names.hasMoreElements()) { + String name = names.nextElement(); + Logger logger = Logger.getLogger(name); + if( logger == root) { + continue; + } + map.put(name, new JulInfo(name, logger)); + + while (true) { + int dot = name.lastIndexOf("."); + if (dot < 0) + break; + name = name.substring(0, dot); + if(!map.containsKey(name)) { + map.put(name, new JulInfo(name, null)); + } + } + } + map.put(LoggerInfo.ROOT_NAME, new JulInfo(LoggerInfo.ROOT_NAME, root)); + return map.values(); + } + + @Override + public void setThreshold(String level) { + if(handler==null) { + throw new IllegalStateException("Must have an handler"); + } + handler.setLevel( Level.parse(level) ); + } + + @Override + public String getThreshold() { + if(handler==null) { + throw new IllegalStateException("Must have an handler"); + } + return handler.getLevel().toString(); + } + + @Override + public void registerListener(ListenerConfig cfg, CoreContainer container) { + if(history!=null) { + throw new IllegalStateException("History already registered"); + } + history = new CircularList(cfg.size); + handler = new RecordHandler(this); + if(cfg.threshold != null) { + handler.setLevel(Level.parse(cfg.threshold)); + } + else { + handler.setLevel(Level.WARNING); + } + + Logger log = LogManager.getLogManager().getLogger(""); + log.addHandler(handler); + } + + @Override + public long getTimestamp(LogRecord event) { + return event.getMillis(); + } + + @Override + public SolrDocument toSolrDocument(LogRecord event) { + SolrDocument doc = new SolrDocument(); + doc.setField("time", new Date(event.getMillis())); + doc.setField("level", event.getLevel().toString()); + doc.setField("logger", event.getLoggerName()); + doc.setField("message", event.getMessage().toString()); + Throwable t = event.getThrown(); + if(t!=null) { + doc.setField("trace", Throwables.getStackTraceAsString(t)); + } + return doc; + } } \ No newline at end of file diff --git a/solr/core/src/java/org/apache/solr/logging/jul/RecordHandler.java b/solr/core/src/java/org/apache/solr/logging/jul/RecordHandler.java index 6ed119e22fb..942a85d593e 100644 --- a/solr/core/src/java/org/apache/solr/logging/jul/RecordHandler.java +++ b/solr/core/src/java/org/apache/solr/logging/jul/RecordHandler.java @@ -1,47 +1,47 @@ -/* - * 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. - */ -package org.apache.solr.logging.jul; - - -import java.util.logging.LogRecord; - -import org.apache.solr.logging.LogWatcher; - -public final class RecordHandler extends java.util.logging.Handler { - final LogWatcher framework; - - public RecordHandler(LogWatcher framework) { - this.framework = framework; - } - - @Override - public void close() throws SecurityException { - //history.reset(); - } - - @Override - public void flush() { - // nothing - } - - @Override - public void publish(LogRecord r) { - if(isLoggable(r)) { - framework.add(r, r.getMillis()); - } - } +/* + * 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. + */ +package org.apache.solr.logging.jul; + + +import java.util.logging.LogRecord; + +import org.apache.solr.logging.LogWatcher; + +public final class RecordHandler extends java.util.logging.Handler { + final LogWatcher framework; + + public RecordHandler(LogWatcher framework) { + this.framework = framework; + } + + @Override + public void close() throws SecurityException { + //history.reset(); + } + + @Override + public void flush() { + // nothing + } + + @Override + public void publish(LogRecord r) { + if(isLoggable(r)) { + framework.add(r, r.getMillis()); + } + } } \ No newline at end of file diff --git a/solr/example/cloud-scripts/zkcli.bat b/solr/example/cloud-scripts/zkcli.bat index 9036dd9b24b..b57513088aa 100644 --- a/solr/example/cloud-scripts/zkcli.bat +++ b/solr/example/cloud-scripts/zkcli.bat @@ -1,12 +1,12 @@ -REM You can override pass the following parameters to this script: -REM - -set JVM=java - -REM Find location of this script - -set SDIR=%~dp0 -if "%SDIR:~-1%"=="\" set SDIR=%SDIR:~0,-1% - - -"%JVM%" -classpath "%SDIR%\..\solr-webapp\webapp\WEB-INF\lib\*" org.apache.solr.cloud.ZkCLI %* +REM You can override pass the following parameters to this script: +REM + +set JVM=java + +REM Find location of this script + +set SDIR=%~dp0 +if "%SDIR:~-1%"=="\" set SDIR=%SDIR:~0,-1% + + +"%JVM%" -classpath "%SDIR%\..\solr-webapp\webapp\WEB-INF\lib\*" org.apache.solr.cloud.ZkCLI %* From 64549e4332ffe631a1586fb9a16a3ce72a0ccd79 Mon Sep 17 00:00:00 2001 From: Michael McCandless Date: Mon, 27 Aug 2012 15:20:17 +0000 Subject: [PATCH 09/81] fix test thread safety issue git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1377711 13f79535-47bb-0310-9956-ffa450edef68 --- .../lucene/search/ShardSearchingTestBase.java | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/lucene/test-framework/src/java/org/apache/lucene/search/ShardSearchingTestBase.java b/lucene/test-framework/src/java/org/apache/lucene/search/ShardSearchingTestBase.java index e99f02d9cca..cf7ca0d6174 100644 --- a/lucene/test-framework/src/java/org/apache/lucene/search/ShardSearchingTestBase.java +++ b/lucene/test-framework/src/java/org/apache/lucene/search/ShardSearchingTestBase.java @@ -468,15 +468,17 @@ public abstract class ShardSearchingTestBase extends LuceneTestCase { // Get the current (fresh) searcher for this node public ShardIndexSearcher acquire() { - final ShardIndexSearcher s = currentShardSearcher; - // TODO: this isn't thread safe.... in theory the - // reader could get decRef'd to 0 before we have a - // chance to incRef, ie if a reopen happens right - // after the above line, this thread gets stalled, and - // the old IR is closed. But because we use SLM in - // this test, this will be exceptionally rare: - s.getIndexReader().incRef(); - return s; + while(true) { + final ShardIndexSearcher s = currentShardSearcher; + // In theory the reader could get decRef'd to 0 + // before we have a chance to incRef, ie if a reopen + // happens right after the above line, this thread + // gets stalled, and the old IR is closed. So we + // must try/retry until incRef succeeds: + if (s.getIndexReader().tryIncRef()) { + return s; + } + } } public void release(ShardIndexSearcher s) throws IOException { From 2b1926e4bfe44efa2a7c4fc2f722470196a2e731 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Mon, 27 Aug 2012 16:43:56 +0000 Subject: [PATCH 10/81] disable check for now until jenkins configurations are fixed to not be so slow git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1377738 13f79535-47bb-0310-9956-ffa450edef68 --- build.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build.xml b/build.xml index 33a9a9bca40..880b5458719 100644 --- a/build.xml +++ b/build.xml @@ -262,7 +262,9 @@ - + + From c61a8c0b7192a285330d5db82b0e032a8386f7c5 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Mon, 27 Aug 2012 17:31:23 +0000 Subject: [PATCH 11/81] add more missing javadocs git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1377758 13f79535-47bb-0310-9956-ffa450edef68 --- .../queries/function/valuesource/ShortFieldSource.java | 5 +++-- .../queryparser/surround/query/DistanceSubQuery.java | 4 ++++ .../lucene/queryparser/surround/query/FieldsQuery.java | 3 +++ .../apache/lucene/queryparser/surround/query/NotQuery.java | 3 +++ .../lucene/queryparser/surround/query/SimpleTerm.java | 7 +++++++ .../lucene/queryparser/surround/query/SrndPrefixQuery.java | 3 +++ .../lucene/queryparser/surround/query/SrndTermQuery.java | 3 +++ .../lucene/queryparser/xml/CorePlusExtensionsParser.java | 4 +++- .../java/org/apache/lucene/queryparser/xml/DOMUtils.java | 2 +- .../org/apache/lucene/queryparser/xml/ParserException.java | 3 ++- .../lucene/spatial/util/CachingDoubleValueSource.java | 2 ++ .../org/apache/lucene/spatial/util/ValueSourceFilter.java | 2 ++ 12 files changed, 36 insertions(+), 5 deletions(-) diff --git a/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/ShortFieldSource.java b/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/ShortFieldSource.java index f3fbe0bc518..2fe26399dd5 100644 --- a/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/ShortFieldSource.java +++ b/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/ShortFieldSource.java @@ -25,8 +25,9 @@ import org.apache.lucene.search.FieldCache; /** - * - * + * Obtains short field values from the {@link org.apache.lucene.search.FieldCache} + * using getShorts() + * and makes those values available as other numeric types, casting as needed. **/ public class ShortFieldSource extends FieldCacheSource { diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/query/DistanceSubQuery.java b/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/query/DistanceSubQuery.java index 9b37934b844..ad793c8349f 100644 --- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/query/DistanceSubQuery.java +++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/query/DistanceSubQuery.java @@ -18,6 +18,10 @@ package org.apache.lucene.queryparser.surround.query; import java.io.IOException; +/** + * Interface for queries that can be nested as subqueries + * into a span near. + */ public interface DistanceSubQuery { /** When distanceSubQueryNotAllowed() returns non null, the reason why the subquery * is not allowed as a distance subquery is returned. diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/query/FieldsQuery.java b/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/query/FieldsQuery.java index 4544325e4e2..7582711ffba 100644 --- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/query/FieldsQuery.java +++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/query/FieldsQuery.java @@ -22,6 +22,9 @@ import java.util.Iterator; import org.apache.lucene.search.Query; +/** + * Forms an OR query of the provided query across multiple fields. + */ public class FieldsQuery extends SrndQuery { /* mostly untested */ private SrndQuery q; private List fieldNames; diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/query/NotQuery.java b/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/query/NotQuery.java index 325629560e4..a50708792d7 100644 --- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/query/NotQuery.java +++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/query/NotQuery.java @@ -21,6 +21,9 @@ import org.apache.lucene.search.Query; import org.apache.lucene.search.BooleanQuery; import org.apache.lucene.search.BooleanClause; +/** + * Factory for prohibited clauses + */ public class NotQuery extends ComposedQuery { public NotQuery(List queries, String opName) { super(queries, true /* infix */, opName); } diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/query/SimpleTerm.java b/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/query/SimpleTerm.java index 1c2e9047430..6ad433b3e70 100644 --- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/query/SimpleTerm.java +++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/query/SimpleTerm.java @@ -22,6 +22,9 @@ import org.apache.lucene.index.IndexReader; import org.apache.lucene.index.Term; import org.apache.lucene.search.Query; +/** + * Base class for queries that expand to sets of simple terms. + */ public abstract class SimpleTerm extends SrndQuery implements DistanceSubQuery, Comparable @@ -67,6 +70,10 @@ public abstract class SimpleTerm String fieldName, MatchingTermVisitor mtv) throws IOException; + /** + * Callback to visit each matching term during "rewrite" + * in {@link #visitMatchingTerm(Term)} + */ public interface MatchingTermVisitor { void visitMatchingTerm(Term t)throws IOException; } diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/query/SrndPrefixQuery.java b/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/query/SrndPrefixQuery.java index 31e8f3a1abb..cc816fec615 100644 --- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/query/SrndPrefixQuery.java +++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/query/SrndPrefixQuery.java @@ -27,6 +27,9 @@ import org.apache.lucene.index.MultiFields; import java.io.IOException; +/** + * Query that matches String prefixes + */ public class SrndPrefixQuery extends SimpleTerm { private final BytesRef prefixRef; public SrndPrefixQuery(String prefix, boolean quoted, char truncator) { diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/query/SrndTermQuery.java b/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/query/SrndTermQuery.java index fbaddda034f..ca83a0d8e78 100644 --- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/query/SrndTermQuery.java +++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/query/SrndTermQuery.java @@ -26,6 +26,9 @@ import org.apache.lucene.index.MultiFields; import org.apache.lucene.util.BytesRef; +/** + * Simple single-term clause + */ public class SrndTermQuery extends SimpleTerm { public SrndTermQuery(String termText, boolean quoted) { super(quoted); diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/xml/CorePlusExtensionsParser.java b/lucene/queryparser/src/java/org/apache/lucene/queryparser/xml/CorePlusExtensionsParser.java index 2cf73066932..e7f844c46ee 100644 --- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/xml/CorePlusExtensionsParser.java +++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/xml/CorePlusExtensionsParser.java @@ -22,7 +22,9 @@ import org.apache.lucene.queryparser.xml.builders.*; */ /** - * + * Assembles a QueryBuilder which uses Query objects from + * Lucene's sandbox and queries + * modules in addition to core queries. */ public class CorePlusExtensionsParser extends CoreParser { diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/xml/DOMUtils.java b/lucene/queryparser/src/java/org/apache/lucene/queryparser/xml/DOMUtils.java index b3f5caa7647..44938927f38 100644 --- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/xml/DOMUtils.java +++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/xml/DOMUtils.java @@ -26,7 +26,7 @@ import java.io.Reader; */ /** - * + * Helper methods for parsing XML */ public class DOMUtils { diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/xml/ParserException.java b/lucene/queryparser/src/java/org/apache/lucene/queryparser/xml/ParserException.java index 63f2af97ddd..3974d363bae 100644 --- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/xml/ParserException.java +++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/xml/ParserException.java @@ -20,7 +20,8 @@ package org.apache.lucene.queryparser.xml; */ /** - * + * Thrown when the xml queryparser encounters + * invalid syntax/configuration. */ public class ParserException extends Exception { diff --git a/lucene/spatial/src/java/org/apache/lucene/spatial/util/CachingDoubleValueSource.java b/lucene/spatial/src/java/org/apache/lucene/spatial/util/CachingDoubleValueSource.java index 678e2a544ce..fa9fb857bb9 100644 --- a/lucene/spatial/src/java/org/apache/lucene/spatial/util/CachingDoubleValueSource.java +++ b/lucene/spatial/src/java/org/apache/lucene/spatial/util/CachingDoubleValueSource.java @@ -26,6 +26,8 @@ import java.util.HashMap; import java.util.Map; /** + * Caches the doubleVal of another value source in a HashMap + * so that it is computed only once. * @lucene.internal */ public class CachingDoubleValueSource extends ValueSource { diff --git a/lucene/spatial/src/java/org/apache/lucene/spatial/util/ValueSourceFilter.java b/lucene/spatial/src/java/org/apache/lucene/spatial/util/ValueSourceFilter.java index 1a430b721b8..2f603b6a446 100644 --- a/lucene/spatial/src/java/org/apache/lucene/spatial/util/ValueSourceFilter.java +++ b/lucene/spatial/src/java/org/apache/lucene/spatial/util/ValueSourceFilter.java @@ -28,6 +28,8 @@ import org.apache.lucene.util.Bits; import java.io.IOException; /** + * Filter that matches all documents where a valuesource is + * in between a range of min and max * @lucene.internal */ public class ValueSourceFilter extends Filter { From 75ec6779281c2bf25f73aef26a38887b0dd92be9 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Mon, 27 Aug 2012 19:19:55 +0000 Subject: [PATCH 12/81] fix javadocs so they dont grow bigger and Bigger and BIGGER (http://lucene.apache.org/core/4_0_0-BETA/core/org/apache/lucene/util/Constants.html) git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1377797 13f79535-47bb-0310-9956-ffa450edef68 --- lucene/core/src/java/org/apache/lucene/util/Constants.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lucene/core/src/java/org/apache/lucene/util/Constants.java b/lucene/core/src/java/org/apache/lucene/util/Constants.java index f44a5f4b6f9..3855173d035 100644 --- a/lucene/core/src/java/org/apache/lucene/util/Constants.java +++ b/lucene/core/src/java/org/apache/lucene/util/Constants.java @@ -33,10 +33,10 @@ public final class Constants { public static final String JVM_VERSION = System.getProperty("java.vm.version"); public static final String JVM_NAME = System.getProperty("java.vm.name"); - /** The value of System.getProperty("java.version"). **/ + /** The value of System.getProperty("java.version"). **/ public static final String JAVA_VERSION = System.getProperty("java.version"); - /** The value of System.getProperty("os.name"). **/ + /** The value of System.getProperty("os.name"). **/ public static final String OS_NAME = System.getProperty("os.name"); /** True iff running on Linux. */ public static final boolean LINUX = OS_NAME.startsWith("Linux"); From 4f76db565010ddba6544415d9fc1c7f45e77ddd6 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Mon, 27 Aug 2012 20:36:18 +0000 Subject: [PATCH 13/81] improve these javadocs git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1377836 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/lucene/analysis/Analyzer.java | 19 ++++++++++++++++++ .../lucene/analysis/CachingTokenFilter.java | 12 +++++++++++ .../java/org/apache/lucene/codecs/Codec.java | 12 +++++++++++ .../apache/lucene/codecs/PostingsFormat.java | 20 +++++++++++++++++++ 4 files changed, 63 insertions(+) diff --git a/lucene/core/src/java/org/apache/lucene/analysis/Analyzer.java b/lucene/core/src/java/org/apache/lucene/analysis/Analyzer.java index 13679bdc47d..0ff186f7696 100644 --- a/lucene/core/src/java/org/apache/lucene/analysis/Analyzer.java +++ b/lucene/core/src/java/org/apache/lucene/analysis/Analyzer.java @@ -71,10 +71,22 @@ public abstract class Analyzer { private final ReuseStrategy reuseStrategy; + /** + * Create a new Analyzer, reusing the same set of components per-thread + * across calls to {@link #tokenStream(String, Reader)}. + */ public Analyzer() { this(new GlobalReuseStrategy()); } + /** + * Expert: create a new Analyzer with a custom {@link ReuseStrategy}. + *

+ * NOTE: if you just want to reuse on a per-field basis, its easier to + * use a subclass of {@link AnalyzerWrapper} such as + * + * PerFieldAnalyerWrapper instead. + */ public Analyzer(ReuseStrategy reuseStrategy) { this.reuseStrategy = reuseStrategy; } @@ -171,7 +183,14 @@ public abstract class Analyzer { * {@link Analyzer#tokenStream(String, Reader)}. */ public static class TokenStreamComponents { + /** + * Original source of the tokens. + */ protected final Tokenizer source; + /** + * Sink tokenstream, such as the outer tokenfilter decorating + * the chain. This can be the source if there are no filters. + */ protected final TokenStream sink; /** diff --git a/lucene/core/src/java/org/apache/lucene/analysis/CachingTokenFilter.java b/lucene/core/src/java/org/apache/lucene/analysis/CachingTokenFilter.java index a6c1e822a77..e71452af165 100644 --- a/lucene/core/src/java/org/apache/lucene/analysis/CachingTokenFilter.java +++ b/lucene/core/src/java/org/apache/lucene/analysis/CachingTokenFilter.java @@ -38,6 +38,11 @@ public final class CachingTokenFilter extends TokenFilter { private Iterator iterator = null; private AttributeSource.State finalState; + /** + * Create a new CachingTokenFilter around input, + * caching its token attributes, which can be replayed again + * after a call to {@link #reset()}. + */ public CachingTokenFilter(TokenStream input) { super(input); } @@ -67,6 +72,13 @@ public final class CachingTokenFilter extends TokenFilter { } } + /** + * Rewinds the iterator to the beginning of the cached list. + *

+ * Note that this does not call reset() on the wrapped tokenstream ever, even + * the first time. You should reset() the inner tokenstream before wrapping + * it with CachingTokenFilter. + */ @Override public void reset() { if(cache != null) { diff --git a/lucene/core/src/java/org/apache/lucene/codecs/Codec.java b/lucene/core/src/java/org/apache/lucene/codecs/Codec.java index c7f46e452ce..ddff816a62c 100644 --- a/lucene/core/src/java/org/apache/lucene/codecs/Codec.java +++ b/lucene/core/src/java/org/apache/lucene/codecs/Codec.java @@ -41,6 +41,14 @@ public abstract class Codec implements NamedSPILoader.NamedSPI { private final String name; + /** + * Creates a new codec. + *

+ * The provided name will be written into the index segment: in order to + * for the segment to be read this class should be registered with Java's + * SPI mechanism (registered in META-INF/ of your jar file, etc). + * @param name must be all ascii alphanumeric, and less than 128 characters in length. + */ public Codec(String name) { NamedSPILoader.checkServiceName(name); this.name = name; @@ -118,6 +126,10 @@ public abstract class Codec implements NamedSPILoader.NamedSPI { defaultCodec = codec; } + /** + * returns the codec's name. Subclasses can override to provide + * more detail (such as parameters). + */ @Override public String toString() { return name; diff --git a/lucene/core/src/java/org/apache/lucene/codecs/PostingsFormat.java b/lucene/core/src/java/org/apache/lucene/codecs/PostingsFormat.java index 0c48c1a767b..27f237b167b 100644 --- a/lucene/core/src/java/org/apache/lucene/codecs/PostingsFormat.java +++ b/lucene/core/src/java/org/apache/lucene/codecs/PostingsFormat.java @@ -18,14 +18,24 @@ package org.apache.lucene.codecs; */ import java.io.IOException; +import java.util.ServiceLoader; import java.util.Set; +import org.apache.lucene.codecs.perfield.PerFieldPostingsFormat; // javadocs import org.apache.lucene.index.SegmentWriteState; import org.apache.lucene.index.SegmentReadState; import org.apache.lucene.util.NamedSPILoader; /** * Encodes/decodes terms, postings, and proximity data. + *

+ * Note, when extending this class, the name ({@link #getName}) may + * written into the index in certain configurations. In order for the segment + * to be read, the name must resolve to your implementation via {@link #forName(String)}. + * This method uses Java's + * {@link ServiceLoader Service Provider Interface} to resolve codec names. + *

+ * @see ServiceLoader * @lucene.experimental */ public abstract class PostingsFormat implements NamedSPILoader.NamedSPI { @@ -38,11 +48,21 @@ public abstract class PostingsFormat implements NamedSPILoader.NamedSPI { */ private final String name; + /** + * Creates a new postings format. + *

+ * The provided name will be written into the index segment in some configurations + * (such as when using {@link PerFieldPostingsFormat}): in such configurations, + * for the segment to be read this class should be registered with Java's + * SPI mechanism (registered in META-INF/ of your jar file, etc). + * @param name must be all ascii alphanumeric, and less than 128 characters in length. + */ protected PostingsFormat(String name) { NamedSPILoader.checkServiceName(name); this.name = name; } + /** Returns this posting format's name */ @Override public final String getName() { return name; From 682123b2feb71ec32f8f39d2889604ea6e6d2eb8 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Mon, 27 Aug 2012 20:43:52 +0000 Subject: [PATCH 14/81] make these javadoc comments git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1377845 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/java/org/apache/lucene/document/Field.java | 10 +++++----- .../src/java/org/apache/lucene/document/TextField.java | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lucene/core/src/java/org/apache/lucene/document/Field.java b/lucene/core/src/java/org/apache/lucene/document/Field.java index 6a5cc6a6647..7ac79524237 100644 --- a/lucene/core/src/java/org/apache/lucene/document/Field.java +++ b/lucene/core/src/java/org/apache/lucene/document/Field.java @@ -63,13 +63,13 @@ public class Field implements IndexableField { protected final FieldType type; protected final String name; - // Field's value: + /** Field's value */ protected Object fieldsData; - // Pre-analyzed tokenStream for indexed fields; this is - // separate from fieldsData because you are allowed to - // have both; eg maybe field has a String value but you - // customize how it's tokenized: + /** Pre-analyzed tokenStream for indexed fields; this is + * separate from fieldsData because you are allowed to + * have both; eg maybe field has a String value but you + * customize how it's tokenized */ protected TokenStream tokenStream; private transient TokenStream internalTokenStream; diff --git a/lucene/core/src/java/org/apache/lucene/document/TextField.java b/lucene/core/src/java/org/apache/lucene/document/TextField.java index 2d082e387c2..d8c66956f62 100644 --- a/lucene/core/src/java/org/apache/lucene/document/TextField.java +++ b/lucene/core/src/java/org/apache/lucene/document/TextField.java @@ -27,10 +27,10 @@ import org.apache.lucene.analysis.TokenStream; public final class TextField extends Field { - /* Indexed, tokenized, not stored. */ + /** Indexed, tokenized, not stored. */ public static final FieldType TYPE_NOT_STORED = new FieldType(); - /* Indexed, tokenized, stored. */ + /** Indexed, tokenized, stored. */ public static final FieldType TYPE_STORED = new FieldType(); static { From 69d8555ea87a8b49f4a87753d296a00b7bfc62f7 Mon Sep 17 00:00:00 2001 From: "Chris M. Hostetter" Date: Mon, 27 Aug 2012 21:09:45 +0000 Subject: [PATCH 15/81] be more specific: only the admin ui requires having at least on SolrCore git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1377867 13f79535-47bb-0310-9956-ffa450edef68 --- solr/webapp/web/js/scripts/app.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/solr/webapp/web/js/scripts/app.js b/solr/webapp/web/js/scripts/app.js index 60ee063adc5..eb3c4ab47a4 100644 --- a/solr/webapp/web/js/scripts/app.js +++ b/solr/webapp/web/js/scripts/app.js @@ -258,8 +258,7 @@ var solr_admin = function( app_config ) { show_global_error ( - '

There are no SolrCores running — for the current functionality ' + - 'we require at least one SolrCore, sorry :)
' + '
There are no SolrCores running.
Using the Solr Admin UI currently requires at least one SolrCore.
' ); return; } // else: we have at least one core.... From 5ba7843db911bad642810e367a728ca3d739ebb7 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Mon, 27 Aug 2012 21:59:27 +0000 Subject: [PATCH 16/81] improve (Indexable)FieldType docs git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1377885 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/lucene/document/FieldType.java | 141 +++++++++++++++++- .../org/apache/lucene/index/FieldInfo.java | 23 ++- .../lucene/index/IndexableFieldType.java | 56 ++++++- 3 files changed, 203 insertions(+), 17 deletions(-) diff --git a/lucene/core/src/java/org/apache/lucene/document/FieldType.java b/lucene/core/src/java/org/apache/lucene/document/FieldType.java index 4da9f392056..6a46995c7ce 100644 --- a/lucene/core/src/java/org/apache/lucene/document/FieldType.java +++ b/lucene/core/src/java/org/apache/lucene/document/FieldType.java @@ -17,6 +17,7 @@ package org.apache.lucene.document; * limitations under the License. */ +import org.apache.lucene.analysis.Analyzer; // javadocs import org.apache.lucene.index.DocValues; import org.apache.lucene.index.FieldInfo.IndexOptions; import org.apache.lucene.index.IndexableFieldType; @@ -47,6 +48,9 @@ public class FieldType implements IndexableFieldType { private boolean frozen; private int numericPrecisionStep = NumericUtils.PRECISION_STEP_DEFAULT; + /** + * Create a new mutable FieldType with all of the properties from ref + */ public FieldType(FieldType ref) { this.indexed = ref.indexed(); this.stored = ref.stored(); @@ -62,6 +66,9 @@ public class FieldType implements IndexableFieldType { // Do not copy frozen! } + /** + * Create a new FieldType with default properties. + */ public FieldType() { } @@ -80,110 +87,227 @@ public class FieldType implements IndexableFieldType { this.frozen = true; } + /** + * {@inheritDoc} + *

+ * The default is false. + * @see #setIndexed(boolean) + */ public boolean indexed() { return this.indexed; } + /** + * Set to true to index (invert) this field. + * @see #indexed() + */ public void setIndexed(boolean value) { checkIfFrozen(); this.indexed = value; } + /** + * {@inheritDoc} + *

+ * The default is false. + * @see #setStored(boolean) + */ public boolean stored() { return this.stored; } + /** + * Set to true to store this field. + * @see #stored() + */ public void setStored(boolean value) { checkIfFrozen(); this.stored = value; } + /** + * {@inheritDoc} + *

+ * The default is true. + * @see #setTokenized(boolean) + */ public boolean tokenized() { return this.tokenized; } + /** + * Set to true to tokenize this field's contents via the + * configured {@link Analyzer}. + * @see #tokenized() + */ public void setTokenized(boolean value) { checkIfFrozen(); this.tokenized = value; } + /** + * {@inheritDoc} + *

+ * The default is false. + * @see #setStoreTermVectors(boolean) + */ public boolean storeTermVectors() { return this.storeTermVectors; } + /** + * Set to true if this field's indexed form should be also stored + * into term vectors. + * @see #storeTermVectors() + */ public void setStoreTermVectors(boolean value) { checkIfFrozen(); this.storeTermVectors = value; } + /** + * {@inheritDoc} + *

+ * The default is false. + * @see #setStoreTermVectorOffsets(boolean) + */ public boolean storeTermVectorOffsets() { return this.storeTermVectorOffsets; } + /** + * Set to true to also store token character offsets into the term + * vector for this field. + * @see #storeTermVectorOffsets() + */ public void setStoreTermVectorOffsets(boolean value) { checkIfFrozen(); this.storeTermVectorOffsets = value; } + /** + * {@inheritDoc} + *

+ * The default is false. + * @see #setStoreTermVectorPositions(boolean) + */ public boolean storeTermVectorPositions() { return this.storeTermVectorPositions; } + /** + * Set to true to also store token positions into the term + * vector for this field. + * @see #storeTermVectorPositions() + */ public void setStoreTermVectorPositions(boolean value) { checkIfFrozen(); this.storeTermVectorPositions = value; } + /** + * {@inheritDoc} + *

+ * The default is false. + * @see #setStoreTermVectorPayloads(boolean) + */ public boolean storeTermVectorPayloads() { return this.storeTermVectorPayloads; } + /** + * Set to true to also store token payloads into the term + * vector for this field. + * @see #storeTermVectorPayloads() + */ public void setStoreTermVectorPayloads(boolean value) { checkIfFrozen(); this.storeTermVectorPayloads = value; } + /** + * {@inheritDoc} + *

+ * The default is false. + * @see #setOmitNorms(boolean) + */ public boolean omitNorms() { return this.omitNorms; } + /** + * Set to true to omit normalization values for the field. + * @see #omitNorms() + */ public void setOmitNorms(boolean value) { checkIfFrozen(); this.omitNorms = value; } + /** + * {@inheritDoc} + *

+ * The default is {@link IndexOptions#DOCS_AND_FREQS_AND_POSITIONS}. + * @see #setIndexOptions(FieldInfo.IndexOptions) + */ public IndexOptions indexOptions() { return this.indexOptions; } + /** + * Sets the indexing options for the field: + * @see #indexOptions() + */ public void setIndexOptions(IndexOptions value) { checkIfFrozen(); this.indexOptions = value; } + /** + * Set's the field's DocValues.Type + * @see #docValueType() + */ public void setDocValueType(DocValues.Type type) { checkIfFrozen(); docValueType = type; } + /** + * {@inheritDoc} + *

+ * The default is null (no docValues) + * @see #setDocValueType(DocValues.Type) + */ @Override public DocValues.Type docValueType() { return docValueType; } + /** + * Specifies the field's numeric type. + * @see #numericType() + */ public void setNumericType(NumericType type) { checkIfFrozen(); numericType = type; } - /** NumericDataType; if - * non-null then the field's value will be indexed - * numerically so that {@link NumericRangeQuery} can be - * used at search time. */ + /** + * NumericType: if non-null then the field's value will be indexed + * numerically so that {@link NumericRangeQuery} can be used at + * search time. + *

+ * The default is null (no numeric type) + * @see #setNumericType(NumericType) + */ public NumericType numericType() { return numericType; } + /** + * Sets the numeric precision step for the field. + * @see #numericPrecisionStep() + */ public void setNumericPrecisionStep(int precisionStep) { checkIfFrozen(); if (precisionStep < 1) { @@ -192,7 +316,14 @@ public class FieldType implements IndexableFieldType { this.numericPrecisionStep = precisionStep; } - /** Precision step for numeric field. */ + /** + * Precision step for numeric field. + *

+ * This has no effect if {@link #numericType()} returns null. + *

+ * The default is {@link NumericUtils#PRECISION_STEP_DEFAULT} + * @see #setNumericPrecisionStep(int) + */ public int numericPrecisionStep() { return numericPrecisionStep; } diff --git a/lucene/core/src/java/org/apache/lucene/index/FieldInfo.java b/lucene/core/src/java/org/apache/lucene/index/FieldInfo.java index 3ab27064e2b..8161d8a7dcb 100644 --- a/lucene/core/src/java/org/apache/lucene/index/FieldInfo.java +++ b/lucene/core/src/java/org/apache/lucene/index/FieldInfo.java @@ -55,14 +55,29 @@ public final class FieldInfo { // NOTE: order is important here; FieldInfo uses this // order to merge two conflicting IndexOptions (always // "downgrades" by picking the lowest). - /** only documents are indexed: term frequencies and positions are omitted */ + /** + * Only documents are indexed: term frequencies and positions are omitted. + * Phrase and other positional queries on the field will throw an exception, and scoring + * will behave as if any term in the document appears only once. + */ // TODO: maybe rename to just DOCS? DOCS_ONLY, - /** only documents and term frequencies are indexed: positions are omitted */ + /** + * Only documents and term frequencies are indexed: positions are omitted. + * This enables normal scoring, except Phrase and other positional queries + * will throw an exception. + */ DOCS_AND_FREQS, - /** documents, frequencies and positions */ + /** + * Indexes documents, frequencies and positions. + * This is a typical default for full-text search: full scoring is enabled + * and positional queries are supported. + */ DOCS_AND_FREQS_AND_POSITIONS, - /** documents, frequencies, positions and offsets */ + /** + * Indexes documents, frequencies, positions and offsets. + * Character offsets are encoded alongside the positions. + */ DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS, }; diff --git a/lucene/core/src/java/org/apache/lucene/index/IndexableFieldType.java b/lucene/core/src/java/org/apache/lucene/index/IndexableFieldType.java index 435fc3b5c06..91f2efe756f 100644 --- a/lucene/core/src/java/org/apache/lucene/index/IndexableFieldType.java +++ b/lucene/core/src/java/org/apache/lucene/index/IndexableFieldType.java @@ -17,6 +17,7 @@ package org.apache.lucene.index; * limitations under the License. */ +import org.apache.lucene.analysis.Analyzer; // javadocs import org.apache.lucene.index.FieldInfo.IndexOptions; /** @@ -31,29 +32,68 @@ public interface IndexableFieldType { /** True if the field's value should be stored */ public boolean stored(); - /** True if this field's value should be analyzed */ + /** + * True if this field's value should be analyzed by the + * {@link Analyzer}. + *

+ * This has no effect if {@link #indexed()} returns false. + */ public boolean tokenized(); - /** True if term vectors should be indexed */ + /** + * True if this field's indexed form should be also stored + * into term vectors. + *

+ * This builds a miniature inverted-index for this field which + * can be accessed in a document-oriented way from + * {@link IndexReader#getTermVector(int,String)}. + *

+ * This option is illegal if {@link #indexed()} returns false. + */ public boolean storeTermVectors(); - /** True if term vector offsets should be indexed */ + /** + * True if this field's token character offsets should also + * be stored into term vectors. + *

+ * This option is illegal if term vectors are not enabled for the field + * ({@link #storeTermVectors()} is false) + */ public boolean storeTermVectorOffsets(); - /** True if term vector positions should be indexed */ + /** + * True if this field's token positions should also be stored + * into the term vectors. + *

+ * This option is illegal if term vectors are not enabled for the field + * ({@link #storeTermVectors()} is false). + */ public boolean storeTermVectorPositions(); - /** True if term vector payloads should be indexed */ + /** + * True if this field's token payloads should also be stored + * into the term vectors. + *

+ * This option is illegal if term vector positions are not enabled + * for the field ({@link #storeTermVectors()} is false). + */ public boolean storeTermVectorPayloads(); - /** True if norms should not be indexed */ + /** + * True if normalization values should be omitted for the field. + *

+ * This saves memory, but at the expense of scoring quality (length normalization + * will be disabled), and if you omit norms, you cannot use index-time boosts. + */ public boolean omitNorms(); /** {@link IndexOptions}, describing what should be * recorded into the inverted index */ public IndexOptions indexOptions(); - /** DocValues type; if non-null then the field's value - * will be indexed into docValues */ + /** + * DocValues {@link DocValues.Type}: if non-null then the field's value + * will be indexed into docValues. + */ public DocValues.Type docValueType(); } From 2afa06672fe204f468a72d7c85b23158345d5597 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Mon, 27 Aug 2012 22:30:09 +0000 Subject: [PATCH 17/81] remove useless inheritdocs (if you dont add to it, it does nothing) git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1377893 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/lucene/analysis/Analyzer.java | 16 ++++--------- .../lucene/analysis/AnalyzerWrapper.java | 9 ------- .../org/apache/lucene/document/Field.java | 5 +--- .../org/apache/lucene/index/SegmentInfo.java | 1 - .../index/TestCrashCausesCorruptIndex.java | 24 ------------------- .../grouping/dv/DVGroupFacetCollector.java | 4 +--- .../FunctionAllGroupHeadsCollector.java | 10 ++++---- .../function/FunctionAllGroupsCollector.java | 9 +++---- .../FunctionSecondPassGroupingCollector.java | 8 ++----- .../grouping/term/TermAllGroupsCollector.java | 6 ++--- .../suggest/fst/FSTCompletionLookup.java | 3 --- 11 files changed, 18 insertions(+), 77 deletions(-) diff --git a/lucene/core/src/java/org/apache/lucene/analysis/Analyzer.java b/lucene/core/src/java/org/apache/lucene/analysis/Analyzer.java index 0ff186f7696..4b7fd2e336b 100644 --- a/lucene/core/src/java/org/apache/lucene/analysis/Analyzer.java +++ b/lucene/core/src/java/org/apache/lucene/analysis/Analyzer.java @@ -326,16 +326,12 @@ public abstract class Analyzer { */ public final static class GlobalReuseStrategy extends ReuseStrategy { - /** - * {@inheritDoc} - */ + @Override public TokenStreamComponents getReusableComponents(String fieldName) { return (TokenStreamComponents) getStoredValue(); } - /** - * {@inheritDoc} - */ + @Override public void setReusableComponents(String fieldName, TokenStreamComponents components) { setStoredValue(components); } @@ -347,19 +343,15 @@ public abstract class Analyzer { */ public static class PerFieldReuseStrategy extends ReuseStrategy { - /** - * {@inheritDoc} - */ @SuppressWarnings("unchecked") + @Override public TokenStreamComponents getReusableComponents(String fieldName) { Map componentsPerField = (Map) getStoredValue(); return componentsPerField != null ? componentsPerField.get(fieldName) : null; } - /** - * {@inheritDoc} - */ @SuppressWarnings("unchecked") + @Override public void setReusableComponents(String fieldName, TokenStreamComponents components) { Map componentsPerField = (Map) getStoredValue(); if (componentsPerField == null) { diff --git a/lucene/core/src/java/org/apache/lucene/analysis/AnalyzerWrapper.java b/lucene/core/src/java/org/apache/lucene/analysis/AnalyzerWrapper.java index 261075c0676..0acac2cb128 100644 --- a/lucene/core/src/java/org/apache/lucene/analysis/AnalyzerWrapper.java +++ b/lucene/core/src/java/org/apache/lucene/analysis/AnalyzerWrapper.java @@ -61,25 +61,16 @@ public abstract class AnalyzerWrapper extends Analyzer { */ protected abstract TokenStreamComponents wrapComponents(String fieldName, TokenStreamComponents components); - /** - * {@inheritDoc} - */ @Override protected final TokenStreamComponents createComponents(String fieldName, Reader aReader) { return wrapComponents(fieldName, getWrappedAnalyzer(fieldName).createComponents(fieldName, aReader)); } - /** - * {@inheritDoc} - */ @Override public final int getPositionIncrementGap(String fieldName) { return getWrappedAnalyzer(fieldName).getPositionIncrementGap(fieldName); } - /** - * {@inheritDoc} - */ @Override public final int getOffsetGap(String fieldName) { return getWrappedAnalyzer(fieldName).getOffsetGap(fieldName); diff --git a/lucene/core/src/java/org/apache/lucene/document/Field.java b/lucene/core/src/java/org/apache/lucene/document/Field.java index 7ac79524237..4248d167b31 100644 --- a/lucene/core/src/java/org/apache/lucene/document/Field.java +++ b/lucene/core/src/java/org/apache/lucene/document/Field.java @@ -213,7 +213,7 @@ public class Field implements IndexableField { } /** - * The TokesStream for this field to be used when indexing, or null. If null, + * The TokenStream for this field to be used when indexing, or null. If null, * the Reader value or String value is analyzed to produce the indexed tokens. */ public TokenStream tokenStreamValue() { @@ -405,9 +405,6 @@ public class Field implements IndexableField { return type; } - /** - * {@inheritDoc} - */ public TokenStream tokenStream(Analyzer analyzer) throws IOException { if (!fieldType().indexed()) { return null; diff --git a/lucene/core/src/java/org/apache/lucene/index/SegmentInfo.java b/lucene/core/src/java/org/apache/lucene/index/SegmentInfo.java index 9ec55e278e8..6e7807ae01b 100644 --- a/lucene/core/src/java/org/apache/lucene/index/SegmentInfo.java +++ b/lucene/core/src/java/org/apache/lucene/index/SegmentInfo.java @@ -165,7 +165,6 @@ public final class SegmentInfo { return Collections.unmodifiableSet(setFiles); } - /** {@inheritDoc} */ @Override public String toString() { return toString(dir, 0); diff --git a/lucene/core/src/test/org/apache/lucene/index/TestCrashCausesCorruptIndex.java b/lucene/core/src/test/org/apache/lucene/index/TestCrashCausesCorruptIndex.java index ec5638912db..821d0d54b4a 100644 --- a/lucene/core/src/test/org/apache/lucene/index/TestCrashCausesCorruptIndex.java +++ b/lucene/core/src/test/org/apache/lucene/index/TestCrashCausesCorruptIndex.java @@ -168,17 +168,11 @@ public class TestCrashCausesCorruptIndex extends LuceneTestCase { this.crashAfterCreateOutput = name; } - /** - * {@inheritDoc} - */ @Override public void close() throws IOException { realDirectory.close(); } - /** - * {@inheritDoc} - */ @Override public IndexOutput createOutput(String name, IOContext cxt) throws IOException { IndexOutput indexOutput = realDirectory.createOutput(name, cxt); @@ -194,49 +188,31 @@ public class TestCrashCausesCorruptIndex extends LuceneTestCase { return indexOutput; } - /** - * {@inheritDoc} - */ @Override public void deleteFile(String name) throws IOException { realDirectory.deleteFile(name); } - /** - * {@inheritDoc} - */ @Override public boolean fileExists(String name) throws IOException { return realDirectory.fileExists(name); } - /** - * {@inheritDoc} - */ @Override public long fileLength(String name) throws IOException { return realDirectory.fileLength(name); } - /** - * {@inheritDoc} - */ @Override public String[] listAll() throws IOException { return realDirectory.listAll(); } - /** - * {@inheritDoc} - */ @Override public IndexInput openInput(String name, IOContext cxt) throws IOException { return realDirectory.openInput(name, cxt); } - /** - * {@inheritDoc} - */ @Override public void sync(Collection names) throws IOException { realDirectory.sync(names); diff --git a/lucene/grouping/src/java/org/apache/lucene/search/grouping/dv/DVGroupFacetCollector.java b/lucene/grouping/src/java/org/apache/lucene/search/grouping/dv/DVGroupFacetCollector.java index 76c58acb95d..746c01875f3 100644 --- a/lucene/grouping/src/java/org/apache/lucene/search/grouping/dv/DVGroupFacetCollector.java +++ b/lucene/grouping/src/java/org/apache/lucene/search/grouping/dv/DVGroupFacetCollector.java @@ -262,9 +262,7 @@ public abstract class DVGroupFacetCollector extends AbstractGroupFacetCollector } } - /** - * {@inheritDoc} - */ + @Override protected void nextTerm() throws IOException { mergeTerm = facetFieldSource.getByOrd(mergePos, spare); } diff --git a/lucene/grouping/src/java/org/apache/lucene/search/grouping/function/FunctionAllGroupHeadsCollector.java b/lucene/grouping/src/java/org/apache/lucene/search/grouping/function/FunctionAllGroupHeadsCollector.java index 2f5b5425f5e..614659e0bf4 100644 --- a/lucene/grouping/src/java/org/apache/lucene/search/grouping/function/FunctionAllGroupHeadsCollector.java +++ b/lucene/grouping/src/java/org/apache/lucene/search/grouping/function/FunctionAllGroupHeadsCollector.java @@ -70,9 +70,7 @@ public class FunctionAllGroupHeadsCollector extends AbstractAllGroupHeadsCollect } } - /** - * {@inheritDoc} - */ + @Override protected void retrieveGroupHeadAndAddIfNotExist(int doc) throws IOException { filler.fillValue(doc); GroupHead groupHead = groups.get(mval); @@ -87,13 +85,12 @@ public class FunctionAllGroupHeadsCollector extends AbstractAllGroupHeadsCollect this.temporalResult.groupHead = groupHead; } - /** - * {@inheritDoc} - */ + @Override protected Collection getCollectedGroupHeads() { return groups.values(); } + @Override public void setScorer(Scorer scorer) throws IOException { this.scorer = scorer; for (GroupHead groupHead : groups.values()) { @@ -103,6 +100,7 @@ public class FunctionAllGroupHeadsCollector extends AbstractAllGroupHeadsCollect } } + @Override public void setNextReader(AtomicReaderContext context) throws IOException { this.readerContext = context; FunctionValues values = groupBy.getValues(vsContext, context); diff --git a/lucene/grouping/src/java/org/apache/lucene/search/grouping/function/FunctionAllGroupsCollector.java b/lucene/grouping/src/java/org/apache/lucene/search/grouping/function/FunctionAllGroupsCollector.java index 12a8cc2ac2e..72b82466237 100644 --- a/lucene/grouping/src/java/org/apache/lucene/search/grouping/function/FunctionAllGroupsCollector.java +++ b/lucene/grouping/src/java/org/apache/lucene/search/grouping/function/FunctionAllGroupsCollector.java @@ -61,13 +61,12 @@ public class FunctionAllGroupsCollector extends AbstractAllGroupsCollector getGroups() { return groups; } + @Override public void collect(int doc) throws IOException { filler.fillValue(doc); if (!groups.contains(mval)) { @@ -75,9 +74,7 @@ public class FunctionAllGroupsCollector extends AbstractAllGroupsCollector retrieveGroup(int doc) throws IOException { filler.fillValue(doc); return groupMap.get(mval); } - /** - * {@inheritDoc} - */ + @Override public void setNextReader(AtomicReaderContext readerContext) throws IOException { super.setNextReader(readerContext); FunctionValues values = groupByVS.getValues(vsContext, readerContext); diff --git a/lucene/grouping/src/java/org/apache/lucene/search/grouping/term/TermAllGroupsCollector.java b/lucene/grouping/src/java/org/apache/lucene/search/grouping/term/TermAllGroupsCollector.java index f2f003d1163..663c20e7d55 100644 --- a/lucene/grouping/src/java/org/apache/lucene/search/grouping/term/TermAllGroupsCollector.java +++ b/lucene/grouping/src/java/org/apache/lucene/search/grouping/term/TermAllGroupsCollector.java @@ -82,6 +82,7 @@ public class TermAllGroupsCollector extends AbstractAllGroupsCollector this(groupField, DEFAULT_INITIAL_SIZE); } + @Override public void collect(int doc) throws IOException { int key = index.getOrd(doc); if (!ordSet.exists(key)) { @@ -91,13 +92,12 @@ public class TermAllGroupsCollector extends AbstractAllGroupsCollector } } - /** - * {@inheritDoc} - */ + @Override public Collection getGroups() { return groups; } + @Override public void setNextReader(AtomicReaderContext context) throws IOException { index = FieldCache.DEFAULT.getTermsIndex(context.reader(), groupField); diff --git a/lucene/suggest/src/java/org/apache/lucene/search/suggest/fst/FSTCompletionLookup.java b/lucene/suggest/src/java/org/apache/lucene/search/suggest/fst/FSTCompletionLookup.java index 862d9cbfda5..d89d0ac20d4 100644 --- a/lucene/suggest/src/java/org/apache/lucene/search/suggest/fst/FSTCompletionLookup.java +++ b/lucene/suggest/src/java/org/apache/lucene/search/suggest/fst/FSTCompletionLookup.java @@ -138,9 +138,6 @@ public class FSTCompletionLookup extends Lookup { completion.getFST(), true, exactMatchFirst); } - /** - * {@inheritDoc} - */ @Override public void build(TermFreqIterator tfit) throws IOException { File tempInput = File.createTempFile( From a8b57fa9de9789d31725c457521758c7690d22db Mon Sep 17 00:00:00 2001 From: "Chris M. Hostetter" Date: Mon, 27 Aug 2012 23:01:11 +0000 Subject: [PATCH 18/81] SOLR-3745: Proper error reporting if SolrCloud mode is used w/o necessary "_version_" field in schema.xml git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1377898 13f79535-47bb-0310-9956-ffa450edef68 --- solr/CHANGES.txt | 3 +++ .../java/org/apache/solr/core/SolrCore.java | 20 +++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index 88a75309f7e..cda122295ef 100644 --- a/solr/CHANGES.txt +++ b/solr/CHANGES.txt @@ -85,6 +85,9 @@ Bug Fixes * SOLR-3746: Proper error reporting if updateLog is configured w/o necessary "_version_" field in schema.xml (hossman) +* SOLR-3745: Proper error reporting if SolrCloud mode is used w/o + necessary "_version_" field in schema.xml (hossman) + Other Changes ---------------------- diff --git a/solr/core/src/java/org/apache/solr/core/SolrCore.java b/solr/core/src/java/org/apache/solr/core/SolrCore.java index 9c1082d8116..5404e3f4549 100644 --- a/solr/core/src/java/org/apache/solr/core/SolrCore.java +++ b/solr/core/src/java/org/apache/solr/core/SolrCore.java @@ -65,6 +65,7 @@ import org.apache.solr.search.ValueSourceParser; import org.apache.solr.update.DirectUpdateHandler2; import org.apache.solr.update.SolrIndexWriter; import org.apache.solr.update.UpdateHandler; +import org.apache.solr.update.VersionInfo; import org.apache.solr.update.processor.DistributedUpdateProcessorFactory; import org.apache.solr.update.processor.LogUpdateProcessorFactory; import org.apache.solr.update.processor.RunUpdateProcessorFactory; @@ -593,6 +594,25 @@ public final class SolrCore implements SolrInfoMBean { schema = new IndexSchema(config, IndexSchema.DEFAULT_SCHEMA_FILE, null); } + if (null != cd && null != cd.getCloudDescriptor()) { + // we are evidently running in cloud mode. + // + // In cloud mode, version field is required for correct consistency + // ideally this check would be more fine grained, and individual features + // would assert it when they initialize, but DistribuedUpdateProcessor + // is currently a big ball of wax that does more then just distributing + // updates (ie: partial document updates), so it needs to work in no cloud + // mode as well, and can't assert version field support on init. + + try { + Object ignored = VersionInfo.getAndCheckVersionField(schema); + } catch (SolrException e) { + throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, + "Schema will not work with SolrCloud mode: " + + e.getMessage(), e); + } + } + //Initialize JMX if (config.jmxConfig.enabled) { infoRegistry = new JmxMonitoredMap(name, String.valueOf(this.hashCode()), config.jmxConfig); From 68c7fb5ea3d90e5a55e51342171cbd3e79c1fcb0 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Mon, 27 Aug 2012 23:06:38 +0000 Subject: [PATCH 19/81] minor improvements to Field/IndexableField javadocs git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1377901 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/lucene/document/Field.java | 60 +++++++++++++++---- .../apache/lucene/index/IndexableField.java | 23 ++++++- 2 files changed, 69 insertions(+), 14 deletions(-) diff --git a/lucene/core/src/java/org/apache/lucene/document/Field.java b/lucene/core/src/java/org/apache/lucene/document/Field.java index 4248d167b31..0f0a8cc8c7f 100644 --- a/lucene/core/src/java/org/apache/lucene/document/Field.java +++ b/lucene/core/src/java/org/apache/lucene/document/Field.java @@ -60,7 +60,13 @@ import org.apache.lucene.index.FieldInvertState; // javadocs */ public class Field implements IndexableField { + /** + * Field's type + */ protected final FieldType type; + /** + * Field's name + */ protected final String name; /** Field's value */ @@ -75,8 +81,16 @@ public class Field implements IndexableField { private transient TokenStream internalTokenStream; private transient ReusableStringReader internalReader; + /** + * Field's boost + * @see #boost() + */ protected float boost = 1.0f; + /** + * Expert: creates a field with no initial value. + * Intended only for custom Field subclasses. + */ protected Field(String name, FieldType type) { if (name == null) { throw new IllegalArgumentException("name cannot be null"); @@ -279,6 +293,10 @@ public class Field implements IndexableField { fieldsData = value; } + /** + * Expert: change the value of this field. See + * {@link #setStringValue(String)}. + */ public void setByteValue(byte value) { if (!(fieldsData instanceof Byte)) { throw new IllegalArgumentException("cannot change value type from " + fieldsData.getClass().getSimpleName() + " to Byte"); @@ -286,6 +304,10 @@ public class Field implements IndexableField { fieldsData = Byte.valueOf(value); } + /** + * Expert: change the value of this field. See + * {@link #setStringValue(String)}. + */ public void setShortValue(short value) { if (!(fieldsData instanceof Short)) { throw new IllegalArgumentException("cannot change value type from " + fieldsData.getClass().getSimpleName() + " to Short"); @@ -293,6 +315,10 @@ public class Field implements IndexableField { fieldsData = Short.valueOf(value); } + /** + * Expert: change the value of this field. See + * {@link #setStringValue(String)}. + */ public void setIntValue(int value) { if (!(fieldsData instanceof Integer)) { throw new IllegalArgumentException("cannot change value type from " + fieldsData.getClass().getSimpleName() + " to Integer"); @@ -300,6 +326,10 @@ public class Field implements IndexableField { fieldsData = Integer.valueOf(value); } + /** + * Expert: change the value of this field. See + * {@link #setStringValue(String)}. + */ public void setLongValue(long value) { if (!(fieldsData instanceof Long)) { throw new IllegalArgumentException("cannot change value type from " + fieldsData.getClass().getSimpleName() + " to Long"); @@ -307,6 +337,10 @@ public class Field implements IndexableField { fieldsData = Long.valueOf(value); } + /** + * Expert: change the value of this field. See + * {@link #setStringValue(String)}. + */ public void setFloatValue(float value) { if (!(fieldsData instanceof Float)) { throw new IllegalArgumentException("cannot change value type from " + fieldsData.getClass().getSimpleName() + " to Float"); @@ -314,6 +348,10 @@ public class Field implements IndexableField { fieldsData = Float.valueOf(value); } + /** + * Expert: change the value of this field. See + * {@link #setStringValue(String)}. + */ public void setDoubleValue(double value) { if (!(fieldsData instanceof Double)) { throw new IllegalArgumentException("cannot change value type from " + fieldsData.getClass().getSimpleName() + " to Double"); @@ -340,23 +378,19 @@ public class Field implements IndexableField { return name; } + /** + * {@inheritDoc} + *

+ * The default value is 1.0f (no boost). + * @see #setBoost(float) + */ public float boost() { return boost; } - /** Sets the boost factor hits on this field. This value will be - * multiplied into the score of all hits on this this field of this - * document. - * - *

The boost is used to compute the norm factor for the field. By - * default, in the {@link org.apache.lucene.search.similarities.Similarity#computeNorm(FieldInvertState, Norm)} method, - * the boost value is multiplied by the length normalization factor and then - * rounded by {@link org.apache.lucene.search.similarities.DefaultSimilarity#encodeNormValue(float)} before it is stored in the - * index. One should attempt to ensure that this product does not overflow - * the range of that encoding. - * - * @see org.apache.lucene.search.similarities.Similarity#computeNorm(FieldInvertState, Norm) - * @see org.apache.lucene.search.similarities.DefaultSimilarity#encodeNormValue(float) + /** + * Sets the boost factor on this field. + * @see #boost() */ public void setBoost(float boost) { if (boost != 1.0f) { diff --git a/lucene/core/src/java/org/apache/lucene/index/IndexableField.java b/lucene/core/src/java/org/apache/lucene/index/IndexableField.java index 0408bab4d99..2df6f009a28 100644 --- a/lucene/core/src/java/org/apache/lucene/index/IndexableField.java +++ b/lucene/core/src/java/org/apache/lucene/index/IndexableField.java @@ -22,6 +22,8 @@ import java.io.Reader; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.TokenStream; +import org.apache.lucene.search.similarities.DefaultSimilarity; // javadocs +import org.apache.lucene.search.similarities.Similarity; // javadocs import org.apache.lucene.util.BytesRef; // TODO: how to handle versioning here...? @@ -42,7 +44,26 @@ public interface IndexableField { * of this field. */ public IndexableFieldType fieldType(); - /** Field boost (you must pre-multiply in any doc boost). */ + /** + * Returns the field's index-time boost. + *

+ * Only fields can have an index-time boost, if you want to simulate + * a "document boost", then you must pre-multiply it across all the + * relevant fields yourself. + *

The boost is used to compute the norm factor for the field. By + * default, in the {@link Similarity#computeNorm(FieldInvertState, Norm)} method, + * the boost value is multiplied by the length normalization factor and then + * rounded by {@link DefaultSimilarity#encodeNormValue(float)} before it is stored in the + * index. One should attempt to ensure that this product does not overflow + * the range of that encoding. + *

+ * It is illegal to return a boost other than 1.0f for a field that is not + * indexed ({@link IndexableFieldType#indexed()} is false) or omits normalization values + * ({@link IndexableFieldType#omitNorms()} returns true). + * + * @see Similarity#computeNorm(FieldInvertState, Norm) + * @see DefaultSimilarity#encodeNormValue(float) + */ public float boost(); /** Non-null if this field has a binary value */ From ce82983b6b648dba4d457aaa6db96a53e0b5ffa7 Mon Sep 17 00:00:00 2001 From: Michael McCandless Date: Mon, 27 Aug 2012 23:23:25 +0000 Subject: [PATCH 20/81] LUCENE-4324: initial cut at method/field level javadocs checking git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1377911 13f79535-47bb-0310-9956-ffa450edef68 --- dev-tools/scripts/checkJavaDocs.py | 89 ++++++++++++++++++++++++++++-- 1 file changed, 85 insertions(+), 4 deletions(-) diff --git a/dev-tools/scripts/checkJavaDocs.py b/dev-tools/scripts/checkJavaDocs.py index 459341b5440..29a6f86f9a4 100644 --- a/dev-tools/scripts/checkJavaDocs.py +++ b/dev-tools/scripts/checkJavaDocs.py @@ -20,7 +20,82 @@ import re reHREF = re.compile('(.*?)', re.IGNORECASE) reMarkup = re.compile('<.*?>') +reDivBlock = re.compile('

(.*?)
', re.IGNORECASE) +reCaption = re.compile('(.*?)', re.IGNORECASE) +reTDLast = re.compile('(.*?)$', re.IGNORECASE) +reColOne = re.compile('(.*?)', re.IGNORECASE) +def cleanHTML(s): + s = reMarkup.sub('', s) + s = s.replace(' ', ' ') + s = s.replace('<', '<') + s = s.replace('>', '>') + s = s.replace('&', '&') + return s.strip() + +def checkClass(fullPath): + # TODO: only works with java7 generated javadocs now! + f = open(fullPath, encoding='UTF-8') + anyMissing = False + + printed = False + inThing = False + lastCaption = None + lastItem = None + + desc = None + + for line in f.readlines(): + m = reCaption.search(line) + if m is not None: + lastCaption = m.group(1) + #print(' caption %s' % lastCaption) + m = reTDLast.search(line) + if m is not None: + # TODO: this will only get the first line of multi-line things: + lastItem = cleanHTML(m.group(1)) + #print(' item %s' % lastItem) + else: + m = reColOne.search(line) + if m is not None: + # TODO: this will only get the first line of multi-line things: + lastItem = cleanHTML(m.group(1)) + #print(' item %s' % lastItem) + + lineLower = line.strip().lower() + + if lineLower.find('') != -1: + desc = [] + if desc is not None: + desc.append(line) + if line.find('') != -1: + desc = ''.join(desc) + desc = desc.replace('
', '') + desc = desc.replace('
', '') + desc = desc.strip() + #print(' desc %s' % desc) + hasDesc = len(desc) > 0 + desc = None + f.close() + return anyMissing + def checkSummary(fullPath): printed = False f = open(fullPath, encoding='UTF-8') @@ -84,8 +159,8 @@ def checkPackageSummaries(root, level='class'): True if there are problems. """ - if level != 'class' and level != 'package': - print('unsupported level: %s, must be "class" or "package"' % level) + if level != 'class' and level != 'package' and level != 'method': + print('unsupported level: %s, must be "class" or "package" or "method"' % level) sys.exit(1) #for dirPath, dirNames, fileNames in os.walk('%s/lucene/build/docs/api' % root): @@ -100,7 +175,7 @@ def checkPackageSummaries(root, level='class'): anyMissing = False for dirPath, dirNames, fileNames in os.walk(root): - + if dirPath.find('/all/') != -1: # These are dups (this is a bit risk, eg, root IS this /all/ directory..) continue @@ -108,6 +183,12 @@ def checkPackageSummaries(root, level='class'): if 'package-summary.html' in fileNames: if level != 'package' and checkSummary('%s/package-summary.html' % dirPath): anyMissing = True + if level == 'method': + for fileName in fileNames: + fullPath = '%s/%s' % (dirPath, fileName) + if not fileName.startswith('package-') and fileName.endswith('.html') and os.path.isfile(fullPath): + if checkClass(fullPath): + anyMissing = True if 'overview-summary.html' in fileNames: if checkSummary('%s/overview-summary.html' % dirPath): anyMissing = True @@ -116,7 +197,7 @@ def checkPackageSummaries(root, level='class'): if __name__ == '__main__': if len(sys.argv) < 2 or len(sys.argv) > 3: - print('usage: %s [class|package]' % sys.argv[0]) + print('usage: %s [class|package|method]' % sys.argv[0]) sys.exit(1) if len(sys.argv) == 2: level = 'class' From 4716b0bc213b18f7ab6d615f2d34da34fb89479f Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Tue, 28 Aug 2012 00:40:22 +0000 Subject: [PATCH 21/81] LUCENE-4324: nuke default ctors on some all-static-method util classes git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1377923 13f79535-47bb-0310-9956-ffa450edef68 --- .../core/src/java/org/apache/lucene/index/IndexFileNames.java | 3 +++ .../src/java/org/apache/lucene/index/TwoPhaseCommitTool.java | 3 +++ lucene/core/src/java/org/apache/lucene/util/SmallFloat.java | 3 +++ 3 files changed, 9 insertions(+) diff --git a/lucene/core/src/java/org/apache/lucene/index/IndexFileNames.java b/lucene/core/src/java/org/apache/lucene/index/IndexFileNames.java index dfa97525629..2201d67cf1a 100644 --- a/lucene/core/src/java/org/apache/lucene/index/IndexFileNames.java +++ b/lucene/core/src/java/org/apache/lucene/index/IndexFileNames.java @@ -40,6 +40,9 @@ import org.apache.lucene.codecs.Codec; */ public final class IndexFileNames { + + /** No instance */ + private IndexFileNames() {} /** Name of the index segment file */ public static final String SEGMENTS = "segments"; diff --git a/lucene/core/src/java/org/apache/lucene/index/TwoPhaseCommitTool.java b/lucene/core/src/java/org/apache/lucene/index/TwoPhaseCommitTool.java index 10f7817c329..46ed0aa5dca 100644 --- a/lucene/core/src/java/org/apache/lucene/index/TwoPhaseCommitTool.java +++ b/lucene/core/src/java/org/apache/lucene/index/TwoPhaseCommitTool.java @@ -27,6 +27,9 @@ import java.util.Map; * @lucene.experimental */ public final class TwoPhaseCommitTool { + + /** No instance */ + private TwoPhaseCommitTool() {} /** * A wrapper of a {@link TwoPhaseCommit}, which delegates all calls to the diff --git a/lucene/core/src/java/org/apache/lucene/util/SmallFloat.java b/lucene/core/src/java/org/apache/lucene/util/SmallFloat.java index 175b5331909..8221b980803 100644 --- a/lucene/core/src/java/org/apache/lucene/util/SmallFloat.java +++ b/lucene/core/src/java/org/apache/lucene/util/SmallFloat.java @@ -21,6 +21,9 @@ package org.apache.lucene.util; * @lucene.internal */ public class SmallFloat { + + /** No instance */ + private SmallFloat() {} /** Converts a 32 bit float to an 8 bit float. *
Values less than zero are all mapped to zero. From 2ea9eec086352098d439aac5619173ba4203b032 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Tue, 28 Aug 2012 02:18:58 +0000 Subject: [PATCH 22/81] don't parse incomplete method specification git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1377945 13f79535-47bb-0310-9956-ffa450edef68 --- dev-tools/scripts/checkJavaDocs.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/dev-tools/scripts/checkJavaDocs.py b/dev-tools/scripts/checkJavaDocs.py index 29a6f86f9a4..f4e443972d8 100644 --- a/dev-tools/scripts/checkJavaDocs.py +++ b/dev-tools/scripts/checkJavaDocs.py @@ -22,7 +22,7 @@ reHREF = re.compile('(.*?)', re.IGNORECASE) reMarkup = re.compile('<.*?>') reDivBlock = re.compile('
(.*?)
', re.IGNORECASE) reCaption = re.compile('(.*?)', re.IGNORECASE) -reTDLast = re.compile('(.*?)$', re.IGNORECASE) +reTDLast = re.compile('.*', re.IGNORECASE) reColOne = re.compile('(.*?)', re.IGNORECASE) def cleanHTML(s): @@ -52,8 +52,10 @@ def checkClass(fullPath): #print(' caption %s' % lastCaption) m = reTDLast.search(line) if m is not None: - # TODO: this will only get the first line of multi-line things: - lastItem = cleanHTML(m.group(1)) + # TODO: this is actually the link anchor for the method, which we must + # somehow defer and only later check if the list at that anchor does not contain + # the text 'specified by' (in which case its an overridden method from an external library) + lastItem = m.group(1) #print(' item %s' % lastItem) else: m = reColOne.search(line) From b4ca62c640b322ee219277fec81e7f231b09997e Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Tue, 28 Aug 2012 02:32:51 +0000 Subject: [PATCH 23/81] don't parse incomplete ctor specification git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1377949 13f79535-47bb-0310-9956-ffa450edef68 --- dev-tools/scripts/checkJavaDocs.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/dev-tools/scripts/checkJavaDocs.py b/dev-tools/scripts/checkJavaDocs.py index f4e443972d8..42a79f4bab1 100644 --- a/dev-tools/scripts/checkJavaDocs.py +++ b/dev-tools/scripts/checkJavaDocs.py @@ -23,7 +23,7 @@ reMarkup = re.compile('<.*?>') reDivBlock = re.compile('
(.*?)
', re.IGNORECASE) reCaption = re.compile('(.*?)', re.IGNORECASE) reTDLast = re.compile('.*
', re.IGNORECASE) -reColOne = re.compile('(.*?)', re.IGNORECASE) +reColOne = re.compile('.*', re.IGNORECASE) def cleanHTML(s): s = reMarkup.sub('', s) @@ -60,8 +60,7 @@ def checkClass(fullPath): else: m = reColOne.search(line) if m is not None: - # TODO: this will only get the first line of multi-line things: - lastItem = cleanHTML(m.group(1)) + lastItem = m.group(1) #print(' item %s' % lastItem) lineLower = line.strip().lower() From e82f5c28622af3185026fd249974dda0df2eaebc Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Tue, 28 Aug 2012 02:53:39 +0000 Subject: [PATCH 24/81] avoid false positives in regexes, and parse nested classes correctly git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1377953 13f79535-47bb-0310-9956-ffa450edef68 --- dev-tools/scripts/checkJavaDocs.py | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/dev-tools/scripts/checkJavaDocs.py b/dev-tools/scripts/checkJavaDocs.py index 42a79f4bab1..cab679f830d 100644 --- a/dev-tools/scripts/checkJavaDocs.py +++ b/dev-tools/scripts/checkJavaDocs.py @@ -22,8 +22,9 @@ reHREF = re.compile('(.*?)', re.IGNORECASE) reMarkup = re.compile('<.*?>') reDivBlock = re.compile('
(.*?)
', re.IGNORECASE) reCaption = re.compile('(.*?)', re.IGNORECASE) -reTDLast = re.compile('.*', re.IGNORECASE) -reColOne = re.compile('.*', re.IGNORECASE) +reTDLastNested = re.compile('', re.IGNORECASE) +reTDLast = re.compile('', re.IGNORECASE) +reColOne = re.compile('', re.IGNORECASE) def cleanHTML(s): s = reMarkup.sub('', s) @@ -50,18 +51,25 @@ def checkClass(fullPath): if m is not None: lastCaption = m.group(1) #print(' caption %s' % lastCaption) - m = reTDLast.search(line) + m = reTDLastNested.search(line) if m is not None: - # TODO: this is actually the link anchor for the method, which we must - # somehow defer and only later check if the list at that anchor does not contain - # the text 'specified by' (in which case its an overridden method from an external library) + # nested classes lastItem = m.group(1) #print(' item %s' % lastItem) else: - m = reColOne.search(line) + m = reTDLast.search(line) if m is not None: + # methods etc + # TODO: this is actually the link anchor for the method, which we must + # somehow defer and only later check if the list at that anchor does not contain + # the text 'specified by' (in which case its an overridden method from an external library) lastItem = m.group(1) - #print(' item %s' % lastItem) + else: + # ctors etc + m = reColOne.search(line) + if m is not None: + lastItem = m.group(1) + #print(' item %s' % lastItem) lineLower = line.strip().lower() From 5e2be08e77623eb1d613df153960092e006c2a80 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Tue, 28 Aug 2012 03:20:37 +0000 Subject: [PATCH 25/81] build up a list so we can prune overridden methods git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1377958 13f79535-47bb-0310-9956-ffa450edef68 --- dev-tools/scripts/checkJavaDocs.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/dev-tools/scripts/checkJavaDocs.py b/dev-tools/scripts/checkJavaDocs.py index cab679f830d..8152251519f 100644 --- a/dev-tools/scripts/checkJavaDocs.py +++ b/dev-tools/scripts/checkJavaDocs.py @@ -37,9 +37,8 @@ def cleanHTML(s): def checkClass(fullPath): # TODO: only works with java7 generated javadocs now! f = open(fullPath, encoding='UTF-8') - anyMissing = False - - printed = False + + missing = [] inThing = False lastCaption = None lastItem = None @@ -81,12 +80,7 @@ def checkClass(fullPath): if inThing: if lineLower.find('') != -1: if not hasDesc: - if not printed: - print() - print(fullPath) - printed = True - print(' missing %s: %s' % (lastCaption, lastItem)) - anyMissing = True + missing.append((lastCaption, lastItem)) inThing = False continue else: @@ -99,11 +93,17 @@ def checkClass(fullPath): desc = desc.replace('
', '') desc = desc.replace('
', '') desc = desc.strip() - #print(' desc %s' % desc) hasDesc = len(desc) > 0 desc = None f.close() - return anyMissing + if len(missing) > 0: + print() + print(fullPath) + for (caption, item) in missing: + print(' missing %s: %s' % (caption, item)) + return True + else: + return False def checkSummary(fullPath): printed = False From 182d59b75e16e51668557fcee57f84d13a0c8d01 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Tue, 28 Aug 2012 03:47:47 +0000 Subject: [PATCH 26/81] prune overridden methods git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1377966 13f79535-47bb-0310-9956-ffa450edef68 --- dev-tools/scripts/checkJavaDocs.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/dev-tools/scripts/checkJavaDocs.py b/dev-tools/scripts/checkJavaDocs.py index 8152251519f..e4484dd8d84 100644 --- a/dev-tools/scripts/checkJavaDocs.py +++ b/dev-tools/scripts/checkJavaDocs.py @@ -26,6 +26,11 @@ reTDLastNested = re.compile('
', re.IGNORECASE) reColOne = re.compile('', re.IGNORECASE) +# the Method detail section at the end +reMethodDetail = re.compile('^

Method Detail

$', re.IGNORECASE) +reMethodDetailAnchor = re.compile('^
$', re.IGNORECASE) +reMethodOverridden = re.compile('^
(Specified by:|Overrides:)
$', re.IGNORECASE) + def cleanHTML(s): s = reMarkup.sub('', s) s = s.replace(' ', ' ') @@ -44,8 +49,29 @@ def checkClass(fullPath): lastItem = None desc = None + + foundMethodDetail = False + lastMethodAnchor = None for line in f.readlines(): + m = reMethodDetail.search(line) + if m is not None: + foundMethodDetail = True + continue + + # prune methods that are just @Overrides of other interface/classes, + # they should be specified elsewhere, if they are e.g. jdk or + # external classes we cannot inherit their docs anyway + if foundMethodDetail: + m = reMethodDetailAnchor.search(line) + if m is not None: + lastMethodAnchor = m.group(1) + continue + m = reMethodOverridden.search(line) + if m is not None and ('Methods', lastMethodAnchor) in missing: + #print('removing @overridden method: %s' % lastMethodAnchor) + missing.remove(('Methods', lastMethodAnchor)) + m = reCaption.search(line) if m is not None: lastCaption = m.group(1) From ed8adb5e92c034078b8151de3bda9056a62eeb96 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Tue, 28 Aug 2012 04:05:33 +0000 Subject: [PATCH 27/81] generics-proof this git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1377970 13f79535-47bb-0310-9956-ffa450edef68 --- dev-tools/scripts/checkJavaDocs.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/dev-tools/scripts/checkJavaDocs.py b/dev-tools/scripts/checkJavaDocs.py index e4484dd8d84..7340ca5786d 100644 --- a/dev-tools/scripts/checkJavaDocs.py +++ b/dev-tools/scripts/checkJavaDocs.py @@ -28,7 +28,7 @@ reColOne = re.compile('
Method Detail$', re.IGNORECASE) -reMethodDetailAnchor = re.compile('^$', re.IGNORECASE) +reMethodDetailAnchor = re.compile('^()?$', re.IGNORECASE) reMethodOverridden = re.compile('^
(Specified by:|Overrides:)
$', re.IGNORECASE) def cleanHTML(s): @@ -65,7 +65,7 @@ def checkClass(fullPath): if foundMethodDetail: m = reMethodDetailAnchor.search(line) if m is not None: - lastMethodAnchor = m.group(1) + lastMethodAnchor = m.group(2) continue m = reMethodOverridden.search(line) if m is not None and ('Methods', lastMethodAnchor) in missing: @@ -85,9 +85,6 @@ def checkClass(fullPath): m = reTDLast.search(line) if m is not None: # methods etc - # TODO: this is actually the link anchor for the method, which we must - # somehow defer and only later check if the list at that anchor does not contain - # the text 'specified by' (in which case its an overridden method from an external library) lastItem = m.group(1) else: # ctors etc From d3e059b5e77d6c6a205582e26cc35fe8a8ce63f7 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Tue, 28 Aug 2012 04:14:50 +0000 Subject: [PATCH 28/81] add missing javadocs git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1377972 13f79535-47bb-0310-9956-ffa450edef68 --- .../util/AbstractAnalysisFactory.java | 22 +++++++++++++++++++ .../analysis/util/ResourceLoaderAware.java | 4 ++++ .../lucene/analysis/util/StemmerUtil.java | 3 +++ .../lucene/analysis/util/WordlistLoader.java | 11 ++++++---- 4 files changed, 36 insertions(+), 4 deletions(-) diff --git a/lucene/analysis/common/src/java/org/apache/lucene/analysis/util/AbstractAnalysisFactory.java b/lucene/analysis/common/src/java/org/apache/lucene/analysis/util/AbstractAnalysisFactory.java index e1933169410..e43b5c5ef35 100644 --- a/lucene/analysis/common/src/java/org/apache/lucene/analysis/util/AbstractAnalysisFactory.java +++ b/lucene/analysis/common/src/java/org/apache/lucene/analysis/util/AbstractAnalysisFactory.java @@ -37,6 +37,15 @@ import java.util.regex.PatternSyntaxException; /** * Abstract parent class for analysis factories {@link TokenizerFactory}, * {@link TokenFilterFactory} and {@link CharFilterFactory}. + *

+ * The typical lifecycle for a factory consumer is: + *

    + *
  1. Create factory via its a no-arg constructor + *
  2. Set version emulation by calling {@link #setLuceneMatchVersion(Version)} + *
  3. Calls {@link #init(Map)} passing arguments as key-value mappings. + *
  4. (Optional) If the factory uses resources such as files, {@link ResourceLoaderAware#inform(ResourceLoader)} is called to initialize those resources. + *
  5. Consumer calls create() to obtain instances. + *
*/ public abstract class AbstractAnalysisFactory { @@ -46,6 +55,9 @@ public abstract class AbstractAnalysisFactory { /** the luceneVersion arg */ protected Version luceneMatchVersion = null; + /** + * Initialize this factory via a set of key-value pairs. + */ public void init(Map args) { this.args = args; } @@ -104,6 +116,9 @@ public abstract class AbstractAnalysisFactory { return Boolean.parseBoolean(s); } + /** + * Compiles a pattern for the value of the specified argument key name + */ protected Pattern getPattern(String name) { try { String pat = args.get(name); @@ -118,6 +133,10 @@ public abstract class AbstractAnalysisFactory { } } + /** + * Returns as {@link CharArraySet} from wordFiles, which + * can be a comma-separated list of filenames + */ protected CharArraySet getWordSet(ResourceLoader loader, String wordFiles, boolean ignoreCase) throws IOException { assureMatchVersion(); @@ -137,6 +156,9 @@ public abstract class AbstractAnalysisFactory { return words; } + /** + * Returns the resource's lines (with content treated as UTF-8) + */ protected List getLines(ResourceLoader loader, String resource) throws IOException { return WordlistLoader.getLines(loader.openResource(resource), IOUtils.CHARSET_UTF_8); } diff --git a/lucene/analysis/common/src/java/org/apache/lucene/analysis/util/ResourceLoaderAware.java b/lucene/analysis/common/src/java/org/apache/lucene/analysis/util/ResourceLoaderAware.java index cf360241d8d..7ac18b60f3c 100644 --- a/lucene/analysis/common/src/java/org/apache/lucene/analysis/util/ResourceLoaderAware.java +++ b/lucene/analysis/common/src/java/org/apache/lucene/analysis/util/ResourceLoaderAware.java @@ -27,5 +27,9 @@ import java.io.IOException; */ public interface ResourceLoaderAware { + /** + * Initializes this component with the provided ResourceLoader + * (used for loading classes, files, etc). + */ void inform(ResourceLoader loader) throws IOException; } diff --git a/lucene/analysis/common/src/java/org/apache/lucene/analysis/util/StemmerUtil.java b/lucene/analysis/common/src/java/org/apache/lucene/analysis/util/StemmerUtil.java index 6bae85cc2b3..679ac0ceec7 100644 --- a/lucene/analysis/common/src/java/org/apache/lucene/analysis/util/StemmerUtil.java +++ b/lucene/analysis/common/src/java/org/apache/lucene/analysis/util/StemmerUtil.java @@ -19,6 +19,9 @@ package org.apache.lucene.analysis.util; /** Some commonly-used stemming functions */ public class StemmerUtil { + /** no instance */ + private StemmerUtil() {} + /** * Returns true if the character array starts with the suffix. * diff --git a/lucene/analysis/common/src/java/org/apache/lucene/analysis/util/WordlistLoader.java b/lucene/analysis/common/src/java/org/apache/lucene/analysis/util/WordlistLoader.java index 8c8866f871c..1f27d163831 100644 --- a/lucene/analysis/common/src/java/org/apache/lucene/analysis/util/WordlistLoader.java +++ b/lucene/analysis/common/src/java/org/apache/lucene/analysis/util/WordlistLoader.java @@ -36,7 +36,10 @@ import org.apache.lucene.util.Version; */ public class WordlistLoader { - private static final int INITITAL_CAPACITY = 16; + private static final int INITIAL_CAPACITY = 16; + + /** no instance */ + private WordlistLoader() {} /** * Reads lines from a Reader and adds every line as an entry to a CharArraySet (omitting @@ -74,7 +77,7 @@ public class WordlistLoader { * @return A {@link CharArraySet} with the reader's words */ public static CharArraySet getWordSet(Reader reader, Version matchVersion) throws IOException { - return getWordSet(reader, new CharArraySet(matchVersion, INITITAL_CAPACITY, false)); + return getWordSet(reader, new CharArraySet(matchVersion, INITIAL_CAPACITY, false)); } /** @@ -89,7 +92,7 @@ public class WordlistLoader { * @return A CharArraySet with the reader's words */ public static CharArraySet getWordSet(Reader reader, String comment, Version matchVersion) throws IOException { - return getWordSet(reader, comment, new CharArraySet(matchVersion, INITITAL_CAPACITY, false)); + return getWordSet(reader, comment, new CharArraySet(matchVersion, INITIAL_CAPACITY, false)); } /** @@ -171,7 +174,7 @@ public class WordlistLoader { * @return A {@link CharArraySet} with the reader's words */ public static CharArraySet getSnowballWordSet(Reader reader, Version matchVersion) throws IOException { - return getSnowballWordSet(reader, new CharArraySet(matchVersion, INITITAL_CAPACITY, false)); + return getSnowballWordSet(reader, new CharArraySet(matchVersion, INITIAL_CAPACITY, false)); } From d8f36a22b1ab3c4e4d910e8cff09e386c037eab2 Mon Sep 17 00:00:00 2001 From: Uwe Schindler Date: Tue, 28 Aug 2012 06:50:46 +0000 Subject: [PATCH 29/81] LUCENE-3923: Faster SVN WC checks git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1377991 13f79535-47bb-0310-9956-ffa450edef68 --- build-clover.xml | 49 ------- build.xml | 45 ++----- extra-targets.xml | 114 ++++++++++++++++ lucene/build.xml | 10 -- lucene/common-build.xml | 13 +- lucene/tools/src/java/lucene-solr.antlib.xml | 3 - .../lucene/validation/SVNEolCheckTask.java | 126 ------------------ solr/build.xml | 6 - solr/webapp/build.xml | 4 - 9 files changed, 127 insertions(+), 243 deletions(-) delete mode 100644 build-clover.xml create mode 100644 extra-targets.xml delete mode 100644 lucene/tools/src/java/org/apache/lucene/validation/SVNEolCheckTask.java diff --git a/build-clover.xml b/build-clover.xml deleted file mode 100644 index 119b4bd8692..00000000000 --- a/build-clover.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - Clover not enabled! - - - - - - - - - - - - - - - - You can find the merged Lucene/Solr Clover report in '${clover.report.dir}'. - - - diff --git a/build.xml b/build.xml index 880b5458719..5bcd84ee6b5 100644 --- a/build.xml +++ b/build.xml @@ -75,12 +75,6 @@ The following files contain @author tags or nocommits:${line.separator}${validate.patternsFound} - - - - - - @@ -254,17 +248,21 @@ + + + + + + - + - - + @@ -288,31 +286,4 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/extra-targets.xml b/extra-targets.xml new file mode 100644 index 00000000000..1a78b581884 --- /dev/null +++ b/extra-targets.xml @@ -0,0 +1,114 @@ + + + + + + + This file is designed for importing into a main build file, and not intended + for standalone use. + + + + + + + Clover not enabled! + + + + + + + + + + + + + + + + You can find the merged Lucene/Solr Clover report in '${clover.report.dir}'. + + + + + + + + + diff --git a/lucene/build.xml b/lucene/build.xml index d6ed8074af0..8d9c2986ca9 100644 --- a/lucene/build.xml +++ b/lucene/build.xml @@ -198,16 +198,6 @@ - - - - - - - - - - diff --git a/lucene/common-build.xml b/lucene/common-build.xml index bb9b887a820..83a018ca95c 100644 --- a/lucene/common-build.xml +++ b/lucene/common-build.xml @@ -508,6 +508,9 @@ + + + - - - - - + - + diff --git a/lucene/tools/src/java/lucene-solr.antlib.xml b/lucene/tools/src/java/lucene-solr.antlib.xml index f3ae1c23f3d..f18d8a3287b 100644 --- a/lucene/tools/src/java/lucene-solr.antlib.xml +++ b/lucene/tools/src/java/lucene-solr.antlib.xml @@ -21,7 +21,4 @@ - diff --git a/lucene/tools/src/java/org/apache/lucene/validation/SVNEolCheckTask.java b/lucene/tools/src/java/org/apache/lucene/validation/SVNEolCheckTask.java deleted file mode 100644 index 83a6e685ad6..00000000000 --- a/lucene/tools/src/java/org/apache/lucene/validation/SVNEolCheckTask.java +++ /dev/null @@ -1,126 +0,0 @@ -package org.apache.lucene.validation; - -/* - * 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. - */ - -import java.io.BufferedReader; -import java.io.File; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.nio.charset.Charset; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -import org.apache.tools.ant.BuildException; -import org.apache.tools.ant.Task; -import org.apache.tools.ant.types.Resource; -import org.apache.tools.ant.types.ResourceCollection; -import org.apache.tools.ant.types.resources.FileResource; -import org.apache.tools.ant.types.resources.Resources; - -/** - * Checks all files to ensure they have svn:eol-style, or - * have a binary svn:mime-type. - *

- * TODO: check that this value is actually correct, not just present. - *

- * WARNING: slow! - */ -public class SVNEolCheckTask extends Task { - - private final Resources files = new Resources(); - - private String svnExecutable; - - /** Set of files to check */ - public void add(ResourceCollection rc) { - files.add(rc); - } - - /** svn.exe executable */ - public void setSvnExecutable(String svnExecutable) { - this.svnExecutable = svnExecutable; - } - - @Override - public void execute() throws BuildException { - if (svnExecutable == null) { - throw new BuildException("svnExecutable parameter must be set!"); - } - boolean success = true; - files.setProject(getProject()); - Iterator iter = (Iterator) files.iterator(); - while (iter.hasNext()) { - Resource r = iter.next(); - if (!(r instanceof FileResource)) { - throw new BuildException("Only filesystem resource are supported: " + r.getName() - + ", was: " + r.getClass().getName()); - } - - File f = ((FileResource) r).getFile(); - List cmd = new ArrayList(); - cmd.add(svnExecutable); - cmd.add("pget"); - cmd.add("svn:eol-style"); - cmd.add(f.getAbsolutePath()); - String eolStyle = exec(cmd); - if (eolStyle.isEmpty()) { - cmd.clear(); - cmd.add(svnExecutable); - cmd.add("pget"); - cmd.add("svn:mime-type"); - cmd.add(f.getAbsolutePath()); - String binProp = exec(cmd); - if (!binProp.startsWith("application/") && !binProp.startsWith("image/")) { - success = false; - log(r.getName() + " missing svn:eol-style (or binary svn:mime-type)."); - } - } - } - if (!success) { - throw new BuildException("Some svn properties are missing"); - } - } - - private String exec(List cmd) throws BuildException { - ProcessBuilder pb = new ProcessBuilder(cmd); - pb.redirectErrorStream(true); - BufferedReader r = null; - StringBuilder sb = new StringBuilder(); - try { - Process p = pb.start(); - InputStream is = p.getInputStream(); - r = new BufferedReader(new InputStreamReader(is, Charset.defaultCharset())); - int ch; - while ((ch = r.read()) > 0) { - sb.append((char)ch); - } - p.waitFor(); - return sb.toString(); - } catch (Exception e) { - throw new BuildException(e); - } finally { - if (r != null) { - try { - r.close(); - } catch (IOException e) {} - } - } - } -} diff --git a/solr/build.xml b/solr/build.xml index 5764f7b90eb..80b12b2c58c 100644 --- a/solr/build.xml +++ b/solr/build.xml @@ -638,12 +638,6 @@ - - - - - - diff --git a/solr/webapp/build.xml b/solr/webapp/build.xml index cf32a9e5bfd..8195438721d 100644 --- a/solr/webapp/build.xml +++ b/solr/webapp/build.xml @@ -40,10 +40,6 @@ - - - From 31c9cede9a6b228c50605b07d226f798c1714278 Mon Sep 17 00:00:00 2001 From: Martijn van Groningen Date: Tue, 28 Aug 2012 11:03:46 +0000 Subject: [PATCH 30/81] LUCENE-4333: Fixed NPE in TermGroupFacetCollector when faceting on mv fields. git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1378077 13f79535-47bb-0310-9956-ffa450edef68 --- lucene/CHANGES.txt | 3 + .../term/TermGroupFacetCollector.java | 7 ++ .../grouping/GroupFacetCollectorTest.java | 77 +++++++++++++++++++ 3 files changed, 87 insertions(+) diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt index 8d5a3489243..267a272674d 100644 --- a/lucene/CHANGES.txt +++ b/lucene/CHANGES.txt @@ -113,6 +113,9 @@ Bug Fixes * LUCENE-4224: Add in-order scorer to query time joining and the out-of-order scorer throws an UOE. (Martijn van Groningen, Robert Muir) +* LUCENE-4333: Fixed NPE in TermGroupFacetCollector when faceting on mv fields. + (Jesse MacVicar, Martijn van Groningen) + Optimizations * LUCENE-4317: Improve reuse of internal TokenStreams and StringReader diff --git a/lucene/grouping/src/java/org/apache/lucene/search/grouping/term/TermGroupFacetCollector.java b/lucene/grouping/src/java/org/apache/lucene/search/grouping/term/TermGroupFacetCollector.java index 77a78aa9e44..80a8bf24652 100644 --- a/lucene/grouping/src/java/org/apache/lucene/search/grouping/term/TermGroupFacetCollector.java +++ b/lucene/grouping/src/java/org/apache/lucene/search/grouping/term/TermGroupFacetCollector.java @@ -186,6 +186,10 @@ public abstract class TermGroupFacetCollector extends AbstractGroupFacetCollecto } public void collect(int doc) throws IOException { + if (facetFieldDocTermOrds.isEmpty()) { + return; + } + int groupOrd = groupFieldTermsIndex.getOrd(doc); if (facetOrdTermsEnum != null) { reuse = facetFieldDocTermOrds.lookup(doc, reuse); @@ -240,6 +244,9 @@ public abstract class TermGroupFacetCollector extends AbstractGroupFacetCollecto segmentTotalCount = 0; segmentGroupedFacetHits.clear(); + if (facetFieldDocTermOrds.isEmpty()) { + return; + } for (GroupedFacetHit groupedFacetHit : groupedFacetHits) { int groupOrd = groupFieldTermsIndex.binarySearchLookup(groupedFacetHit.groupValue, spare); if (groupOrd < 0) { diff --git a/lucene/grouping/src/test/org/apache/lucene/search/grouping/GroupFacetCollectorTest.java b/lucene/grouping/src/test/org/apache/lucene/search/grouping/GroupFacetCollectorTest.java index 47805c53e0e..b6ef3862fa6 100644 --- a/lucene/grouping/src/test/org/apache/lucene/search/grouping/GroupFacetCollectorTest.java +++ b/lucene/grouping/src/test/org/apache/lucene/search/grouping/GroupFacetCollectorTest.java @@ -21,6 +21,7 @@ import org.apache.lucene.analysis.MockAnalyzer; import org.apache.lucene.document.*; import org.apache.lucene.index.DirectoryReader; import org.apache.lucene.index.DocValues; +import org.apache.lucene.index.NoMergePolicy; import org.apache.lucene.index.RandomIndexWriter; import org.apache.lucene.index.Term; import org.apache.lucene.search.IndexSearcher; @@ -217,6 +218,82 @@ public class GroupFacetCollectorTest extends AbstractGroupingTestCase { dir.close(); } + public void testMVGroupedFacetingWithDeletes() throws Exception { + final String groupField = "hotel"; + FieldType customType = new FieldType(); + customType.setStored(true); + + Directory dir = newDirectory(); + RandomIndexWriter w = new RandomIndexWriter( + random(), + dir, + newIndexWriterConfig(TEST_VERSION_CURRENT, + new MockAnalyzer(random())).setMergePolicy(NoMergePolicy.COMPOUND_FILES)); + boolean useDv = false; + + // 0 + Document doc = new Document(); + addField(doc, "x", "x", useDv); + w.addDocument(doc); + + doc = new Document(); + addField(doc, groupField, "a", useDv); + addField(doc, "airport", "ams", useDv); + w.addDocument(doc); + + w.commit(); + w.deleteDocuments(new TermQuery(new Term("airport", "ams"))); + + // 0 + doc = new Document(); + addField(doc, groupField, "a", useDv); + addField(doc, "airport", "ams", useDv); + w.addDocument(doc); + + // 1 + doc = new Document(); + addField(doc, groupField, "a", useDv); + addField(doc, "airport", "dus", useDv); + w.addDocument(doc); + + // 2 + doc = new Document(); + addField(doc, groupField, "b", useDv); + addField(doc, "airport", "ams", useDv); + w.addDocument(doc); + + // 3 + doc = new Document(); + addField(doc, groupField, "b", useDv); + addField(doc, "airport", "ams", useDv); + w.addDocument(doc); + + // 4 + doc = new Document(); + addField(doc, groupField, "b", useDv); + addField(doc, "airport", "ams", useDv); + w.addDocument(doc); + + w.commit(); + w.close(); + IndexSearcher indexSearcher = new IndexSearcher(DirectoryReader.open(dir)); + AbstractGroupFacetCollector groupedAirportFacetCollector = createRandomCollector(groupField, "airport", null, true, useDv); + indexSearcher.search(new MatchAllDocsQuery(), groupedAirportFacetCollector); + TermGroupFacetCollector.GroupedFacetResult airportResult = groupedAirportFacetCollector.mergeSegmentResults(10, 0, false); + assertEquals(3, airportResult.getTotalCount()); + assertEquals(0, airportResult.getTotalMissingCount()); + + List entries = airportResult.getFacetEntries(0, 10); + assertEquals(2, entries.size()); + assertEquals("ams", entries.get(0).getValue().utf8ToString()); + assertEquals(2, entries.get(0).getCount()); + assertEquals("dus", entries.get(1).getValue().utf8ToString()); + assertEquals(1, entries.get(1).getCount()); + + indexSearcher.getIndexReader().close(); + dir.close(); + } + private void addField(Document doc, String field, String value, boolean canUseIDV) { doc.add(new StringField(field, value, Field.Store.NO)); if (canUseIDV) { From 84fb1d09d071dd4d6d1df21ac555b069c67ad01a Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Tue, 28 Aug 2012 11:50:28 +0000 Subject: [PATCH 31/81] LUCENE-4334: remove unnecessary ant-junit dependency git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1378090 13f79535-47bb-0310-9956-ffa450edef68 --- dev-tools/eclipse/dot.classpath | 1 - dev-tools/idea/.idea/libraries/Ant.xml | 1 - dev-tools/maven/lucene/core/pom.xml.template | 5 - .../lucene/test-framework/pom.xml.template | 4 - dev-tools/maven/pom.xml.template | 5 - lucene/licenses/ant-junit-1.8.2.jar.sha1 | 1 - lucene/licenses/ant-junit-LICENSE-ASL.txt | 272 ------------------ lucene/licenses/ant-junit-NOTICE.txt | 6 - lucene/test-framework/ivy.xml | 1 - solr/licenses/ant-junit-1.8.2.jar.sha1 | 1 - solr/licenses/ant-junit-LICENSE-ASL.txt | 272 ------------------ solr/licenses/ant-junit-NOTICE.txt | 6 - solr/test-framework/ivy.xml | 1 - 13 files changed, 576 deletions(-) delete mode 100644 lucene/licenses/ant-junit-1.8.2.jar.sha1 delete mode 100644 lucene/licenses/ant-junit-LICENSE-ASL.txt delete mode 100644 lucene/licenses/ant-junit-NOTICE.txt delete mode 100644 solr/licenses/ant-junit-1.8.2.jar.sha1 delete mode 100644 solr/licenses/ant-junit-LICENSE-ASL.txt delete mode 100644 solr/licenses/ant-junit-NOTICE.txt diff --git a/dev-tools/eclipse/dot.classpath b/dev-tools/eclipse/dot.classpath index 1d2abc15758..0c289480f82 100644 --- a/dev-tools/eclipse/dot.classpath +++ b/dev-tools/eclipse/dot.classpath @@ -95,7 +95,6 @@ - diff --git a/dev-tools/idea/.idea/libraries/Ant.xml b/dev-tools/idea/.idea/libraries/Ant.xml index be80e38880c..a01ee64d804 100644 --- a/dev-tools/idea/.idea/libraries/Ant.xml +++ b/dev-tools/idea/.idea/libraries/Ant.xml @@ -2,7 +2,6 @@ - diff --git a/dev-tools/maven/lucene/core/pom.xml.template b/dev-tools/maven/lucene/core/pom.xml.template index 35197d45e13..7ffb353938e 100644 --- a/dev-tools/maven/lucene/core/pom.xml.template +++ b/dev-tools/maven/lucene/core/pom.xml.template @@ -52,11 +52,6 @@ ant test - - org.apache.ant - ant-junit - test - com.carrotsearch.randomizedtesting randomizedtesting-runner diff --git a/dev-tools/maven/lucene/test-framework/pom.xml.template b/dev-tools/maven/lucene/test-framework/pom.xml.template index f454c523c10..7e7a1a1e6be 100644 --- a/dev-tools/maven/lucene/test-framework/pom.xml.template +++ b/dev-tools/maven/lucene/test-framework/pom.xml.template @@ -51,10 +51,6 @@ junit junit - - org.apache.ant - ant-junit - com.carrotsearch.randomizedtesting randomizedtesting-runner diff --git a/dev-tools/maven/pom.xml.template b/dev-tools/maven/pom.xml.template index bfef1392d97..9cc2ec4dd06 100644 --- a/dev-tools/maven/pom.xml.template +++ b/dev-tools/maven/pom.xml.template @@ -227,11 +227,6 @@ ant 1.8.2 - - org.apache.ant - ant-junit - 1.8.2 - org.apache.commons commons-compress diff --git a/lucene/licenses/ant-junit-1.8.2.jar.sha1 b/lucene/licenses/ant-junit-1.8.2.jar.sha1 deleted file mode 100644 index b079f25a851..00000000000 --- a/lucene/licenses/ant-junit-1.8.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -1653e85a2710d59edef1fcdd899a35f2c45324b3 diff --git a/lucene/licenses/ant-junit-LICENSE-ASL.txt b/lucene/licenses/ant-junit-LICENSE-ASL.txt deleted file mode 100644 index ab3182e7776..00000000000 --- a/lucene/licenses/ant-junit-LICENSE-ASL.txt +++ /dev/null @@ -1,272 +0,0 @@ -/* - * Apache License - * Version 2.0, January 2004 - * http://www.apache.org/licenses/ - * - * TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - * - * 1. Definitions. - * - * "License" shall mean the terms and conditions for use, reproduction, - * and distribution as defined by Sections 1 through 9 of this document. - * - * "Licensor" shall mean the copyright owner or entity authorized by - * the copyright owner that is granting the License. - * - * "Legal Entity" shall mean the union of the acting entity and all - * other entities that control, are controlled by, or are under common - * control with that entity. For the purposes of this definition, - * "control" means (i) the power, direct or indirect, to cause the - * direction or management of such entity, whether by contract or - * otherwise, or (ii) ownership of fifty percent (50%) or more of the - * outstanding shares, or (iii) beneficial ownership of such entity. - * - * "You" (or "Your") shall mean an individual or Legal Entity - * exercising permissions granted by this License. - * - * "Source" form shall mean the preferred form for making modifications, - * including but not limited to software source code, documentation - * source, and configuration files. - * - * "Object" form shall mean any form resulting from mechanical - * transformation or translation of a Source form, including but - * not limited to compiled object code, generated documentation, - * and conversions to other media types. - * - * "Work" shall mean the work of authorship, whether in Source or - * Object form, made available under the License, as indicated by a - * copyright notice that is included in or attached to the work - * (an example is provided in the Appendix below). - * - * "Derivative Works" shall mean any work, whether in Source or Object - * form, that is based on (or derived from) the Work and for which the - * editorial revisions, annotations, elaborations, or other modifications - * represent, as a whole, an original work of authorship. For the purposes - * of this License, Derivative Works shall not include works that remain - * separable from, or merely link (or bind by name) to the interfaces of, - * the Work and Derivative Works thereof. - * - * "Contribution" shall mean any work of authorship, including - * the original version of the Work and any modifications or additions - * to that Work or Derivative Works thereof, that is intentionally - * submitted to Licensor for inclusion in the Work by the copyright owner - * or by an individual or Legal Entity authorized to submit on behalf of - * the copyright owner. For the purposes of this definition, "submitted" - * means any form of electronic, verbal, or written communication sent - * to the Licensor or its representatives, including but not limited to - * communication on electronic mailing lists, source code control systems, - * and issue tracking systems that are managed by, or on behalf of, the - * Licensor for the purpose of discussing and improving the Work, but - * excluding communication that is conspicuously marked or otherwise - * designated in writing by the copyright owner as "Not a Contribution." - * - * "Contributor" shall mean Licensor and any individual or Legal Entity - * on behalf of whom a Contribution has been received by Licensor and - * subsequently incorporated within the Work. - * - * 2. Grant of Copyright License. Subject to the terms and conditions of - * this License, each Contributor hereby grants to You a perpetual, - * worldwide, non-exclusive, no-charge, royalty-free, irrevocable - * copyright license to reproduce, prepare Derivative Works of, - * publicly display, publicly perform, sublicense, and distribute the - * Work and such Derivative Works in Source or Object form. - * - * 3. Grant of Patent License. Subject to the terms and conditions of - * this License, each Contributor hereby grants to You a perpetual, - * worldwide, non-exclusive, no-charge, royalty-free, irrevocable - * (except as stated in this section) patent license to make, have made, - * use, offer to sell, sell, import, and otherwise transfer the Work, - * where such license applies only to those patent claims licensable - * by such Contributor that are necessarily infringed by their - * Contribution(s) alone or by combination of their Contribution(s) - * with the Work to which such Contribution(s) was submitted. If You - * institute patent litigation against any entity (including a - * cross-claim or counterclaim in a lawsuit) alleging that the Work - * or a Contribution incorporated within the Work constitutes direct - * or contributory patent infringement, then any patent licenses - * granted to You under this License for that Work shall terminate - * as of the date such litigation is filed. - * - * 4. Redistribution. You may reproduce and distribute copies of the - * Work or Derivative Works thereof in any medium, with or without - * modifications, and in Source or Object form, provided that You - * meet the following conditions: - * - * (a) You must give any other recipients of the Work or - * Derivative Works a copy of this License; and - * - * (b) You must cause any modified files to carry prominent notices - * stating that You changed the files; and - * - * (c) You must retain, in the Source form of any Derivative Works - * that You distribute, all copyright, patent, trademark, and - * attribution notices from the Source form of the Work, - * excluding those notices that do not pertain to any part of - * the Derivative Works; and - * - * (d) If the Work includes a "NOTICE" text file as part of its - * distribution, then any Derivative Works that You distribute must - * include a readable copy of the attribution notices contained - * within such NOTICE file, excluding those notices that do not - * pertain to any part of the Derivative Works, in at least one - * of the following places: within a NOTICE text file distributed - * as part of the Derivative Works; within the Source form or - * documentation, if provided along with the Derivative Works; or, - * within a display generated by the Derivative Works, if and - * wherever such third-party notices normally appear. The contents - * of the NOTICE file are for informational purposes only and - * do not modify the License. You may add Your own attribution - * notices within Derivative Works that You distribute, alongside - * or as an addendum to the NOTICE text from the Work, provided - * that such additional attribution notices cannot be construed - * as modifying the License. - * - * You may add Your own copyright statement to Your modifications and - * may provide additional or different license terms and conditions - * for use, reproduction, or distribution of Your modifications, or - * for any such Derivative Works as a whole, provided Your use, - * reproduction, and distribution of the Work otherwise complies with - * the conditions stated in this License. - * - * 5. Submission of Contributions. Unless You explicitly state otherwise, - * any Contribution intentionally submitted for inclusion in the Work - * by You to the Licensor shall be under the terms and conditions of - * this License, without any additional terms or conditions. - * Notwithstanding the above, nothing herein shall supersede or modify - * the terms of any separate license agreement you may have executed - * with Licensor regarding such Contributions. - * - * 6. Trademarks. This License does not grant permission to use the trade - * names, trademarks, service marks, or product names of the Licensor, - * except as required for reasonable and customary use in describing the - * origin of the Work and reproducing the content of the NOTICE file. - * - * 7. Disclaimer of Warranty. Unless required by applicable law or - * agreed to in writing, Licensor provides the Work (and each - * Contributor provides its Contributions) on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - * implied, including, without limitation, any warranties or conditions - * of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - * PARTICULAR PURPOSE. You are solely responsible for determining the - * appropriateness of using or redistributing the Work and assume any - * risks associated with Your exercise of permissions under this License. - * - * 8. Limitation of Liability. In no event and under no legal theory, - * whether in tort (including negligence), contract, or otherwise, - * unless required by applicable law (such as deliberate and grossly - * negligent acts) or agreed to in writing, shall any Contributor be - * liable to You for damages, including any direct, indirect, special, - * incidental, or consequential damages of any character arising as a - * result of this License or out of the use or inability to use the - * Work (including but not limited to damages for loss of goodwill, - * work stoppage, computer failure or malfunction, or any and all - * other commercial damages or losses), even if such Contributor - * has been advised of the possibility of such damages. - * - * 9. Accepting Warranty or Additional Liability. While redistributing - * the Work or Derivative Works thereof, You may choose to offer, - * and charge a fee for, acceptance of support, warranty, indemnity, - * or other liability obligations and/or rights consistent with this - * License. However, in accepting such obligations, You may act only - * on Your own behalf and on Your sole responsibility, not on behalf - * of any other Contributor, and only if You agree to indemnify, - * defend, and hold each Contributor harmless for any liability - * incurred by, or claims asserted against, such Contributor by reason - * of your accepting any such warranty or additional liability. - * - * END OF TERMS AND CONDITIONS - * - * APPENDIX: How to apply the Apache License to your work. - * - * To apply the Apache License to your work, attach the following - * boilerplate notice, with the fields enclosed by brackets "[]" - * replaced with your own identifying information. (Don't include - * the brackets!) The text should be enclosed in the appropriate - * comment syntax for the file format. We also recommend that a - * file or class name and description of purpose be included on the - * same "printed page" as the copyright notice for easier - * identification within third-party archives. - * - * Copyright [yyyy] [name of copyright owner] - * - * Licensed 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. - */ - -W3C® SOFTWARE NOTICE AND LICENSE -http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 - -This work (and included software, documentation such as READMEs, or other -related items) is being provided by the copyright holders under the following -license. By obtaining, using and/or copying this work, you (the licensee) agree -that you have read, understood, and will comply with the following terms and -conditions. - -Permission to copy, modify, and distribute this software and its documentation, -with or without modification, for any purpose and without fee or royalty is -hereby granted, provided that you include the following on ALL copies of the -software and documentation or portions thereof, including modifications: - - 1. The full text of this NOTICE in a location viewable to users of the - redistributed or derivative work. - 2. Any pre-existing intellectual property disclaimers, notices, or terms - and conditions. If none exist, the W3C Software Short Notice should be - included (hypertext is preferred, text is permitted) within the body - of any redistributed or derivative code. - 3. Notice of any changes or modifications to the files, including the date - changes were made. (We recommend you provide URIs to the location from - which the code is derived.) - -THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE -NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT -THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY -PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS. - -COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION. - -The name and trademarks of copyright holders may NOT be used in advertising or -publicity pertaining to the software without specific, written prior permission. -Title to copyright in this software and any associated documentation will at -all times remain with copyright holders. - -____________________________________ - -This formulation of W3C's notice and license became active on December 31 2002. -This version removes the copyright ownership notice such that this license can -be used with materials other than those owned by the W3C, reflects that ERCIM -is now a host of the W3C, includes references to this specific dated version of -the license, and removes the ambiguous grant of "use". Otherwise, this version -is the same as the previous version and is written so as to preserve the Free -Software Foundation's assessment of GPL compatibility and OSI's certification -under the Open Source Definition. Please see our Copyright FAQ for common -questions about using materials from our site, including specific terms and -conditions for packages like libwww, Amaya, and Jigsaw. Other questions about -this notice can be directed to site-policy@w3.org. - -Joseph Reagle - -This license came from: http://www.megginson.com/SAX/copying.html - However please note future versions of SAX may be covered - under http://saxproject.org/?selected=pd - -SAX2 is Free! - -I hereby abandon any property rights to SAX 2.0 (the Simple API for -XML), and release all of the SAX 2.0 source code, compiled code, and -documentation contained in this distribution into the Public Domain. -SAX comes with NO WARRANTY or guarantee of fitness for any -purpose. - -David Megginson, david@megginson.com -2000-05-05 diff --git a/lucene/licenses/ant-junit-NOTICE.txt b/lucene/licenses/ant-junit-NOTICE.txt deleted file mode 100644 index 203ed03c8b6..00000000000 --- a/lucene/licenses/ant-junit-NOTICE.txt +++ /dev/null @@ -1,6 +0,0 @@ -Apache Ant -Copyright 1999-2008 The Apache Software Foundation - -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/). - diff --git a/lucene/test-framework/ivy.xml b/lucene/test-framework/ivy.xml index 6d5543436ef..8a9a71f89e7 100644 --- a/lucene/test-framework/ivy.xml +++ b/lucene/test-framework/ivy.xml @@ -30,7 +30,6 @@ - diff --git a/solr/licenses/ant-junit-1.8.2.jar.sha1 b/solr/licenses/ant-junit-1.8.2.jar.sha1 deleted file mode 100644 index b079f25a851..00000000000 --- a/solr/licenses/ant-junit-1.8.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -1653e85a2710d59edef1fcdd899a35f2c45324b3 diff --git a/solr/licenses/ant-junit-LICENSE-ASL.txt b/solr/licenses/ant-junit-LICENSE-ASL.txt deleted file mode 100644 index ab3182e7776..00000000000 --- a/solr/licenses/ant-junit-LICENSE-ASL.txt +++ /dev/null @@ -1,272 +0,0 @@ -/* - * Apache License - * Version 2.0, January 2004 - * http://www.apache.org/licenses/ - * - * TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - * - * 1. Definitions. - * - * "License" shall mean the terms and conditions for use, reproduction, - * and distribution as defined by Sections 1 through 9 of this document. - * - * "Licensor" shall mean the copyright owner or entity authorized by - * the copyright owner that is granting the License. - * - * "Legal Entity" shall mean the union of the acting entity and all - * other entities that control, are controlled by, or are under common - * control with that entity. For the purposes of this definition, - * "control" means (i) the power, direct or indirect, to cause the - * direction or management of such entity, whether by contract or - * otherwise, or (ii) ownership of fifty percent (50%) or more of the - * outstanding shares, or (iii) beneficial ownership of such entity. - * - * "You" (or "Your") shall mean an individual or Legal Entity - * exercising permissions granted by this License. - * - * "Source" form shall mean the preferred form for making modifications, - * including but not limited to software source code, documentation - * source, and configuration files. - * - * "Object" form shall mean any form resulting from mechanical - * transformation or translation of a Source form, including but - * not limited to compiled object code, generated documentation, - * and conversions to other media types. - * - * "Work" shall mean the work of authorship, whether in Source or - * Object form, made available under the License, as indicated by a - * copyright notice that is included in or attached to the work - * (an example is provided in the Appendix below). - * - * "Derivative Works" shall mean any work, whether in Source or Object - * form, that is based on (or derived from) the Work and for which the - * editorial revisions, annotations, elaborations, or other modifications - * represent, as a whole, an original work of authorship. For the purposes - * of this License, Derivative Works shall not include works that remain - * separable from, or merely link (or bind by name) to the interfaces of, - * the Work and Derivative Works thereof. - * - * "Contribution" shall mean any work of authorship, including - * the original version of the Work and any modifications or additions - * to that Work or Derivative Works thereof, that is intentionally - * submitted to Licensor for inclusion in the Work by the copyright owner - * or by an individual or Legal Entity authorized to submit on behalf of - * the copyright owner. For the purposes of this definition, "submitted" - * means any form of electronic, verbal, or written communication sent - * to the Licensor or its representatives, including but not limited to - * communication on electronic mailing lists, source code control systems, - * and issue tracking systems that are managed by, or on behalf of, the - * Licensor for the purpose of discussing and improving the Work, but - * excluding communication that is conspicuously marked or otherwise - * designated in writing by the copyright owner as "Not a Contribution." - * - * "Contributor" shall mean Licensor and any individual or Legal Entity - * on behalf of whom a Contribution has been received by Licensor and - * subsequently incorporated within the Work. - * - * 2. Grant of Copyright License. Subject to the terms and conditions of - * this License, each Contributor hereby grants to You a perpetual, - * worldwide, non-exclusive, no-charge, royalty-free, irrevocable - * copyright license to reproduce, prepare Derivative Works of, - * publicly display, publicly perform, sublicense, and distribute the - * Work and such Derivative Works in Source or Object form. - * - * 3. Grant of Patent License. Subject to the terms and conditions of - * this License, each Contributor hereby grants to You a perpetual, - * worldwide, non-exclusive, no-charge, royalty-free, irrevocable - * (except as stated in this section) patent license to make, have made, - * use, offer to sell, sell, import, and otherwise transfer the Work, - * where such license applies only to those patent claims licensable - * by such Contributor that are necessarily infringed by their - * Contribution(s) alone or by combination of their Contribution(s) - * with the Work to which such Contribution(s) was submitted. If You - * institute patent litigation against any entity (including a - * cross-claim or counterclaim in a lawsuit) alleging that the Work - * or a Contribution incorporated within the Work constitutes direct - * or contributory patent infringement, then any patent licenses - * granted to You under this License for that Work shall terminate - * as of the date such litigation is filed. - * - * 4. Redistribution. You may reproduce and distribute copies of the - * Work or Derivative Works thereof in any medium, with or without - * modifications, and in Source or Object form, provided that You - * meet the following conditions: - * - * (a) You must give any other recipients of the Work or - * Derivative Works a copy of this License; and - * - * (b) You must cause any modified files to carry prominent notices - * stating that You changed the files; and - * - * (c) You must retain, in the Source form of any Derivative Works - * that You distribute, all copyright, patent, trademark, and - * attribution notices from the Source form of the Work, - * excluding those notices that do not pertain to any part of - * the Derivative Works; and - * - * (d) If the Work includes a "NOTICE" text file as part of its - * distribution, then any Derivative Works that You distribute must - * include a readable copy of the attribution notices contained - * within such NOTICE file, excluding those notices that do not - * pertain to any part of the Derivative Works, in at least one - * of the following places: within a NOTICE text file distributed - * as part of the Derivative Works; within the Source form or - * documentation, if provided along with the Derivative Works; or, - * within a display generated by the Derivative Works, if and - * wherever such third-party notices normally appear. The contents - * of the NOTICE file are for informational purposes only and - * do not modify the License. You may add Your own attribution - * notices within Derivative Works that You distribute, alongside - * or as an addendum to the NOTICE text from the Work, provided - * that such additional attribution notices cannot be construed - * as modifying the License. - * - * You may add Your own copyright statement to Your modifications and - * may provide additional or different license terms and conditions - * for use, reproduction, or distribution of Your modifications, or - * for any such Derivative Works as a whole, provided Your use, - * reproduction, and distribution of the Work otherwise complies with - * the conditions stated in this License. - * - * 5. Submission of Contributions. Unless You explicitly state otherwise, - * any Contribution intentionally submitted for inclusion in the Work - * by You to the Licensor shall be under the terms and conditions of - * this License, without any additional terms or conditions. - * Notwithstanding the above, nothing herein shall supersede or modify - * the terms of any separate license agreement you may have executed - * with Licensor regarding such Contributions. - * - * 6. Trademarks. This License does not grant permission to use the trade - * names, trademarks, service marks, or product names of the Licensor, - * except as required for reasonable and customary use in describing the - * origin of the Work and reproducing the content of the NOTICE file. - * - * 7. Disclaimer of Warranty. Unless required by applicable law or - * agreed to in writing, Licensor provides the Work (and each - * Contributor provides its Contributions) on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - * implied, including, without limitation, any warranties or conditions - * of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - * PARTICULAR PURPOSE. You are solely responsible for determining the - * appropriateness of using or redistributing the Work and assume any - * risks associated with Your exercise of permissions under this License. - * - * 8. Limitation of Liability. In no event and under no legal theory, - * whether in tort (including negligence), contract, or otherwise, - * unless required by applicable law (such as deliberate and grossly - * negligent acts) or agreed to in writing, shall any Contributor be - * liable to You for damages, including any direct, indirect, special, - * incidental, or consequential damages of any character arising as a - * result of this License or out of the use or inability to use the - * Work (including but not limited to damages for loss of goodwill, - * work stoppage, computer failure or malfunction, or any and all - * other commercial damages or losses), even if such Contributor - * has been advised of the possibility of such damages. - * - * 9. Accepting Warranty or Additional Liability. While redistributing - * the Work or Derivative Works thereof, You may choose to offer, - * and charge a fee for, acceptance of support, warranty, indemnity, - * or other liability obligations and/or rights consistent with this - * License. However, in accepting such obligations, You may act only - * on Your own behalf and on Your sole responsibility, not on behalf - * of any other Contributor, and only if You agree to indemnify, - * defend, and hold each Contributor harmless for any liability - * incurred by, or claims asserted against, such Contributor by reason - * of your accepting any such warranty or additional liability. - * - * END OF TERMS AND CONDITIONS - * - * APPENDIX: How to apply the Apache License to your work. - * - * To apply the Apache License to your work, attach the following - * boilerplate notice, with the fields enclosed by brackets "[]" - * replaced with your own identifying information. (Don't include - * the brackets!) The text should be enclosed in the appropriate - * comment syntax for the file format. We also recommend that a - * file or class name and description of purpose be included on the - * same "printed page" as the copyright notice for easier - * identification within third-party archives. - * - * Copyright [yyyy] [name of copyright owner] - * - * Licensed 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. - */ - -W3C® SOFTWARE NOTICE AND LICENSE -http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 - -This work (and included software, documentation such as READMEs, or other -related items) is being provided by the copyright holders under the following -license. By obtaining, using and/or copying this work, you (the licensee) agree -that you have read, understood, and will comply with the following terms and -conditions. - -Permission to copy, modify, and distribute this software and its documentation, -with or without modification, for any purpose and without fee or royalty is -hereby granted, provided that you include the following on ALL copies of the -software and documentation or portions thereof, including modifications: - - 1. The full text of this NOTICE in a location viewable to users of the - redistributed or derivative work. - 2. Any pre-existing intellectual property disclaimers, notices, or terms - and conditions. If none exist, the W3C Software Short Notice should be - included (hypertext is preferred, text is permitted) within the body - of any redistributed or derivative code. - 3. Notice of any changes or modifications to the files, including the date - changes were made. (We recommend you provide URIs to the location from - which the code is derived.) - -THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE -NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT -THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY -PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS. - -COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION. - -The name and trademarks of copyright holders may NOT be used in advertising or -publicity pertaining to the software without specific, written prior permission. -Title to copyright in this software and any associated documentation will at -all times remain with copyright holders. - -____________________________________ - -This formulation of W3C's notice and license became active on December 31 2002. -This version removes the copyright ownership notice such that this license can -be used with materials other than those owned by the W3C, reflects that ERCIM -is now a host of the W3C, includes references to this specific dated version of -the license, and removes the ambiguous grant of "use". Otherwise, this version -is the same as the previous version and is written so as to preserve the Free -Software Foundation's assessment of GPL compatibility and OSI's certification -under the Open Source Definition. Please see our Copyright FAQ for common -questions about using materials from our site, including specific terms and -conditions for packages like libwww, Amaya, and Jigsaw. Other questions about -this notice can be directed to site-policy@w3.org. - -Joseph Reagle - -This license came from: http://www.megginson.com/SAX/copying.html - However please note future versions of SAX may be covered - under http://saxproject.org/?selected=pd - -SAX2 is Free! - -I hereby abandon any property rights to SAX 2.0 (the Simple API for -XML), and release all of the SAX 2.0 source code, compiled code, and -documentation contained in this distribution into the Public Domain. -SAX comes with NO WARRANTY or guarantee of fitness for any -purpose. - -David Megginson, david@megginson.com -2000-05-05 diff --git a/solr/licenses/ant-junit-NOTICE.txt b/solr/licenses/ant-junit-NOTICE.txt deleted file mode 100644 index 203ed03c8b6..00000000000 --- a/solr/licenses/ant-junit-NOTICE.txt +++ /dev/null @@ -1,6 +0,0 @@ -Apache Ant -Copyright 1999-2008 The Apache Software Foundation - -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/). - diff --git a/solr/test-framework/ivy.xml b/solr/test-framework/ivy.xml index 67a2c048bdd..3bf2fd4f965 100644 --- a/solr/test-framework/ivy.xml +++ b/solr/test-framework/ivy.xml @@ -30,7 +30,6 @@ - From 59637e32ee6b0a9be41e56d7a9aabe80427d4cc0 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Tue, 28 Aug 2012 12:01:18 +0000 Subject: [PATCH 32/81] fix end tag, otherwise half of Directory javadocs are in italics git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1378094 13f79535-47bb-0310-9956-ffa450edef68 --- lucene/core/src/java/org/apache/lucene/store/Directory.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lucene/core/src/java/org/apache/lucene/store/Directory.java b/lucene/core/src/java/org/apache/lucene/store/Directory.java index 9297082fc2c..8a75718c7be 100644 --- a/lucene/core/src/java/org/apache/lucene/store/Directory.java +++ b/lucene/core/src/java/org/apache/lucene/store/Directory.java @@ -187,7 +187,7 @@ public abstract class Directory implements Closeable { * } * *

- * NOTE: this method does not check whether dest exist and will + * NOTE: this method does not check whether dest exist and will * overwrite it if it does. */ public void copy(Directory to, String src, String dest, IOContext context) throws IOException { From d3a9eeee06bb988a29a32531937a200e94c32398 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Tue, 28 Aug 2012 12:36:00 +0000 Subject: [PATCH 33/81] clean up regexps git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1378107 13f79535-47bb-0310-9956-ffa450edef68 --- dev-tools/scripts/checkJavaDocs.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dev-tools/scripts/checkJavaDocs.py b/dev-tools/scripts/checkJavaDocs.py index 7340ca5786d..5e404dd81c5 100644 --- a/dev-tools/scripts/checkJavaDocs.py +++ b/dev-tools/scripts/checkJavaDocs.py @@ -22,13 +22,13 @@ reHREF = re.compile('(.*?)', re.IGNORECASE) reMarkup = re.compile('<.*?>') reDivBlock = re.compile('

(.*?)
', re.IGNORECASE) reCaption = re.compile('(.*?)', re.IGNORECASE) -reTDLastNested = re.compile('', re.IGNORECASE) -reTDLast = re.compile('', re.IGNORECASE) -reColOne = re.compile('', re.IGNORECASE) +reTDLastNested = re.compile('^', re.IGNORECASE) +reTDLast = re.compile('^', re.IGNORECASE) +reColOne = re.compile('^', re.IGNORECASE) # the Method detail section at the end reMethodDetail = re.compile('^

Method Detail

$', re.IGNORECASE) -reMethodDetailAnchor = re.compile('^(
)?$', re.IGNORECASE) +reMethodDetailAnchor = re.compile('^(?:)?$', re.IGNORECASE) reMethodOverridden = re.compile('^
(Specified by:|Overrides:)
$', re.IGNORECASE) def cleanHTML(s): @@ -65,7 +65,7 @@ def checkClass(fullPath): if foundMethodDetail: m = reMethodDetailAnchor.search(line) if m is not None: - lastMethodAnchor = m.group(2) + lastMethodAnchor = m.group(1) continue m = reMethodOverridden.search(line) if m is not None and ('Methods', lastMethodAnchor) in missing: From 86eb842ab3c1be698b6d14bbf2456e8a5142bbe6 Mon Sep 17 00:00:00 2001 From: Uwe Schindler Date: Tue, 28 Aug 2012 13:04:58 +0000 Subject: [PATCH 34/81] Add javadocs. git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1378119 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/lucene/util/WeakIdentityMap.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/lucene/core/src/java/org/apache/lucene/util/WeakIdentityMap.java b/lucene/core/src/java/org/apache/lucene/util/WeakIdentityMap.java index b20f6c62ca5..33c91fc0676 100644 --- a/lucene/core/src/java/org/apache/lucene/util/WeakIdentityMap.java +++ b/lucene/core/src/java/org/apache/lucene/util/WeakIdentityMap.java @@ -65,35 +65,51 @@ public final class WeakIdentityMap { this.backingStore = backingStore; } + /** Removes all of the mappings from this map. */ public void clear() { backingStore.clear(); reap(); } + /** Returns {@code true} if this map contains a mapping for the specified key. */ public boolean containsKey(Object key) { reap(); return backingStore.containsKey(new IdentityWeakReference(key, null)); } + /** Returns the value to which the specified key is mapped. */ public V get(Object key) { reap(); return backingStore.get(new IdentityWeakReference(key, null)); } + /** Associates the specified value with the specified key in this map. + * If the map previously contained a mapping for this key, the old value + * is replaced. */ public V put(K key, V value) { reap(); return backingStore.put(new IdentityWeakReference(key, queue), value); } + /** Returns {@code true} if this map contains no key-value mappings. */ public boolean isEmpty() { return size() == 0; } + /** Removes the mapping for a key from this weak hash map if it is present. + * Returns the value to which this map previously associated the key, + * or {@code null} if the map contained no mapping for the key. + * A return value of {@code null} does not necessarily indicate that + * the map contained.*/ public V remove(Object key) { reap(); return backingStore.remove(new IdentityWeakReference(key, null)); } + /** Returns the number of key-value mappings in this map. This result is a snapshot, + * and may not reflect unprocessed entries that will be removed before next + * attempted access because they are no longer referenced. + */ public int size() { if (backingStore.isEmpty()) return 0; From a8ba6a23beb00e45f3a01feaf4c5c4ff48c871fa Mon Sep 17 00:00:00 2001 From: Michael McCandless Date: Tue, 28 Aug 2012 14:02:19 +0000 Subject: [PATCH 35/81] escape generics to HTML git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1378140 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/lucene/search/DisjunctionMaxQuery.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lucene/core/src/java/org/apache/lucene/search/DisjunctionMaxQuery.java b/lucene/core/src/java/org/apache/lucene/search/DisjunctionMaxQuery.java index 2c28ee09271..665a87a51c2 100644 --- a/lucene/core/src/java/org/apache/lucene/search/DisjunctionMaxQuery.java +++ b/lucene/core/src/java/org/apache/lucene/search/DisjunctionMaxQuery.java @@ -61,7 +61,7 @@ public class DisjunctionMaxQuery extends Query implements Iterable { /** * Creates a new DisjunctionMaxQuery - * @param disjuncts a Collection of all the disjuncts to add + * @param disjuncts a Collection<Query> of all the disjuncts to add * @param tieBreakerMultiplier the weight to give to each matching non-maximum disjunct */ public DisjunctionMaxQuery(Collection disjuncts, float tieBreakerMultiplier) { @@ -77,14 +77,14 @@ public class DisjunctionMaxQuery extends Query implements Iterable { } /** Add a collection of disjuncts to this disjunction - * via Iterable + * via Iterable<Query> * @param disjuncts a collection of queries to add as disjuncts. */ public void add(Collection disjuncts) { this.disjuncts.addAll(disjuncts); } - /** @return An Iterator over the disjuncts */ + /** @return An Iterator<Query> over the disjuncts */ public Iterator iterator() { return disjuncts.iterator(); } From 2684ba035e85381e9dad86968f37972dcd828991 Mon Sep 17 00:00:00 2001 From: Michael McCandless Date: Tue, 28 Aug 2012 14:08:01 +0000 Subject: [PATCH 36/81] try to catch mis-matched tags in the desc git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1378143 13f79535-47bb-0310-9956-ffa450edef68 --- dev-tools/scripts/checkJavaDocs.py | 50 ++++++++++++++++++++++++++++-- 1 file changed, 47 insertions(+), 3 deletions(-) diff --git a/dev-tools/scripts/checkJavaDocs.py b/dev-tools/scripts/checkJavaDocs.py index 5e404dd81c5..87eb1157b90 100644 --- a/dev-tools/scripts/checkJavaDocs.py +++ b/dev-tools/scripts/checkJavaDocs.py @@ -31,6 +31,39 @@ reMethodDetail = re.compile('^

Method Detail

$', re.IGNORECASE) reMethodDetailAnchor = re.compile('^(?:
)?$', re.IGNORECASE) reMethodOverridden = re.compile('^
(Specified by:|Overrides:)
$', re.IGNORECASE) +reTag = re.compile("(?i)<(\/?\w+)((\s+\w+(\s*=\s*(?:\".*?\"|'.*?'|[^'\">\s]+))?)+\s*|\s*)\/?>") + +def verifyHTML(s): + + stack = [] + upto = 0 + while True: + m = reTag.search(s, upto) + if m is None: + break + tag = m.group(1) + upto = m.end(0) + + if tag[:1] == '/': + justTag = tag[1:] + else: + justTag = tag + + if justTag.lower() in ('br', 'li', 'p'): + continue + + if tag[:1] == '/': + if len(stack) == 0: + raise RuntimeError('saw closing "%s" without opening <%s...>' % (m.group(0), tag[1:])) + elif stack[-1][0] != tag[1:].lower(): + raise RuntimeError('closing "%s" does not match opening "%s"' % (m.group(0), stack[-1][1])) + stack.pop() + else: + stack.append((tag.lower(), m.group(0))) + + if len(stack) != 0: + raise RuntimeError('"%s" was never closed' % stack[-1][1]) + def cleanHTML(s): s = reMarkup.sub('', s) s = s.replace(' ', ' ') @@ -42,8 +75,9 @@ def cleanHTML(s): def checkClass(fullPath): # TODO: only works with java7 generated javadocs now! f = open(fullPath, encoding='UTF-8') - + missing = [] + broken = [] inThing = False lastCaption = None lastItem = None @@ -113,17 +147,27 @@ def checkClass(fullPath): desc.append(line) if line.find('') != -1: desc = ''.join(desc) + + try: + verifyHTML(desc) + except RuntimeError as e: + broken.append((lastCaption, lastItem, str(e))) + #print('FAIL: %s: %s: %s: %s' % (lastCaption, lastItem, e, desc)) + desc = desc.replace('
', '') desc = desc.replace('
', '') desc = desc.strip() hasDesc = len(desc) > 0 + desc = None f.close() - if len(missing) > 0: + if len(missing) > 0 or len(broken) > 0: print() print(fullPath) for (caption, item) in missing: print(' missing %s: %s' % (caption, item)) + for (caption, item, why) in broken: + print(' broken HTML: %s: %s: %s' % (caption, item, why)) return True else: return False @@ -220,7 +264,7 @@ def checkPackageSummaries(root, level='class'): fullPath = '%s/%s' % (dirPath, fileName) if not fileName.startswith('package-') and fileName.endswith('.html') and os.path.isfile(fullPath): if checkClass(fullPath): - anyMissing = True + anyMissing = True if 'overview-summary.html' in fileNames: if checkSummary('%s/overview-summary.html' % dirPath): anyMissing = True From 15abfb83beda483024380eaf9a4fab4c8f605980 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Tue, 28 Aug 2012 14:37:46 +0000 Subject: [PATCH 37/81] fix broken html git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1378152 13f79535-47bb-0310-9956-ffa450edef68 --- .../queryparser/flexible/core/QueryNodeParseException.java | 4 ++-- .../lucene/queryparser/flexible/core/nodes/QueryNodeImpl.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/QueryNodeParseException.java b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/QueryNodeParseException.java index 6ca2606c35a..bbe85ba8d37 100644 --- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/QueryNodeParseException.java +++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/QueryNodeParseException.java @@ -80,7 +80,7 @@ public class QueryNodeParseException extends QueryNodeException { } /** - * For EndOfLine and EndOfFile ("") parsing problems the last char in the + * For EndOfLine and EndOfFile ("<EOF>") parsing problems the last char in the * string is returned For the case where the parser is not able to figure out * the line and column number -1 will be returned * @@ -91,7 +91,7 @@ public class QueryNodeParseException extends QueryNodeException { } /** - * For EndOfLine and EndOfFile ("") parsing problems the last char in the + * For EndOfLine and EndOfFile ("<EOF>") parsing problems the last char in the * string is returned For the case where the parser is not able to figure out * the line and column number -1 will be returned * diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/nodes/QueryNodeImpl.java b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/nodes/QueryNodeImpl.java index f2c16c89767..97e33176a2f 100644 --- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/nodes/QueryNodeImpl.java +++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/nodes/QueryNodeImpl.java @@ -211,7 +211,7 @@ public abstract class QueryNodeImpl implements QueryNode, Cloneable { /** * Every implementation of this class should return pseudo xml like this: * - * For FieldQueryNode: + * For FieldQueryNode: <field start='1' end='2' field='subject' text='foo'/> * * @see org.apache.lucene.queryparser.flexible.core.nodes.QueryNode#toString() */ From 005fe165dc4b81ad4a222a2da573dcff11a63724 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Tue, 28 Aug 2012 15:44:31 +0000 Subject: [PATCH 38/81] javadocs git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1378183 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/lucene/index/DirectoryReader.java | 1 + .../org/apache/lucene/index/FieldInfo.java | 22 +++++++------- .../org/apache/lucene/index/FieldInfos.java | 19 +++++------- .../lucene/index/FilterAtomicReader.java | 26 ++++++++++++++++ .../lucene/index/FilteredTermsEnum.java | 15 +++++++++- .../apache/lucene/index/IndexFileNames.java | 4 +++ .../org/apache/lucene/index/IndexReader.java | 3 +- .../org/apache/lucene/index/IndexWriter.java | 11 +++++++ .../org/apache/lucene/index/MultiFields.java | 30 +++++++++++++++++++ .../lucene/index/SegmentInfoPerCommit.java | 17 +++++++++++ .../apache/lucene/index/SegmentReader.java | 16 +++++----- .../java/org/apache/lucene/index/Term.java | 4 --- .../org/apache/lucene/index/TermsEnum.java | 15 ++++++---- .../java/org/apache/lucene/util/IOUtils.java | 11 ++++++- 14 files changed, 152 insertions(+), 42 deletions(-) diff --git a/lucene/core/src/java/org/apache/lucene/index/DirectoryReader.java b/lucene/core/src/java/org/apache/lucene/index/DirectoryReader.java index beea8ae320a..b4c08fff6ee 100644 --- a/lucene/core/src/java/org/apache/lucene/index/DirectoryReader.java +++ b/lucene/core/src/java/org/apache/lucene/index/DirectoryReader.java @@ -51,6 +51,7 @@ import org.apache.lucene.store.Directory; public abstract class DirectoryReader extends BaseCompositeReader { public static final int DEFAULT_TERMS_INDEX_DIVISOR = 1; + /** The index directory. */ protected final Directory directory; /** Returns a IndexReader reading the index in the given diff --git a/lucene/core/src/java/org/apache/lucene/index/FieldInfo.java b/lucene/core/src/java/org/apache/lucene/index/FieldInfo.java index 8161d8a7dcb..7e6247b189e 100644 --- a/lucene/core/src/java/org/apache/lucene/index/FieldInfo.java +++ b/lucene/core/src/java/org/apache/lucene/index/FieldInfo.java @@ -31,7 +31,9 @@ import org.apache.lucene.index.DocValues.Type; **/ public final class FieldInfo { + /** Field's name */ public final String name; + /** Internal field number */ public final int number; private boolean indexed; @@ -164,27 +166,27 @@ public final class FieldInfo { assert checkConsistency(); } - /** @return IndexOptions for the field, or null if the field is not indexed */ + /** Returns IndexOptions for the field, or null if the field is not indexed */ public IndexOptions getIndexOptions() { return indexOptions; } /** - * @return true if this field has any docValues. + * Returns true if this field has any docValues. */ public boolean hasDocValues() { return docValueType != null; } /** - * @return {@link DocValues.Type} of the docValues. this may be null if the field has no docvalues. + * Returns {@link DocValues.Type} of the docValues. this may be null if the field has no docvalues. */ public DocValues.Type getDocValuesType() { return docValueType; } /** - * @return {@link DocValues.Type} of the norm. this may be null if the field has no norms. + * Returns {@link DocValues.Type} of the norm. this may be null if the field has no norms. */ public DocValues.Type getNormType() { return normType; @@ -208,35 +210,35 @@ public final class FieldInfo { } /** - * @return true if norms are explicitly omitted for this field + * Returns true if norms are explicitly omitted for this field */ public boolean omitsNorms() { return omitNorms; } /** - * @return true if this field actually has any norms. + * Returns true if this field actually has any norms. */ public boolean hasNorms() { return normType != null; } /** - * @return true if this field is indexed. + * Returns true if this field is indexed. */ public boolean isIndexed() { return indexed; } /** - * @return true if any payloads exist for this field. + * Returns true if any payloads exist for this field. */ public boolean hasPayloads() { return storePayloads; } /** - * @return true if any term vectors exist for this field. + * Returns true if any term vectors exist for this field. */ public boolean hasVectors() { return storeTermVector; @@ -271,7 +273,7 @@ public final class FieldInfo { } /** - * @return internal codec attributes map. May be null if no mappings exist. + * Returns internal codec attributes map. May be null if no mappings exist. */ public Map attributes() { return attributes; diff --git a/lucene/core/src/java/org/apache/lucene/index/FieldInfos.java b/lucene/core/src/java/org/apache/lucene/index/FieldInfos.java index 4a603ca1740..33243a83c75 100644 --- a/lucene/core/src/java/org/apache/lucene/index/FieldInfos.java +++ b/lucene/core/src/java/org/apache/lucene/index/FieldInfos.java @@ -44,6 +44,9 @@ public class FieldInfos implements Iterable { private final HashMap byName = new HashMap(); private final Collection values; // for an unmodifiable iterator + /** + * Constructs a new FieldInfos from an array of FieldInfo objects + */ public FieldInfos(FieldInfo[] infos) { boolean hasVectors = false; boolean hasProx = false; @@ -98,30 +101,22 @@ public class FieldInfos implements Iterable { return hasOffsets; } - /** - * @return true if at least one field has any vectors - */ + /** Returns true if any fields have vectors */ public boolean hasVectors() { return hasVectors; } - /** - * @return true if at least one field has any norms - */ + /** Returns true if any fields have norms */ public boolean hasNorms() { return hasNorms; } - /** - * @return true if at least one field has doc values - */ + /** Returns true if any fields have DocValues */ public boolean hasDocValues() { return hasDocValues; } - /** - * @return number of fields - */ + /** Returns the number of fields */ public int size() { assert byNumber.size() == byName.size(); return byNumber.size(); diff --git a/lucene/core/src/java/org/apache/lucene/index/FilterAtomicReader.java b/lucene/core/src/java/org/apache/lucene/index/FilterAtomicReader.java index c2cb3a6eb9b..54edfc7d92b 100644 --- a/lucene/core/src/java/org/apache/lucene/index/FilterAtomicReader.java +++ b/lucene/core/src/java/org/apache/lucene/index/FilterAtomicReader.java @@ -40,8 +40,13 @@ public class FilterAtomicReader extends AtomicReader { /** Base class for filtering {@link Fields} * implementations. */ public static class FilterFields extends Fields { + /** The underlying Fields instance. */ protected final Fields in; + /** + * Creates a new FilterFields. + * @param in the underlying Fields instance. + */ public FilterFields(Fields in) { this.in = in; } @@ -65,8 +70,13 @@ public class FilterAtomicReader extends AtomicReader { /** Base class for filtering {@link Terms} * implementations. */ public static class FilterTerms extends Terms { + /** The underlying Terms instance. */ protected final Terms in; + /** + * Creates a new FilterTerms + * @param in the underlying Terms instance. + */ public FilterTerms(Terms in) { this.in = in; } @@ -124,8 +134,13 @@ public class FilterAtomicReader extends AtomicReader { /** Base class for filtering {@link TermsEnum} implementations. */ public static class FilterTermsEnum extends TermsEnum { + /** The underlying TermsEnum instance. */ protected final TermsEnum in; + /** + * Creates a new FilterTermsEnum + * @param in the underlying TermsEnum instance. + */ public FilterTermsEnum(TermsEnum in) { this.in = in; } @Override @@ -201,8 +216,13 @@ public class FilterAtomicReader extends AtomicReader { /** Base class for filtering {@link DocsEnum} implementations. */ public static class FilterDocsEnum extends DocsEnum { + /** The underlying DocsEnum instance. */ protected final DocsEnum in; + /** + * Create a new FilterDocsEnum + * @param in the underlying DocsEnum instance. + */ public FilterDocsEnum(DocsEnum in) { this.in = in; } @@ -235,8 +255,13 @@ public class FilterAtomicReader extends AtomicReader { /** Base class for filtering {@link DocsAndPositionsEnum} implementations. */ public static class FilterDocsAndPositionsEnum extends DocsAndPositionsEnum { + /** The underlying DocsAndPositionsEnum instance. */ protected final DocsAndPositionsEnum in; + /** + * Create a new FilterDocsAndPositionsEnum + * @param in the underlying DocsAndPositionsEnum instance. + */ public FilterDocsAndPositionsEnum(DocsAndPositionsEnum in) { this.in = in; } @@ -287,6 +312,7 @@ public class FilterAtomicReader extends AtomicReader { } } + /** The underlying AtomicReader. */ protected final AtomicReader in; /** diff --git a/lucene/core/src/java/org/apache/lucene/index/FilteredTermsEnum.java b/lucene/core/src/java/org/apache/lucene/index/FilteredTermsEnum.java index a47c7ab68ad..0e51884dfc9 100644 --- a/lucene/core/src/java/org/apache/lucene/index/FilteredTermsEnum.java +++ b/lucene/core/src/java/org/apache/lucene/index/FilteredTermsEnum.java @@ -48,7 +48,20 @@ public abstract class FilteredTermsEnum extends TermsEnum { * the enum should call {@link #nextSeekTerm} and step forward. * @see #accept(BytesRef) */ - protected static enum AcceptStatus {YES, YES_AND_SEEK, NO, NO_AND_SEEK, END}; + protected static enum AcceptStatus { + /** Accept the term and position the enum at the next term. */ + YES, + /** Accept the term and advance ({@link FilteredTermsEnum#nextSeekTerm(BytesRef)}) + * to the next term. */ + YES_AND_SEEK, + /** Reject the term and position the enum at the next term. */ + NO, + /** Reject the term and advance ({@link FilteredTermsEnum#nextSeekTerm(BytesRef)}) + * to the next term. */ + NO_AND_SEEK, + /** Reject the term and stop enumerating. */ + END + }; /** Return if term is accepted, not accepted or the iteration should ended * (and possibly seek). diff --git a/lucene/core/src/java/org/apache/lucene/index/IndexFileNames.java b/lucene/core/src/java/org/apache/lucene/index/IndexFileNames.java index 2201d67cf1a..b74b18c5948 100644 --- a/lucene/core/src/java/org/apache/lucene/index/IndexFileNames.java +++ b/lucene/core/src/java/org/apache/lucene/index/IndexFileNames.java @@ -187,6 +187,10 @@ public final class IndexFileNames { return filename; } + /** + * Removes the extension (anything after the first '.'), + * otherwise returns the original filename. + */ public static String stripExtension(String filename) { int idx = filename.indexOf('.'); if (idx != -1) { diff --git a/lucene/core/src/java/org/apache/lucene/index/IndexReader.java b/lucene/core/src/java/org/apache/lucene/index/IndexReader.java index 9a41845202f..86c0e029f6b 100644 --- a/lucene/core/src/java/org/apache/lucene/index/IndexReader.java +++ b/lucene/core/src/java/org/apache/lucene/index/IndexReader.java @@ -243,7 +243,8 @@ public abstract class IndexReader implements Closeable { } /** - * @throws AlreadyClosedException if this IndexReader is closed + * Throws AlreadyClosedException if this IndexReader or any + * of its child readers is closed, otherwise returns. */ protected final void ensureOpen() throws AlreadyClosedException { if (refCount.get() <= 0) { diff --git a/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java b/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java index bbfa46c1aef..8df850bc579 100644 --- a/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java +++ b/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java @@ -549,6 +549,14 @@ public class IndexWriter implements Closeable, TwoPhaseCommit { } } + /** + * Used internally to throw an {@link + * AlreadyClosedException} if this IndexWriter has been + * closed. + *

+ * Calls {@link #ensureOpen(boolean) ensureOpen(true)}. + * @throws AlreadyClosedException if this IndexWriter is closed + */ protected final void ensureOpen() throws AlreadyClosedException { ensureOpen(true); } @@ -1030,6 +1038,9 @@ public class IndexWriter implements Closeable, TwoPhaseCommit { return count; } + /** + * Returns true if this index has deletions (including buffered deletions). + */ public synchronized boolean hasDeletions() { ensureOpen(); if (bufferedDeletesStream.any()) { diff --git a/lucene/core/src/java/org/apache/lucene/index/MultiFields.java b/lucene/core/src/java/org/apache/lucene/index/MultiFields.java index 0e44b58623b..dd8fa967fcf 100644 --- a/lucene/core/src/java/org/apache/lucene/index/MultiFields.java +++ b/lucene/core/src/java/org/apache/lucene/index/MultiFields.java @@ -89,6 +89,15 @@ public final class MultiFields extends Fields { } } + /** Returns a single {@link Bits} instance for this + * reader, merging live Documents on the + * fly. This method will return null if the reader + * has no deletions. + * + *

NOTE: this is a very slow way to access live docs. + * For example, each Bits access will require a binary search. + * It's better to get the sub-readers and iterate through them + * yourself. */ public static Bits getLiveDocs(IndexReader reader) { if (reader.hasDeletions()) { final List leaves = reader.leaves(); @@ -176,6 +185,11 @@ public final class MultiFields extends Fields { return null; } + /** + * Expert: construct a new MultiFields instance directly. + * @lucene.internal + */ + // TODO: why is this public? public MultiFields(Fields[] subs, ReaderSlice[] subSlices) { this.subs = subs; this.subSlices = subSlices; @@ -229,6 +243,14 @@ public final class MultiFields extends Fields { return -1; } + /** Returns the total number of occurrences of this term + * across all documents (the sum of the freq() for each + * doc that has this term). This will be -1 if the + * codec doesn't support this measure. Note that, like + * other term measures, this measure does not take + * deleted documents into account. + * @see TermsEnum#totalTermFreq() + */ public static long totalTermFreq(IndexReader r, String field, BytesRef text) throws IOException { final Terms terms = getTerms(r, field); if (terms != null) { @@ -256,6 +278,14 @@ public final class MultiFields extends Fields { return builder.finish(); } + /** Call this to get the (merged) FieldInfos representing the + * set of indexed fields only for a composite reader. + *

+ * NOTE: the returned field numbers will likely not + * correspond to the actual field numbers in the underlying + * readers, and codec metadata ({@link FieldInfo#getAttribute(String)} + * will be unavailable. + */ public static Collection getIndexedFields(IndexReader reader) { final Collection fields = new HashSet(); for(final FieldInfo fieldInfo : getMergedFieldInfos(reader)) { diff --git a/lucene/core/src/java/org/apache/lucene/index/SegmentInfoPerCommit.java b/lucene/core/src/java/org/apache/lucene/index/SegmentInfoPerCommit.java index 60c2bcf4d94..26959dc8bea 100644 --- a/lucene/core/src/java/org/apache/lucene/index/SegmentInfoPerCommit.java +++ b/lucene/core/src/java/org/apache/lucene/index/SegmentInfoPerCommit.java @@ -97,15 +97,25 @@ public class SegmentInfoPerCommit { sizeInBytes = -1; } + /** + * Sets the generation number of the live docs file. + * @see #getDelGen() + */ public void setDelGen(long delGen) { this.delGen = delGen; sizeInBytes = -1; } + /** Returns true if there are any deletions for the + * segment at this commit. */ public boolean hasDeletions() { return delGen != -1; } + /** + * Returns the next available generation number + * of the live docs file. + */ public long getNextDelGen() { if (delGen == -1) { return 1; @@ -114,10 +124,17 @@ public class SegmentInfoPerCommit { } } + /** + * Returns generation number of the live docs file + * or -1 if there are no deletes yet. + */ public long getDelGen() { return delGen; } + /** + * Returns the number of deleted docs in the segment. + */ public int getDelCount() { return delCount; } diff --git a/lucene/core/src/java/org/apache/lucene/index/SegmentReader.java b/lucene/core/src/java/org/apache/lucene/index/SegmentReader.java index a6076ca1f01..b8464681b91 100644 --- a/lucene/core/src/java/org/apache/lucene/index/SegmentReader.java +++ b/lucene/core/src/java/org/apache/lucene/index/SegmentReader.java @@ -47,9 +47,11 @@ public final class SegmentReader extends AtomicReader { final SegmentCoreReaders core; /** + * Constructs a new SegmentReader with a new core. * @throws CorruptIndexException if the index is corrupt * @throws IOException if there is a low-level IO error */ + // TODO: why is this public? public SegmentReader(SegmentInfoPerCommit si, int termInfosIndexDivisor, IOContext context) throws IOException { this.si = si; core = new SegmentCoreReaders(this, si.info.dir, si, context, termInfosIndexDivisor); @@ -76,19 +78,19 @@ public final class SegmentReader extends AtomicReader { } } - // Create new SegmentReader sharing core from a previous - // SegmentReader and loading new live docs from a new - // deletes file. Used by openIfChanged. + /** Create new SegmentReader sharing core from a previous + * SegmentReader and loading new live docs from a new + * deletes file. Used by openIfChanged. */ SegmentReader(SegmentInfoPerCommit si, SegmentCoreReaders core, IOContext context) throws IOException { this(si, core, si.info.getCodec().liveDocsFormat().readLiveDocs(si.info.dir, si, context), si.info.getDocCount() - si.getDelCount()); } - // Create new SegmentReader sharing core from a previous - // SegmentReader and using the provided in-memory - // liveDocs. Used by IndexWriter to provide a new NRT - // reader: + /** Create new SegmentReader sharing core from a previous + * SegmentReader and using the provided in-memory + * liveDocs. Used by IndexWriter to provide a new NRT + * reader */ SegmentReader(SegmentInfoPerCommit si, SegmentCoreReaders core, Bits liveDocs, int numDocs) { this.si = si; this.core = core; diff --git a/lucene/core/src/java/org/apache/lucene/index/Term.java b/lucene/core/src/java/org/apache/lucene/index/Term.java index 62cecaba4ed..a2efbcfaac1 100644 --- a/lucene/core/src/java/org/apache/lucene/index/Term.java +++ b/lucene/core/src/java/org/apache/lucene/index/Term.java @@ -132,8 +132,4 @@ public final class Term implements Comparable { @Override public final String toString() { return field + ":" + bytes.utf8ToString(); } - - public Term deepCopyOf() { - return new Term(field, BytesRef.deepCopyOf(bytes)); - } } diff --git a/lucene/core/src/java/org/apache/lucene/index/TermsEnum.java b/lucene/core/src/java/org/apache/lucene/index/TermsEnum.java index 787ce0253bb..d151dfd0430 100644 --- a/lucene/core/src/java/org/apache/lucene/index/TermsEnum.java +++ b/lucene/core/src/java/org/apache/lucene/index/TermsEnum.java @@ -51,12 +51,15 @@ public abstract class TermsEnum implements BytesRefIterator { return atts; } - /** Represents returned result from {@link #seekCeil}. - * If status is FOUND, then the precise term was found. - * If status is NOT_FOUND, then a different term was - * found. If the status is END, the end of the iteration - * was hit. */ - public static enum SeekStatus {END, FOUND, NOT_FOUND}; + /** Represents returned result from {@link #seekCeil}. */ + public static enum SeekStatus { + /** The term was not found, and the end of iteration was hit. */ + END, + /** The precise term was found. */ + FOUND, + /** A different term was found after the requested term */ + NOT_FOUND + }; /** Attempts to seek to the exact term, returning * true if the term is found. If this returns false, the diff --git a/lucene/core/src/java/org/apache/lucene/util/IOUtils.java b/lucene/core/src/java/org/apache/lucene/util/IOUtils.java index 3c3e32de7d3..5770b80e683 100644 --- a/lucene/core/src/java/org/apache/lucene/util/IOUtils.java +++ b/lucene/core/src/java/org/apache/lucene/util/IOUtils.java @@ -98,7 +98,9 @@ public final class IOUtils { } } - /** @see #closeWhileHandlingException(Exception, Closeable...) */ + /** + * Closes all given Closeables, suppressing all thrown exceptions. + * @see #closeWhileHandlingException(Exception, Closeable...) */ public static void closeWhileHandlingException(E priorException, Iterable objects) throws E, IOException { Throwable th = null; @@ -160,6 +162,7 @@ public final class IOUtils { } /** + * Closes all given Closeables. * @see #close(Closeable...) */ public static void close(Iterable objects) throws IOException { @@ -205,6 +208,7 @@ public final class IOUtils { } /** + * Closes all given Closeables, suppressing all thrown exceptions. * @see #closeWhileHandlingException(Closeable...) */ public static void closeWhileHandlingException(Iterable objects) { @@ -322,6 +326,11 @@ public final class IOUtils { } } + /** + * Deletes all given files, suppressing all thrown IOExceptions. + *

+ * Note that the files should not be null. + */ public static void deleteFilesIgnoringExceptions(Directory dir, String... files) { for (String name : files) { try { From 6722080cfce19666fd892aa5ad0bb87324aa0b1a Mon Sep 17 00:00:00 2001 From: Michael McCandless Date: Tue, 28 Aug 2012 16:16:38 +0000 Subject: [PATCH 39/81] use {@code ...} git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1378203 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/lucene/search/DisjunctionMaxQuery.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lucene/core/src/java/org/apache/lucene/search/DisjunctionMaxQuery.java b/lucene/core/src/java/org/apache/lucene/search/DisjunctionMaxQuery.java index 665a87a51c2..ed1e26b43de 100644 --- a/lucene/core/src/java/org/apache/lucene/search/DisjunctionMaxQuery.java +++ b/lucene/core/src/java/org/apache/lucene/search/DisjunctionMaxQuery.java @@ -61,7 +61,7 @@ public class DisjunctionMaxQuery extends Query implements Iterable { /** * Creates a new DisjunctionMaxQuery - * @param disjuncts a Collection<Query> of all the disjuncts to add + * @param disjuncts a {@code Collection} of all the disjuncts to add * @param tieBreakerMultiplier the weight to give to each matching non-maximum disjunct */ public DisjunctionMaxQuery(Collection disjuncts, float tieBreakerMultiplier) { @@ -77,14 +77,14 @@ public class DisjunctionMaxQuery extends Query implements Iterable { } /** Add a collection of disjuncts to this disjunction - * via Iterable<Query> + * via {@code Iterable} * @param disjuncts a collection of queries to add as disjuncts. */ public void add(Collection disjuncts) { this.disjuncts.addAll(disjuncts); } - /** @return An Iterator<Query> over the disjuncts */ + /** @return An {@code Iterator} over the disjuncts */ public Iterator iterator() { return disjuncts.iterator(); } From 6382ff26072b01248a5f253772ac9e6f37ecc1c9 Mon Sep 17 00:00:00 2001 From: Michael McCandless Date: Tue, 28 Aug 2012 16:24:31 +0000 Subject: [PATCH 40/81] move imports down git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1378207 13f79535-47bb-0310-9956-ffa450edef68 --- .../lucene/search/similarities/DefaultSimilarity.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lucene/core/src/java/org/apache/lucene/search/similarities/DefaultSimilarity.java b/lucene/core/src/java/org/apache/lucene/search/similarities/DefaultSimilarity.java index 79514a52ad7..c2d25a8401d 100644 --- a/lucene/core/src/java/org/apache/lucene/search/similarities/DefaultSimilarity.java +++ b/lucene/core/src/java/org/apache/lucene/search/similarities/DefaultSimilarity.java @@ -1,9 +1,5 @@ package org.apache.lucene.search.similarities; -import org.apache.lucene.index.FieldInvertState; -import org.apache.lucene.index.Norm; -import org.apache.lucene.util.BytesRef; - /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -21,6 +17,10 @@ import org.apache.lucene.util.BytesRef; * limitations under the License. */ +import org.apache.lucene.index.FieldInvertState; +import org.apache.lucene.index.Norm; +import org.apache.lucene.util.BytesRef; + /** Expert: Default scoring implementation. */ public class DefaultSimilarity extends TFIDFSimilarity { From 16692d69f4e06ac24c69c38d68b513a5c0f48660 Mon Sep 17 00:00:00 2001 From: Michael McCandless Date: Tue, 28 Aug 2012 18:11:14 +0000 Subject: [PATCH 41/81] javadocs: fix broken HTML git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1378250 13f79535-47bb-0310-9956-ffa450edef68 --- lucene/analysis/stempel/src/java/org/egothor/stemmer/Row.java | 2 +- lucene/core/src/java/org/apache/lucene/util/PriorityQueue.java | 2 +- lucene/core/src/java/org/apache/lucene/util/fst/Util.java | 2 +- .../src/java/org/apache/lucene/facet/taxonomy/CategoryPath.java | 2 +- .../queryparser/flexible/core/config/AbstractQueryConfig.java | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lucene/analysis/stempel/src/java/org/egothor/stemmer/Row.java b/lucene/analysis/stempel/src/java/org/egothor/stemmer/Row.java index 944e3463f21..1489a57f4b6 100644 --- a/lucene/analysis/stempel/src/java/org/egothor/stemmer/Row.java +++ b/lucene/analysis/stempel/src/java/org/egothor/stemmer/Row.java @@ -220,7 +220,7 @@ public class Row { * Character. * * @param way the Character associated with the desired Cell - * @return the reference, or -1 if the Cell is null,/tt> + * @return the reference, or -1 if the Cell is null */ public int getRef(Character way) { Cell c = at(way); diff --git a/lucene/core/src/java/org/apache/lucene/util/PriorityQueue.java b/lucene/core/src/java/org/apache/lucene/util/PriorityQueue.java index 6cf6c27badf..477ea1bb8f4 100644 --- a/lucene/core/src/java/org/apache/lucene/util/PriorityQueue.java +++ b/lucene/core/src/java/org/apache/lucene/util/PriorityQueue.java @@ -103,7 +103,7 @@ public abstract class PriorityQueue { * *

    * // extends getSentinelObject() to return a non-null value.
-   * PriorityQueue pq = new MyQueue(numHits);
+   * PriorityQueue<MyObject> pq = new MyQueue<MyObject>(numHits);
    * // save the 'top' element, which is guaranteed to not be null.
    * MyObject pqTop = pq.top();
    * <...>
diff --git a/lucene/core/src/java/org/apache/lucene/util/fst/Util.java b/lucene/core/src/java/org/apache/lucene/util/fst/Util.java
index 0dbc7966eb5..3d7439d8cfe 100644
--- a/lucene/core/src/java/org/apache/lucene/util/fst/Util.java
+++ b/lucene/core/src/java/org/apache/lucene/util/fst/Util.java
@@ -89,7 +89,7 @@ public final class Util {
    *  pair where the output is equal to the target, and will
    *  return null if that output does not exist.
    *
-   *  

NOTE: this only works with FST, only + *

NOTE: this only works with {@code FST}, only * works when the outputs are ascending in order with * the inputs and only works when you shared * the outputs (pass doShare=true to {@link diff --git a/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/CategoryPath.java b/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/CategoryPath.java index 30de4d9e67b..db97dd81800 100644 --- a/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/CategoryPath.java +++ b/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/CategoryPath.java @@ -570,7 +570,7 @@ public class CategoryPath implements Serializable, Cloneable, Comparable - * This constructor does not copy the capacity (spare buffer size) + * This constructor does not copy the capacity (spare buffer size) * of the existing CategoryPath. Rather, the new object occupies exactly the * space it needs, without any spare. This is the expected behavior in the * typical use case outlined in the previous paragraph. diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/config/AbstractQueryConfig.java b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/config/AbstractQueryConfig.java index fc6d79d2946..4c8869c92f6 100644 --- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/config/AbstractQueryConfig.java +++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/config/AbstractQueryConfig.java @@ -62,7 +62,7 @@ public abstract class AbstractQueryConfig { /** * Returns true if there is a value set with the given key, otherwise false. * - * @param @param the value's type + * @param the value's type * @param key the key, cannot be null * @return true if there is a value set with the given key, otherwise false */ From 18fe854d862100e75dd7bd93523cc49924358942 Mon Sep 17 00:00:00 2001 From: Michael McCandless Date: Tue, 28 Aug 2012 18:14:07 +0000 Subject: [PATCH 42/81] detect broken HTML in the detailed class javadocs git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1378252 13f79535-47bb-0310-9956-ffa450edef68 --- dev-tools/scripts/checkJavaDocs.py | 78 ++++++++++++++++++++++++++++-- 1 file changed, 75 insertions(+), 3 deletions(-) diff --git a/dev-tools/scripts/checkJavaDocs.py b/dev-tools/scripts/checkJavaDocs.py index 87eb1157b90..908f65898e5 100644 --- a/dev-tools/scripts/checkJavaDocs.py +++ b/dev-tools/scripts/checkJavaDocs.py @@ -49,7 +49,7 @@ def verifyHTML(s): else: justTag = tag - if justTag.lower() in ('br', 'li', 'p'): + if justTag.lower() in ('br', 'li', 'p', 'col'): continue if tag[:1] == '/': @@ -72,7 +72,71 @@ def cleanHTML(s): s = s.replace('&', '&') return s.strip() -def checkClass(fullPath): +reH3 = re.compile('

(.*?)

', re.IGNORECASE) +reH4 = re.compile('

(.*?)

', re.IGNORECASE) + +def checkClassDetails(fullPath): + """ + Checks for invalid HTML in the full javadocs under each field/method. + """ + + # TODO: only works with java7 generated javadocs now! + with open(fullPath, encoding='UTF-8') as f: + desc = None + cat = None + item = None + errors = [] + for line in f.readlines(): + m = reH3.search(line) + if m is not None: + if desc is not None: + # Have to fake
    context because we pulled a fragment out "across" two
      s: + desc = ''.join(desc) + if True or cat == 'Constructor Detail': + idx = desc.find('') + if idx == -1: + # Ctor missing javadocs ... checkClassSummaries catches it + desc = None + continue + desc = desc[:idx+6] + else: + desc = '
        %s
      ' % ''.join(desc) + #print(' VERIFY %s: %s: %s' % (cat, item, desc)) + try: + verifyHTML(desc) + except RuntimeError as re: + #print(' FAILED: %s' % re) + errors.append((cat, item, str(re))) + desc = None + cat = m.group(1) + continue + + m = reH4.search(line) + if m is not None: + if desc is not None: + # Have to fake
        context because we pulled a fragment out "across" two
          s: + desc = '
            %s
          ' % ''.join(desc) + #print(' VERIFY %s: %s: %s' % (cat, item, desc)) + try: + verifyHTML(desc) + except RuntimeError as re: + #print(' FAILED: %s' % re) + errors.append((cat, item, str(re))) + item = m.group(1) + desc = [] + continue + + if desc is not None: + desc.append(line) + + if len(errors) != 0: + print() + print(fullPath) + for cat, item, message in errors: + print(' broken details HTML: %s: %s: %s' % (cat, item, message)) + +def checkClassSummaries(fullPath): + # TODO: only works with java7 generated javadocs now! f = open(fullPath, encoding='UTF-8') @@ -250,6 +314,11 @@ def checkPackageSummaries(root, level='class'): sys.exit(1) anyMissing = False + if not os.path.isdir(root): + checkClassSummaries(root) + checkClassDetails(root) + sys.exit(0) + for dirPath, dirNames, fileNames in os.walk(root): if dirPath.find('/all/') != -1: @@ -263,8 +332,11 @@ def checkPackageSummaries(root, level='class'): for fileName in fileNames: fullPath = '%s/%s' % (dirPath, fileName) if not fileName.startswith('package-') and fileName.endswith('.html') and os.path.isfile(fullPath): - if checkClass(fullPath): + if checkClassSummaries(fullPath): anyMissing = True + if checkClassDetails(fullPath): + anyMissing = True + if 'overview-summary.html' in fileNames: if checkSummary('%s/overview-summary.html' % dirPath): anyMissing = True From 1fb282a4cb3803ab564d0215dd6153f3fc91ea99 Mon Sep 17 00:00:00 2001 From: Michael McCandless Date: Tue, 28 Aug 2012 19:03:42 +0000 Subject: [PATCH 43/81] fix MemoryIndex false positive failure git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1378271 13f79535-47bb-0310-9956-ffa450edef68 --- dev-tools/scripts/checkJavaDocs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dev-tools/scripts/checkJavaDocs.py b/dev-tools/scripts/checkJavaDocs.py index 908f65898e5..2dc40a6e1c4 100644 --- a/dev-tools/scripts/checkJavaDocs.py +++ b/dev-tools/scripts/checkJavaDocs.py @@ -72,8 +72,8 @@ def cleanHTML(s): s = s.replace('&', '&') return s.strip() -reH3 = re.compile('

          (.*?)

          ', re.IGNORECASE) -reH4 = re.compile('

          (.*?)

          ', re.IGNORECASE) +reH3 = re.compile('^

          (.*?)

          ', re.IGNORECASE | re.MULTILINE) +reH4 = re.compile('^

          (.*?)

          ', re.IGNORECASE | re.MULTILINE) def checkClassDetails(fullPath): """ From 0d707bd8c73271f0518171890ac3e83b8f082047 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Tue, 28 Aug 2012 19:19:20 +0000 Subject: [PATCH 44/81] fix broken javadocs (javacc bug) by regenerating with latest version, fix broken links in .javacc (reintroduced if you regenerate) git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1378274 13f79535-47bb-0310-9956-ffa450edef68 --- lucene/common-build.xml | 6 +- .../queryparser/classic/CharStream.java | 11 +- .../queryparser/classic/ParseException.java | 59 ++--- .../queryparser/classic/QueryParser.java | 20 +- .../lucene/queryparser/classic/QueryParser.jj | 2 +- .../queryparser/classic/QueryParserBase.java | 8 +- .../lucene/queryparser/classic/Token.java | 33 ++- .../queryparser/classic/TokenMgrError.java | 246 +++++++++--------- .../flexible/standard/parser/CharStream.java | 11 +- .../standard/parser/ParseException.java | 40 ++- .../standard/parser/StandardSyntaxParser.java | 78 +++--- .../flexible/standard/parser/Token.java | 33 ++- .../standard/parser/TokenMgrError.java | 246 +++++++++--------- .../surround/parser/CharStream.java | 11 +- .../surround/parser/ParseException.java | 47 ++-- .../surround/parser/QueryParser.java | 8 +- .../queryparser/surround/parser/Token.java | 33 ++- .../surround/parser/TokenMgrError.java | 246 +++++++++--------- 18 files changed, 579 insertions(+), 559 deletions(-) diff --git a/lucene/common-build.xml b/lucene/common-build.xml index 83a018ca95c..6f638621c54 100644 --- a/lucene/common-build.xml +++ b/lucene/common-build.xml @@ -400,17 +400,17 @@ JavaCC not found. JavaCC Home: ${javacc.home} - Please download and install JavaCC 4.1 from: + Please download and install JavaCC 5.0 from: <http://javacc.dev.java.net> Then, create a build.properties file either in your home directory, or within the Lucene directory and set the javacc.home property to the path where JavaCC is installed. For example, - if you installed JavaCC in /usr/local/java/javacc-4.1, then set the + if you installed JavaCC in /usr/local/java/javacc-5.0, then set the javacc.home property to: - javacc.home=/usr/local/java/javacc-4.1 + javacc.home=/usr/local/java/javacc-5.0 If you get an error like the one below, then you have not installed things correctly. Please check all your paths and try again. diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/CharStream.java b/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/CharStream.java index d5b80024580..2c5fcbabde5 100644 --- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/CharStream.java +++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/CharStream.java @@ -1,5 +1,5 @@ -/* Generated By:JavaCC: Do not edit this line. CharStream.java Version 4.1 */ -/* JavaCCOptions:STATIC=false */ +/* Generated By:JavaCC: Do not edit this line. CharStream.java Version 5.0 */ +/* JavaCCOptions:STATIC=false,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ package org.apache.lucene.queryparser.classic; /** @@ -17,7 +17,8 @@ package org.apache.lucene.queryparser.classic; * operation. */ -public interface CharStream { +public +interface CharStream { /** * Returns the next character from the selected input. The method @@ -26,6 +27,7 @@ public interface CharStream { */ char readChar() throws java.io.IOException; + @Deprecated /** * Returns the column position of the character last read. * @deprecated @@ -33,6 +35,7 @@ public interface CharStream { */ int getColumn(); + @Deprecated /** * Returns the line number of the character last read. * @deprecated @@ -109,4 +112,4 @@ public interface CharStream { void Done(); } -/* JavaCC - OriginalChecksum=0790771f0d47abfd976f028fa2364b0f (do not edit this line) */ +/* JavaCC - OriginalChecksum=30b94cad7b10d0d81e3a59a1083939d0 (do not edit this line) */ diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/ParseException.java b/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/ParseException.java index a452ac39b6a..7ba0d3c8ece 100644 --- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/ParseException.java +++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/ParseException.java @@ -1,4 +1,4 @@ -/* Generated By:JavaCC: Do not edit this line. ParseException.java Version 4.1 */ +/* Generated By:JavaCC: Do not edit this line. ParseException.java Version 5.0 */ /* JavaCCOptions:KEEP_LINE_COL=null */ package org.apache.lucene.queryparser.classic; @@ -13,25 +13,25 @@ package org.apache.lucene.queryparser.classic; */ public class ParseException extends Exception { + /** + * The version identifier for this Serializable class. + * Increment only if the serialized form of the + * class changes. + */ + private static final long serialVersionUID = 1L; + /** * This constructor is used by the method "generateParseException" * in the generated parser. Calling this constructor generates * a new object of this type with the fields "currentToken", - * "expectedTokenSequences", and "tokenImage" set. The boolean - * flag "specialConstructor" is also set to true to indicate that - * this constructor was used to create this object. - * This constructor calls its super class with the empty string - * to force the "toString" method of parent class "Throwable" to - * print the error message in the form: - * ParseException: + * "expectedTokenSequences", and "tokenImage" set. */ public ParseException(Token currentTokenVal, int[][] expectedTokenSequencesVal, String[] tokenImageVal ) { - super(""); - specialConstructor = true; + super(initialise(currentTokenVal, expectedTokenSequencesVal, tokenImageVal)); currentToken = currentTokenVal; expectedTokenSequences = expectedTokenSequencesVal; tokenImage = tokenImageVal; @@ -49,33 +49,13 @@ public class ParseException extends Exception { public ParseException() { super(); - specialConstructor = false; } /** Constructor with message. */ public ParseException(String message) { super(message); - specialConstructor = false; } - /** - * Creates a new ParseException which is wrapping another Throwable with an - * additional message - * - * @param message Message for the Exception - * @param throwable Wrapped Throwable - */ - public ParseException(String message, Throwable throwable) { - super(message, throwable); - specialConstructor = false; - } - - /** - * This variable determines which constructor was used to create - * this object and thereby affects the semantics of the - * "getMessage" method (see below). - */ - protected boolean specialConstructor; /** * This is the last token that has been consumed successfully. If @@ -99,19 +79,16 @@ public class ParseException extends Exception { public String[] tokenImage; /** - * This method has the standard behavior when this object has been - * created using the standard constructors. Otherwise, it uses - * "currentToken" and "expectedTokenSequences" to generate a parse + * It uses "currentToken" and "expectedTokenSequences" to generate a parse * error message and returns it. If this object has been created * due to a parse error, and you do not catch it (it gets thrown - * from the parser), then this method is called during the printing - * of the final stack trace, and hence the correct error message + * from the parser) the correct error message * gets displayed. */ - public String getMessage() { - if (!specialConstructor) { - return super.getMessage(); - } + private static String initialise(Token currentToken, + int[][] expectedTokenSequences, + String[] tokenImage) { + String eol = System.getProperty("line.separator", "\n"); StringBuffer expected = new StringBuffer(); int maxSize = 0; for (int i = 0; i < expectedTokenSequences.length; i++) { @@ -161,7 +138,7 @@ public class ParseException extends Exception { * when these raw version cannot be used as part of an ASCII * string literal. */ - protected String add_escapes(String str) { + static String add_escapes(String str) { StringBuffer retval = new StringBuffer(); char ch; for (int i = 0; i < str.length(); i++) { @@ -207,4 +184,4 @@ public class ParseException extends Exception { } } -/* JavaCC - OriginalChecksum=f669ffb14d5be55de6298772ac9befeb (do not edit this line) */ +/* JavaCC - OriginalChecksum=b187d97d5bb75c3fc63d642c1c26ac6e (do not edit this line) */ diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParser.java b/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParser.java index 8180f153592..26bcfc546b9 100644 --- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParser.java +++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParser.java @@ -44,8 +44,8 @@ import org.apache.lucene.util.Version; * *

          * Examples of appropriately formatted queries can be found in the - * query syntax documentation + * href="{@docRoot}/org/apache/lucene/queryparser/classic/package-summary.html#package_description">query syntax + * documentation. *

          * *

          @@ -76,6 +76,14 @@ import org.apache.lucene.util.Version; *

          NOTE: there is a new QueryParser in contrib, which matches * the same syntax as this class, but is more modular, * enabling substantial customization to how a query is created. + * + * + *

          NOTE: You must specify the required {@link Version} + * compatibility when creating QueryParser: + *

          */ public class QueryParser extends QueryParserBase implements QueryParserConstants { /** The default operator for parsing queries. @@ -84,7 +92,7 @@ public class QueryParser extends QueryParserBase implements QueryParserConstants static public enum Operator { OR, AND } /** Create a query parser. - * @param matchVersion Lucene version to match. + * @param matchVersion Lucene version to match. See above. * @param f the default field for query terms. * @param a used to find terms in the query text. */ @@ -632,7 +640,7 @@ public class QueryParser extends QueryParserBase implements QueryParserConstants return (jj_ntk = jj_nt.kind); } - private java.util.List jj_expentries = new java.util.ArrayList(); + private java.util.List jj_expentries = new java.util.ArrayList(); private int[] jj_expentry; private int jj_kind = -1; private int[] jj_lasttokens = new int[100]; @@ -647,7 +655,7 @@ public class QueryParser extends QueryParserBase implements QueryParserConstants for (int i = 0; i < jj_endpos; i++) { jj_expentry[i] = jj_lasttokens[i]; } - jj_entries_loop: for (java.util.Iterator it = jj_expentries.iterator(); it.hasNext();) { + jj_entries_loop: for (java.util.Iterator it = jj_expentries.iterator(); it.hasNext();) { int[] oldentry = (int[])(it.next()); if (oldentry.length == jj_expentry.length) { for (int i = 0; i < jj_expentry.length; i++) { @@ -695,7 +703,7 @@ public class QueryParser extends QueryParserBase implements QueryParserConstants jj_add_error_token(0, 0); int[][] exptokseq = new int[jj_expentries.size()][]; for (int i = 0; i < jj_expentries.size(); i++) { - exptokseq[i] = (int[])jj_expentries.get(i); + exptokseq[i] = jj_expentries.get(i); } return new ParseException(token, exptokseq, tokenImage); } diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParser.jj b/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParser.jj index 6e214dde7e8..593262ba9e6 100644 --- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParser.jj +++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParser.jj @@ -68,7 +68,7 @@ import org.apache.lucene.util.Version; * *

          * Examples of appropriately formatted queries can be found in the query syntax + * href="{@docRoot}/org/apache/lucene/queryparser/classic/package-summary.html#package_description">query syntax * documentation. *

          * diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParserBase.java b/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParserBase.java index 363de831074..79807cfa68b 100644 --- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParserBase.java +++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParserBase.java @@ -482,7 +482,9 @@ public abstract class QueryParserBase implements CommonQueryParserConfiguration source = analyzer.tokenStream(field, new StringReader(queryText)); source.reset(); } catch (IOException e) { - throw new ParseException("Unable to initialize TokenStream to analyze query text", e); + ParseException p = new ParseException("Unable to initialize TokenStream to analyze query text"); + p.initCause(e); + throw p; } CachingTokenFilter buffer = new CachingTokenFilter(source); TermToBytesRefAttribute termAtt = null; @@ -527,7 +529,9 @@ public abstract class QueryParserBase implements CommonQueryParserConfiguration source.close(); } catch (IOException e) { - throw new ParseException("Cannot close TokenStream analyzing query text", e); + ParseException p = new ParseException("Cannot close TokenStream analyzing query text"); + p.initCause(e); + throw p; } BytesRef bytes = termAtt == null ? null : termAtt.getBytesRef(); diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/Token.java b/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/Token.java index 2b47564fcc0..0e52ec21969 100644 --- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/Token.java +++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/Token.java @@ -1,12 +1,19 @@ -/* Generated By:JavaCC: Do not edit this line. Token.java Version 4.1 */ -/* JavaCCOptions:TOKEN_EXTENDS=,KEEP_LINE_COL=null */ +/* Generated By:JavaCC: Do not edit this line. Token.java Version 5.0 */ +/* JavaCCOptions:TOKEN_EXTENDS=,KEEP_LINE_COL=null,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ package org.apache.lucene.queryparser.classic; /** * Describes the input token stream. */ -public class Token { +public class Token implements java.io.Serializable { + + /** + * The version identifier for this Serializable class. + * Increment only if the serialized form of the + * class changes. + */ + private static final long serialVersionUID = 1L; /** * An integer that describes the kind of this token. This numbering @@ -75,7 +82,7 @@ public class Token { */ public Token(int kind) { - this(kind, null); + this(kind, null); } /** @@ -83,8 +90,8 @@ public class Token { */ public Token(int kind, String image) { - this.kind = kind; - this.image = image; + this.kind = kind; + this.image = image; } /** @@ -92,7 +99,7 @@ public class Token { */ public String toString() { - return image; + return image; } /** @@ -109,16 +116,16 @@ public class Token { */ public static Token newToken(int ofKind, String image) { - switch(ofKind) - { - default : return new Token(ofKind, image); - } + switch(ofKind) + { + default : return new Token(ofKind, image); + } } public static Token newToken(int ofKind) { - return newToken(ofKind, null); + return newToken(ofKind, null); } } -/* JavaCC - OriginalChecksum=9f74ef8b727ef4e5dafb84a45b3584c9 (do not edit this line) */ +/* JavaCC - OriginalChecksum=405bb5d2fcd84e94ac1c8f0b12c1f914 (do not edit this line) */ diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/TokenMgrError.java b/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/TokenMgrError.java index 7dad74792a0..51712a761fb 100644 --- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/TokenMgrError.java +++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/TokenMgrError.java @@ -1,141 +1,147 @@ -/* Generated By:JavaCC: Do not edit this line. TokenMgrError.java Version 4.1 */ +/* Generated By:JavaCC: Do not edit this line. TokenMgrError.java Version 5.0 */ /* JavaCCOptions: */ package org.apache.lucene.queryparser.classic; /** Token Manager Error. */ -@SuppressWarnings("serial") public class TokenMgrError extends Error { - /* - * Ordinals for various reasons why an Error of this type can be thrown. - */ + /** + * The version identifier for this Serializable class. + * Increment only if the serialized form of the + * class changes. + */ + private static final long serialVersionUID = 1L; - /** - * Lexical error occurred. - */ - static final int LEXICAL_ERROR = 0; + /* + * Ordinals for various reasons why an Error of this type can be thrown. + */ - /** - * An attempt was made to create a second instance of a static token manager. - */ - static final int STATIC_LEXER_ERROR = 1; + /** + * Lexical error occurred. + */ + static final int LEXICAL_ERROR = 0; - /** - * Tried to change to an invalid lexical state. - */ - static final int INVALID_LEXICAL_STATE = 2; + /** + * An attempt was made to create a second instance of a static token manager. + */ + static final int STATIC_LEXER_ERROR = 1; - /** - * Detected (and bailed out of) an infinite loop in the token manager. - */ - static final int LOOP_DETECTED = 3; + /** + * Tried to change to an invalid lexical state. + */ + static final int INVALID_LEXICAL_STATE = 2; - /** - * Indicates the reason why the exception is thrown. It will have - * one of the above 4 values. - */ - int errorCode; + /** + * Detected (and bailed out of) an infinite loop in the token manager. + */ + static final int LOOP_DETECTED = 3; - /** - * Replaces unprintable characters by their escaped (or unicode escaped) - * equivalents in the given string - */ - protected static final String addEscapes(String str) { - StringBuffer retval = new StringBuffer(); - char ch; - for (int i = 0; i < str.length(); i++) { - switch (str.charAt(i)) - { - case 0 : - continue; - case '\b': - retval.append("\\b"); - continue; - case '\t': - retval.append("\\t"); - continue; - case '\n': - retval.append("\\n"); - continue; - case '\f': - retval.append("\\f"); - continue; - case '\r': - retval.append("\\r"); - continue; - case '\"': - retval.append("\\\""); - continue; - case '\'': - retval.append("\\\'"); - continue; - case '\\': - retval.append("\\\\"); - continue; - default: - if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) { - String s = "0000" + Integer.toString(ch, 16); - retval.append("\\u" + s.substring(s.length() - 4, s.length())); - } else { - retval.append(ch); - } - continue; - } + /** + * Indicates the reason why the exception is thrown. It will have + * one of the above 4 values. + */ + int errorCode; + + /** + * Replaces unprintable characters by their escaped (or unicode escaped) + * equivalents in the given string + */ + protected static final String addEscapes(String str) { + StringBuffer retval = new StringBuffer(); + char ch; + for (int i = 0; i < str.length(); i++) { + switch (str.charAt(i)) + { + case 0 : + continue; + case '\b': + retval.append("\\b"); + continue; + case '\t': + retval.append("\\t"); + continue; + case '\n': + retval.append("\\n"); + continue; + case '\f': + retval.append("\\f"); + continue; + case '\r': + retval.append("\\r"); + continue; + case '\"': + retval.append("\\\""); + continue; + case '\'': + retval.append("\\\'"); + continue; + case '\\': + retval.append("\\\\"); + continue; + default: + if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) { + String s = "0000" + Integer.toString(ch, 16); + retval.append("\\u" + s.substring(s.length() - 4, s.length())); + } else { + retval.append(ch); + } + continue; } - return retval.toString(); - } + } + return retval.toString(); + } - /** - * Returns a detailed message for the Error when it is thrown by the - * token manager to indicate a lexical error. - * Parameters : - * EOFSeen : indicates if EOF caused the lexical error - * curLexState : lexical state in which this error occurred - * errorLine : line number when the error occurred - * errorColumn : column number when the error occurred - * errorAfter : prefix that was seen before this error occurred - * curchar : the offending character - * Note: You can customize the lexical error message by modifying this method. - */ - protected static String LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar) { - return("Lexical error at line " + - errorLine + ", column " + - errorColumn + ". Encountered: " + - (EOFSeen ? " " : ("\"" + addEscapes(String.valueOf(curChar)) + "\"") + " (" + (int)curChar + "), ") + - "after : \"" + addEscapes(errorAfter) + "\""); - } + /** + * Returns a detailed message for the Error when it is thrown by the + * token manager to indicate a lexical error. + * Parameters : + * EOFSeen : indicates if EOF caused the lexical error + * curLexState : lexical state in which this error occurred + * errorLine : line number when the error occurred + * errorColumn : column number when the error occurred + * errorAfter : prefix that was seen before this error occurred + * curchar : the offending character + * Note: You can customize the lexical error message by modifying this method. + */ + protected static String LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar) { + return("Lexical error at line " + + errorLine + ", column " + + errorColumn + ". Encountered: " + + (EOFSeen ? " " : ("\"" + addEscapes(String.valueOf(curChar)) + "\"") + " (" + (int)curChar + "), ") + + "after : \"" + addEscapes(errorAfter) + "\""); + } - /** - * You can also modify the body of this method to customize your error messages. - * For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE are not - * of end-users concern, so you can return something like : - * - * "Internal Error : Please file a bug report .... " - * - * from this method for such cases in the release version of your parser. - */ - public String getMessage() { - return super.getMessage(); - } + /** + * You can also modify the body of this method to customize your error messages. + * For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE are not + * of end-users concern, so you can return something like : + * + * "Internal Error : Please file a bug report .... " + * + * from this method for such cases in the release version of your parser. + */ + public String getMessage() { + return super.getMessage(); + } - /* - * Constructors of various flavors follow. - */ + /* + * Constructors of various flavors follow. + */ - /** No arg constructor. */ - public TokenMgrError() { - } + /** No arg constructor. */ + public TokenMgrError() { + } - /** Constructor with message and reason. */ - public TokenMgrError(String message, int reason) { - super(message); - errorCode = reason; - } + /** Constructor with message and reason. */ + public TokenMgrError(String message, int reason) { + super(message); + errorCode = reason; + } - /** Full Constructor. */ - public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar, int reason) { - this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason); - } + /** Full Constructor. */ + public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar, int reason) { + this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason); + } } -/* JavaCC - OriginalChecksum=b55ad725f5fbc672fa115f498926930c (do not edit this line) */ +/* JavaCC - OriginalChecksum=f433e1a52b8eadbf12f3fbbbf87fd140 (do not edit this line) */ diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/CharStream.java b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/CharStream.java index 9447bdda6dc..15b8245acf3 100644 --- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/CharStream.java +++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/CharStream.java @@ -1,5 +1,5 @@ -/* Generated By:JavaCC: Do not edit this line. CharStream.java Version 4.1 */ -/* JavaCCOptions:STATIC=false */ +/* Generated By:JavaCC: Do not edit this line. CharStream.java Version 5.0 */ +/* JavaCCOptions:STATIC=false,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ package org.apache.lucene.queryparser.flexible.standard.parser; /** @@ -17,7 +17,8 @@ package org.apache.lucene.queryparser.flexible.standard.parser; * operation. */ -public interface CharStream { +public +interface CharStream { /** * Returns the next character from the selected input. The method @@ -26,6 +27,7 @@ public interface CharStream { */ char readChar() throws java.io.IOException; + @Deprecated /** * Returns the column position of the character last read. * @deprecated @@ -33,6 +35,7 @@ public interface CharStream { */ int getColumn(); + @Deprecated /** * Returns the line number of the character last read. * @deprecated @@ -109,4 +112,4 @@ public interface CharStream { void Done(); } -/* JavaCC - OriginalChecksum=298ffb3c7c64c6de9b7812e011e58d99 (do not edit this line) */ +/* JavaCC - OriginalChecksum=53b2ec7502d50e2290e86187a6c01270 (do not edit this line) */ diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/ParseException.java b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/ParseException.java index 8b1badb939c..4d87b831d4f 100644 --- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/ParseException.java +++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/ParseException.java @@ -1,4 +1,4 @@ -/* Generated By:JavaCC: Do not edit this line. ParseException.java Version 4.1 */ +/* Generated By:JavaCC: Do not edit this line. ParseException.java Version 5.0 */ /* JavaCCOptions:KEEP_LINE_COL=null */ package org.apache.lucene.queryparser.flexible.standard.parser; @@ -18,17 +18,18 @@ package org.apache.lucene.queryparser.flexible.standard.parser; */ public class ParseException extends QueryNodeParseException { + /** + * The version identifier for this Serializable class. + * Increment only if the serialized form of the + * class changes. + */ + private static final long serialVersionUID = 1L; + /** * This constructor is used by the method "generateParseException" * in the generated parser. Calling this constructor generates * a new object of this type with the fields "currentToken", - * "expectedTokenSequences", and "tokenImage" set. The boolean - * flag "specialConstructor" is also set to true to indicate that - * this constructor was used to create this object. - * This constructor calls its super class with the empty string - * to force the "toString" method of parent class "Throwable" to - * print the error message in the form: - * ParseException: + * "expectedTokenSequences", and "tokenImage" set. */ public ParseException(Token currentTokenVal, int[][] expectedTokenSequencesVal, String[] tokenImageVal) { @@ -58,12 +59,6 @@ public class ParseException extends QueryNodeParseException { super(message); } - /** - * This variable determines which constructor was used to create - * this object and thereby affects the semantics of the - * "getMessage" method (see below). - */ - protected boolean specialConstructor; /** * This is the last token that has been consumed successfully. If @@ -87,17 +82,16 @@ public class ParseException extends QueryNodeParseException { public String[] tokenImage; /** - * This method has the standard behavior when this object has been - * created using the standard constructors. Otherwise, it uses - * "currentToken" and "expectedTokenSequences" to generate a parse + * It uses "currentToken" and "expectedTokenSequences" to generate a parse * error message and returns it. If this object has been created * due to a parse error, and you do not catch it (it gets thrown - * from the parser), then this method is called during the printing - * of the final stack trace, and hence the correct error message + * from the parser) the correct error message * gets displayed. */ - private static String initialise(Token currentToken, int[][] expectedTokenSequences, String[] tokenImage) { - String eol = System.getProperty("line.separator", "n"); + private static String initialise(Token currentToken, + int[][] expectedTokenSequences, + String[] tokenImage) { + String eol = System.getProperty("line.separator", "\n"); StringBuffer expected = new StringBuffer(); int maxSize = 0; for (int i = 0; i < expectedTokenSequences.length; i++) { @@ -147,7 +141,7 @@ public class ParseException extends QueryNodeParseException { * when these raw version cannot be used as part of an ASCII * string literal. */ - static private String add_escapes(String str) { + static String add_escapes(String str) { StringBuffer retval = new StringBuffer(); char ch; for (int i = 0; i < str.length(); i++) { @@ -193,4 +187,4 @@ public class ParseException extends QueryNodeParseException { } } -/* JavaCC - OriginalChecksum=7601d49d11bc059457ae5850628ebc8a (do not edit this line) */ +/* JavaCC - OriginalChecksum=4263a02db9988d7a863aa97ad2f6dc67 (do not edit this line) */ diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/StandardSyntaxParser.java b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/StandardSyntaxParser.java index 21023e5b682..676d8a0141a 100644 --- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/StandardSyntaxParser.java +++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/StandardSyntaxParser.java @@ -732,30 +732,6 @@ public class StandardSyntaxParser implements SyntaxParser, StandardSyntaxParserC finally { jj_save(1, xla); } } - private boolean jj_3R_4() { - Token xsp; - xsp = jj_scanpos; - if (jj_scan_token(15)) { - jj_scanpos = xsp; - if (jj_scan_token(16)) return true; - } - if (jj_3R_6()) return true; - return false; - } - - private boolean jj_3R_6() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_7()) { - jj_scanpos = xsp; - if (jj_3R_8()) { - jj_scanpos = xsp; - if (jj_3R_9()) return true; - } - } - return false; - } - private boolean jj_3_2() { if (jj_scan_token(TERM)) return true; Token xsp; @@ -782,16 +758,6 @@ public class StandardSyntaxParser implements SyntaxParser, StandardSyntaxParserC return false; } - private boolean jj_3R_8() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_12()) { - jj_scanpos = xsp; - if (jj_scan_token(27)) return true; - } - return false; - } - private boolean jj_3_1() { if (jj_scan_token(TERM)) return true; Token xsp; @@ -803,8 +769,13 @@ public class StandardSyntaxParser implements SyntaxParser, StandardSyntaxParserC return false; } - private boolean jj_3R_9() { - if (jj_scan_token(QUOTED)) return true; + private boolean jj_3R_8() { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_12()) { + jj_scanpos = xsp; + if (jj_scan_token(27)) return true; + } return false; } @@ -821,6 +792,11 @@ public class StandardSyntaxParser implements SyntaxParser, StandardSyntaxParserC return false; } + private boolean jj_3R_9() { + if (jj_scan_token(QUOTED)) return true; + return false; + } + private boolean jj_3R_5() { Token xsp; xsp = jj_scanpos; @@ -845,6 +821,30 @@ public class StandardSyntaxParser implements SyntaxParser, StandardSyntaxParserC return false; } + private boolean jj_3R_4() { + Token xsp; + xsp = jj_scanpos; + if (jj_scan_token(15)) { + jj_scanpos = xsp; + if (jj_scan_token(16)) return true; + } + if (jj_3R_6()) return true; + return false; + } + + private boolean jj_3R_6() { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_7()) { + jj_scanpos = xsp; + if (jj_3R_8()) { + jj_scanpos = xsp; + if (jj_3R_9()) return true; + } + } + return false; + } + /** Generated Token Manager. */ public StandardSyntaxParserTokenManager token_source; /** Current token. */ @@ -986,7 +986,7 @@ public class StandardSyntaxParser implements SyntaxParser, StandardSyntaxParserC return (jj_ntk = jj_nt.kind); } - private java.util.List jj_expentries = new java.util.ArrayList(); + private java.util.List jj_expentries = new java.util.ArrayList(); private int[] jj_expentry; private int jj_kind = -1; private int[] jj_lasttokens = new int[100]; @@ -1001,7 +1001,7 @@ public class StandardSyntaxParser implements SyntaxParser, StandardSyntaxParserC for (int i = 0; i < jj_endpos; i++) { jj_expentry[i] = jj_lasttokens[i]; } - jj_entries_loop: for (java.util.Iterator it = jj_expentries.iterator(); it.hasNext();) { + jj_entries_loop: for (java.util.Iterator it = jj_expentries.iterator(); it.hasNext();) { int[] oldentry = (int[])(it.next()); if (oldentry.length == jj_expentry.length) { for (int i = 0; i < jj_expentry.length; i++) { @@ -1049,7 +1049,7 @@ public class StandardSyntaxParser implements SyntaxParser, StandardSyntaxParserC jj_add_error_token(0, 0); int[][] exptokseq = new int[jj_expentries.size()][]; for (int i = 0; i < jj_expentries.size(); i++) { - exptokseq[i] = (int[])jj_expentries.get(i); + exptokseq[i] = jj_expentries.get(i); } return new ParseException(token, exptokseq, tokenImage); } diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/Token.java b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/Token.java index 95869f37545..95e66bbb28f 100644 --- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/Token.java +++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/Token.java @@ -1,12 +1,19 @@ -/* Generated By:JavaCC: Do not edit this line. Token.java Version 4.1 */ -/* JavaCCOptions:TOKEN_EXTENDS=,KEEP_LINE_COL=null */ +/* Generated By:JavaCC: Do not edit this line. Token.java Version 5.0 */ +/* JavaCCOptions:TOKEN_EXTENDS=,KEEP_LINE_COL=null,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ package org.apache.lucene.queryparser.flexible.standard.parser; /** * Describes the input token stream. */ -public class Token { +public class Token implements java.io.Serializable { + + /** + * The version identifier for this Serializable class. + * Increment only if the serialized form of the + * class changes. + */ + private static final long serialVersionUID = 1L; /** * An integer that describes the kind of this token. This numbering @@ -75,7 +82,7 @@ public class Token { */ public Token(int kind) { - this(kind, null); + this(kind, null); } /** @@ -83,8 +90,8 @@ public class Token { */ public Token(int kind, String image) { - this.kind = kind; - this.image = image; + this.kind = kind; + this.image = image; } /** @@ -92,7 +99,7 @@ public class Token { */ public String toString() { - return image; + return image; } /** @@ -109,16 +116,16 @@ public class Token { */ public static Token newToken(int ofKind, String image) { - switch(ofKind) - { - default : return new Token(ofKind, image); - } + switch(ofKind) + { + default : return new Token(ofKind, image); + } } public static Token newToken(int ofKind) { - return newToken(ofKind, null); + return newToken(ofKind, null); } } -/* JavaCC - OriginalChecksum=3b4fe6dcfcfa24a81f1c6ceffae5f73a (do not edit this line) */ +/* JavaCC - OriginalChecksum=ea8b1e55950603be28e2f63dcd544ab4 (do not edit this line) */ diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/TokenMgrError.java b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/TokenMgrError.java index 24647e18dd3..9207c0fa5b5 100644 --- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/TokenMgrError.java +++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/TokenMgrError.java @@ -1,141 +1,147 @@ -/* Generated By:JavaCC: Do not edit this line. TokenMgrError.java Version 4.1 */ +/* Generated By:JavaCC: Do not edit this line. TokenMgrError.java Version 5.0 */ /* JavaCCOptions: */ package org.apache.lucene.queryparser.flexible.standard.parser; /** Token Manager Error. */ -@SuppressWarnings("serial") public class TokenMgrError extends Error { - /* - * Ordinals for various reasons why an Error of this type can be thrown. - */ + /** + * The version identifier for this Serializable class. + * Increment only if the serialized form of the + * class changes. + */ + private static final long serialVersionUID = 1L; - /** - * Lexical error occurred. - */ - static final int LEXICAL_ERROR = 0; + /* + * Ordinals for various reasons why an Error of this type can be thrown. + */ - /** - * An attempt was made to create a second instance of a static token manager. - */ - static final int STATIC_LEXER_ERROR = 1; + /** + * Lexical error occurred. + */ + static final int LEXICAL_ERROR = 0; - /** - * Tried to change to an invalid lexical state. - */ - static final int INVALID_LEXICAL_STATE = 2; + /** + * An attempt was made to create a second instance of a static token manager. + */ + static final int STATIC_LEXER_ERROR = 1; - /** - * Detected (and bailed out of) an infinite loop in the token manager. - */ - static final int LOOP_DETECTED = 3; + /** + * Tried to change to an invalid lexical state. + */ + static final int INVALID_LEXICAL_STATE = 2; - /** - * Indicates the reason why the exception is thrown. It will have - * one of the above 4 values. - */ - int errorCode; + /** + * Detected (and bailed out of) an infinite loop in the token manager. + */ + static final int LOOP_DETECTED = 3; - /** - * Replaces unprintable characters by their escaped (or unicode escaped) - * equivalents in the given string - */ - protected static final String addEscapes(String str) { - StringBuffer retval = new StringBuffer(); - char ch; - for (int i = 0; i < str.length(); i++) { - switch (str.charAt(i)) - { - case 0 : - continue; - case '\b': - retval.append("\\b"); - continue; - case '\t': - retval.append("\\t"); - continue; - case '\n': - retval.append("\\n"); - continue; - case '\f': - retval.append("\\f"); - continue; - case '\r': - retval.append("\\r"); - continue; - case '\"': - retval.append("\\\""); - continue; - case '\'': - retval.append("\\\'"); - continue; - case '\\': - retval.append("\\\\"); - continue; - default: - if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) { - String s = "0000" + Integer.toString(ch, 16); - retval.append("\\u" + s.substring(s.length() - 4, s.length())); - } else { - retval.append(ch); - } - continue; - } + /** + * Indicates the reason why the exception is thrown. It will have + * one of the above 4 values. + */ + int errorCode; + + /** + * Replaces unprintable characters by their escaped (or unicode escaped) + * equivalents in the given string + */ + protected static final String addEscapes(String str) { + StringBuffer retval = new StringBuffer(); + char ch; + for (int i = 0; i < str.length(); i++) { + switch (str.charAt(i)) + { + case 0 : + continue; + case '\b': + retval.append("\\b"); + continue; + case '\t': + retval.append("\\t"); + continue; + case '\n': + retval.append("\\n"); + continue; + case '\f': + retval.append("\\f"); + continue; + case '\r': + retval.append("\\r"); + continue; + case '\"': + retval.append("\\\""); + continue; + case '\'': + retval.append("\\\'"); + continue; + case '\\': + retval.append("\\\\"); + continue; + default: + if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) { + String s = "0000" + Integer.toString(ch, 16); + retval.append("\\u" + s.substring(s.length() - 4, s.length())); + } else { + retval.append(ch); + } + continue; } - return retval.toString(); - } + } + return retval.toString(); + } - /** - * Returns a detailed message for the Error when it is thrown by the - * token manager to indicate a lexical error. - * Parameters : - * EOFSeen : indicates if EOF caused the lexical error - * curLexState : lexical state in which this error occurred - * errorLine : line number when the error occurred - * errorColumn : column number when the error occurred - * errorAfter : prefix that was seen before this error occurred - * curchar : the offending character - * Note: You can customize the lexical error message by modifying this method. - */ - protected static String LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar) { - return("Lexical error at line " + - errorLine + ", column " + - errorColumn + ". Encountered: " + - (EOFSeen ? " " : ("\"" + addEscapes(String.valueOf(curChar)) + "\"") + " (" + (int)curChar + "), ") + - "after : \"" + addEscapes(errorAfter) + "\""); - } + /** + * Returns a detailed message for the Error when it is thrown by the + * token manager to indicate a lexical error. + * Parameters : + * EOFSeen : indicates if EOF caused the lexical error + * curLexState : lexical state in which this error occurred + * errorLine : line number when the error occurred + * errorColumn : column number when the error occurred + * errorAfter : prefix that was seen before this error occurred + * curchar : the offending character + * Note: You can customize the lexical error message by modifying this method. + */ + protected static String LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar) { + return("Lexical error at line " + + errorLine + ", column " + + errorColumn + ". Encountered: " + + (EOFSeen ? " " : ("\"" + addEscapes(String.valueOf(curChar)) + "\"") + " (" + (int)curChar + "), ") + + "after : \"" + addEscapes(errorAfter) + "\""); + } - /** - * You can also modify the body of this method to customize your error messages. - * For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE are not - * of end-users concern, so you can return something like : - * - * "Internal Error : Please file a bug report .... " - * - * from this method for such cases in the release version of your parser. - */ - public String getMessage() { - return super.getMessage(); - } + /** + * You can also modify the body of this method to customize your error messages. + * For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE are not + * of end-users concern, so you can return something like : + * + * "Internal Error : Please file a bug report .... " + * + * from this method for such cases in the release version of your parser. + */ + public String getMessage() { + return super.getMessage(); + } - /* - * Constructors of various flavors follow. - */ + /* + * Constructors of various flavors follow. + */ - /** No arg constructor. */ - public TokenMgrError() { - } + /** No arg constructor. */ + public TokenMgrError() { + } - /** Constructor with message and reason. */ - public TokenMgrError(String message, int reason) { - super(message); - errorCode = reason; - } + /** Constructor with message and reason. */ + public TokenMgrError(String message, int reason) { + super(message); + errorCode = reason; + } - /** Full Constructor. */ - public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar, int reason) { - this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason); - } + /** Full Constructor. */ + public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar, int reason) { + this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason); + } } -/* JavaCC - OriginalChecksum=1efb3d906925f2478637c66473b79bae (do not edit this line) */ +/* JavaCC - OriginalChecksum=be88283d82a985d82a34dda46bcf42d5 (do not edit this line) */ diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/CharStream.java b/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/CharStream.java index ede87387de8..31f3ad7950e 100644 --- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/CharStream.java +++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/CharStream.java @@ -1,5 +1,5 @@ -/* Generated By:JavaCC: Do not edit this line. CharStream.java Version 4.1 */ -/* JavaCCOptions:STATIC=false */ +/* Generated By:JavaCC: Do not edit this line. CharStream.java Version 5.0 */ +/* JavaCCOptions:STATIC=false,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ package org.apache.lucene.queryparser.surround.parser; /** @@ -17,7 +17,8 @@ package org.apache.lucene.queryparser.surround.parser; * operation. */ -public interface CharStream { +public +interface CharStream { /** * Returns the next character from the selected input. The method @@ -26,6 +27,7 @@ public interface CharStream { */ char readChar() throws java.io.IOException; + @Deprecated /** * Returns the column position of the character last read. * @deprecated @@ -33,6 +35,7 @@ public interface CharStream { */ int getColumn(); + @Deprecated /** * Returns the line number of the character last read. * @deprecated @@ -109,4 +112,4 @@ public interface CharStream { void Done(); } -/* JavaCC - OriginalChecksum=def574f5a8956cf01b79ebe7bce95e74 (do not edit this line) */ +/* JavaCC - OriginalChecksum=242ae59b965491e225a44534cbc73b42 (do not edit this line) */ diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/ParseException.java b/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/ParseException.java index 263a758ae9a..a163111401c 100644 --- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/ParseException.java +++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/ParseException.java @@ -1,4 +1,4 @@ -/* Generated By:JavaCC: Do not edit this line. ParseException.java Version 4.1 */ +/* Generated By:JavaCC: Do not edit this line. ParseException.java Version 5.0 */ /* JavaCCOptions:KEEP_LINE_COL=null */ package org.apache.lucene.queryparser.surround.parser; @@ -13,25 +13,25 @@ package org.apache.lucene.queryparser.surround.parser; */ public class ParseException extends Exception { + /** + * The version identifier for this Serializable class. + * Increment only if the serialized form of the + * class changes. + */ + private static final long serialVersionUID = 1L; + /** * This constructor is used by the method "generateParseException" * in the generated parser. Calling this constructor generates * a new object of this type with the fields "currentToken", - * "expectedTokenSequences", and "tokenImage" set. The boolean - * flag "specialConstructor" is also set to true to indicate that - * this constructor was used to create this object. - * This constructor calls its super class with the empty string - * to force the "toString" method of parent class "Throwable" to - * print the error message in the form: - * ParseException: + * "expectedTokenSequences", and "tokenImage" set. */ public ParseException(Token currentTokenVal, int[][] expectedTokenSequencesVal, String[] tokenImageVal ) { - super(""); - specialConstructor = true; + super(initialise(currentTokenVal, expectedTokenSequencesVal, tokenImageVal)); currentToken = currentTokenVal; expectedTokenSequences = expectedTokenSequencesVal; tokenImage = tokenImageVal; @@ -49,21 +49,13 @@ public class ParseException extends Exception { public ParseException() { super(); - specialConstructor = false; } /** Constructor with message. */ public ParseException(String message) { super(message); - specialConstructor = false; } - /** - * This variable determines which constructor was used to create - * this object and thereby affects the semantics of the - * "getMessage" method (see below). - */ - protected boolean specialConstructor; /** * This is the last token that has been consumed successfully. If @@ -87,19 +79,16 @@ public class ParseException extends Exception { public String[] tokenImage; /** - * This method has the standard behavior when this object has been - * created using the standard constructors. Otherwise, it uses - * "currentToken" and "expectedTokenSequences" to generate a parse + * It uses "currentToken" and "expectedTokenSequences" to generate a parse * error message and returns it. If this object has been created * due to a parse error, and you do not catch it (it gets thrown - * from the parser), then this method is called during the printing - * of the final stack trace, and hence the correct error message + * from the parser) the correct error message * gets displayed. */ - public String getMessage() { - if (!specialConstructor) { - return super.getMessage(); - } + private static String initialise(Token currentToken, + int[][] expectedTokenSequences, + String[] tokenImage) { + String eol = System.getProperty("line.separator", "\n"); StringBuffer expected = new StringBuffer(); int maxSize = 0; for (int i = 0; i < expectedTokenSequences.length; i++) { @@ -149,7 +138,7 @@ public class ParseException extends Exception { * when these raw version cannot be used as part of an ASCII * string literal. */ - protected String add_escapes(String str) { + static String add_escapes(String str) { StringBuffer retval = new StringBuffer(); char ch; for (int i = 0; i < str.length(); i++) { @@ -195,4 +184,4 @@ public class ParseException extends Exception { } } -/* JavaCC - OriginalChecksum=10f9a58db50336511327c43cc760ac21 (do not edit this line) */ +/* JavaCC - OriginalChecksum=bd8163f41bf2fd1bb00f025fce3dcaaf (do not edit this line) */ diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/QueryParser.java b/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/QueryParser.java index 071cc06629b..29ddce5174a 100644 --- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/QueryParser.java +++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/QueryParser.java @@ -52,7 +52,7 @@ public class QueryParser implements QueryParserConstants { /* CHECKME: These should be the same as for the tokenizer. How? */ final char truncator = '*'; final char anyChar = '?'; - final char quote = '\"'; + final char quote = '\u005c"'; final char fieldOperator = ':'; final char comma = ','; /* prefix list separator */ final char carat = '^'; /* weight operator */ @@ -644,7 +644,7 @@ public class QueryParser implements QueryParserConstants { return (jj_ntk = jj_nt.kind); } - private java.util.List jj_expentries = new java.util.ArrayList(); + private java.util.List jj_expentries = new java.util.ArrayList(); private int[] jj_expentry; private int jj_kind = -1; private int[] jj_lasttokens = new int[100]; @@ -659,7 +659,7 @@ public class QueryParser implements QueryParserConstants { for (int i = 0; i < jj_endpos; i++) { jj_expentry[i] = jj_lasttokens[i]; } - jj_entries_loop: for (java.util.Iterator it = jj_expentries.iterator(); it.hasNext();) { + jj_entries_loop: for (java.util.Iterator it = jj_expentries.iterator(); it.hasNext();) { int[] oldentry = (int[])(it.next()); if (oldentry.length == jj_expentry.length) { for (int i = 0; i < jj_expentry.length; i++) { @@ -704,7 +704,7 @@ public class QueryParser implements QueryParserConstants { jj_add_error_token(0, 0); int[][] exptokseq = new int[jj_expentries.size()][]; for (int i = 0; i < jj_expentries.size(); i++) { - exptokseq[i] = (int[])jj_expentries.get(i); + exptokseq[i] = jj_expentries.get(i); } return new ParseException(token, exptokseq, tokenImage); } diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/Token.java b/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/Token.java index 4b59fbd556d..d6736f8a01e 100644 --- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/Token.java +++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/Token.java @@ -1,12 +1,19 @@ -/* Generated By:JavaCC: Do not edit this line. Token.java Version 4.1 */ -/* JavaCCOptions:TOKEN_EXTENDS=,KEEP_LINE_COL=null */ +/* Generated By:JavaCC: Do not edit this line. Token.java Version 5.0 */ +/* JavaCCOptions:TOKEN_EXTENDS=,KEEP_LINE_COL=null,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ package org.apache.lucene.queryparser.surround.parser; /** * Describes the input token stream. */ -public class Token { +public class Token implements java.io.Serializable { + + /** + * The version identifier for this Serializable class. + * Increment only if the serialized form of the + * class changes. + */ + private static final long serialVersionUID = 1L; /** * An integer that describes the kind of this token. This numbering @@ -75,7 +82,7 @@ public class Token { */ public Token(int kind) { - this(kind, null); + this(kind, null); } /** @@ -83,8 +90,8 @@ public class Token { */ public Token(int kind, String image) { - this.kind = kind; - this.image = image; + this.kind = kind; + this.image = image; } /** @@ -92,7 +99,7 @@ public class Token { */ public String toString() { - return image; + return image; } /** @@ -109,16 +116,16 @@ public class Token { */ public static Token newToken(int ofKind, String image) { - switch(ofKind) - { - default : return new Token(ofKind, image); - } + switch(ofKind) + { + default : return new Token(ofKind, image); + } } public static Token newToken(int ofKind) { - return newToken(ofKind, null); + return newToken(ofKind, null); } } -/* JavaCC - OriginalChecksum=072a7ad2709e5810f5c35fa113fa0c8b (do not edit this line) */ +/* JavaCC - OriginalChecksum=f2df701e24da1cf2d025118ce6efdd2f (do not edit this line) */ diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/TokenMgrError.java b/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/TokenMgrError.java index d5490254b1d..c79fc217f53 100644 --- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/TokenMgrError.java +++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/TokenMgrError.java @@ -1,141 +1,147 @@ -/* Generated By:JavaCC: Do not edit this line. TokenMgrError.java Version 4.1 */ +/* Generated By:JavaCC: Do not edit this line. TokenMgrError.java Version 5.0 */ /* JavaCCOptions: */ package org.apache.lucene.queryparser.surround.parser; /** Token Manager Error. */ -@SuppressWarnings("serial") public class TokenMgrError extends Error { - /* - * Ordinals for various reasons why an Error of this type can be thrown. - */ + /** + * The version identifier for this Serializable class. + * Increment only if the serialized form of the + * class changes. + */ + private static final long serialVersionUID = 1L; - /** - * Lexical error occurred. - */ - static final int LEXICAL_ERROR = 0; + /* + * Ordinals for various reasons why an Error of this type can be thrown. + */ - /** - * An attempt was made to create a second instance of a static token manager. - */ - static final int STATIC_LEXER_ERROR = 1; + /** + * Lexical error occurred. + */ + static final int LEXICAL_ERROR = 0; - /** - * Tried to change to an invalid lexical state. - */ - static final int INVALID_LEXICAL_STATE = 2; + /** + * An attempt was made to create a second instance of a static token manager. + */ + static final int STATIC_LEXER_ERROR = 1; - /** - * Detected (and bailed out of) an infinite loop in the token manager. - */ - static final int LOOP_DETECTED = 3; + /** + * Tried to change to an invalid lexical state. + */ + static final int INVALID_LEXICAL_STATE = 2; - /** - * Indicates the reason why the exception is thrown. It will have - * one of the above 4 values. - */ - int errorCode; + /** + * Detected (and bailed out of) an infinite loop in the token manager. + */ + static final int LOOP_DETECTED = 3; - /** - * Replaces unprintable characters by their escaped (or unicode escaped) - * equivalents in the given string - */ - protected static final String addEscapes(String str) { - StringBuffer retval = new StringBuffer(); - char ch; - for (int i = 0; i < str.length(); i++) { - switch (str.charAt(i)) - { - case 0 : - continue; - case '\b': - retval.append("\\b"); - continue; - case '\t': - retval.append("\\t"); - continue; - case '\n': - retval.append("\\n"); - continue; - case '\f': - retval.append("\\f"); - continue; - case '\r': - retval.append("\\r"); - continue; - case '\"': - retval.append("\\\""); - continue; - case '\'': - retval.append("\\\'"); - continue; - case '\\': - retval.append("\\\\"); - continue; - default: - if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) { - String s = "0000" + Integer.toString(ch, 16); - retval.append("\\u" + s.substring(s.length() - 4, s.length())); - } else { - retval.append(ch); - } - continue; - } + /** + * Indicates the reason why the exception is thrown. It will have + * one of the above 4 values. + */ + int errorCode; + + /** + * Replaces unprintable characters by their escaped (or unicode escaped) + * equivalents in the given string + */ + protected static final String addEscapes(String str) { + StringBuffer retval = new StringBuffer(); + char ch; + for (int i = 0; i < str.length(); i++) { + switch (str.charAt(i)) + { + case 0 : + continue; + case '\b': + retval.append("\\b"); + continue; + case '\t': + retval.append("\\t"); + continue; + case '\n': + retval.append("\\n"); + continue; + case '\f': + retval.append("\\f"); + continue; + case '\r': + retval.append("\\r"); + continue; + case '\"': + retval.append("\\\""); + continue; + case '\'': + retval.append("\\\'"); + continue; + case '\\': + retval.append("\\\\"); + continue; + default: + if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) { + String s = "0000" + Integer.toString(ch, 16); + retval.append("\\u" + s.substring(s.length() - 4, s.length())); + } else { + retval.append(ch); + } + continue; } - return retval.toString(); - } + } + return retval.toString(); + } - /** - * Returns a detailed message for the Error when it is thrown by the - * token manager to indicate a lexical error. - * Parameters : - * EOFSeen : indicates if EOF caused the lexical error - * curLexState : lexical state in which this error occurred - * errorLine : line number when the error occurred - * errorColumn : column number when the error occurred - * errorAfter : prefix that was seen before this error occurred - * curchar : the offending character - * Note: You can customize the lexical error message by modifying this method. - */ - protected static String LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar) { - return("Lexical error at line " + - errorLine + ", column " + - errorColumn + ". Encountered: " + - (EOFSeen ? " " : ("\"" + addEscapes(String.valueOf(curChar)) + "\"") + " (" + (int)curChar + "), ") + - "after : \"" + addEscapes(errorAfter) + "\""); - } + /** + * Returns a detailed message for the Error when it is thrown by the + * token manager to indicate a lexical error. + * Parameters : + * EOFSeen : indicates if EOF caused the lexical error + * curLexState : lexical state in which this error occurred + * errorLine : line number when the error occurred + * errorColumn : column number when the error occurred + * errorAfter : prefix that was seen before this error occurred + * curchar : the offending character + * Note: You can customize the lexical error message by modifying this method. + */ + protected static String LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar) { + return("Lexical error at line " + + errorLine + ", column " + + errorColumn + ". Encountered: " + + (EOFSeen ? " " : ("\"" + addEscapes(String.valueOf(curChar)) + "\"") + " (" + (int)curChar + "), ") + + "after : \"" + addEscapes(errorAfter) + "\""); + } - /** - * You can also modify the body of this method to customize your error messages. - * For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE are not - * of end-users concern, so you can return something like : - * - * "Internal Error : Please file a bug report .... " - * - * from this method for such cases in the release version of your parser. - */ - public String getMessage() { - return super.getMessage(); - } + /** + * You can also modify the body of this method to customize your error messages. + * For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE are not + * of end-users concern, so you can return something like : + * + * "Internal Error : Please file a bug report .... " + * + * from this method for such cases in the release version of your parser. + */ + public String getMessage() { + return super.getMessage(); + } - /* - * Constructors of various flavors follow. - */ + /* + * Constructors of various flavors follow. + */ - /** No arg constructor. */ - public TokenMgrError() { - } + /** No arg constructor. */ + public TokenMgrError() { + } - /** Constructor with message and reason. */ - public TokenMgrError(String message, int reason) { - super(message); - errorCode = reason; - } + /** Constructor with message and reason. */ + public TokenMgrError(String message, int reason) { + super(message); + errorCode = reason; + } - /** Full Constructor. */ - public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar, int reason) { - this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason); - } + /** Full Constructor. */ + public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar, int reason) { + this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason); + } } -/* JavaCC - OriginalChecksum=9cfe06f5ffcaac4b72c928c9ced2f5e7 (do not edit this line) */ +/* JavaCC - OriginalChecksum=8c69a370d9a9893140562c8bb911678c (do not edit this line) */ From 0cd9b42034e6ac3413fa8b2576f9187f8ca9b9ff Mon Sep 17 00:00:00 2001 From: Dawid Weiss Date: Tue, 28 Aug 2012 21:16:51 +0000 Subject: [PATCH 45/81] LUCENE-4338: Redirect java.io.tmpdir so that each JVM gets their own tmpdir under a build/test. git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1378352 13f79535-47bb-0310-9956-ffa450edef68 --- lucene/common-build.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lucene/common-build.xml b/lucene/common-build.xml index 6f638621c54..12e0e1239f7 100644 --- a/lucene/common-build.xml +++ b/lucene/common-build.xml @@ -847,7 +847,8 @@ - + + From 44410bc9a972896212fe23918075ce388de6cfe5 Mon Sep 17 00:00:00 2001 From: Uwe Schindler Date: Tue, 28 Aug 2012 23:29:44 +0000 Subject: [PATCH 46/81] LUCENE-4336: JavaCC tasks should use IVY git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1378381 13f79535-47bb-0310-9956-ffa450edef68 --- lucene/BUILD.txt | 24 +----------- lucene/build.xml | 10 ----- lucene/common-build.xml | 76 +----------------------------------- lucene/core/build.xml | 2 - lucene/misc/build.xml | 2 - lucene/queryparser/build.xml | 60 ++++++++++++++++++---------- 6 files changed, 42 insertions(+), 132 deletions(-) diff --git a/lucene/BUILD.txt b/lucene/BUILD.txt index 658be2b61e6..196b9863751 100644 --- a/lucene/BUILD.txt +++ b/lucene/BUILD.txt @@ -66,35 +66,13 @@ system. NOTE: the ~ character represents your user account home directory. -Step 3) Install JavaCC - -Building the Lucene distribution from the source does not require the JavaCC -parser generator, but if you wish to regenerate any of the pre-generated -parser pieces, you will need to install JavaCC. Version 4.1 is tested to -work correctly. - - http://javacc.dev.java.net - -Follow the download links and download the zip file to a temporary -location on your file system. - -After JavaCC is installed, create a build.properties file -(as in step 2), and add the line - - javacc.home=/javacc - -where this points to the root directory of your javacc installation -(the directory that contains bin/lib/javacc.jar). - -Step 4) Run ant +Step 3) Run ant Assuming you have ant in your PATH and have set ANT_HOME to the location of your ant installation, typing "ant" at the shell prompt and command prompt should run ant. Ant will by default look for the "build.xml" file in your current directory, and compile Lucene. -To rebuild any of the JavaCC-based parsers, run "ant javacc". - For further information on Lucene, go to: http://lucene.apache.org/ diff --git a/lucene/build.xml b/lucene/build.xml index 8d9c2986ca9..6401a8cbef0 100644 --- a/lucene/build.xml +++ b/lucene/build.xml @@ -452,16 +452,6 @@ - - - - - - - - - - diff --git a/lucene/common-build.xml b/lucene/common-build.xml index 12e0e1239f7..7037389096b 100644 --- a/lucene/common-build.xml +++ b/lucene/common-build.xml @@ -173,7 +173,6 @@ - @@ -185,12 +184,6 @@ - - - - - - @@ -261,23 +254,6 @@ - - - - - - - - - - - One or more of the JavaCC .jj files is newer than its corresponding - .java file. Run the "javacc" target to regenerate the artifacts. - - - @@ -391,36 +367,6 @@ - - - - - - ################################################################## - JavaCC not found. - JavaCC Home: ${javacc.home} - - Please download and install JavaCC 5.0 from: - - <http://javacc.dev.java.net> - - Then, create a build.properties file either in your home - directory, or within the Lucene directory and set the javacc.home - property to the path where JavaCC is installed. For example, - if you installed JavaCC in /usr/local/java/javacc-5.0, then set the - javacc.home property to: - - javacc.home=/usr/local/java/javacc-5.0 - - If you get an error like the one below, then you have not installed - things correctly. Please check all your paths and try again. - - java.lang.NoClassDefFoundError: org.javacc.parser.Main - ################################################################## - - - - @@ -1379,31 +1325,11 @@ ${tests-output}/junit4-*.suites - per-JVM executed suites - + - - - - - - - - - - - - diff --git a/lucene/core/build.xml b/lucene/core/build.xml index ff061d72a86..48e960bde70 100644 --- a/lucene/core/build.xml +++ b/lucene/core/build.xml @@ -38,8 +38,6 @@ - - diff --git a/lucene/misc/build.xml b/lucene/misc/build.xml index 3c5e19f64df..7ed7fbcbb97 100644 --- a/lucene/misc/build.xml +++ b/lucene/misc/build.xml @@ -19,8 +19,6 @@ - - Index tools and other miscellaneous code diff --git a/lucene/queryparser/build.xml b/lucene/queryparser/build.xml index 72e6c221dc1..ec26035455a 100644 --- a/lucene/queryparser/build.xml +++ b/lucene/queryparser/build.xml @@ -39,15 +39,10 @@ - - - + + + - - - - - @@ -64,23 +59,13 @@ - - - - - - + - - - - - - + @@ -138,4 +123,39 @@ import org.apache.lucene.queryparser.flexible.core.messages.*;" byline="true"/> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From e70e2c6439f02643fe7011b14ca9ff1f9c0639b3 Mon Sep 17 00:00:00 2001 From: Uwe Schindler Date: Tue, 28 Aug 2012 23:42:59 +0000 Subject: [PATCH 47/81] LUCENE-4336: Remove useless and conflicting attribute! git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1378385 13f79535-47bb-0310-9956-ffa450edef68 --- lucene/queryparser/build.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lucene/queryparser/build.xml b/lucene/queryparser/build.xml index ec26035455a..66e9fde6581 100644 --- a/lucene/queryparser/build.xml +++ b/lucene/queryparser/build.xml @@ -128,7 +128,7 @@ import org.apache.lucene.queryparser.flexible.core.messages.*;" - + @@ -139,7 +139,6 @@ import org.apache.lucene.queryparser.flexible.core.messages.*;" - From c53886d78e93d8e2d7fc3ca2a8bb1bee89aedcee Mon Sep 17 00:00:00 2001 From: "Chris M. Hostetter" Date: Tue, 28 Aug 2012 23:50:38 +0000 Subject: [PATCH 48/81] SOLR-3757: reduce confusion if people go to enable master/slave replication by only having a single /replication handler in the example config git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1378387 13f79535-47bb-0310-9956-ffa450edef68 --- .../solr/collection1/conf/solrconfig.xml | 31 ++++++++++--------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/solr/example/solr/collection1/conf/solrconfig.xml b/solr/example/solr/collection1/conf/solrconfig.xml index bbdf5762cef..a5d1ecb74e4 100755 --- a/solr/example/solr/collection1/conf/solrconfig.xml +++ b/solr/example/solr/collection1/conf/solrconfig.xml @@ -1104,30 +1104,33 @@ http://wiki.apache.org/solr/SolrReplication - In the example below, remove the section if - this is just a slave and remove the section - if this is just a master. + It is also neccessary for SolrCloud to function (in Cloud mode, the + replication handler is used to bulk transfer segments when nodes + are added or need to recover). + + https://wiki.apache.org/solr/SolrCloud/ --> - + + - - - - + From 223b127eae09fb63eb5ff527124cfffa0e10866d Mon Sep 17 00:00:00 2001 From: Uwe Schindler Date: Wed, 29 Aug 2012 00:16:55 +0000 Subject: [PATCH 50/81] LUCENE-4336: Finally I found a solution with IVY patterns. Sorry for repeated commits. git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1378396 13f79535-47bb-0310-9956-ffa450edef68 --- lucene/queryparser/build.xml | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/lucene/queryparser/build.xml b/lucene/queryparser/build.xml index 66e9fde6581..d91b34f8b98 100644 --- a/lucene/queryparser/build.xml +++ b/lucene/queryparser/build.xml @@ -123,16 +123,11 @@ import org.apache.lucene.queryparser.flexible.core.messages.*;" byline="true"/> - - - - - - - - - + + + From c8aa9c1f42642188807f65b74c5f95afa78bab72 Mon Sep 17 00:00:00 2001 From: Steven Rowe Date: Wed, 29 Aug 2012 06:26:02 +0000 Subject: [PATCH 51/81] SOLR-2747: Added 'ant changes-to-html' to Solr. git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1378452 13f79535-47bb-0310-9956-ffa450edef68 --- lucene/CHANGES.txt | 8 +- lucene/build.xml | 18 -- lucene/common-build.xml | 18 ++ lucene/site/changes/changes2html.pl | 388 +++++++++++++++++++--------- solr/CHANGES.txt | 150 +++++------ solr/build.xml | 9 +- solr/common-build.xml | 2 + 7 files changed, 382 insertions(+), 211 deletions(-) diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt index 267a272674d..c856b7b143c 100644 --- a/lucene/CHANGES.txt +++ b/lucene/CHANGES.txt @@ -7553,7 +7553,7 @@ Infrastructure 11. Fixed bugs in GermanAnalyzer (gschwarz) -1.2 RC2: +1.2 RC2 - added sources to distribution - removed broken build scripts and libraries from distribution - SegmentsReader: fixed potential race condition @@ -7568,7 +7568,8 @@ Infrastructure - JDK 1.1 compatibility fix: disabled lock files for JDK 1.1, since they rely on a feature added in JDK 1.2. -1.2 RC1 (first Apache release): +1.2 RC1 + - first Apache release - packages renamed from com.lucene to org.apache.lucene - license switched from LGPL to Apache - ant-only build -- no more makefiles @@ -7579,7 +7580,8 @@ Infrastructure - Analyzers can choose tokenizer based on field name - misc bug fixes. -1.01b (last Sourceforge release) +1.01b + . last Sourceforge release . a few bug fixes . new Query Parser . new prefix query (search for "foo*" matches "food") diff --git a/lucene/build.xml b/lucene/build.xml index 6401a8cbef0..3bf20953157 100644 --- a/lucene/build.xml +++ b/lucene/build.xml @@ -470,24 +470,6 @@ - - - - - - - - - - - - - - - diff --git a/lucene/common-build.xml b/lucene/common-build.xml index 7037389096b..91401d8a778 100644 --- a/lucene/common-build.xml +++ b/lucene/common-build.xml @@ -1681,4 +1681,22 @@ ${tests-output}/junit4-*.suites - per-JVM executed suites + + + + + + + + + + + + + + + diff --git a/lucene/site/changes/changes2html.pl b/lucene/site/changes/changes2html.pl index 2ade718d2f1..98e8d8f09ba 100755 --- a/lucene/site/changes/changes2html.pl +++ b/lucene/site/changes/changes2html.pl @@ -25,13 +25,12 @@ use strict; use warnings; # JIRA REST API documentation: -my $project_info_url = 'https://issues.apache.org/jira/rest/api/2/project/LUCENE'; +my $project_info_url = 'https://issues.apache.org/jira/rest/api/2/project'; my $jira_url_prefix = 'http://issues.apache.org/jira/browse/'; my $bugzilla_url_prefix = 'http://issues.apache.org/bugzilla/show_bug.cgi?id='; -my %release_dates = &setup_release_dates; my $month_regex = &setup_month_regex; my %month_nums = &setup_month_nums; -my %bugzilla_jira_map = &setup_bugzilla_jira_map; +my %lucene_bugzilla_jira_map = &setup_lucene_bugzilla_jira_map; my $title = undef; my $release = undef; my $reldate = undef; @@ -44,20 +43,35 @@ my @releases = (); my @lines = <>; # Get all input at once +my $product = ''; +for my $line (@lines) { + ($product) = $line =~ /(Solr|Lucene)/i; + if ($product) { + $product = uc($product); + last; + } +} +my %release_dates = &setup_release_dates; +my $in_major_component_versions_section = 0; + + # # Parse input and build hierarchical release structure in @releases # for (my $line_num = 0 ; $line_num <= $#lines ; ++$line_num) { $_ = $lines[$line_num]; - next unless (/\S/); # Skip blank lines + unless (/\S/) { # Skip blank lines + $in_major_component_versions_section = 0; + next; + } next if (/^\s*\$Id(?::.*)?\$/); # Skip $Id$ lines + next if (/^\s{0,4}-{5,}\s*$/); # Skip Solr's section underlines unless ($title) { if (/\S/) { - s/^\s+//; # Trim leading whitespace + s/^[^\p{N}\p{L}]*//; # Trim leading non-alphanum chars, including BOM chars, if any s/\s+$//; # Trim trailing whitespace } - s/^[^Ll]*//; # Trim leading BOM characters if exists $title = $_; next; } @@ -71,8 +85,11 @@ for (my $line_num = 0 ; $line_num <= $#lines ; ++$line_num) { ($reldate, $relinfo) = get_release_date($release, $relinfo); $sections = []; push @releases, [ $release, $reldate, $relinfo, $sections ]; - ($first_relid = lc($release)) =~ s/\s+/_/g if ($#releases == 0); - ($second_relid = lc($release)) =~ s/\s+/_/g if ($#releases == 1); + ($first_relid = lc($release)) =~ s/\s+/_/g + if ($#releases == 0 or ($#releases == 1 and not ($releases[0][0]))); + ($second_relid = lc($release)) =~ s/\s+/_/g + if ( ($#releases == 1 and $releases[0][0]) + or ($#releases == 2 and not $releases[0][0])); $items = undef; next; } @@ -90,18 +107,43 @@ for (my $line_num = 0 ; $line_num <= $#lines ; ++$line_num) { next; } + if (m!^20\d\d[-/]\d{1,2}[-/]\d{1,2}!) { # Collect dated postscripts + my $item = $_; + my $line = ''; + while ($line_num < $#lines and ($line = $lines[++$line_num]) =~ /\S/) { + $line =~ s/^\s+//; # Trim leading whitespace + $line =~ s/\s+$//; # Trim trailing whitespace + $item .= "$line\n"; + } + push @releases, [ $item, '', '', [] ]; + next; + } + # Section heading: no leading whitespace, initial word capitalized, # five words or less, and no trailing punctuation - if (/^([A-Z]\S*(?:\s+\S+){0,4})(?"; print "Older Releases"; print "\n"; print "
            \n" } - + ($release, $reldate, $relinfo, $sections) = @$rel; # The first section heading is undefined for the older sectionless releases my $has_release_sections = has_release_sections($sections); - (my $relid = lc($release)) =~ s/\s+/_/g; - print "<$header>"; - print "Release " unless ($release =~ /^trunk$/i); - print "$release $relinfo"; - print " [$reldate]" unless ($reldate eq 'unknown'); - print "\n"; - print "
              \n" - if ($has_release_sections); + my $relid = ''; + if ($release) { # Pre-release sections have no release ID + ++$relcnt; + ($relid = lc($release)) =~ s/\s+/_/g; + print "<$header>"; + print "" + unless ($release =~ /^20\d\d/); + print "Release " unless ($release =~ /^trunk$|^20\d\d/i); + print "$release $relinfo"; + print " [$reldate]" unless ($reldate eq 'unknown' or not $reldate); + print "" unless ($release =~ /^20\d\d/); + print "\n"; + print "
                \n" + if ($has_release_sections); + } for my $section (@$sections) { ($heading, $items) = @$section; (my $sectid = lc($heading)) =~ s/\s+/_/g; my $numItemsStr = $#{$items} > 0 ? "($#{$items})" : "(none)"; - print "
              • ", - ($heading || ''), "   $numItemsStr\n" - if ($has_release_sections and $heading); + my $list_item = "li"; + if ($release) { + if ($heading and $heading eq 'Detailed Change List') { + print " <$subheader>$heading\n"; + next; + } elsif ($has_release_sections and $heading) { + print "
              • ", + ($heading || ''), "   $numItemsStr\n" + } + } else { + print "

                $heading

                \n" if ($heading); + $list_item = "p"; + } my $list_type = $items->[0] || ''; my $list = ($has_release_sections || $list_type eq 'numbered' ? 'ol' : 'ul'); my $listid = $sectid ? "$relid.$sectid" : $relid; print " <$list id=\"$listid.list\">\n" - unless ($has_release_sections and not $heading); + unless (not $release or ($has_release_sections and not $heading)); for my $itemnum (1..$#{$items}) { my $item = $items->[$itemnum]; - $item =~ s:&:&:g; # Escape HTML metachars, but leave - $item =~ s:<(?!/?code>):<:gi; # tags intact and add
                -      $item =~ s:(?:>:gi;      #   wrappers for non-inline sections
                -      $item =~ s{((?:^|.*\n)\s*)(?!.+)(.+)(?![ \t]*\S)}
                +      $item =~ s:&:&:g;                       # Escape HTML metachars, but leave  tags
                +      $item =~ s~<(?!/?code>(?:[^,]|$))~<~gi;  #   intact - unless followed by a comma - and
                +      $item =~ s:(?:>:gi;              #   add 
                 wrappers for non-inline sections
                +      $item =~ s{((?:^|.*\n)\s*)(?!,)(?!.+)(.+)(?![ \t]*\S)}
                                 { 
                                   my $prefix = $1; 
                                   my $code = $2;
                @@ -409,62 +475,67 @@ for my $rel (@releases) {
                                   "$prefix
                $code
                " }gise; - # Put attributions on their own lines. - # Check for trailing parenthesized attribution with no following period. - # Exclude things like "(see #3 above)" and "(use the bug number instead of xxxx)" - unless ($item =~ s:\s*(\((?!see #|use the bug number)[^()"]+?\))\s*$:\n
                $1:) { - # If attribution is not found, then look for attribution with a - # trailing period, but try not to include trailing parenthesized things - # that are not attributions. - # - # Rule of thumb: if a trailing parenthesized expression with a following - # period does not contain "LUCENE-XXX", and it either has three or - # fewer words or it includes the word "via" or the phrase "updates from", - # then it is considered to be an attribution. - - $item =~ s{(\s*(\((?!see \#|use the bug number)[^()"]+?\))) - ((?:\.|(?i:\.?\s*Issue\s+\d{3,}|LUCENE-\d+)\.?)\s*)$} - { - my $subst = $1; # default: no change - my $parenthetical = $2; - my $trailing_period_and_or_issue = $3; - if ($parenthetical !~ /LUCENE-\d+/) { - my ($no_parens) = $parenthetical =~ /^\((.*)\)$/s; - my @words = grep {/\S/} split /\s+/, $no_parens; - if ($no_parens =~ /\b(?:via|updates\s+from)\b/i || scalar(@words) <= 3) { - $subst = "\n
                $parenthetical"; - } - } - $subst . $trailing_period_and_or_issue; - }ex; - } + $item = markup_trailing_attribution($item) unless ($item =~ /\n[ ]*-/); $item =~ s{(.*?)(
                .*?
                )|(.*)} { my $uncode = undef; - if (defined($2)) { - $uncode = $1 || ''; + my ($one,$two,$three) = ($1,$2,$3); + if (defined($two)) { + $uncode = $one || ''; + $uncode =~ s{^(.*?)(?=\n[ ]*-)} + { + my $prefix = $1; + my ($primary,$additional_work) = $prefix =~ /^(.*?)((?:\s*Additional\s+Work:\s*)?)$/si; + my $result = markup_trailing_attribution($primary); + $result .= "
                \n$additional_work
                " if ($additional_work); + $result; + }se; $uncode =~ s{((?<=\n)[ ]*-.*\n(?:.*\n)*)} { my $bulleted_list = $1; - $bulleted_list - =~ s{(?:(?<=\n)|\A)[ ]*-[ ]*(.*(?:\n|\z)(?:[ ]+[^ -].*(?:\n|\z))*)} - {
              • \n$1
              • \n}g; $bulleted_list - =~ s!(\n)!
                  \n$1
                \n!s; + =~ s{(?:(?<=\n)|\A)[ ]*-[ ]*(.*(?:\n|\z)(?:[ ]+[^ -].*(?:\n|\z))*)} + { + qq!
              • \n! + . markup_trailing_attribution($1) + . "
              • \n" + }ge; + $bulleted_list + =~ s{(\n)(.*)} + { + qq!
                  \n$1
                \n! + . markup_trailing_attribution($2 || '') + }se; $bulleted_list; }ge; - "$uncode$2"; + "$uncode$two"; } else { - $uncode = $3 || ''; + $uncode = $three || ''; + $uncode =~ s{^(.*?)(?=\n[ ]*-)} + { + my $prefix = $1; + my ($primary,$additional_work) = $prefix =~ /^(.*?)((?:\s*Additional\s+Work:\s*)?)$/si; + my $result = markup_trailing_attribution($primary); + $result .= "
                \n$additional_work
                " if ($additional_work); + $result; + }se; $uncode =~ s{((?<=\n)[ ]*-.*\n(?:.*\n)*)} { my $bulleted_list = $1; - $bulleted_list - =~ s{(?:(?<=\n)|\A)[ ]*-[ ]*(.*(?:\n|\z)(?:[ ]+[^ -].*(?:\n|\z))*)} - {
              • \n$1
              • \n}g; $bulleted_list - =~ s!(\n)!
                  \n$1
                \n!s; + =~ s{(?:(?<=\n)|\A)[ ]*-[ ]*(.*(?:\n|\z)(?:[ ]+[^ -].*(?:\n|\z))*)} + { + qq!
              • \n! + . markup_trailing_attribution($1) + . "
              • \n" + }ge; + $bulleted_list + =~ s{(\n)(.*)} + { + qq!
                  \n$1
                \n! + . markup_trailing_attribution($2 || '') + }se; $bulleted_list; }ge; $uncode; @@ -480,49 +551,119 @@ for my $rel (@releases) { # Link Lucene XXX, SOLR XXX and INFRA XXX to JIRA $item =~ s{((LUCENE|SOLR|INFRA)\s+(\d{3,}))} {$1}gi; - # Find single Bugzilla issues - $item =~ s~((?i:bug|patch|issue)\s*\#?\s*(\d+)) - ~ my $issue = $1; - my $jira_issue_num = $bugzilla_jira_map{$2}; # Link to JIRA copies - $issue = qq!! - . qq!$issue [LUCENE-$jira_issue_num]! - if (defined($jira_issue_num)); - $issue; - ~gex; - # Find multiple Bugzilla issues - $item =~ s~(?<=(?i:bugs))(\s*)(\d+)(\s*(?i:\&|and)\s*)(\d+) - ~ my $leading_whitespace = $1; - my $issue_num_1 = $2; - my $interlude = $3; - my $issue_num_2 = $4; - # Link to JIRA copies - my $jira_issue_1 = $bugzilla_jira_map{$issue_num_1}; - my $issue1 - = qq!! - . qq!$issue_num_1 [LUCENE-$jira_issue_1]! - if (defined($jira_issue_1)); - my $jira_issue_2 = $bugzilla_jira_map{$issue_num_2}; - my $issue2 - = qq!! - . qq!$issue_num_2 [LUCENE-$jira_issue_2]! - if (defined($jira_issue_2)); - $leading_whitespace . $issue1 . $interlude . $issue2; - ~gex; + if ($product eq 'LUCENE') { + # Find single Bugzilla issues + $item =~ s~((?i:bug|patch|issue)\s*\#?\s*(\d+)) + ~ my $issue = $1; + my $jira_issue_num = $lucene_bugzilla_jira_map{$2}; # Link to JIRA copies + $issue = qq!! + . qq!$issue [LUCENE-$jira_issue_num]! + if (defined($jira_issue_num)); + $issue; + ~gex; + # Find multiple Bugzilla issues + $item =~ s~(?<=(?i:bugs))(\s*)(\d+)(\s*(?i:\&|and)\s*)(\d+) + ~ my $leading_whitespace = $1; + my $issue_num_1 = $2; + my $interlude = $3; + my $issue_num_2 = $4; + # Link to JIRA copies + my $jira_issue_1 = $lucene_bugzilla_jira_map{$issue_num_1}; + my $issue1 + = qq!! + . qq!$issue_num_1 [LUCENE-$jira_issue_1]! + if (defined($jira_issue_1)); + my $jira_issue_2 = $lucene_bugzilla_jira_map{$issue_num_2}; + my $issue2 + = qq!! + . qq!$issue_num_2 [LUCENE-$jira_issue_2]! + if (defined($jira_issue_2)); + $leading_whitespace . $issue1 . $interlude . $issue2; + ~gex; + } # Linkify URLs, except Bugzilla links, which don't work anymore - $item =~ s~(?])(https?://(?!(?:nagoya|issues)\.apache\.org/bugzilla)\S+)~$1~g; + $item =~ s~(?])(https?://(?!(?:nagoya|issues)\.apache\.org/bugzilla)[^\s\)]+)~$1~g; - print "
              • $item
              • \n"; + $item =~ s~
              \s+

              \s+~

            ~; + + print " <$list_item>$item\n"; } - print " \n" unless ($has_release_sections and not $heading); - print " \n" if ($has_release_sections); + print " \n" unless (not $release or ($has_release_sections and not $heading)); + print " \n" if ($release and $has_release_sections); } - print "
          \n" if ($has_release_sections); + print "
        \n" if ($release and $has_release_sections); } print "
      \n" if ($relcnt > 3); print "\n\n"; +# Subroutine: markup_trailing_attribution +# +# Takes one parameter: +# +# - text possibly containing a trailing parenthesized attribution +# +# Returns one scalar: +# +# - text with the the trailing attribution, if any, marked up with the color green +# +sub markup_trailing_attribution { + my $item = shift; + + # Put attributions on their own lines. + # Check for trailing parenthesized attribution with no following period. + # Exclude things like "(see #3 above)" and "(use the bug number instead of xxxx)" + unless ($item =~ s{\s*(\((?![Ss]ee ) + (?!spans\b) + (?!mainly\ ) + (?!LUCENE-\d+\)) + (?!and\ ) + (?!backported\ ) + (?!in\ ) + (?!inverse\ ) + (?![Tt]he\ ) + (?!use\ the\ bug\ number) + [^()"]+?\))\s*$} + {\n
      $1}x) { + # If attribution is not found, then look for attribution with a + # trailing period, but try not to include trailing parenthesized things + # that are not attributions. + # + # Rule of thumb: if a trailing parenthesized expression with a following + # period does not contain "LUCENE-XXX", and it either has three or + # fewer words or it includes the word "via" or the phrase "updates from", + # then it is considered to be an attribution. + + $item =~ s{(\s*(\((?![Ss]ee\ ) + (?!spans\b) + (?!mainly\ ) + (?!LUCENE-\d+\)) + (?!and\ ) + (?!backported\ ) + (?!in\ ) + (?!inverse\ ) + (?![Tt]he\ ) + (?!use\ the\ bug\ number) + [^()"]+?\))) + ((?:\.|(?i:\.?\s*Issue\s+\d{3,}|LUCENE-\d+)\.?)\s*)$} + { + my $subst = $1; # default: no change + my $parenthetical = $2; + my $trailing_period_and_or_issue = $3; + if ($parenthetical !~ /LUCENE-\d+/) { + my ($no_parens) = $parenthetical =~ /^\((.*)\)$/s; + my @words = grep {/\S/} split /\s+/, $no_parens; + if ($no_parens =~ /\b(?:via|updates\s+from)\b/i || scalar(@words) <= 4) { + $subst = "\n
      $parenthetical"; + } + } + $subst . $trailing_period_and_or_issue; + }ex; + } + return $item; +} + # # Subroutine: has_release_sections # @@ -636,6 +777,8 @@ sub get_release_date { # Handle '1.2 RC6', which should be '1.2 final' $release = '1.2 final' if ($release eq '1.2 RC6'); + $release =~ s/\.0\.0/\.0/; + $reldate = ( exists($release_dates{$release}) ? $release_dates{$release} : 'unknown'); @@ -658,7 +801,9 @@ sub get_release_date { # as well as those named "final" are included below. # sub setup_release_dates { - my %release_dates + my %release_dates; + if (uc($product) eq 'LUCENE') { + %release_dates = ( '0.01' => '2000-03-30', '0.04' => '2000-04-19', '1.0' => '2000-10-04', '1.01b' => '2001-06-02', '1.2 RC1' => '2001-10-02', '1.2 RC2' => '2001-10-19', @@ -677,9 +822,11 @@ sub setup_release_dates { '2.4.0' => '2008-10-06', '2.4.1' => '2009-03-09', '2.9.0' => '2009-09-23', '2.9.1' => '2009-11-06', '3.0.0' => '2009-11-25'); + } + + print STDERR "Retrieving $project_info_url/$product ...\n"; + my $project_info_json = get_url_contents("$project_info_url/$product"); - my $project_info_json = get_url_contents($project_info_url); - my $project_info = json2perl($project_info_json); for my $version (@{$project_info->{versions}}) { if ($version->{releaseDate}) { @@ -750,12 +897,12 @@ sub setup_month_nums { # -# setup_bugzilla_jira_map +# setup_lucene_bugzilla_jira_map # # Returns a list of alternating Bugzilla bug IDs and LUCENE-* JIRA issue -# numbers, for use in populating the %bugzilla_jira_map hash +# numbers, for use in populating the %lucene_bugzilla_jira_map hash # -sub setup_bugzilla_jira_map { +sub setup_lucene_bugzilla_jira_map { return ( 4049 => 1, 4102 => 2, 4105 => 3, 4254 => 4, 4555 => 5, 4568 => 6, 4754 => 7, 5313 => 8, 5456 => 9, 6078 => 10, 6091 => 11, 6140 => 12, @@ -879,7 +1026,14 @@ sub json2perl { my $json_string = shift; $json_string =~ s/(:\s*)(true|false)/$1"$2"/g; $json_string =~ s/":/",/g; - return eval $json_string; + $json_string =~ s/\'/\\'/g; + $json_string =~ s/\"/\'/g; + my $project_info = eval $json_string; + die "ERROR eval'ing munged JSON string ||$json_string||: $@\n" + if ($@); + die "ERROR empty value after eval'ing JSON string ||$json_string||\n" + unless $project_info; + return $project_info; } 1; diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index cda122295ef..572ae2e774f 100644 --- a/solr/CHANGES.txt +++ b/solr/CHANGES.txt @@ -103,6 +103,10 @@ Other Changes * SOLR-3707: Upgrade Solr to Tika 1.2 (janhoy) +* SOLR-2747: Updated changes2html.pl to handle Solr's CHANGES.txt; added + target 'changes-to-html' to solr/build.xml. + (Steve Rowe, Robert Muir) + ================== 4.0.0-BETA =================== @@ -237,7 +241,7 @@ Bug Fixes * SOLR-3660: Velocity: Link to admin page broken (janhoy) -* SOLR-3658: Adding thousands of docs with one UpdateProcessorChain instance can briefly create +* SOLR-3658: Adding thousands of docs with one UpdateProcessorChain instance can briefly create spikes of threads in the thousands. (yonik, Mark Miller) * SOLR-3656: A core reload now always uses the same dataDir. (Mark Miller, yonik) @@ -311,6 +315,7 @@ Other Changes Also, the configuration itself can be passed using the "dataConfig" parameter rather than using a file (this previously worked in debug mode only). When configuration errors are encountered, the error message is returned in XML format. (James Dyer) + * SOLR-3439: Make SolrCell easier to use out of the box. Also improves "/browse" to display rich-text documents correctly, along with facets for author and content_type. With the new "content" field, highlighting of body is supported. See also SOLR-3672 for @@ -424,26 +429,26 @@ New Features built-in load balancing, and distributed indexing. (Jamie Johnson, Sami Siren, Ted Dunning, yonik, Mark Miller) Additional Work: - SOLR-2324: SolrCloud solr.xml parameters are not persisted by CoreContainer. - (Massimo Schiavon, Mark Miller) - SOLR-2287: Allow users to query by multiple, compatible collections with SolrCloud. - (Soheb Mahmood, Alex Cowell, Mark Miller) - SOLR-2622: ShowFileRequestHandler does not work in SolrCloud mode. - (Stefan Matheis, Mark Miller) - SOLR-3108: Error in SolrCloud's replica lookup code when replica's are hosted in same Solr instance. - (Bruno Dumon, Sami Siren, Mark Miller) - SOLR-3080: Remove shard info from zookeeper when SolrCore is explicitly unloaded. - (yonik, Mark Miller, siren) - SOLR-3437: Recovery issues a spurious commit to the cluster. (Trym R. Møller via Mark Miller) - SOLR-2822: Skip update processors already run on other nodes (hossman) + - SOLR-2324: SolrCloud solr.xml parameters are not persisted by CoreContainer. + (Massimo Schiavon, Mark Miller) + - SOLR-2287: Allow users to query by multiple, compatible collections with SolrCloud. + (Soheb Mahmood, Alex Cowell, Mark Miller) + - SOLR-2622: ShowFileRequestHandler does not work in SolrCloud mode. + (Stefan Matheis, Mark Miller) + - SOLR-3108: Error in SolrCloud's replica lookup code when replica's are hosted in same Solr instance. + (Bruno Dumon, Sami Siren, Mark Miller) + - SOLR-3080: Remove shard info from zookeeper when SolrCore is explicitly unloaded. + (yonik, Mark Miller, siren) + - SOLR-3437: Recovery issues a spurious commit to the cluster. (Trym R. Møller via Mark Miller) + - SOLR-2822: Skip update processors already run on other nodes (hossman) * SOLR-1566: Transforming documents in the ResponseWriters. This will allow for more complex results in responses and open the door for function queries as results. - (ryan with patches from grant, noble, cmale, yonik, Jan Høydahl, + (ryan with patches from grant, noble, cmale, yonik, Jan Høydahl, Arul Kalaipandian, Luca Cavanna, hossman) - SOLR-2037: Thanks to SOLR-1566, documents boosted by the QueryElevationComponent - can be marked as boosted. (gsingers, ryan, yonik) + - SOLR-2037: Thanks to SOLR-1566, documents boosted by the QueryElevationComponent + can be marked as boosted. (gsingers, ryan, yonik) * SOLR-2396: Add CollationField, which is much more efficient than the Solr 3.x CollationKeyFilterFactory, and also supports @@ -459,10 +464,10 @@ New Features (Jan Høydahl via yonik) * SOLR-2272: Pseudo-join queries / filters. Examples: - To restrict to the set of parents with at least one blue-eyed child: - fq={!join from=parent to=name}eyes:blue - To restrict to the set of children with at least one blue-eyed parent: - fq={!join from=name to=parent}eyes:blue + - To restrict to the set of parents with at least one blue-eyed child: + fq={!join from=parent to=name}eyes:blue + - To restrict to the set of children with at least one blue-eyed parent: + fq={!join from=name to=parent}eyes:blue (yonik) * SOLR-1942: Added the ability to select postings format per fieldType in schema.xml @@ -509,12 +514,12 @@ New Features * SOLR-2703: Added support for Lucene's "surround" query parser. (Simon Rosenthal, ehatcher) * SOLR-2754: Added factories for several ranking algorithms: - BM25SimilarityFactory: Okapi BM25 - DFRSimilarityFactory: Divergence from Randomness models - IBSimilarityFactory: Information-based models - LMDirichletSimilarity: LM with Dirichlet smoothing - LMJelinekMercerSimilarity: LM with Jelinek-Mercer smoothing - (David Mark Nemeskey, Robert Muir) + - BM25SimilarityFactory: Okapi BM25 + - DFRSimilarityFactory: Divergence from Randomness models + - IBSimilarityFactory: Information-based models + - LMDirichletSimilarity: LM with Dirichlet smoothing + - LMJelinekMercerSimilarity: LM with Jelinek-Mercer smoothing + (David Mark Nemeskey, Robert Muir) * SOLR-2134 Trie* fields should support sortMissingLast=true, and deprecate Sortable* Field Types (Ryan McKinley, Mike McCandless, Uwe Schindler, Erick Erickson) @@ -537,18 +542,18 @@ New Features * SOLR-2802: New FieldMutatingUpdateProcessor and Factory to simplify the development of UpdateProcessors that modify field values of documents as they are indexed. Also includes several useful new implementations: - RemoveBlankFieldUpdateProcessorFactory - TrimFieldUpdateProcessorFactory - HTMLStripFieldUpdateProcessorFactory - RegexReplaceProcessorFactory - FieldLengthUpdateProcessorFactory - ConcatFieldUpdateProcessorFactory - FirstFieldValueUpdateProcessorFactory - LastFieldValueUpdateProcessorFactory - MinFieldValueUpdateProcessorFactory - MaxFieldValueUpdateProcessorFactory - TruncateFieldUpdateProcessorFactory - IgnoreFieldUpdateProcessorFactory + - RemoveBlankFieldUpdateProcessorFactory + - TrimFieldUpdateProcessorFactory + - HTMLStripFieldUpdateProcessorFactory + - RegexReplaceProcessorFactory + - FieldLengthUpdateProcessorFactory + - ConcatFieldUpdateProcessorFactory + - FirstFieldValueUpdateProcessorFactory + - LastFieldValueUpdateProcessorFactory + - MinFieldValueUpdateProcessorFactory + - MaxFieldValueUpdateProcessorFactory + - TruncateFieldUpdateProcessorFactory + - IgnoreFieldUpdateProcessorFactory (hossman, janhoy) * SOLR-3120: Optional post filtering for spatial queries bbox and geofilt @@ -562,8 +567,8 @@ New Features * SOLR-2898: Support grouped faceting. (Martijn van Groningen) Additional Work: - SOLR-3406: Extended grouped faceting support to facet.query and facet.range parameters. - (David Boychuck, Martijn van Groningen) + - SOLR-3406: Extended grouped faceting support to facet.query and facet.range parameters. + (David Boychuck, Martijn van Groningen) * SOLR-2949: QueryElevationComponent is now supported with distributed search. (Mark Miller, yonik) @@ -646,9 +651,9 @@ New Features * SOLR-3508: Simplify JSON update format for deletes as well as allow version specification for optimistic locking. Examples: - {"delete":"myid"} - {"delete":["id1","id2","id3"]} - {"delete":{"id":"myid", "_version_":123456789}} + - {"delete":"myid"} + - {"delete":["id1","id2","id3"]} + - {"delete":{"id":"myid", "_version_":123456789}} (yonik) * SOLR-3211: Allow parameter overrides in conjunction with "spellcheck.maxCollationTries". @@ -692,9 +697,9 @@ Optimizations works with SolrCore to provide faster 'soft' commits, and has an improved API that requires less instanceof special casing. (Mark Miller, Robert Muir) Additional Work: - SOLR-2697: commit and autocommit operations don't reset - DirectUpdateHandler2.numDocsPending stats attribute. - (Alexey Serba, Mark Miller) + - SOLR-2697: commit and autocommit operations don't reset + DirectUpdateHandler2.numDocsPending stats attribute. + (Alexey Serba, Mark Miller) * SOLR-2950: The QueryElevationComponent now avoids using the FieldCache and looking up every document id (gsingers, yonik) @@ -739,8 +744,8 @@ Bug Fixes * SOLR-2193, SOLR-2565, SOLR-2651: SolrCores now properly share IndexWriters across SolrCore reloads. (Mark Miller, Robert Muir) Additional Work: - SOLR-2705: On reload, IndexWriterProvider holds onto the initial SolrCore it was created with. - (Yury Kats, Mark Miller) + - SOLR-2705: On reload, IndexWriterProvider holds onto the initial SolrCore it was created with. + (Yury Kats, Mark Miller) * SOLR-2682: Remove addException() in SimpleFacet. FacetComponent no longer catches and embeds exceptions occurred during facet processing, it throws HTTP 400 or 500 exceptions instead. (koji) @@ -919,7 +924,7 @@ Other Changes * SOLR-2607: Removed deprecated client/ruby directory, which included solr-ruby and flare. (ehatcher) -* Solr-3032: logOnce from SolrException logOnce and all the supporting +* SOLR-3032: logOnce from SolrException logOnce and all the supporting structure is gone. abortOnConfugrationError is also gone as it is no longer referenced. Errors should be caught and logged at the top-most level or logged and NOT propagated up the chain. (Erick Erickson) @@ -999,7 +1004,7 @@ More information about this release, including any errata related to the release notes, upgrade instructions, or other changes may be found online at: https://wiki.apache.org/solr/Solr3.6.1 -Bug Fixes: +Bug Fixes * LUCENE-3969: Throw IAE on bad arguments that could cause confusing errors in PatternTokenizer. CommonGrams populates PositionLengthAttribute correctly. @@ -1174,7 +1179,7 @@ New Features * SOLR-2001: The query component will substitute an empty query that matches no documents if the query parser returns null. This also prevents an exception from being thrown by the default parser if "q" is missing. (yonik) - SOLR-435: if q is "" then it's also acceptable. (dsmiley, hoss) + - SOLR-435: if q is "" then it's also acceptable. (dsmiley, hoss) * SOLR-2919: Added parametric tailoring options to ICUCollationKeyFilterFactory. These can be used to customize range query/sort behavior, for example to @@ -1557,7 +1562,7 @@ Bug Fixes * SOLR-2875: Fix the incorrect url in DIH example tika-data-config.xml (Shinichiro Abe via koji) - Other Changes +Other Changes ---------------------- * SOLR-2750: Make both "update.chain" and the deprecated "update.param" work @@ -1767,7 +1772,7 @@ Bug Fixes * SOLR-2668: DIH multithreaded mode does not rollback on errors from EntityProcessor (Frank Wesemann, shalin) - Other Changes +Other Changes ---------------------- * SOLR-2629: Eliminate deprecation warnings in some JSPs. @@ -2913,10 +2918,10 @@ Use of the "charset" option when configuring the following Analysis Factories has been deprecated and will cause a warning to be logged. In future versions of Solr attempting to use this option will cause an error. See SOLR-1410 for more information. - * GreekLowerCaseFilterFactory - * RussianStemFilterFactory - * RussianLowerCaseFilterFactory - * RussianLetterTokenizerFactory + - GreekLowerCaseFilterFactory + - RussianStemFilterFactory + - RussianLowerCaseFilterFactory + - RussianLetterTokenizerFactory DIH: Evaluator API has been changed in a non back-compatible way. Users who have developed custom Evaluators will need to change their code according to @@ -2993,7 +2998,7 @@ New Features 7. SOLR-680: Add StatsComponent. This gets simple statistics on matched numeric fields, including: min, max, mean, median, stddev. (koji, ryan) - 7.1 SOLR-1380: Added support for multi-valued fields (Harish Agarwal via gsingers) + - SOLR-1380: Added support for multi-valued fields (Harish Agarwal via gsingers) 8. SOLR-561: Added Replication implemented in Java as a request handler. Supports index replication as well as configuration replication and exposes detailed statistics and progress information @@ -3514,11 +3519,12 @@ Bug Fixes 28. SOLR-1008: Fix stats.jsp XML encoding for item entries with ampersands in their names. (ehatcher) 29. SOLR-976: deleteByQuery is ignored when deleteById is placed prior to deleteByQuery in a . - Now both delete by id and delete by query can be specified at the same time as follows. (koji) + Now both delete by id and delete by query can be specified at the same time as follows. 0599106000 office:Bridgewateroffice:Osaka + (koji) 30. SOLR-1016: HTTP 503 error changes 500 in SolrCore (koji) @@ -3777,7 +3783,7 @@ Other Changes 8. SOLR-875: Upgraded to Lucene 2.9-dev (r723985) and consolidated the BitSet implementations (Michael Busch, gsingers) 9. SOLR-819: Upgraded to Lucene 2.9-dev (r724059) to get access to Arabic public constructors (gsingers) - and + 10. SOLR-900: Moved solrj into /src/solrj. The contents of solr-common.jar is now included in the solr-solrj.jar. (ryan) @@ -3861,10 +3867,10 @@ Other Changes (hossman) 42. Upgraded to Lucene 2.9-dev r794238. Other changes include: - LUCENE-1614 - Use Lucene's DocIdSetIterator.NO_MORE_DOCS as the sentinel value. - LUCENE-1630 - Add acceptsDocsOutOfOrder method to Collector implementations. - LUCENE-1673, LUCENE-1701 - Trie has moved to Lucene core and renamed to NumericRangeQuery. - LUCENE-1662, LUCENE-1687 - Replace usage of ExtendedFieldCache by FieldCache. + - LUCENE-1614 - Use Lucene's DocIdSetIterator.NO_MORE_DOCS as the sentinel value. + - LUCENE-1630 - Add acceptsDocsOutOfOrder method to Collector implementations. + - LUCENE-1673, LUCENE-1701 - Trie has moved to Lucene core and renamed to NumericRangeQuery. + - LUCENE-1662, LUCENE-1687 - Replace usage of ExtendedFieldCache by FieldCache. (shalin) 42. SOLR-1241: Solr's CharFilter has been moved to Lucene. Remove CharFilter and related classes @@ -3874,7 +3880,7 @@ Other Changes 44. Upgraded to Lucene 2.9-dev r801856 (Mark Miller) -45. SOLR1276: Added StatsComponentTest (Rafa�ł Ku�ć, gsingers) +45. SOLR-1276: Added StatsComponentTest (Rafał Kuć, gsingers) 46. SOLR-1377: The TokenizerFactory API has changed to explicitly return a Tokenizer rather then a TokenStream (that may be or may not be a Tokenizer). This change @@ -3971,7 +3977,7 @@ Build Documentation ---------------------- - 1. SOLR-789: The javadoc of RandomSortField is not readable (Nicolas Lalev�Á�e via koji) + 1. SOLR-789: The javadoc of RandomSortField is not readable (Nicolas Lalevée via koji) 2. SOLR-962: Note about null handling in ModifiableSolrParams.add javadoc (Kay Kay via hossman) @@ -4016,8 +4022,8 @@ example solrconfig.xml) for more details... In Solr 1.2, DateField did not enforce the canonical representation of the ISO 8601 format when parsing incoming data, and did not generation the canonical format when generating dates from "Date Math" strings -(particularly as it pertains to milliseconds ending in trailing zeros) --- As a result equivalent dates could not always be compared properly. +(particularly as it pertains to milliseconds ending in trailing zeros). +As a result equivalent dates could not always be compared properly. This problem is corrected in Solr 1.3, but DateField users that might have been affected by indexing inconsistent formats of equivilent dates (ie: 1995-12-31T23:59:59Z vs 1995-12-31T23:59:59.000Z) may want @@ -4340,7 +4346,7 @@ Changes in runtime behavior 2. SOLR-689 / SOLR-695: If you have used "MultiCore" functionality in an unreleased version of 1.3-dev, many classes and configs have been renamed for the official - 1.3 release. Speciffically, solr.xml has replaced multicore.xml, and uses a slightly + 1.3 release. Speciffically, solr.xml has replaced multicore.xml, and uses a slightly different syntax. The solrj classes: MultiCore{Request/Response/Params} have been renamed: CoreAdmin{Request/Response/Params} (hossman, ryan, Henri Biestro) @@ -4419,7 +4425,7 @@ Bug Fixes 9. SOLR-294: Logging of elapsed time broken on Solaris because the date command there does not support the %s output format. (bill) -10. SOLR-136: Snappuller - "date -d" and locales don't mix. (J�Á�rgen Hermann via bill) +10. SOLR-136: Snappuller - "date -d" and locales don't mix. (Jürgen Hermann via bill) 11. SOLR-333: Changed distributiondump.jsp to use Solr HOME instead of CWD to set path. @@ -4469,8 +4475,8 @@ Bug Fixes 27. SOLR-267: Changed logging to report number of hits, and also provide a mechanism to add log messages to be output by the SolrCore via a NamedList toLog member variable. (Will Johnson, yseeley, gsingers) - - SOLR-267: Removed adding values to the HTTP headers in SolrDispatchFilter (gsingers) + + - SOLR-267: Removed adding values to the HTTP headers in SolrDispatchFilter (gsingers) 28. SOLR-509: Moved firstSearcher event notification to the end of the SolrCore constructor (Koji Sekiguchi via gsingers) diff --git a/solr/build.xml b/solr/build.xml index 80b12b2c58c..86527863fa2 100644 --- a/solr/build.xml +++ b/solr/build.xml @@ -320,6 +320,9 @@ + + + depends="init-dist, dist, example, javadocs, changes-to-html"> @@ -444,6 +447,10 @@ + + + + diff --git a/solr/common-build.xml b/solr/common-build.xml index 3493cdd5626..3ff864cc1f0 100644 --- a/solr/common-build.xml +++ b/solr/common-build.xml @@ -49,6 +49,8 @@ + + From fdc313d3bc6e6124e4e4ac772bed443d2f08d604 Mon Sep 17 00:00:00 2001 From: Sami Siren Date: Wed, 29 Aug 2012 06:58:38 +0000 Subject: [PATCH 52/81] fix test, remove unused method git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1378458 13f79535-47bb-0310-9956-ffa450edef68 --- solr/core/src/test/org/apache/solr/cloud/OverseerTest.java | 2 +- .../java/org/apache/solr/common/cloud/ZkStateReader.java | 7 ------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/solr/core/src/test/org/apache/solr/cloud/OverseerTest.java b/solr/core/src/test/org/apache/solr/cloud/OverseerTest.java index 80436404007..74f9f8bafaf 100644 --- a/solr/core/src/test/org/apache/solr/cloud/OverseerTest.java +++ b/solr/core/src/test/org/apache/solr/cloud/OverseerTest.java @@ -347,7 +347,7 @@ public class OverseerTest extends SolrTestCaseJ4 { //make sure leaders are in cloud state for (int i = 0; i < sliceCount; i++) { - assertNotNull(reader.getLeaderUrl("collection1", "shard" + (i + 1)), 15000); + assertNotNull(reader.getLeaderUrl("collection1", "shard" + (i + 1), 15000)); } } finally { diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java b/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java index 3dee5b503ca..8b4e2cb6740 100644 --- a/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java +++ b/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java @@ -385,13 +385,6 @@ public class ZkStateReader { } - /** - * Get shard leader url. - */ - public String getLeaderUrl(String collection, String shard) throws InterruptedException, KeeperException { - return getLeaderUrl(collection, shard, 1000); - } - public String getLeaderUrl(String collection, String shard, int timeout) throws InterruptedException, KeeperException { ZkCoreNodeProps props = new ZkCoreNodeProps(getLeaderProps(collection, From ebde32f31f0bc05ca2b6f29ce68bc44de04e7740 Mon Sep 17 00:00:00 2001 From: Adrien Grand Date: Wed, 29 Aug 2012 10:22:03 +0000 Subject: [PATCH 53/81] LUCENE-4322: Start reducing the JAR size by only specializing decode for bitsPerValue in [1-24]. git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1378492 13f79535-47bb-0310-9956-ffa450edef68 --- lucene/CHANGES.txt | 4 + .../lucene/util/packed/BulkOperation.java | 112 +- .../util/packed/BulkOperationPacked.java | 231 +++++ .../util/packed/BulkOperationPacked1.java | 31 +- .../util/packed/BulkOperationPacked10.java | 39 +- .../util/packed/BulkOperationPacked11.java | 51 +- .../util/packed/BulkOperationPacked12.java | 35 +- .../util/packed/BulkOperationPacked13.java | 55 +- .../util/packed/BulkOperationPacked14.java | 43 +- .../util/packed/BulkOperationPacked15.java | 59 +- .../util/packed/BulkOperationPacked16.java | 31 +- .../util/packed/BulkOperationPacked17.java | 63 +- .../util/packed/BulkOperationPacked18.java | 47 +- .../util/packed/BulkOperationPacked19.java | 67 +- .../util/packed/BulkOperationPacked2.java | 31 +- .../util/packed/BulkOperationPacked20.java | 39 +- .../util/packed/BulkOperationPacked21.java | 71 +- .../util/packed/BulkOperationPacked22.java | 51 +- .../util/packed/BulkOperationPacked23.java | 75 +- .../util/packed/BulkOperationPacked24.java | 35 +- .../util/packed/BulkOperationPacked25.java | 840 --------------- .../util/packed/BulkOperationPacked26.java | 472 --------- .../util/packed/BulkOperationPacked27.java | 880 ---------------- .../util/packed/BulkOperationPacked28.java | 288 ------ .../util/packed/BulkOperationPacked29.java | 920 ----------------- .../util/packed/BulkOperationPacked3.java | 35 +- .../util/packed/BulkOperationPacked30.java | 512 ---------- .../util/packed/BulkOperationPacked31.java | 960 ------------------ .../util/packed/BulkOperationPacked32.java | 112 -- .../util/packed/BulkOperationPacked33.java | 569 ----------- .../util/packed/BulkOperationPacked34.java | 329 ------ .../util/packed/BulkOperationPacked35.java | 591 ----------- .../util/packed/BulkOperationPacked36.java | 209 ---- .../util/packed/BulkOperationPacked37.java | 613 ----------- .../util/packed/BulkOperationPacked38.java | 351 ------- .../util/packed/BulkOperationPacked39.java | 635 ------------ .../util/packed/BulkOperationPacked4.java | 31 +- .../util/packed/BulkOperationPacked40.java | 149 --- .../util/packed/BulkOperationPacked41.java | 657 ------------ .../util/packed/BulkOperationPacked42.java | 373 ------- .../util/packed/BulkOperationPacked43.java | 679 ------------- .../util/packed/BulkOperationPacked44.java | 231 ----- .../util/packed/BulkOperationPacked45.java | 701 ------------- .../util/packed/BulkOperationPacked46.java | 395 ------- .../util/packed/BulkOperationPacked47.java | 723 ------------- .../util/packed/BulkOperationPacked48.java | 119 --- .../util/packed/BulkOperationPacked49.java | 745 -------------- .../util/packed/BulkOperationPacked5.java | 39 +- .../util/packed/BulkOperationPacked50.java | 417 -------- .../util/packed/BulkOperationPacked51.java | 767 -------------- .../util/packed/BulkOperationPacked52.java | 253 ----- .../util/packed/BulkOperationPacked53.java | 789 -------------- .../util/packed/BulkOperationPacked54.java | 439 -------- .../util/packed/BulkOperationPacked55.java | 811 --------------- .../util/packed/BulkOperationPacked56.java | 171 ---- .../util/packed/BulkOperationPacked57.java | 833 --------------- .../util/packed/BulkOperationPacked58.java | 461 --------- .../util/packed/BulkOperationPacked59.java | 855 ---------------- .../util/packed/BulkOperationPacked6.java | 35 +- .../util/packed/BulkOperationPacked60.java | 275 ----- .../util/packed/BulkOperationPacked61.java | 877 ---------------- .../util/packed/BulkOperationPacked62.java | 483 --------- .../util/packed/BulkOperationPacked63.java | 899 ---------------- .../util/packed/BulkOperationPacked64.java | 63 -- .../util/packed/BulkOperationPacked7.java | 43 +- .../util/packed/BulkOperationPacked8.java | 31 +- .../util/packed/BulkOperationPacked9.java | 47 +- .../BulkOperationPackedSingleBlock.java | 173 ++++ .../BulkOperationPackedSingleBlock1.java | 29 +- .../BulkOperationPackedSingleBlock10.java | 29 +- .../BulkOperationPackedSingleBlock12.java | 29 +- .../BulkOperationPackedSingleBlock16.java | 29 +- .../BulkOperationPackedSingleBlock2.java | 29 +- .../BulkOperationPackedSingleBlock21.java | 29 +- .../BulkOperationPackedSingleBlock3.java | 29 +- .../BulkOperationPackedSingleBlock32.java | 112 -- .../BulkOperationPackedSingleBlock4.java | 29 +- .../BulkOperationPackedSingleBlock5.java | 29 +- .../BulkOperationPackedSingleBlock6.java | 29 +- .../BulkOperationPackedSingleBlock7.java | 29 +- .../BulkOperationPackedSingleBlock8.java | 29 +- .../BulkOperationPackedSingleBlock9.java | 29 +- .../lucene/util/packed/gen_BulkOperation.py | 127 +-- 83 files changed, 634 insertions(+), 23032 deletions(-) create mode 100644 lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked.java delete mode 100644 lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked25.java delete mode 100644 lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked26.java delete mode 100644 lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked27.java delete mode 100644 lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked28.java delete mode 100644 lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked29.java delete mode 100644 lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked30.java delete mode 100644 lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked31.java delete mode 100644 lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked32.java delete mode 100644 lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked33.java delete mode 100644 lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked34.java delete mode 100644 lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked35.java delete mode 100644 lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked36.java delete mode 100644 lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked37.java delete mode 100644 lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked38.java delete mode 100644 lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked39.java delete mode 100644 lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked40.java delete mode 100644 lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked41.java delete mode 100644 lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked42.java delete mode 100644 lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked43.java delete mode 100644 lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked44.java delete mode 100644 lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked45.java delete mode 100644 lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked46.java delete mode 100644 lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked47.java delete mode 100644 lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked48.java delete mode 100644 lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked49.java delete mode 100644 lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked50.java delete mode 100644 lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked51.java delete mode 100644 lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked52.java delete mode 100644 lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked53.java delete mode 100644 lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked54.java delete mode 100644 lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked55.java delete mode 100644 lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked56.java delete mode 100644 lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked57.java delete mode 100644 lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked58.java delete mode 100644 lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked59.java delete mode 100644 lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked60.java delete mode 100644 lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked61.java delete mode 100644 lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked62.java delete mode 100644 lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked63.java delete mode 100644 lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked64.java create mode 100644 lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPackedSingleBlock.java delete mode 100644 lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPackedSingleBlock32.java diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt index c856b7b143c..71057583205 100644 --- a/lucene/CHANGES.txt +++ b/lucene/CHANGES.txt @@ -118,6 +118,10 @@ Bug Fixes Optimizations +* LUCENE-4322: Decrease lucene-core JAR size. The core JAR size had increased a + lot because of generated code introduced in LUCENE-4161 and LUCENE-3892. + (Adrien Grand) + * LUCENE-4317: Improve reuse of internal TokenStreams and StringReader in oal.document.Field. (Uwe Schindler, Chris Male, Robert Muir) diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperation.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperation.java index 435c4584443..87475ff4b11 100644 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperation.java +++ b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperation.java @@ -19,7 +19,6 @@ package org.apache.lucene.util.packed; * limitations under the License. */ -import java.nio.ByteBuffer; /** * Efficient sequential read/write of packed integers. @@ -50,46 +49,46 @@ abstract class BulkOperation implements PackedInts.Decoder, PackedInts.Encoder { new BulkOperationPacked22(), new BulkOperationPacked23(), new BulkOperationPacked24(), - new BulkOperationPacked25(), - new BulkOperationPacked26(), - new BulkOperationPacked27(), - new BulkOperationPacked28(), - new BulkOperationPacked29(), - new BulkOperationPacked30(), - new BulkOperationPacked31(), - new BulkOperationPacked32(), - new BulkOperationPacked33(), - new BulkOperationPacked34(), - new BulkOperationPacked35(), - new BulkOperationPacked36(), - new BulkOperationPacked37(), - new BulkOperationPacked38(), - new BulkOperationPacked39(), - new BulkOperationPacked40(), - new BulkOperationPacked41(), - new BulkOperationPacked42(), - new BulkOperationPacked43(), - new BulkOperationPacked44(), - new BulkOperationPacked45(), - new BulkOperationPacked46(), - new BulkOperationPacked47(), - new BulkOperationPacked48(), - new BulkOperationPacked49(), - new BulkOperationPacked50(), - new BulkOperationPacked51(), - new BulkOperationPacked52(), - new BulkOperationPacked53(), - new BulkOperationPacked54(), - new BulkOperationPacked55(), - new BulkOperationPacked56(), - new BulkOperationPacked57(), - new BulkOperationPacked58(), - new BulkOperationPacked59(), - new BulkOperationPacked60(), - new BulkOperationPacked61(), - new BulkOperationPacked62(), - new BulkOperationPacked63(), - new BulkOperationPacked64(), + new BulkOperationPacked(25), + new BulkOperationPacked(26), + new BulkOperationPacked(27), + new BulkOperationPacked(28), + new BulkOperationPacked(29), + new BulkOperationPacked(30), + new BulkOperationPacked(31), + new BulkOperationPacked(32), + new BulkOperationPacked(33), + new BulkOperationPacked(34), + new BulkOperationPacked(35), + new BulkOperationPacked(36), + new BulkOperationPacked(37), + new BulkOperationPacked(38), + new BulkOperationPacked(39), + new BulkOperationPacked(40), + new BulkOperationPacked(41), + new BulkOperationPacked(42), + new BulkOperationPacked(43), + new BulkOperationPacked(44), + new BulkOperationPacked(45), + new BulkOperationPacked(46), + new BulkOperationPacked(47), + new BulkOperationPacked(48), + new BulkOperationPacked(49), + new BulkOperationPacked(50), + new BulkOperationPacked(51), + new BulkOperationPacked(52), + new BulkOperationPacked(53), + new BulkOperationPacked(54), + new BulkOperationPacked(55), + new BulkOperationPacked(56), + new BulkOperationPacked(57), + new BulkOperationPacked(58), + new BulkOperationPacked(59), + new BulkOperationPacked(60), + new BulkOperationPacked(61), + new BulkOperationPacked(62), + new BulkOperationPacked(63), + new BulkOperationPacked(64), }; // NOTE: this is sparse (some entries are null): @@ -125,7 +124,7 @@ abstract class BulkOperation implements PackedInts.Decoder, PackedInts.Encoder { null, null, null, - new BulkOperationPackedSingleBlock32(), + new BulkOperationPackedSingleBlock(32), }; @@ -142,32 +141,11 @@ abstract class BulkOperation implements PackedInts.Decoder, PackedInts.Encoder { } } - - private static long[] toLongArray(int[] ints, int offset, int length) { - long[] arr = new long[length]; - for (int i = 0; i < length; ++i) { - arr[i] = ints[offset + i]; + protected int writeLong(long block, byte[] blocks, int blocksOffset) { + for (int j = 1; j <= 8; ++j) { + blocks[blocksOffset++] = (byte) (block >>> (64 - (j << 3))); } - return arr; - } - - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - encode(toLongArray(values, valuesOffset, iterations * valueCount()), 0, blocks, blocksOffset, iterations); - } - - @Override - public void encode(long[] values, int valuesOffset, byte[] blocks, int blocksOffset, int iterations) { - final long[] longBLocks = new long[blockCount() * iterations]; - encode(values, valuesOffset, longBLocks, 0, iterations); - ByteBuffer.wrap(blocks, blocksOffset, 8 * iterations * blockCount()).asLongBuffer().put(longBLocks); - } - - @Override - public void encode(int[] values, int valuesOffset, byte[] blocks, int blocksOffset, int iterations) { - final long[] longBLocks = new long[blockCount() * iterations]; - encode(values, valuesOffset, longBLocks, 0, iterations); - ByteBuffer.wrap(blocks, blocksOffset, 8 * iterations * blockCount()).asLongBuffer().put(longBLocks); + return blocksOffset; } /** diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked.java new file mode 100644 index 00000000000..f549ed604bb --- /dev/null +++ b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked.java @@ -0,0 +1,231 @@ +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. + */ + +/** + * Non-specialized {@link BulkOperation} for {@link PackedInts.Format#PACKED}. + */ +class BulkOperationPacked extends BulkOperation { + + private final int bitsPerValue; + private final int blockCount; + private final int valueCount; + private final long mask; + + public BulkOperationPacked(int bitsPerValue) { + this.bitsPerValue = bitsPerValue; + assert bitsPerValue > 0 && bitsPerValue <= 64; + int blocks = bitsPerValue; + while ((blocks & 1) == 0) { + blocks >>>= 1; + } + this.blockCount = blocks; + this.valueCount = 64 * blockCount / bitsPerValue; + if (bitsPerValue == 64) { + this.mask = ~0L; + } else { + this.mask = (1L << bitsPerValue) - 1; + } + assert valueCount * bitsPerValue == 64 * blockCount; + } + + @Override + public int blockCount() { + return blockCount; + } + + @Override + public int valueCount() { + return valueCount; + } + + @Override + public void decode(long[] blocks, int blocksOffset, long[] values, + int valuesOffset, int iterations) { + int bitsLeft = 64; + for (int i = 0; i < valueCount * iterations; ++i) { + bitsLeft -= bitsPerValue; + if (bitsLeft < 0) { + values[valuesOffset++] = + ((blocks[blocksOffset++] & ((1L << (bitsPerValue + bitsLeft)) - 1)) << -bitsLeft) + | (blocks[blocksOffset] >>> (64 + bitsLeft)); + bitsLeft += 64; + } else { + values[valuesOffset++] = (blocks[blocksOffset] >>> bitsLeft) & mask; + } + } + } + + @Override + public void decode(byte[] blocks, int blocksOffset, long[] values, + int valuesOffset, int iterations) { + int blockBitsLeft = 8; + int valueBitsLeft = bitsPerValue; + long nextValue = 0; + for (int end = valuesOffset + iterations * valueCount; valuesOffset < end; ) { + if (valueBitsLeft > blockBitsLeft) { + nextValue |= (blocks[blocksOffset++] & ((1L << blockBitsLeft) - 1)) << (valueBitsLeft - blockBitsLeft); + valueBitsLeft -= blockBitsLeft; + blockBitsLeft = 8; + } else { + nextValue |= ((blocks[blocksOffset] & 0xFFL) >>> (blockBitsLeft - valueBitsLeft)) & ((1L << valueBitsLeft) - 1); + values[valuesOffset++] = nextValue; + nextValue = 0; + blockBitsLeft -= valueBitsLeft; + valueBitsLeft = bitsPerValue; + } + } + } + + @Override + public void decode(long[] blocks, int blocksOffset, int[] values, + int valuesOffset, int iterations) { + if (bitsPerValue > 32) { + throw new UnsupportedOperationException("Cannot decode " + bitsPerValue + "-bits values into an int[]"); + } + int bitsLeft = 64; + for (int i = 0; i < valueCount * iterations; ++i) { + bitsLeft -= bitsPerValue; + if (bitsLeft < 0) { + values[valuesOffset++] = (int) + (((blocks[blocksOffset++] & ((1L << (bitsPerValue + bitsLeft)) - 1)) << -bitsLeft) + | (blocks[blocksOffset] >>> (64 + bitsLeft))); + bitsLeft += 64; + } else { + values[valuesOffset++] = (int) ((blocks[blocksOffset] >>> bitsLeft) & mask); + } + } + } + + @Override + public void decode(byte[] blocks, int blocksOffset, int[] values, + int valuesOffset, int iterations) { + if (bitsPerValue > 32) { + throw new UnsupportedOperationException("Cannot decode " + bitsPerValue + "-bits values into an int[]"); + } + int blockBitsLeft = 8; + int valueBitsLeft = bitsPerValue; + int nextValue = 0; + for (int end = valuesOffset + iterations * valueCount; valuesOffset < end; ) { + if (valueBitsLeft > blockBitsLeft) { + nextValue |= (blocks[blocksOffset++] & ((1L << blockBitsLeft) - 1)) << (valueBitsLeft - blockBitsLeft); + valueBitsLeft -= blockBitsLeft; + blockBitsLeft = 8; + } else { + nextValue |= ((blocks[blocksOffset] & 0xFFL) >>> (blockBitsLeft - valueBitsLeft)) & ((1L << valueBitsLeft) - 1); + values[valuesOffset++] = nextValue; + nextValue = 0; + blockBitsLeft -= valueBitsLeft; + valueBitsLeft = bitsPerValue; + } + } + } + + @Override + public void encode(long[] values, int valuesOffset, long[] blocks, + int blocksOffset, int iterations) { + long nextBlock = 0; + int bitsLeft = 64; + for (int i = 0; i < valueCount * iterations; ++i) { + bitsLeft -= bitsPerValue; + if (bitsLeft > 0) { + nextBlock |= values[valuesOffset++] << bitsLeft; + } else if (bitsLeft == 0) { + nextBlock |= values[valuesOffset++]; + blocks[blocksOffset++] = nextBlock; + nextBlock = 0; + bitsLeft = 64; + } else { // bitsLeft < 0 + nextBlock |= values[valuesOffset] >>> -bitsLeft; + blocks[blocksOffset++] = nextBlock; + nextBlock = (values[valuesOffset++] & ((1L << -bitsLeft) - 1)) << (64 + bitsLeft); + bitsLeft += 64; + } + } + } + + @Override + public void encode(int[] values, int valuesOffset, long[] blocks, + int blocksOffset, int iterations) { + long nextBlock = 0; + int bitsLeft = 64; + for (int i = 0; i < valueCount * iterations; ++i) { + bitsLeft -= bitsPerValue; + if (bitsLeft > 0) { + nextBlock |= (values[valuesOffset++] & 0xFFFFFFFFL) << bitsLeft; + } else if (bitsLeft == 0) { + nextBlock |= (values[valuesOffset++] & 0xFFFFFFFFL); + blocks[blocksOffset++] = nextBlock; + nextBlock = 0; + bitsLeft = 64; + } else { // bitsLeft < 0 + nextBlock |= (values[valuesOffset] & 0xFFFFFFFFL) >>> -bitsLeft; + blocks[blocksOffset++] = nextBlock; + nextBlock = (values[valuesOffset++] & ((1L << -bitsLeft) - 1)) << (64 + bitsLeft); + bitsLeft += 64; + } + } + } + + @Override + public void encode(long[] values, int valuesOffset, byte[] blocks, + int blocksOffset, int iterations) { + long nextBlock = 0; + int bitsLeft = 64; + for (int i = 0; i < valueCount * iterations; ++i) { + bitsLeft -= bitsPerValue; + if (bitsLeft > 0) { + nextBlock |= values[valuesOffset++] << bitsLeft; + } else if (bitsLeft == 0) { + nextBlock |= values[valuesOffset++]; + blocksOffset = writeLong(nextBlock, blocks, blocksOffset); + nextBlock = 0; + bitsLeft = 64; + } else { // bitsLeft < 0 + nextBlock |= values[valuesOffset] >>> -bitsLeft; + blocksOffset = writeLong(nextBlock, blocks, blocksOffset); + nextBlock = (values[valuesOffset++] & ((1L << -bitsLeft) - 1)) << (64 + bitsLeft); + bitsLeft += 64; + } + } + } + + @Override + public void encode(int[] values, int valuesOffset, byte[] blocks, + int blocksOffset, int iterations) { + long nextBlock = 0; + int bitsLeft = 64; + for (int i = 0; i < valueCount * iterations; ++i) { + bitsLeft -= bitsPerValue; + if (bitsLeft > 0) { + nextBlock |= (values[valuesOffset++] & 0xFFFFFFFFL) << bitsLeft; + } else if (bitsLeft == 0) { + nextBlock |= (values[valuesOffset++] & 0xFFFFFFFFL); + blocksOffset = writeLong(nextBlock, blocks, blocksOffset); + nextBlock = 0; + bitsLeft = 64; + } else { // bitsLeft < 0 + nextBlock |= (values[valuesOffset] & 0xFFFFFFFFL) >>> -bitsLeft; + blocksOffset = writeLong(nextBlock, blocks, blocksOffset); + nextBlock = (values[valuesOffset++] & ((1L << -bitsLeft) - 1)) << (64 + bitsLeft); + bitsLeft += 64; + } + } + } + +} diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked1.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked1.java index 41ef456d881..7e00714ccfb 100644 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked1.java +++ b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked1.java @@ -22,15 +22,12 @@ package org.apache.lucene.util.packed; /** * Efficient sequential read/write of packed integers. */ -final class BulkOperationPacked1 extends BulkOperation { - @Override - public int blockCount() { - return 1; - } +final class BulkOperationPacked1 extends BulkOperationPacked { - @Override - public int valueCount() { - return 64; + public BulkOperationPacked1() { + super(1); + assert blockCount() == 1; + assert valueCount() == 64; } @Override @@ -339,22 +336,4 @@ final class BulkOperationPacked1 extends BulkOperation { } } - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 63) | ((values[valuesOffset++] & 0xffffffffL) << 62) | ((values[valuesOffset++] & 0xffffffffL) << 61) | ((values[valuesOffset++] & 0xffffffffL) << 60) | ((values[valuesOffset++] & 0xffffffffL) << 59) | ((values[valuesOffset++] & 0xffffffffL) << 58) | ((values[valuesOffset++] & 0xffffffffL) << 57) | ((values[valuesOffset++] & 0xffffffffL) << 56) | ((values[valuesOffset++] & 0xffffffffL) << 55) | ((values[valuesOffset++] & 0xffffffffL) << 54) | ((values[valuesOffset++] & 0xffffffffL) << 53) | ((values[valuesOffset++] & 0xffffffffL) << 52) | ((values[valuesOffset++] & 0xffffffffL) << 51) | ((values[valuesOffset++] & 0xffffffffL) << 50) | ((values[valuesOffset++] & 0xffffffffL) << 49) | ((values[valuesOffset++] & 0xffffffffL) << 48) | ((values[valuesOffset++] & 0xffffffffL) << 47) | ((values[valuesOffset++] & 0xffffffffL) << 46) | ((values[valuesOffset++] & 0xffffffffL) << 45) | ((values[valuesOffset++] & 0xffffffffL) << 44) | ((values[valuesOffset++] & 0xffffffffL) << 43) | ((values[valuesOffset++] & 0xffffffffL) << 42) | ((values[valuesOffset++] & 0xffffffffL) << 41) | ((values[valuesOffset++] & 0xffffffffL) << 40) | ((values[valuesOffset++] & 0xffffffffL) << 39) | ((values[valuesOffset++] & 0xffffffffL) << 38) | ((values[valuesOffset++] & 0xffffffffL) << 37) | ((values[valuesOffset++] & 0xffffffffL) << 36) | ((values[valuesOffset++] & 0xffffffffL) << 35) | ((values[valuesOffset++] & 0xffffffffL) << 34) | ((values[valuesOffset++] & 0xffffffffL) << 33) | ((values[valuesOffset++] & 0xffffffffL) << 32) | ((values[valuesOffset++] & 0xffffffffL) << 31) | ((values[valuesOffset++] & 0xffffffffL) << 30) | ((values[valuesOffset++] & 0xffffffffL) << 29) | ((values[valuesOffset++] & 0xffffffffL) << 28) | ((values[valuesOffset++] & 0xffffffffL) << 27) | ((values[valuesOffset++] & 0xffffffffL) << 26) | ((values[valuesOffset++] & 0xffffffffL) << 25) | ((values[valuesOffset++] & 0xffffffffL) << 24) | ((values[valuesOffset++] & 0xffffffffL) << 23) | ((values[valuesOffset++] & 0xffffffffL) << 22) | ((values[valuesOffset++] & 0xffffffffL) << 21) | ((values[valuesOffset++] & 0xffffffffL) << 20) | ((values[valuesOffset++] & 0xffffffffL) << 19) | ((values[valuesOffset++] & 0xffffffffL) << 18) | ((values[valuesOffset++] & 0xffffffffL) << 17) | ((values[valuesOffset++] & 0xffffffffL) << 16) | ((values[valuesOffset++] & 0xffffffffL) << 15) | ((values[valuesOffset++] & 0xffffffffL) << 14) | ((values[valuesOffset++] & 0xffffffffL) << 13) | ((values[valuesOffset++] & 0xffffffffL) << 12) | ((values[valuesOffset++] & 0xffffffffL) << 11) | ((values[valuesOffset++] & 0xffffffffL) << 10) | ((values[valuesOffset++] & 0xffffffffL) << 9) | ((values[valuesOffset++] & 0xffffffffL) << 8) | ((values[valuesOffset++] & 0xffffffffL) << 7) | ((values[valuesOffset++] & 0xffffffffL) << 6) | ((values[valuesOffset++] & 0xffffffffL) << 5) | ((values[valuesOffset++] & 0xffffffffL) << 4) | ((values[valuesOffset++] & 0xffffffffL) << 3) | ((values[valuesOffset++] & 0xffffffffL) << 2) | ((values[valuesOffset++] & 0xffffffffL) << 1) | (values[valuesOffset++] & 0xffffffffL); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] << 63) | (values[valuesOffset++] << 62) | (values[valuesOffset++] << 61) | (values[valuesOffset++] << 60) | (values[valuesOffset++] << 59) | (values[valuesOffset++] << 58) | (values[valuesOffset++] << 57) | (values[valuesOffset++] << 56) | (values[valuesOffset++] << 55) | (values[valuesOffset++] << 54) | (values[valuesOffset++] << 53) | (values[valuesOffset++] << 52) | (values[valuesOffset++] << 51) | (values[valuesOffset++] << 50) | (values[valuesOffset++] << 49) | (values[valuesOffset++] << 48) | (values[valuesOffset++] << 47) | (values[valuesOffset++] << 46) | (values[valuesOffset++] << 45) | (values[valuesOffset++] << 44) | (values[valuesOffset++] << 43) | (values[valuesOffset++] << 42) | (values[valuesOffset++] << 41) | (values[valuesOffset++] << 40) | (values[valuesOffset++] << 39) | (values[valuesOffset++] << 38) | (values[valuesOffset++] << 37) | (values[valuesOffset++] << 36) | (values[valuesOffset++] << 35) | (values[valuesOffset++] << 34) | (values[valuesOffset++] << 33) | (values[valuesOffset++] << 32) | (values[valuesOffset++] << 31) | (values[valuesOffset++] << 30) | (values[valuesOffset++] << 29) | (values[valuesOffset++] << 28) | (values[valuesOffset++] << 27) | (values[valuesOffset++] << 26) | (values[valuesOffset++] << 25) | (values[valuesOffset++] << 24) | (values[valuesOffset++] << 23) | (values[valuesOffset++] << 22) | (values[valuesOffset++] << 21) | (values[valuesOffset++] << 20) | (values[valuesOffset++] << 19) | (values[valuesOffset++] << 18) | (values[valuesOffset++] << 17) | (values[valuesOffset++] << 16) | (values[valuesOffset++] << 15) | (values[valuesOffset++] << 14) | (values[valuesOffset++] << 13) | (values[valuesOffset++] << 12) | (values[valuesOffset++] << 11) | (values[valuesOffset++] << 10) | (values[valuesOffset++] << 9) | (values[valuesOffset++] << 8) | (values[valuesOffset++] << 7) | (values[valuesOffset++] << 6) | (values[valuesOffset++] << 5) | (values[valuesOffset++] << 4) | (values[valuesOffset++] << 3) | (values[valuesOffset++] << 2) | (values[valuesOffset++] << 1) | values[valuesOffset++]; - } - } - } diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked10.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked10.java index 20d23d7cb11..2d42d9a60db 100644 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked10.java +++ b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked10.java @@ -22,15 +22,12 @@ package org.apache.lucene.util.packed; /** * Efficient sequential read/write of packed integers. */ -final class BulkOperationPacked10 extends BulkOperation { - @Override - public int blockCount() { - return 5; - } +final class BulkOperationPacked10 extends BulkOperationPacked { - @Override - public int valueCount() { - return 32; + public BulkOperationPacked10() { + super(10); + assert blockCount() == 5; + assert valueCount() == 32; } @Override @@ -283,30 +280,4 @@ final class BulkOperationPacked10 extends BulkOperation { } } - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 54) | ((values[valuesOffset++] & 0xffffffffL) << 44) | ((values[valuesOffset++] & 0xffffffffL) << 34) | ((values[valuesOffset++] & 0xffffffffL) << 24) | ((values[valuesOffset++] & 0xffffffffL) << 14) | ((values[valuesOffset++] & 0xffffffffL) << 4) | ((values[valuesOffset] & 0xffffffffL) >>> 6); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 58) | ((values[valuesOffset++] & 0xffffffffL) << 48) | ((values[valuesOffset++] & 0xffffffffL) << 38) | ((values[valuesOffset++] & 0xffffffffL) << 28) | ((values[valuesOffset++] & 0xffffffffL) << 18) | ((values[valuesOffset++] & 0xffffffffL) << 8) | ((values[valuesOffset] & 0xffffffffL) >>> 2); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 62) | ((values[valuesOffset++] & 0xffffffffL) << 52) | ((values[valuesOffset++] & 0xffffffffL) << 42) | ((values[valuesOffset++] & 0xffffffffL) << 32) | ((values[valuesOffset++] & 0xffffffffL) << 22) | ((values[valuesOffset++] & 0xffffffffL) << 12) | ((values[valuesOffset++] & 0xffffffffL) << 2) | ((values[valuesOffset] & 0xffffffffL) >>> 8); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 56) | ((values[valuesOffset++] & 0xffffffffL) << 46) | ((values[valuesOffset++] & 0xffffffffL) << 36) | ((values[valuesOffset++] & 0xffffffffL) << 26) | ((values[valuesOffset++] & 0xffffffffL) << 16) | ((values[valuesOffset++] & 0xffffffffL) << 6) | ((values[valuesOffset] & 0xffffffffL) >>> 4); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 60) | ((values[valuesOffset++] & 0xffffffffL) << 50) | ((values[valuesOffset++] & 0xffffffffL) << 40) | ((values[valuesOffset++] & 0xffffffffL) << 30) | ((values[valuesOffset++] & 0xffffffffL) << 20) | ((values[valuesOffset++] & 0xffffffffL) << 10) | (values[valuesOffset++] & 0xffffffffL); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] << 54) | (values[valuesOffset++] << 44) | (values[valuesOffset++] << 34) | (values[valuesOffset++] << 24) | (values[valuesOffset++] << 14) | (values[valuesOffset++] << 4) | (values[valuesOffset] >>> 6); - blocks[blocksOffset++] = (values[valuesOffset++] << 58) | (values[valuesOffset++] << 48) | (values[valuesOffset++] << 38) | (values[valuesOffset++] << 28) | (values[valuesOffset++] << 18) | (values[valuesOffset++] << 8) | (values[valuesOffset] >>> 2); - blocks[blocksOffset++] = (values[valuesOffset++] << 62) | (values[valuesOffset++] << 52) | (values[valuesOffset++] << 42) | (values[valuesOffset++] << 32) | (values[valuesOffset++] << 22) | (values[valuesOffset++] << 12) | (values[valuesOffset++] << 2) | (values[valuesOffset] >>> 8); - blocks[blocksOffset++] = (values[valuesOffset++] << 56) | (values[valuesOffset++] << 46) | (values[valuesOffset++] << 36) | (values[valuesOffset++] << 26) | (values[valuesOffset++] << 16) | (values[valuesOffset++] << 6) | (values[valuesOffset] >>> 4); - blocks[blocksOffset++] = (values[valuesOffset++] << 60) | (values[valuesOffset++] << 50) | (values[valuesOffset++] << 40) | (values[valuesOffset++] << 30) | (values[valuesOffset++] << 20) | (values[valuesOffset++] << 10) | values[valuesOffset++]; - } - } - } diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked11.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked11.java index 9788cae56e2..2c99c67f1eb 100644 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked11.java +++ b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked11.java @@ -22,15 +22,12 @@ package org.apache.lucene.util.packed; /** * Efficient sequential read/write of packed integers. */ -final class BulkOperationPacked11 extends BulkOperation { - @Override - public int blockCount() { - return 11; - } +final class BulkOperationPacked11 extends BulkOperationPacked { - @Override - public int valueCount() { - return 64; + public BulkOperationPacked11() { + super(11); + assert blockCount() == 11; + assert valueCount() == 64; } @Override @@ -519,42 +516,4 @@ final class BulkOperationPacked11 extends BulkOperation { } } - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 53) | ((values[valuesOffset++] & 0xffffffffL) << 42) | ((values[valuesOffset++] & 0xffffffffL) << 31) | ((values[valuesOffset++] & 0xffffffffL) << 20) | ((values[valuesOffset++] & 0xffffffffL) << 9) | ((values[valuesOffset] & 0xffffffffL) >>> 2); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 62) | ((values[valuesOffset++] & 0xffffffffL) << 51) | ((values[valuesOffset++] & 0xffffffffL) << 40) | ((values[valuesOffset++] & 0xffffffffL) << 29) | ((values[valuesOffset++] & 0xffffffffL) << 18) | ((values[valuesOffset++] & 0xffffffffL) << 7) | ((values[valuesOffset] & 0xffffffffL) >>> 4); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 60) | ((values[valuesOffset++] & 0xffffffffL) << 49) | ((values[valuesOffset++] & 0xffffffffL) << 38) | ((values[valuesOffset++] & 0xffffffffL) << 27) | ((values[valuesOffset++] & 0xffffffffL) << 16) | ((values[valuesOffset++] & 0xffffffffL) << 5) | ((values[valuesOffset] & 0xffffffffL) >>> 6); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 58) | ((values[valuesOffset++] & 0xffffffffL) << 47) | ((values[valuesOffset++] & 0xffffffffL) << 36) | ((values[valuesOffset++] & 0xffffffffL) << 25) | ((values[valuesOffset++] & 0xffffffffL) << 14) | ((values[valuesOffset++] & 0xffffffffL) << 3) | ((values[valuesOffset] & 0xffffffffL) >>> 8); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 56) | ((values[valuesOffset++] & 0xffffffffL) << 45) | ((values[valuesOffset++] & 0xffffffffL) << 34) | ((values[valuesOffset++] & 0xffffffffL) << 23) | ((values[valuesOffset++] & 0xffffffffL) << 12) | ((values[valuesOffset++] & 0xffffffffL) << 1) | ((values[valuesOffset] & 0xffffffffL) >>> 10); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 54) | ((values[valuesOffset++] & 0xffffffffL) << 43) | ((values[valuesOffset++] & 0xffffffffL) << 32) | ((values[valuesOffset++] & 0xffffffffL) << 21) | ((values[valuesOffset++] & 0xffffffffL) << 10) | ((values[valuesOffset] & 0xffffffffL) >>> 1); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 63) | ((values[valuesOffset++] & 0xffffffffL) << 52) | ((values[valuesOffset++] & 0xffffffffL) << 41) | ((values[valuesOffset++] & 0xffffffffL) << 30) | ((values[valuesOffset++] & 0xffffffffL) << 19) | ((values[valuesOffset++] & 0xffffffffL) << 8) | ((values[valuesOffset] & 0xffffffffL) >>> 3); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 61) | ((values[valuesOffset++] & 0xffffffffL) << 50) | ((values[valuesOffset++] & 0xffffffffL) << 39) | ((values[valuesOffset++] & 0xffffffffL) << 28) | ((values[valuesOffset++] & 0xffffffffL) << 17) | ((values[valuesOffset++] & 0xffffffffL) << 6) | ((values[valuesOffset] & 0xffffffffL) >>> 5); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 59) | ((values[valuesOffset++] & 0xffffffffL) << 48) | ((values[valuesOffset++] & 0xffffffffL) << 37) | ((values[valuesOffset++] & 0xffffffffL) << 26) | ((values[valuesOffset++] & 0xffffffffL) << 15) | ((values[valuesOffset++] & 0xffffffffL) << 4) | ((values[valuesOffset] & 0xffffffffL) >>> 7); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 57) | ((values[valuesOffset++] & 0xffffffffL) << 46) | ((values[valuesOffset++] & 0xffffffffL) << 35) | ((values[valuesOffset++] & 0xffffffffL) << 24) | ((values[valuesOffset++] & 0xffffffffL) << 13) | ((values[valuesOffset++] & 0xffffffffL) << 2) | ((values[valuesOffset] & 0xffffffffL) >>> 9); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 55) | ((values[valuesOffset++] & 0xffffffffL) << 44) | ((values[valuesOffset++] & 0xffffffffL) << 33) | ((values[valuesOffset++] & 0xffffffffL) << 22) | ((values[valuesOffset++] & 0xffffffffL) << 11) | (values[valuesOffset++] & 0xffffffffL); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] << 53) | (values[valuesOffset++] << 42) | (values[valuesOffset++] << 31) | (values[valuesOffset++] << 20) | (values[valuesOffset++] << 9) | (values[valuesOffset] >>> 2); - blocks[blocksOffset++] = (values[valuesOffset++] << 62) | (values[valuesOffset++] << 51) | (values[valuesOffset++] << 40) | (values[valuesOffset++] << 29) | (values[valuesOffset++] << 18) | (values[valuesOffset++] << 7) | (values[valuesOffset] >>> 4); - blocks[blocksOffset++] = (values[valuesOffset++] << 60) | (values[valuesOffset++] << 49) | (values[valuesOffset++] << 38) | (values[valuesOffset++] << 27) | (values[valuesOffset++] << 16) | (values[valuesOffset++] << 5) | (values[valuesOffset] >>> 6); - blocks[blocksOffset++] = (values[valuesOffset++] << 58) | (values[valuesOffset++] << 47) | (values[valuesOffset++] << 36) | (values[valuesOffset++] << 25) | (values[valuesOffset++] << 14) | (values[valuesOffset++] << 3) | (values[valuesOffset] >>> 8); - blocks[blocksOffset++] = (values[valuesOffset++] << 56) | (values[valuesOffset++] << 45) | (values[valuesOffset++] << 34) | (values[valuesOffset++] << 23) | (values[valuesOffset++] << 12) | (values[valuesOffset++] << 1) | (values[valuesOffset] >>> 10); - blocks[blocksOffset++] = (values[valuesOffset++] << 54) | (values[valuesOffset++] << 43) | (values[valuesOffset++] << 32) | (values[valuesOffset++] << 21) | (values[valuesOffset++] << 10) | (values[valuesOffset] >>> 1); - blocks[blocksOffset++] = (values[valuesOffset++] << 63) | (values[valuesOffset++] << 52) | (values[valuesOffset++] << 41) | (values[valuesOffset++] << 30) | (values[valuesOffset++] << 19) | (values[valuesOffset++] << 8) | (values[valuesOffset] >>> 3); - blocks[blocksOffset++] = (values[valuesOffset++] << 61) | (values[valuesOffset++] << 50) | (values[valuesOffset++] << 39) | (values[valuesOffset++] << 28) | (values[valuesOffset++] << 17) | (values[valuesOffset++] << 6) | (values[valuesOffset] >>> 5); - blocks[blocksOffset++] = (values[valuesOffset++] << 59) | (values[valuesOffset++] << 48) | (values[valuesOffset++] << 37) | (values[valuesOffset++] << 26) | (values[valuesOffset++] << 15) | (values[valuesOffset++] << 4) | (values[valuesOffset] >>> 7); - blocks[blocksOffset++] = (values[valuesOffset++] << 57) | (values[valuesOffset++] << 46) | (values[valuesOffset++] << 35) | (values[valuesOffset++] << 24) | (values[valuesOffset++] << 13) | (values[valuesOffset++] << 2) | (values[valuesOffset] >>> 9); - blocks[blocksOffset++] = (values[valuesOffset++] << 55) | (values[valuesOffset++] << 44) | (values[valuesOffset++] << 33) | (values[valuesOffset++] << 22) | (values[valuesOffset++] << 11) | values[valuesOffset++]; - } - } - } diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked12.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked12.java index c944982e5e6..1be82b19901 100644 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked12.java +++ b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked12.java @@ -22,15 +22,12 @@ package org.apache.lucene.util.packed; /** * Efficient sequential read/write of packed integers. */ -final class BulkOperationPacked12 extends BulkOperation { - @Override - public int blockCount() { - return 3; - } +final class BulkOperationPacked12 extends BulkOperationPacked { - @Override - public int valueCount() { - return 16; + public BulkOperationPacked12() { + super(12); + assert blockCount() == 3; + assert valueCount() == 16; } @Override @@ -183,26 +180,4 @@ final class BulkOperationPacked12 extends BulkOperation { } } - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 52) | ((values[valuesOffset++] & 0xffffffffL) << 40) | ((values[valuesOffset++] & 0xffffffffL) << 28) | ((values[valuesOffset++] & 0xffffffffL) << 16) | ((values[valuesOffset++] & 0xffffffffL) << 4) | ((values[valuesOffset] & 0xffffffffL) >>> 8); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 56) | ((values[valuesOffset++] & 0xffffffffL) << 44) | ((values[valuesOffset++] & 0xffffffffL) << 32) | ((values[valuesOffset++] & 0xffffffffL) << 20) | ((values[valuesOffset++] & 0xffffffffL) << 8) | ((values[valuesOffset] & 0xffffffffL) >>> 4); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 60) | ((values[valuesOffset++] & 0xffffffffL) << 48) | ((values[valuesOffset++] & 0xffffffffL) << 36) | ((values[valuesOffset++] & 0xffffffffL) << 24) | ((values[valuesOffset++] & 0xffffffffL) << 12) | (values[valuesOffset++] & 0xffffffffL); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] << 52) | (values[valuesOffset++] << 40) | (values[valuesOffset++] << 28) | (values[valuesOffset++] << 16) | (values[valuesOffset++] << 4) | (values[valuesOffset] >>> 8); - blocks[blocksOffset++] = (values[valuesOffset++] << 56) | (values[valuesOffset++] << 44) | (values[valuesOffset++] << 32) | (values[valuesOffset++] << 20) | (values[valuesOffset++] << 8) | (values[valuesOffset] >>> 4); - blocks[blocksOffset++] = (values[valuesOffset++] << 60) | (values[valuesOffset++] << 48) | (values[valuesOffset++] << 36) | (values[valuesOffset++] << 24) | (values[valuesOffset++] << 12) | values[valuesOffset++]; - } - } - } diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked13.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked13.java index f1a08a459d4..a39e71c1ee1 100644 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked13.java +++ b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked13.java @@ -22,15 +22,12 @@ package org.apache.lucene.util.packed; /** * Efficient sequential read/write of packed integers. */ -final class BulkOperationPacked13 extends BulkOperation { - @Override - public int blockCount() { - return 13; - } +final class BulkOperationPacked13 extends BulkOperationPacked { - @Override - public int valueCount() { - return 64; + public BulkOperationPacked13() { + super(13); + assert blockCount() == 13; + assert valueCount() == 64; } @Override @@ -555,46 +552,4 @@ final class BulkOperationPacked13 extends BulkOperation { } } - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 51) | ((values[valuesOffset++] & 0xffffffffL) << 38) | ((values[valuesOffset++] & 0xffffffffL) << 25) | ((values[valuesOffset++] & 0xffffffffL) << 12) | ((values[valuesOffset] & 0xffffffffL) >>> 1); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 63) | ((values[valuesOffset++] & 0xffffffffL) << 50) | ((values[valuesOffset++] & 0xffffffffL) << 37) | ((values[valuesOffset++] & 0xffffffffL) << 24) | ((values[valuesOffset++] & 0xffffffffL) << 11) | ((values[valuesOffset] & 0xffffffffL) >>> 2); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 62) | ((values[valuesOffset++] & 0xffffffffL) << 49) | ((values[valuesOffset++] & 0xffffffffL) << 36) | ((values[valuesOffset++] & 0xffffffffL) << 23) | ((values[valuesOffset++] & 0xffffffffL) << 10) | ((values[valuesOffset] & 0xffffffffL) >>> 3); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 61) | ((values[valuesOffset++] & 0xffffffffL) << 48) | ((values[valuesOffset++] & 0xffffffffL) << 35) | ((values[valuesOffset++] & 0xffffffffL) << 22) | ((values[valuesOffset++] & 0xffffffffL) << 9) | ((values[valuesOffset] & 0xffffffffL) >>> 4); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 60) | ((values[valuesOffset++] & 0xffffffffL) << 47) | ((values[valuesOffset++] & 0xffffffffL) << 34) | ((values[valuesOffset++] & 0xffffffffL) << 21) | ((values[valuesOffset++] & 0xffffffffL) << 8) | ((values[valuesOffset] & 0xffffffffL) >>> 5); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 59) | ((values[valuesOffset++] & 0xffffffffL) << 46) | ((values[valuesOffset++] & 0xffffffffL) << 33) | ((values[valuesOffset++] & 0xffffffffL) << 20) | ((values[valuesOffset++] & 0xffffffffL) << 7) | ((values[valuesOffset] & 0xffffffffL) >>> 6); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 58) | ((values[valuesOffset++] & 0xffffffffL) << 45) | ((values[valuesOffset++] & 0xffffffffL) << 32) | ((values[valuesOffset++] & 0xffffffffL) << 19) | ((values[valuesOffset++] & 0xffffffffL) << 6) | ((values[valuesOffset] & 0xffffffffL) >>> 7); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 57) | ((values[valuesOffset++] & 0xffffffffL) << 44) | ((values[valuesOffset++] & 0xffffffffL) << 31) | ((values[valuesOffset++] & 0xffffffffL) << 18) | ((values[valuesOffset++] & 0xffffffffL) << 5) | ((values[valuesOffset] & 0xffffffffL) >>> 8); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 56) | ((values[valuesOffset++] & 0xffffffffL) << 43) | ((values[valuesOffset++] & 0xffffffffL) << 30) | ((values[valuesOffset++] & 0xffffffffL) << 17) | ((values[valuesOffset++] & 0xffffffffL) << 4) | ((values[valuesOffset] & 0xffffffffL) >>> 9); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 55) | ((values[valuesOffset++] & 0xffffffffL) << 42) | ((values[valuesOffset++] & 0xffffffffL) << 29) | ((values[valuesOffset++] & 0xffffffffL) << 16) | ((values[valuesOffset++] & 0xffffffffL) << 3) | ((values[valuesOffset] & 0xffffffffL) >>> 10); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 54) | ((values[valuesOffset++] & 0xffffffffL) << 41) | ((values[valuesOffset++] & 0xffffffffL) << 28) | ((values[valuesOffset++] & 0xffffffffL) << 15) | ((values[valuesOffset++] & 0xffffffffL) << 2) | ((values[valuesOffset] & 0xffffffffL) >>> 11); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 53) | ((values[valuesOffset++] & 0xffffffffL) << 40) | ((values[valuesOffset++] & 0xffffffffL) << 27) | ((values[valuesOffset++] & 0xffffffffL) << 14) | ((values[valuesOffset++] & 0xffffffffL) << 1) | ((values[valuesOffset] & 0xffffffffL) >>> 12); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 52) | ((values[valuesOffset++] & 0xffffffffL) << 39) | ((values[valuesOffset++] & 0xffffffffL) << 26) | ((values[valuesOffset++] & 0xffffffffL) << 13) | (values[valuesOffset++] & 0xffffffffL); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] << 51) | (values[valuesOffset++] << 38) | (values[valuesOffset++] << 25) | (values[valuesOffset++] << 12) | (values[valuesOffset] >>> 1); - blocks[blocksOffset++] = (values[valuesOffset++] << 63) | (values[valuesOffset++] << 50) | (values[valuesOffset++] << 37) | (values[valuesOffset++] << 24) | (values[valuesOffset++] << 11) | (values[valuesOffset] >>> 2); - blocks[blocksOffset++] = (values[valuesOffset++] << 62) | (values[valuesOffset++] << 49) | (values[valuesOffset++] << 36) | (values[valuesOffset++] << 23) | (values[valuesOffset++] << 10) | (values[valuesOffset] >>> 3); - blocks[blocksOffset++] = (values[valuesOffset++] << 61) | (values[valuesOffset++] << 48) | (values[valuesOffset++] << 35) | (values[valuesOffset++] << 22) | (values[valuesOffset++] << 9) | (values[valuesOffset] >>> 4); - blocks[blocksOffset++] = (values[valuesOffset++] << 60) | (values[valuesOffset++] << 47) | (values[valuesOffset++] << 34) | (values[valuesOffset++] << 21) | (values[valuesOffset++] << 8) | (values[valuesOffset] >>> 5); - blocks[blocksOffset++] = (values[valuesOffset++] << 59) | (values[valuesOffset++] << 46) | (values[valuesOffset++] << 33) | (values[valuesOffset++] << 20) | (values[valuesOffset++] << 7) | (values[valuesOffset] >>> 6); - blocks[blocksOffset++] = (values[valuesOffset++] << 58) | (values[valuesOffset++] << 45) | (values[valuesOffset++] << 32) | (values[valuesOffset++] << 19) | (values[valuesOffset++] << 6) | (values[valuesOffset] >>> 7); - blocks[blocksOffset++] = (values[valuesOffset++] << 57) | (values[valuesOffset++] << 44) | (values[valuesOffset++] << 31) | (values[valuesOffset++] << 18) | (values[valuesOffset++] << 5) | (values[valuesOffset] >>> 8); - blocks[blocksOffset++] = (values[valuesOffset++] << 56) | (values[valuesOffset++] << 43) | (values[valuesOffset++] << 30) | (values[valuesOffset++] << 17) | (values[valuesOffset++] << 4) | (values[valuesOffset] >>> 9); - blocks[blocksOffset++] = (values[valuesOffset++] << 55) | (values[valuesOffset++] << 42) | (values[valuesOffset++] << 29) | (values[valuesOffset++] << 16) | (values[valuesOffset++] << 3) | (values[valuesOffset] >>> 10); - blocks[blocksOffset++] = (values[valuesOffset++] << 54) | (values[valuesOffset++] << 41) | (values[valuesOffset++] << 28) | (values[valuesOffset++] << 15) | (values[valuesOffset++] << 2) | (values[valuesOffset] >>> 11); - blocks[blocksOffset++] = (values[valuesOffset++] << 53) | (values[valuesOffset++] << 40) | (values[valuesOffset++] << 27) | (values[valuesOffset++] << 14) | (values[valuesOffset++] << 1) | (values[valuesOffset] >>> 12); - blocks[blocksOffset++] = (values[valuesOffset++] << 52) | (values[valuesOffset++] << 39) | (values[valuesOffset++] << 26) | (values[valuesOffset++] << 13) | values[valuesOffset++]; - } - } - } diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked14.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked14.java index 9b5198beb5d..6ddaaf47458 100644 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked14.java +++ b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked14.java @@ -22,15 +22,12 @@ package org.apache.lucene.util.packed; /** * Efficient sequential read/write of packed integers. */ -final class BulkOperationPacked14 extends BulkOperation { - @Override - public int blockCount() { - return 7; - } +final class BulkOperationPacked14 extends BulkOperationPacked { - @Override - public int valueCount() { - return 32; + public BulkOperationPacked14() { + super(14); + assert blockCount() == 7; + assert valueCount() == 32; } @Override @@ -319,34 +316,4 @@ final class BulkOperationPacked14 extends BulkOperation { } } - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 50) | ((values[valuesOffset++] & 0xffffffffL) << 36) | ((values[valuesOffset++] & 0xffffffffL) << 22) | ((values[valuesOffset++] & 0xffffffffL) << 8) | ((values[valuesOffset] & 0xffffffffL) >>> 6); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 58) | ((values[valuesOffset++] & 0xffffffffL) << 44) | ((values[valuesOffset++] & 0xffffffffL) << 30) | ((values[valuesOffset++] & 0xffffffffL) << 16) | ((values[valuesOffset++] & 0xffffffffL) << 2) | ((values[valuesOffset] & 0xffffffffL) >>> 12); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 52) | ((values[valuesOffset++] & 0xffffffffL) << 38) | ((values[valuesOffset++] & 0xffffffffL) << 24) | ((values[valuesOffset++] & 0xffffffffL) << 10) | ((values[valuesOffset] & 0xffffffffL) >>> 4); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 60) | ((values[valuesOffset++] & 0xffffffffL) << 46) | ((values[valuesOffset++] & 0xffffffffL) << 32) | ((values[valuesOffset++] & 0xffffffffL) << 18) | ((values[valuesOffset++] & 0xffffffffL) << 4) | ((values[valuesOffset] & 0xffffffffL) >>> 10); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 54) | ((values[valuesOffset++] & 0xffffffffL) << 40) | ((values[valuesOffset++] & 0xffffffffL) << 26) | ((values[valuesOffset++] & 0xffffffffL) << 12) | ((values[valuesOffset] & 0xffffffffL) >>> 2); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 62) | ((values[valuesOffset++] & 0xffffffffL) << 48) | ((values[valuesOffset++] & 0xffffffffL) << 34) | ((values[valuesOffset++] & 0xffffffffL) << 20) | ((values[valuesOffset++] & 0xffffffffL) << 6) | ((values[valuesOffset] & 0xffffffffL) >>> 8); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 56) | ((values[valuesOffset++] & 0xffffffffL) << 42) | ((values[valuesOffset++] & 0xffffffffL) << 28) | ((values[valuesOffset++] & 0xffffffffL) << 14) | (values[valuesOffset++] & 0xffffffffL); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] << 50) | (values[valuesOffset++] << 36) | (values[valuesOffset++] << 22) | (values[valuesOffset++] << 8) | (values[valuesOffset] >>> 6); - blocks[blocksOffset++] = (values[valuesOffset++] << 58) | (values[valuesOffset++] << 44) | (values[valuesOffset++] << 30) | (values[valuesOffset++] << 16) | (values[valuesOffset++] << 2) | (values[valuesOffset] >>> 12); - blocks[blocksOffset++] = (values[valuesOffset++] << 52) | (values[valuesOffset++] << 38) | (values[valuesOffset++] << 24) | (values[valuesOffset++] << 10) | (values[valuesOffset] >>> 4); - blocks[blocksOffset++] = (values[valuesOffset++] << 60) | (values[valuesOffset++] << 46) | (values[valuesOffset++] << 32) | (values[valuesOffset++] << 18) | (values[valuesOffset++] << 4) | (values[valuesOffset] >>> 10); - blocks[blocksOffset++] = (values[valuesOffset++] << 54) | (values[valuesOffset++] << 40) | (values[valuesOffset++] << 26) | (values[valuesOffset++] << 12) | (values[valuesOffset] >>> 2); - blocks[blocksOffset++] = (values[valuesOffset++] << 62) | (values[valuesOffset++] << 48) | (values[valuesOffset++] << 34) | (values[valuesOffset++] << 20) | (values[valuesOffset++] << 6) | (values[valuesOffset] >>> 8); - blocks[blocksOffset++] = (values[valuesOffset++] << 56) | (values[valuesOffset++] << 42) | (values[valuesOffset++] << 28) | (values[valuesOffset++] << 14) | values[valuesOffset++]; - } - } - } diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked15.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked15.java index 90319279d18..9a7300a49e5 100644 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked15.java +++ b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked15.java @@ -22,15 +22,12 @@ package org.apache.lucene.util.packed; /** * Efficient sequential read/write of packed integers. */ -final class BulkOperationPacked15 extends BulkOperation { - @Override - public int blockCount() { - return 15; - } +final class BulkOperationPacked15 extends BulkOperationPacked { - @Override - public int valueCount() { - return 64; + public BulkOperationPacked15() { + super(15); + assert blockCount() == 15; + assert valueCount() == 64; } @Override @@ -591,50 +588,4 @@ final class BulkOperationPacked15 extends BulkOperation { } } - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 49) | ((values[valuesOffset++] & 0xffffffffL) << 34) | ((values[valuesOffset++] & 0xffffffffL) << 19) | ((values[valuesOffset++] & 0xffffffffL) << 4) | ((values[valuesOffset] & 0xffffffffL) >>> 11); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 53) | ((values[valuesOffset++] & 0xffffffffL) << 38) | ((values[valuesOffset++] & 0xffffffffL) << 23) | ((values[valuesOffset++] & 0xffffffffL) << 8) | ((values[valuesOffset] & 0xffffffffL) >>> 7); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 57) | ((values[valuesOffset++] & 0xffffffffL) << 42) | ((values[valuesOffset++] & 0xffffffffL) << 27) | ((values[valuesOffset++] & 0xffffffffL) << 12) | ((values[valuesOffset] & 0xffffffffL) >>> 3); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 61) | ((values[valuesOffset++] & 0xffffffffL) << 46) | ((values[valuesOffset++] & 0xffffffffL) << 31) | ((values[valuesOffset++] & 0xffffffffL) << 16) | ((values[valuesOffset++] & 0xffffffffL) << 1) | ((values[valuesOffset] & 0xffffffffL) >>> 14); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 50) | ((values[valuesOffset++] & 0xffffffffL) << 35) | ((values[valuesOffset++] & 0xffffffffL) << 20) | ((values[valuesOffset++] & 0xffffffffL) << 5) | ((values[valuesOffset] & 0xffffffffL) >>> 10); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 54) | ((values[valuesOffset++] & 0xffffffffL) << 39) | ((values[valuesOffset++] & 0xffffffffL) << 24) | ((values[valuesOffset++] & 0xffffffffL) << 9) | ((values[valuesOffset] & 0xffffffffL) >>> 6); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 58) | ((values[valuesOffset++] & 0xffffffffL) << 43) | ((values[valuesOffset++] & 0xffffffffL) << 28) | ((values[valuesOffset++] & 0xffffffffL) << 13) | ((values[valuesOffset] & 0xffffffffL) >>> 2); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 62) | ((values[valuesOffset++] & 0xffffffffL) << 47) | ((values[valuesOffset++] & 0xffffffffL) << 32) | ((values[valuesOffset++] & 0xffffffffL) << 17) | ((values[valuesOffset++] & 0xffffffffL) << 2) | ((values[valuesOffset] & 0xffffffffL) >>> 13); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 51) | ((values[valuesOffset++] & 0xffffffffL) << 36) | ((values[valuesOffset++] & 0xffffffffL) << 21) | ((values[valuesOffset++] & 0xffffffffL) << 6) | ((values[valuesOffset] & 0xffffffffL) >>> 9); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 55) | ((values[valuesOffset++] & 0xffffffffL) << 40) | ((values[valuesOffset++] & 0xffffffffL) << 25) | ((values[valuesOffset++] & 0xffffffffL) << 10) | ((values[valuesOffset] & 0xffffffffL) >>> 5); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 59) | ((values[valuesOffset++] & 0xffffffffL) << 44) | ((values[valuesOffset++] & 0xffffffffL) << 29) | ((values[valuesOffset++] & 0xffffffffL) << 14) | ((values[valuesOffset] & 0xffffffffL) >>> 1); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 63) | ((values[valuesOffset++] & 0xffffffffL) << 48) | ((values[valuesOffset++] & 0xffffffffL) << 33) | ((values[valuesOffset++] & 0xffffffffL) << 18) | ((values[valuesOffset++] & 0xffffffffL) << 3) | ((values[valuesOffset] & 0xffffffffL) >>> 12); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 52) | ((values[valuesOffset++] & 0xffffffffL) << 37) | ((values[valuesOffset++] & 0xffffffffL) << 22) | ((values[valuesOffset++] & 0xffffffffL) << 7) | ((values[valuesOffset] & 0xffffffffL) >>> 8); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 56) | ((values[valuesOffset++] & 0xffffffffL) << 41) | ((values[valuesOffset++] & 0xffffffffL) << 26) | ((values[valuesOffset++] & 0xffffffffL) << 11) | ((values[valuesOffset] & 0xffffffffL) >>> 4); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 60) | ((values[valuesOffset++] & 0xffffffffL) << 45) | ((values[valuesOffset++] & 0xffffffffL) << 30) | ((values[valuesOffset++] & 0xffffffffL) << 15) | (values[valuesOffset++] & 0xffffffffL); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] << 49) | (values[valuesOffset++] << 34) | (values[valuesOffset++] << 19) | (values[valuesOffset++] << 4) | (values[valuesOffset] >>> 11); - blocks[blocksOffset++] = (values[valuesOffset++] << 53) | (values[valuesOffset++] << 38) | (values[valuesOffset++] << 23) | (values[valuesOffset++] << 8) | (values[valuesOffset] >>> 7); - blocks[blocksOffset++] = (values[valuesOffset++] << 57) | (values[valuesOffset++] << 42) | (values[valuesOffset++] << 27) | (values[valuesOffset++] << 12) | (values[valuesOffset] >>> 3); - blocks[blocksOffset++] = (values[valuesOffset++] << 61) | (values[valuesOffset++] << 46) | (values[valuesOffset++] << 31) | (values[valuesOffset++] << 16) | (values[valuesOffset++] << 1) | (values[valuesOffset] >>> 14); - blocks[blocksOffset++] = (values[valuesOffset++] << 50) | (values[valuesOffset++] << 35) | (values[valuesOffset++] << 20) | (values[valuesOffset++] << 5) | (values[valuesOffset] >>> 10); - blocks[blocksOffset++] = (values[valuesOffset++] << 54) | (values[valuesOffset++] << 39) | (values[valuesOffset++] << 24) | (values[valuesOffset++] << 9) | (values[valuesOffset] >>> 6); - blocks[blocksOffset++] = (values[valuesOffset++] << 58) | (values[valuesOffset++] << 43) | (values[valuesOffset++] << 28) | (values[valuesOffset++] << 13) | (values[valuesOffset] >>> 2); - blocks[blocksOffset++] = (values[valuesOffset++] << 62) | (values[valuesOffset++] << 47) | (values[valuesOffset++] << 32) | (values[valuesOffset++] << 17) | (values[valuesOffset++] << 2) | (values[valuesOffset] >>> 13); - blocks[blocksOffset++] = (values[valuesOffset++] << 51) | (values[valuesOffset++] << 36) | (values[valuesOffset++] << 21) | (values[valuesOffset++] << 6) | (values[valuesOffset] >>> 9); - blocks[blocksOffset++] = (values[valuesOffset++] << 55) | (values[valuesOffset++] << 40) | (values[valuesOffset++] << 25) | (values[valuesOffset++] << 10) | (values[valuesOffset] >>> 5); - blocks[blocksOffset++] = (values[valuesOffset++] << 59) | (values[valuesOffset++] << 44) | (values[valuesOffset++] << 29) | (values[valuesOffset++] << 14) | (values[valuesOffset] >>> 1); - blocks[blocksOffset++] = (values[valuesOffset++] << 63) | (values[valuesOffset++] << 48) | (values[valuesOffset++] << 33) | (values[valuesOffset++] << 18) | (values[valuesOffset++] << 3) | (values[valuesOffset] >>> 12); - blocks[blocksOffset++] = (values[valuesOffset++] << 52) | (values[valuesOffset++] << 37) | (values[valuesOffset++] << 22) | (values[valuesOffset++] << 7) | (values[valuesOffset] >>> 8); - blocks[blocksOffset++] = (values[valuesOffset++] << 56) | (values[valuesOffset++] << 41) | (values[valuesOffset++] << 26) | (values[valuesOffset++] << 11) | (values[valuesOffset] >>> 4); - blocks[blocksOffset++] = (values[valuesOffset++] << 60) | (values[valuesOffset++] << 45) | (values[valuesOffset++] << 30) | (values[valuesOffset++] << 15) | values[valuesOffset++]; - } - } - } diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked16.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked16.java index 93aee65c944..a891b39516c 100644 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked16.java +++ b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked16.java @@ -22,15 +22,12 @@ package org.apache.lucene.util.packed; /** * Efficient sequential read/write of packed integers. */ -final class BulkOperationPacked16 extends BulkOperation { - @Override - public int blockCount() { - return 1; - } +final class BulkOperationPacked16 extends BulkOperationPacked { - @Override - public int valueCount() { - return 4; + public BulkOperationPacked16() { + super(16); + assert blockCount() == 1; + assert valueCount() == 4; } @Override @@ -99,22 +96,4 @@ final class BulkOperationPacked16 extends BulkOperation { } } - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 48) | ((values[valuesOffset++] & 0xffffffffL) << 32) | ((values[valuesOffset++] & 0xffffffffL) << 16) | (values[valuesOffset++] & 0xffffffffL); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] << 48) | (values[valuesOffset++] << 32) | (values[valuesOffset++] << 16) | values[valuesOffset++]; - } - } - } diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked17.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked17.java index b2a150e7636..31893b5712a 100644 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked17.java +++ b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked17.java @@ -22,15 +22,12 @@ package org.apache.lucene.util.packed; /** * Efficient sequential read/write of packed integers. */ -final class BulkOperationPacked17 extends BulkOperation { - @Override - public int blockCount() { - return 17; - } +final class BulkOperationPacked17 extends BulkOperationPacked { - @Override - public int valueCount() { - return 64; + public BulkOperationPacked17() { + super(17); + assert blockCount() == 17; + assert valueCount() == 64; } @Override @@ -627,54 +624,4 @@ final class BulkOperationPacked17 extends BulkOperation { } } - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 47) | ((values[valuesOffset++] & 0xffffffffL) << 30) | ((values[valuesOffset++] & 0xffffffffL) << 13) | ((values[valuesOffset] & 0xffffffffL) >>> 4); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 60) | ((values[valuesOffset++] & 0xffffffffL) << 43) | ((values[valuesOffset++] & 0xffffffffL) << 26) | ((values[valuesOffset++] & 0xffffffffL) << 9) | ((values[valuesOffset] & 0xffffffffL) >>> 8); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 56) | ((values[valuesOffset++] & 0xffffffffL) << 39) | ((values[valuesOffset++] & 0xffffffffL) << 22) | ((values[valuesOffset++] & 0xffffffffL) << 5) | ((values[valuesOffset] & 0xffffffffL) >>> 12); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 52) | ((values[valuesOffset++] & 0xffffffffL) << 35) | ((values[valuesOffset++] & 0xffffffffL) << 18) | ((values[valuesOffset++] & 0xffffffffL) << 1) | ((values[valuesOffset] & 0xffffffffL) >>> 16); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 48) | ((values[valuesOffset++] & 0xffffffffL) << 31) | ((values[valuesOffset++] & 0xffffffffL) << 14) | ((values[valuesOffset] & 0xffffffffL) >>> 3); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 61) | ((values[valuesOffset++] & 0xffffffffL) << 44) | ((values[valuesOffset++] & 0xffffffffL) << 27) | ((values[valuesOffset++] & 0xffffffffL) << 10) | ((values[valuesOffset] & 0xffffffffL) >>> 7); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 57) | ((values[valuesOffset++] & 0xffffffffL) << 40) | ((values[valuesOffset++] & 0xffffffffL) << 23) | ((values[valuesOffset++] & 0xffffffffL) << 6) | ((values[valuesOffset] & 0xffffffffL) >>> 11); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 53) | ((values[valuesOffset++] & 0xffffffffL) << 36) | ((values[valuesOffset++] & 0xffffffffL) << 19) | ((values[valuesOffset++] & 0xffffffffL) << 2) | ((values[valuesOffset] & 0xffffffffL) >>> 15); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 49) | ((values[valuesOffset++] & 0xffffffffL) << 32) | ((values[valuesOffset++] & 0xffffffffL) << 15) | ((values[valuesOffset] & 0xffffffffL) >>> 2); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 62) | ((values[valuesOffset++] & 0xffffffffL) << 45) | ((values[valuesOffset++] & 0xffffffffL) << 28) | ((values[valuesOffset++] & 0xffffffffL) << 11) | ((values[valuesOffset] & 0xffffffffL) >>> 6); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 58) | ((values[valuesOffset++] & 0xffffffffL) << 41) | ((values[valuesOffset++] & 0xffffffffL) << 24) | ((values[valuesOffset++] & 0xffffffffL) << 7) | ((values[valuesOffset] & 0xffffffffL) >>> 10); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 54) | ((values[valuesOffset++] & 0xffffffffL) << 37) | ((values[valuesOffset++] & 0xffffffffL) << 20) | ((values[valuesOffset++] & 0xffffffffL) << 3) | ((values[valuesOffset] & 0xffffffffL) >>> 14); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 50) | ((values[valuesOffset++] & 0xffffffffL) << 33) | ((values[valuesOffset++] & 0xffffffffL) << 16) | ((values[valuesOffset] & 0xffffffffL) >>> 1); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 63) | ((values[valuesOffset++] & 0xffffffffL) << 46) | ((values[valuesOffset++] & 0xffffffffL) << 29) | ((values[valuesOffset++] & 0xffffffffL) << 12) | ((values[valuesOffset] & 0xffffffffL) >>> 5); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 59) | ((values[valuesOffset++] & 0xffffffffL) << 42) | ((values[valuesOffset++] & 0xffffffffL) << 25) | ((values[valuesOffset++] & 0xffffffffL) << 8) | ((values[valuesOffset] & 0xffffffffL) >>> 9); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 55) | ((values[valuesOffset++] & 0xffffffffL) << 38) | ((values[valuesOffset++] & 0xffffffffL) << 21) | ((values[valuesOffset++] & 0xffffffffL) << 4) | ((values[valuesOffset] & 0xffffffffL) >>> 13); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 51) | ((values[valuesOffset++] & 0xffffffffL) << 34) | ((values[valuesOffset++] & 0xffffffffL) << 17) | (values[valuesOffset++] & 0xffffffffL); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] << 47) | (values[valuesOffset++] << 30) | (values[valuesOffset++] << 13) | (values[valuesOffset] >>> 4); - blocks[blocksOffset++] = (values[valuesOffset++] << 60) | (values[valuesOffset++] << 43) | (values[valuesOffset++] << 26) | (values[valuesOffset++] << 9) | (values[valuesOffset] >>> 8); - blocks[blocksOffset++] = (values[valuesOffset++] << 56) | (values[valuesOffset++] << 39) | (values[valuesOffset++] << 22) | (values[valuesOffset++] << 5) | (values[valuesOffset] >>> 12); - blocks[blocksOffset++] = (values[valuesOffset++] << 52) | (values[valuesOffset++] << 35) | (values[valuesOffset++] << 18) | (values[valuesOffset++] << 1) | (values[valuesOffset] >>> 16); - blocks[blocksOffset++] = (values[valuesOffset++] << 48) | (values[valuesOffset++] << 31) | (values[valuesOffset++] << 14) | (values[valuesOffset] >>> 3); - blocks[blocksOffset++] = (values[valuesOffset++] << 61) | (values[valuesOffset++] << 44) | (values[valuesOffset++] << 27) | (values[valuesOffset++] << 10) | (values[valuesOffset] >>> 7); - blocks[blocksOffset++] = (values[valuesOffset++] << 57) | (values[valuesOffset++] << 40) | (values[valuesOffset++] << 23) | (values[valuesOffset++] << 6) | (values[valuesOffset] >>> 11); - blocks[blocksOffset++] = (values[valuesOffset++] << 53) | (values[valuesOffset++] << 36) | (values[valuesOffset++] << 19) | (values[valuesOffset++] << 2) | (values[valuesOffset] >>> 15); - blocks[blocksOffset++] = (values[valuesOffset++] << 49) | (values[valuesOffset++] << 32) | (values[valuesOffset++] << 15) | (values[valuesOffset] >>> 2); - blocks[blocksOffset++] = (values[valuesOffset++] << 62) | (values[valuesOffset++] << 45) | (values[valuesOffset++] << 28) | (values[valuesOffset++] << 11) | (values[valuesOffset] >>> 6); - blocks[blocksOffset++] = (values[valuesOffset++] << 58) | (values[valuesOffset++] << 41) | (values[valuesOffset++] << 24) | (values[valuesOffset++] << 7) | (values[valuesOffset] >>> 10); - blocks[blocksOffset++] = (values[valuesOffset++] << 54) | (values[valuesOffset++] << 37) | (values[valuesOffset++] << 20) | (values[valuesOffset++] << 3) | (values[valuesOffset] >>> 14); - blocks[blocksOffset++] = (values[valuesOffset++] << 50) | (values[valuesOffset++] << 33) | (values[valuesOffset++] << 16) | (values[valuesOffset] >>> 1); - blocks[blocksOffset++] = (values[valuesOffset++] << 63) | (values[valuesOffset++] << 46) | (values[valuesOffset++] << 29) | (values[valuesOffset++] << 12) | (values[valuesOffset] >>> 5); - blocks[blocksOffset++] = (values[valuesOffset++] << 59) | (values[valuesOffset++] << 42) | (values[valuesOffset++] << 25) | (values[valuesOffset++] << 8) | (values[valuesOffset] >>> 9); - blocks[blocksOffset++] = (values[valuesOffset++] << 55) | (values[valuesOffset++] << 38) | (values[valuesOffset++] << 21) | (values[valuesOffset++] << 4) | (values[valuesOffset] >>> 13); - blocks[blocksOffset++] = (values[valuesOffset++] << 51) | (values[valuesOffset++] << 34) | (values[valuesOffset++] << 17) | values[valuesOffset++]; - } - } - } diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked18.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked18.java index 7a641ff28ce..67d9c1a382f 100644 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked18.java +++ b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked18.java @@ -22,15 +22,12 @@ package org.apache.lucene.util.packed; /** * Efficient sequential read/write of packed integers. */ -final class BulkOperationPacked18 extends BulkOperation { - @Override - public int blockCount() { - return 9; - } +final class BulkOperationPacked18 extends BulkOperationPacked { - @Override - public int valueCount() { - return 32; + public BulkOperationPacked18() { + super(18); + assert blockCount() == 9; + assert valueCount() == 32; } @Override @@ -355,38 +352,4 @@ final class BulkOperationPacked18 extends BulkOperation { } } - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 46) | ((values[valuesOffset++] & 0xffffffffL) << 28) | ((values[valuesOffset++] & 0xffffffffL) << 10) | ((values[valuesOffset] & 0xffffffffL) >>> 8); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 56) | ((values[valuesOffset++] & 0xffffffffL) << 38) | ((values[valuesOffset++] & 0xffffffffL) << 20) | ((values[valuesOffset++] & 0xffffffffL) << 2) | ((values[valuesOffset] & 0xffffffffL) >>> 16); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 48) | ((values[valuesOffset++] & 0xffffffffL) << 30) | ((values[valuesOffset++] & 0xffffffffL) << 12) | ((values[valuesOffset] & 0xffffffffL) >>> 6); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 58) | ((values[valuesOffset++] & 0xffffffffL) << 40) | ((values[valuesOffset++] & 0xffffffffL) << 22) | ((values[valuesOffset++] & 0xffffffffL) << 4) | ((values[valuesOffset] & 0xffffffffL) >>> 14); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 50) | ((values[valuesOffset++] & 0xffffffffL) << 32) | ((values[valuesOffset++] & 0xffffffffL) << 14) | ((values[valuesOffset] & 0xffffffffL) >>> 4); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 60) | ((values[valuesOffset++] & 0xffffffffL) << 42) | ((values[valuesOffset++] & 0xffffffffL) << 24) | ((values[valuesOffset++] & 0xffffffffL) << 6) | ((values[valuesOffset] & 0xffffffffL) >>> 12); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 52) | ((values[valuesOffset++] & 0xffffffffL) << 34) | ((values[valuesOffset++] & 0xffffffffL) << 16) | ((values[valuesOffset] & 0xffffffffL) >>> 2); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 62) | ((values[valuesOffset++] & 0xffffffffL) << 44) | ((values[valuesOffset++] & 0xffffffffL) << 26) | ((values[valuesOffset++] & 0xffffffffL) << 8) | ((values[valuesOffset] & 0xffffffffL) >>> 10); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 54) | ((values[valuesOffset++] & 0xffffffffL) << 36) | ((values[valuesOffset++] & 0xffffffffL) << 18) | (values[valuesOffset++] & 0xffffffffL); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] << 46) | (values[valuesOffset++] << 28) | (values[valuesOffset++] << 10) | (values[valuesOffset] >>> 8); - blocks[blocksOffset++] = (values[valuesOffset++] << 56) | (values[valuesOffset++] << 38) | (values[valuesOffset++] << 20) | (values[valuesOffset++] << 2) | (values[valuesOffset] >>> 16); - blocks[blocksOffset++] = (values[valuesOffset++] << 48) | (values[valuesOffset++] << 30) | (values[valuesOffset++] << 12) | (values[valuesOffset] >>> 6); - blocks[blocksOffset++] = (values[valuesOffset++] << 58) | (values[valuesOffset++] << 40) | (values[valuesOffset++] << 22) | (values[valuesOffset++] << 4) | (values[valuesOffset] >>> 14); - blocks[blocksOffset++] = (values[valuesOffset++] << 50) | (values[valuesOffset++] << 32) | (values[valuesOffset++] << 14) | (values[valuesOffset] >>> 4); - blocks[blocksOffset++] = (values[valuesOffset++] << 60) | (values[valuesOffset++] << 42) | (values[valuesOffset++] << 24) | (values[valuesOffset++] << 6) | (values[valuesOffset] >>> 12); - blocks[blocksOffset++] = (values[valuesOffset++] << 52) | (values[valuesOffset++] << 34) | (values[valuesOffset++] << 16) | (values[valuesOffset] >>> 2); - blocks[blocksOffset++] = (values[valuesOffset++] << 62) | (values[valuesOffset++] << 44) | (values[valuesOffset++] << 26) | (values[valuesOffset++] << 8) | (values[valuesOffset] >>> 10); - blocks[blocksOffset++] = (values[valuesOffset++] << 54) | (values[valuesOffset++] << 36) | (values[valuesOffset++] << 18) | values[valuesOffset++]; - } - } - } diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked19.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked19.java index a67dc35ab40..0597af8db35 100644 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked19.java +++ b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked19.java @@ -22,15 +22,12 @@ package org.apache.lucene.util.packed; /** * Efficient sequential read/write of packed integers. */ -final class BulkOperationPacked19 extends BulkOperation { - @Override - public int blockCount() { - return 19; - } +final class BulkOperationPacked19 extends BulkOperationPacked { - @Override - public int valueCount() { - return 64; + public BulkOperationPacked19() { + super(19); + assert blockCount() == 19; + assert valueCount() == 64; } @Override @@ -663,58 +660,4 @@ final class BulkOperationPacked19 extends BulkOperation { } } - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 45) | ((values[valuesOffset++] & 0xffffffffL) << 26) | ((values[valuesOffset++] & 0xffffffffL) << 7) | ((values[valuesOffset] & 0xffffffffL) >>> 12); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 52) | ((values[valuesOffset++] & 0xffffffffL) << 33) | ((values[valuesOffset++] & 0xffffffffL) << 14) | ((values[valuesOffset] & 0xffffffffL) >>> 5); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 59) | ((values[valuesOffset++] & 0xffffffffL) << 40) | ((values[valuesOffset++] & 0xffffffffL) << 21) | ((values[valuesOffset++] & 0xffffffffL) << 2) | ((values[valuesOffset] & 0xffffffffL) >>> 17); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 47) | ((values[valuesOffset++] & 0xffffffffL) << 28) | ((values[valuesOffset++] & 0xffffffffL) << 9) | ((values[valuesOffset] & 0xffffffffL) >>> 10); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 54) | ((values[valuesOffset++] & 0xffffffffL) << 35) | ((values[valuesOffset++] & 0xffffffffL) << 16) | ((values[valuesOffset] & 0xffffffffL) >>> 3); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 61) | ((values[valuesOffset++] & 0xffffffffL) << 42) | ((values[valuesOffset++] & 0xffffffffL) << 23) | ((values[valuesOffset++] & 0xffffffffL) << 4) | ((values[valuesOffset] & 0xffffffffL) >>> 15); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 49) | ((values[valuesOffset++] & 0xffffffffL) << 30) | ((values[valuesOffset++] & 0xffffffffL) << 11) | ((values[valuesOffset] & 0xffffffffL) >>> 8); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 56) | ((values[valuesOffset++] & 0xffffffffL) << 37) | ((values[valuesOffset++] & 0xffffffffL) << 18) | ((values[valuesOffset] & 0xffffffffL) >>> 1); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 63) | ((values[valuesOffset++] & 0xffffffffL) << 44) | ((values[valuesOffset++] & 0xffffffffL) << 25) | ((values[valuesOffset++] & 0xffffffffL) << 6) | ((values[valuesOffset] & 0xffffffffL) >>> 13); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 51) | ((values[valuesOffset++] & 0xffffffffL) << 32) | ((values[valuesOffset++] & 0xffffffffL) << 13) | ((values[valuesOffset] & 0xffffffffL) >>> 6); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 58) | ((values[valuesOffset++] & 0xffffffffL) << 39) | ((values[valuesOffset++] & 0xffffffffL) << 20) | ((values[valuesOffset++] & 0xffffffffL) << 1) | ((values[valuesOffset] & 0xffffffffL) >>> 18); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 46) | ((values[valuesOffset++] & 0xffffffffL) << 27) | ((values[valuesOffset++] & 0xffffffffL) << 8) | ((values[valuesOffset] & 0xffffffffL) >>> 11); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 53) | ((values[valuesOffset++] & 0xffffffffL) << 34) | ((values[valuesOffset++] & 0xffffffffL) << 15) | ((values[valuesOffset] & 0xffffffffL) >>> 4); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 60) | ((values[valuesOffset++] & 0xffffffffL) << 41) | ((values[valuesOffset++] & 0xffffffffL) << 22) | ((values[valuesOffset++] & 0xffffffffL) << 3) | ((values[valuesOffset] & 0xffffffffL) >>> 16); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 48) | ((values[valuesOffset++] & 0xffffffffL) << 29) | ((values[valuesOffset++] & 0xffffffffL) << 10) | ((values[valuesOffset] & 0xffffffffL) >>> 9); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 55) | ((values[valuesOffset++] & 0xffffffffL) << 36) | ((values[valuesOffset++] & 0xffffffffL) << 17) | ((values[valuesOffset] & 0xffffffffL) >>> 2); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 62) | ((values[valuesOffset++] & 0xffffffffL) << 43) | ((values[valuesOffset++] & 0xffffffffL) << 24) | ((values[valuesOffset++] & 0xffffffffL) << 5) | ((values[valuesOffset] & 0xffffffffL) >>> 14); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 50) | ((values[valuesOffset++] & 0xffffffffL) << 31) | ((values[valuesOffset++] & 0xffffffffL) << 12) | ((values[valuesOffset] & 0xffffffffL) >>> 7); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 57) | ((values[valuesOffset++] & 0xffffffffL) << 38) | ((values[valuesOffset++] & 0xffffffffL) << 19) | (values[valuesOffset++] & 0xffffffffL); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] << 45) | (values[valuesOffset++] << 26) | (values[valuesOffset++] << 7) | (values[valuesOffset] >>> 12); - blocks[blocksOffset++] = (values[valuesOffset++] << 52) | (values[valuesOffset++] << 33) | (values[valuesOffset++] << 14) | (values[valuesOffset] >>> 5); - blocks[blocksOffset++] = (values[valuesOffset++] << 59) | (values[valuesOffset++] << 40) | (values[valuesOffset++] << 21) | (values[valuesOffset++] << 2) | (values[valuesOffset] >>> 17); - blocks[blocksOffset++] = (values[valuesOffset++] << 47) | (values[valuesOffset++] << 28) | (values[valuesOffset++] << 9) | (values[valuesOffset] >>> 10); - blocks[blocksOffset++] = (values[valuesOffset++] << 54) | (values[valuesOffset++] << 35) | (values[valuesOffset++] << 16) | (values[valuesOffset] >>> 3); - blocks[blocksOffset++] = (values[valuesOffset++] << 61) | (values[valuesOffset++] << 42) | (values[valuesOffset++] << 23) | (values[valuesOffset++] << 4) | (values[valuesOffset] >>> 15); - blocks[blocksOffset++] = (values[valuesOffset++] << 49) | (values[valuesOffset++] << 30) | (values[valuesOffset++] << 11) | (values[valuesOffset] >>> 8); - blocks[blocksOffset++] = (values[valuesOffset++] << 56) | (values[valuesOffset++] << 37) | (values[valuesOffset++] << 18) | (values[valuesOffset] >>> 1); - blocks[blocksOffset++] = (values[valuesOffset++] << 63) | (values[valuesOffset++] << 44) | (values[valuesOffset++] << 25) | (values[valuesOffset++] << 6) | (values[valuesOffset] >>> 13); - blocks[blocksOffset++] = (values[valuesOffset++] << 51) | (values[valuesOffset++] << 32) | (values[valuesOffset++] << 13) | (values[valuesOffset] >>> 6); - blocks[blocksOffset++] = (values[valuesOffset++] << 58) | (values[valuesOffset++] << 39) | (values[valuesOffset++] << 20) | (values[valuesOffset++] << 1) | (values[valuesOffset] >>> 18); - blocks[blocksOffset++] = (values[valuesOffset++] << 46) | (values[valuesOffset++] << 27) | (values[valuesOffset++] << 8) | (values[valuesOffset] >>> 11); - blocks[blocksOffset++] = (values[valuesOffset++] << 53) | (values[valuesOffset++] << 34) | (values[valuesOffset++] << 15) | (values[valuesOffset] >>> 4); - blocks[blocksOffset++] = (values[valuesOffset++] << 60) | (values[valuesOffset++] << 41) | (values[valuesOffset++] << 22) | (values[valuesOffset++] << 3) | (values[valuesOffset] >>> 16); - blocks[blocksOffset++] = (values[valuesOffset++] << 48) | (values[valuesOffset++] << 29) | (values[valuesOffset++] << 10) | (values[valuesOffset] >>> 9); - blocks[blocksOffset++] = (values[valuesOffset++] << 55) | (values[valuesOffset++] << 36) | (values[valuesOffset++] << 17) | (values[valuesOffset] >>> 2); - blocks[blocksOffset++] = (values[valuesOffset++] << 62) | (values[valuesOffset++] << 43) | (values[valuesOffset++] << 24) | (values[valuesOffset++] << 5) | (values[valuesOffset] >>> 14); - blocks[blocksOffset++] = (values[valuesOffset++] << 50) | (values[valuesOffset++] << 31) | (values[valuesOffset++] << 12) | (values[valuesOffset] >>> 7); - blocks[blocksOffset++] = (values[valuesOffset++] << 57) | (values[valuesOffset++] << 38) | (values[valuesOffset++] << 19) | values[valuesOffset++]; - } - } - } diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked2.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked2.java index 39ac3e663f5..e8e1a2e32d4 100644 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked2.java +++ b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked2.java @@ -22,15 +22,12 @@ package org.apache.lucene.util.packed; /** * Efficient sequential read/write of packed integers. */ -final class BulkOperationPacked2 extends BulkOperation { - @Override - public int blockCount() { - return 1; - } +final class BulkOperationPacked2 extends BulkOperationPacked { - @Override - public int valueCount() { - return 32; + public BulkOperationPacked2() { + super(2); + assert blockCount() == 1; + assert valueCount() == 32; } @Override @@ -211,22 +208,4 @@ final class BulkOperationPacked2 extends BulkOperation { } } - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 62) | ((values[valuesOffset++] & 0xffffffffL) << 60) | ((values[valuesOffset++] & 0xffffffffL) << 58) | ((values[valuesOffset++] & 0xffffffffL) << 56) | ((values[valuesOffset++] & 0xffffffffL) << 54) | ((values[valuesOffset++] & 0xffffffffL) << 52) | ((values[valuesOffset++] & 0xffffffffL) << 50) | ((values[valuesOffset++] & 0xffffffffL) << 48) | ((values[valuesOffset++] & 0xffffffffL) << 46) | ((values[valuesOffset++] & 0xffffffffL) << 44) | ((values[valuesOffset++] & 0xffffffffL) << 42) | ((values[valuesOffset++] & 0xffffffffL) << 40) | ((values[valuesOffset++] & 0xffffffffL) << 38) | ((values[valuesOffset++] & 0xffffffffL) << 36) | ((values[valuesOffset++] & 0xffffffffL) << 34) | ((values[valuesOffset++] & 0xffffffffL) << 32) | ((values[valuesOffset++] & 0xffffffffL) << 30) | ((values[valuesOffset++] & 0xffffffffL) << 28) | ((values[valuesOffset++] & 0xffffffffL) << 26) | ((values[valuesOffset++] & 0xffffffffL) << 24) | ((values[valuesOffset++] & 0xffffffffL) << 22) | ((values[valuesOffset++] & 0xffffffffL) << 20) | ((values[valuesOffset++] & 0xffffffffL) << 18) | ((values[valuesOffset++] & 0xffffffffL) << 16) | ((values[valuesOffset++] & 0xffffffffL) << 14) | ((values[valuesOffset++] & 0xffffffffL) << 12) | ((values[valuesOffset++] & 0xffffffffL) << 10) | ((values[valuesOffset++] & 0xffffffffL) << 8) | ((values[valuesOffset++] & 0xffffffffL) << 6) | ((values[valuesOffset++] & 0xffffffffL) << 4) | ((values[valuesOffset++] & 0xffffffffL) << 2) | (values[valuesOffset++] & 0xffffffffL); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] << 62) | (values[valuesOffset++] << 60) | (values[valuesOffset++] << 58) | (values[valuesOffset++] << 56) | (values[valuesOffset++] << 54) | (values[valuesOffset++] << 52) | (values[valuesOffset++] << 50) | (values[valuesOffset++] << 48) | (values[valuesOffset++] << 46) | (values[valuesOffset++] << 44) | (values[valuesOffset++] << 42) | (values[valuesOffset++] << 40) | (values[valuesOffset++] << 38) | (values[valuesOffset++] << 36) | (values[valuesOffset++] << 34) | (values[valuesOffset++] << 32) | (values[valuesOffset++] << 30) | (values[valuesOffset++] << 28) | (values[valuesOffset++] << 26) | (values[valuesOffset++] << 24) | (values[valuesOffset++] << 22) | (values[valuesOffset++] << 20) | (values[valuesOffset++] << 18) | (values[valuesOffset++] << 16) | (values[valuesOffset++] << 14) | (values[valuesOffset++] << 12) | (values[valuesOffset++] << 10) | (values[valuesOffset++] << 8) | (values[valuesOffset++] << 6) | (values[valuesOffset++] << 4) | (values[valuesOffset++] << 2) | values[valuesOffset++]; - } - } - } diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked20.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked20.java index aa9f4bf1a51..b9b3bacf8be 100644 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked20.java +++ b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked20.java @@ -22,15 +22,12 @@ package org.apache.lucene.util.packed; /** * Efficient sequential read/write of packed integers. */ -final class BulkOperationPacked20 extends BulkOperation { - @Override - public int blockCount() { - return 5; - } +final class BulkOperationPacked20 extends BulkOperationPacked { - @Override - public int valueCount() { - return 16; + public BulkOperationPacked20() { + super(20); + assert blockCount() == 5; + assert valueCount() == 16; } @Override @@ -219,30 +216,4 @@ final class BulkOperationPacked20 extends BulkOperation { } } - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 44) | ((values[valuesOffset++] & 0xffffffffL) << 24) | ((values[valuesOffset++] & 0xffffffffL) << 4) | ((values[valuesOffset] & 0xffffffffL) >>> 16); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 48) | ((values[valuesOffset++] & 0xffffffffL) << 28) | ((values[valuesOffset++] & 0xffffffffL) << 8) | ((values[valuesOffset] & 0xffffffffL) >>> 12); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 52) | ((values[valuesOffset++] & 0xffffffffL) << 32) | ((values[valuesOffset++] & 0xffffffffL) << 12) | ((values[valuesOffset] & 0xffffffffL) >>> 8); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 56) | ((values[valuesOffset++] & 0xffffffffL) << 36) | ((values[valuesOffset++] & 0xffffffffL) << 16) | ((values[valuesOffset] & 0xffffffffL) >>> 4); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 60) | ((values[valuesOffset++] & 0xffffffffL) << 40) | ((values[valuesOffset++] & 0xffffffffL) << 20) | (values[valuesOffset++] & 0xffffffffL); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] << 44) | (values[valuesOffset++] << 24) | (values[valuesOffset++] << 4) | (values[valuesOffset] >>> 16); - blocks[blocksOffset++] = (values[valuesOffset++] << 48) | (values[valuesOffset++] << 28) | (values[valuesOffset++] << 8) | (values[valuesOffset] >>> 12); - blocks[blocksOffset++] = (values[valuesOffset++] << 52) | (values[valuesOffset++] << 32) | (values[valuesOffset++] << 12) | (values[valuesOffset] >>> 8); - blocks[blocksOffset++] = (values[valuesOffset++] << 56) | (values[valuesOffset++] << 36) | (values[valuesOffset++] << 16) | (values[valuesOffset] >>> 4); - blocks[blocksOffset++] = (values[valuesOffset++] << 60) | (values[valuesOffset++] << 40) | (values[valuesOffset++] << 20) | values[valuesOffset++]; - } - } - } diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked21.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked21.java index d02b0bf08a4..d2c886ed79d 100644 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked21.java +++ b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked21.java @@ -22,15 +22,12 @@ package org.apache.lucene.util.packed; /** * Efficient sequential read/write of packed integers. */ -final class BulkOperationPacked21 extends BulkOperation { - @Override - public int blockCount() { - return 21; - } +final class BulkOperationPacked21 extends BulkOperationPacked { - @Override - public int valueCount() { - return 64; + public BulkOperationPacked21() { + super(21); + assert blockCount() == 21; + assert valueCount() == 64; } @Override @@ -699,62 +696,4 @@ final class BulkOperationPacked21 extends BulkOperation { } } - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 43) | ((values[valuesOffset++] & 0xffffffffL) << 22) | ((values[valuesOffset++] & 0xffffffffL) << 1) | ((values[valuesOffset] & 0xffffffffL) >>> 20); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 44) | ((values[valuesOffset++] & 0xffffffffL) << 23) | ((values[valuesOffset++] & 0xffffffffL) << 2) | ((values[valuesOffset] & 0xffffffffL) >>> 19); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 45) | ((values[valuesOffset++] & 0xffffffffL) << 24) | ((values[valuesOffset++] & 0xffffffffL) << 3) | ((values[valuesOffset] & 0xffffffffL) >>> 18); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 46) | ((values[valuesOffset++] & 0xffffffffL) << 25) | ((values[valuesOffset++] & 0xffffffffL) << 4) | ((values[valuesOffset] & 0xffffffffL) >>> 17); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 47) | ((values[valuesOffset++] & 0xffffffffL) << 26) | ((values[valuesOffset++] & 0xffffffffL) << 5) | ((values[valuesOffset] & 0xffffffffL) >>> 16); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 48) | ((values[valuesOffset++] & 0xffffffffL) << 27) | ((values[valuesOffset++] & 0xffffffffL) << 6) | ((values[valuesOffset] & 0xffffffffL) >>> 15); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 49) | ((values[valuesOffset++] & 0xffffffffL) << 28) | ((values[valuesOffset++] & 0xffffffffL) << 7) | ((values[valuesOffset] & 0xffffffffL) >>> 14); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 50) | ((values[valuesOffset++] & 0xffffffffL) << 29) | ((values[valuesOffset++] & 0xffffffffL) << 8) | ((values[valuesOffset] & 0xffffffffL) >>> 13); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 51) | ((values[valuesOffset++] & 0xffffffffL) << 30) | ((values[valuesOffset++] & 0xffffffffL) << 9) | ((values[valuesOffset] & 0xffffffffL) >>> 12); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 52) | ((values[valuesOffset++] & 0xffffffffL) << 31) | ((values[valuesOffset++] & 0xffffffffL) << 10) | ((values[valuesOffset] & 0xffffffffL) >>> 11); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 53) | ((values[valuesOffset++] & 0xffffffffL) << 32) | ((values[valuesOffset++] & 0xffffffffL) << 11) | ((values[valuesOffset] & 0xffffffffL) >>> 10); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 54) | ((values[valuesOffset++] & 0xffffffffL) << 33) | ((values[valuesOffset++] & 0xffffffffL) << 12) | ((values[valuesOffset] & 0xffffffffL) >>> 9); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 55) | ((values[valuesOffset++] & 0xffffffffL) << 34) | ((values[valuesOffset++] & 0xffffffffL) << 13) | ((values[valuesOffset] & 0xffffffffL) >>> 8); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 56) | ((values[valuesOffset++] & 0xffffffffL) << 35) | ((values[valuesOffset++] & 0xffffffffL) << 14) | ((values[valuesOffset] & 0xffffffffL) >>> 7); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 57) | ((values[valuesOffset++] & 0xffffffffL) << 36) | ((values[valuesOffset++] & 0xffffffffL) << 15) | ((values[valuesOffset] & 0xffffffffL) >>> 6); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 58) | ((values[valuesOffset++] & 0xffffffffL) << 37) | ((values[valuesOffset++] & 0xffffffffL) << 16) | ((values[valuesOffset] & 0xffffffffL) >>> 5); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 59) | ((values[valuesOffset++] & 0xffffffffL) << 38) | ((values[valuesOffset++] & 0xffffffffL) << 17) | ((values[valuesOffset] & 0xffffffffL) >>> 4); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 60) | ((values[valuesOffset++] & 0xffffffffL) << 39) | ((values[valuesOffset++] & 0xffffffffL) << 18) | ((values[valuesOffset] & 0xffffffffL) >>> 3); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 61) | ((values[valuesOffset++] & 0xffffffffL) << 40) | ((values[valuesOffset++] & 0xffffffffL) << 19) | ((values[valuesOffset] & 0xffffffffL) >>> 2); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 62) | ((values[valuesOffset++] & 0xffffffffL) << 41) | ((values[valuesOffset++] & 0xffffffffL) << 20) | ((values[valuesOffset] & 0xffffffffL) >>> 1); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 63) | ((values[valuesOffset++] & 0xffffffffL) << 42) | ((values[valuesOffset++] & 0xffffffffL) << 21) | (values[valuesOffset++] & 0xffffffffL); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] << 43) | (values[valuesOffset++] << 22) | (values[valuesOffset++] << 1) | (values[valuesOffset] >>> 20); - blocks[blocksOffset++] = (values[valuesOffset++] << 44) | (values[valuesOffset++] << 23) | (values[valuesOffset++] << 2) | (values[valuesOffset] >>> 19); - blocks[blocksOffset++] = (values[valuesOffset++] << 45) | (values[valuesOffset++] << 24) | (values[valuesOffset++] << 3) | (values[valuesOffset] >>> 18); - blocks[blocksOffset++] = (values[valuesOffset++] << 46) | (values[valuesOffset++] << 25) | (values[valuesOffset++] << 4) | (values[valuesOffset] >>> 17); - blocks[blocksOffset++] = (values[valuesOffset++] << 47) | (values[valuesOffset++] << 26) | (values[valuesOffset++] << 5) | (values[valuesOffset] >>> 16); - blocks[blocksOffset++] = (values[valuesOffset++] << 48) | (values[valuesOffset++] << 27) | (values[valuesOffset++] << 6) | (values[valuesOffset] >>> 15); - blocks[blocksOffset++] = (values[valuesOffset++] << 49) | (values[valuesOffset++] << 28) | (values[valuesOffset++] << 7) | (values[valuesOffset] >>> 14); - blocks[blocksOffset++] = (values[valuesOffset++] << 50) | (values[valuesOffset++] << 29) | (values[valuesOffset++] << 8) | (values[valuesOffset] >>> 13); - blocks[blocksOffset++] = (values[valuesOffset++] << 51) | (values[valuesOffset++] << 30) | (values[valuesOffset++] << 9) | (values[valuesOffset] >>> 12); - blocks[blocksOffset++] = (values[valuesOffset++] << 52) | (values[valuesOffset++] << 31) | (values[valuesOffset++] << 10) | (values[valuesOffset] >>> 11); - blocks[blocksOffset++] = (values[valuesOffset++] << 53) | (values[valuesOffset++] << 32) | (values[valuesOffset++] << 11) | (values[valuesOffset] >>> 10); - blocks[blocksOffset++] = (values[valuesOffset++] << 54) | (values[valuesOffset++] << 33) | (values[valuesOffset++] << 12) | (values[valuesOffset] >>> 9); - blocks[blocksOffset++] = (values[valuesOffset++] << 55) | (values[valuesOffset++] << 34) | (values[valuesOffset++] << 13) | (values[valuesOffset] >>> 8); - blocks[blocksOffset++] = (values[valuesOffset++] << 56) | (values[valuesOffset++] << 35) | (values[valuesOffset++] << 14) | (values[valuesOffset] >>> 7); - blocks[blocksOffset++] = (values[valuesOffset++] << 57) | (values[valuesOffset++] << 36) | (values[valuesOffset++] << 15) | (values[valuesOffset] >>> 6); - blocks[blocksOffset++] = (values[valuesOffset++] << 58) | (values[valuesOffset++] << 37) | (values[valuesOffset++] << 16) | (values[valuesOffset] >>> 5); - blocks[blocksOffset++] = (values[valuesOffset++] << 59) | (values[valuesOffset++] << 38) | (values[valuesOffset++] << 17) | (values[valuesOffset] >>> 4); - blocks[blocksOffset++] = (values[valuesOffset++] << 60) | (values[valuesOffset++] << 39) | (values[valuesOffset++] << 18) | (values[valuesOffset] >>> 3); - blocks[blocksOffset++] = (values[valuesOffset++] << 61) | (values[valuesOffset++] << 40) | (values[valuesOffset++] << 19) | (values[valuesOffset] >>> 2); - blocks[blocksOffset++] = (values[valuesOffset++] << 62) | (values[valuesOffset++] << 41) | (values[valuesOffset++] << 20) | (values[valuesOffset] >>> 1); - blocks[blocksOffset++] = (values[valuesOffset++] << 63) | (values[valuesOffset++] << 42) | (values[valuesOffset++] << 21) | values[valuesOffset++]; - } - } - } diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked22.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked22.java index 67943e87507..7fded6fe362 100644 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked22.java +++ b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked22.java @@ -22,15 +22,12 @@ package org.apache.lucene.util.packed; /** * Efficient sequential read/write of packed integers. */ -final class BulkOperationPacked22 extends BulkOperation { - @Override - public int blockCount() { - return 11; - } +final class BulkOperationPacked22 extends BulkOperationPacked { - @Override - public int valueCount() { - return 32; + public BulkOperationPacked22() { + super(22); + assert blockCount() == 11; + assert valueCount() == 32; } @Override @@ -391,42 +388,4 @@ final class BulkOperationPacked22 extends BulkOperation { } } - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 42) | ((values[valuesOffset++] & 0xffffffffL) << 20) | ((values[valuesOffset] & 0xffffffffL) >>> 2); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 62) | ((values[valuesOffset++] & 0xffffffffL) << 40) | ((values[valuesOffset++] & 0xffffffffL) << 18) | ((values[valuesOffset] & 0xffffffffL) >>> 4); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 60) | ((values[valuesOffset++] & 0xffffffffL) << 38) | ((values[valuesOffset++] & 0xffffffffL) << 16) | ((values[valuesOffset] & 0xffffffffL) >>> 6); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 58) | ((values[valuesOffset++] & 0xffffffffL) << 36) | ((values[valuesOffset++] & 0xffffffffL) << 14) | ((values[valuesOffset] & 0xffffffffL) >>> 8); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 56) | ((values[valuesOffset++] & 0xffffffffL) << 34) | ((values[valuesOffset++] & 0xffffffffL) << 12) | ((values[valuesOffset] & 0xffffffffL) >>> 10); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 54) | ((values[valuesOffset++] & 0xffffffffL) << 32) | ((values[valuesOffset++] & 0xffffffffL) << 10) | ((values[valuesOffset] & 0xffffffffL) >>> 12); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 52) | ((values[valuesOffset++] & 0xffffffffL) << 30) | ((values[valuesOffset++] & 0xffffffffL) << 8) | ((values[valuesOffset] & 0xffffffffL) >>> 14); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 50) | ((values[valuesOffset++] & 0xffffffffL) << 28) | ((values[valuesOffset++] & 0xffffffffL) << 6) | ((values[valuesOffset] & 0xffffffffL) >>> 16); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 48) | ((values[valuesOffset++] & 0xffffffffL) << 26) | ((values[valuesOffset++] & 0xffffffffL) << 4) | ((values[valuesOffset] & 0xffffffffL) >>> 18); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 46) | ((values[valuesOffset++] & 0xffffffffL) << 24) | ((values[valuesOffset++] & 0xffffffffL) << 2) | ((values[valuesOffset] & 0xffffffffL) >>> 20); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 44) | ((values[valuesOffset++] & 0xffffffffL) << 22) | (values[valuesOffset++] & 0xffffffffL); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] << 42) | (values[valuesOffset++] << 20) | (values[valuesOffset] >>> 2); - blocks[blocksOffset++] = (values[valuesOffset++] << 62) | (values[valuesOffset++] << 40) | (values[valuesOffset++] << 18) | (values[valuesOffset] >>> 4); - blocks[blocksOffset++] = (values[valuesOffset++] << 60) | (values[valuesOffset++] << 38) | (values[valuesOffset++] << 16) | (values[valuesOffset] >>> 6); - blocks[blocksOffset++] = (values[valuesOffset++] << 58) | (values[valuesOffset++] << 36) | (values[valuesOffset++] << 14) | (values[valuesOffset] >>> 8); - blocks[blocksOffset++] = (values[valuesOffset++] << 56) | (values[valuesOffset++] << 34) | (values[valuesOffset++] << 12) | (values[valuesOffset] >>> 10); - blocks[blocksOffset++] = (values[valuesOffset++] << 54) | (values[valuesOffset++] << 32) | (values[valuesOffset++] << 10) | (values[valuesOffset] >>> 12); - blocks[blocksOffset++] = (values[valuesOffset++] << 52) | (values[valuesOffset++] << 30) | (values[valuesOffset++] << 8) | (values[valuesOffset] >>> 14); - blocks[blocksOffset++] = (values[valuesOffset++] << 50) | (values[valuesOffset++] << 28) | (values[valuesOffset++] << 6) | (values[valuesOffset] >>> 16); - blocks[blocksOffset++] = (values[valuesOffset++] << 48) | (values[valuesOffset++] << 26) | (values[valuesOffset++] << 4) | (values[valuesOffset] >>> 18); - blocks[blocksOffset++] = (values[valuesOffset++] << 46) | (values[valuesOffset++] << 24) | (values[valuesOffset++] << 2) | (values[valuesOffset] >>> 20); - blocks[blocksOffset++] = (values[valuesOffset++] << 44) | (values[valuesOffset++] << 22) | values[valuesOffset++]; - } - } - } diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked23.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked23.java index e2ee7bff767..67457981268 100644 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked23.java +++ b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked23.java @@ -22,15 +22,12 @@ package org.apache.lucene.util.packed; /** * Efficient sequential read/write of packed integers. */ -final class BulkOperationPacked23 extends BulkOperation { - @Override - public int blockCount() { - return 23; - } +final class BulkOperationPacked23 extends BulkOperationPacked { - @Override - public int valueCount() { - return 64; + public BulkOperationPacked23() { + super(23); + assert blockCount() == 23; + assert valueCount() == 64; } @Override @@ -735,66 +732,4 @@ final class BulkOperationPacked23 extends BulkOperation { } } - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 41) | ((values[valuesOffset++] & 0xffffffffL) << 18) | ((values[valuesOffset] & 0xffffffffL) >>> 5); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 59) | ((values[valuesOffset++] & 0xffffffffL) << 36) | ((values[valuesOffset++] & 0xffffffffL) << 13) | ((values[valuesOffset] & 0xffffffffL) >>> 10); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 54) | ((values[valuesOffset++] & 0xffffffffL) << 31) | ((values[valuesOffset++] & 0xffffffffL) << 8) | ((values[valuesOffset] & 0xffffffffL) >>> 15); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 49) | ((values[valuesOffset++] & 0xffffffffL) << 26) | ((values[valuesOffset++] & 0xffffffffL) << 3) | ((values[valuesOffset] & 0xffffffffL) >>> 20); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 44) | ((values[valuesOffset++] & 0xffffffffL) << 21) | ((values[valuesOffset] & 0xffffffffL) >>> 2); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 62) | ((values[valuesOffset++] & 0xffffffffL) << 39) | ((values[valuesOffset++] & 0xffffffffL) << 16) | ((values[valuesOffset] & 0xffffffffL) >>> 7); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 57) | ((values[valuesOffset++] & 0xffffffffL) << 34) | ((values[valuesOffset++] & 0xffffffffL) << 11) | ((values[valuesOffset] & 0xffffffffL) >>> 12); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 52) | ((values[valuesOffset++] & 0xffffffffL) << 29) | ((values[valuesOffset++] & 0xffffffffL) << 6) | ((values[valuesOffset] & 0xffffffffL) >>> 17); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 47) | ((values[valuesOffset++] & 0xffffffffL) << 24) | ((values[valuesOffset++] & 0xffffffffL) << 1) | ((values[valuesOffset] & 0xffffffffL) >>> 22); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 42) | ((values[valuesOffset++] & 0xffffffffL) << 19) | ((values[valuesOffset] & 0xffffffffL) >>> 4); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 60) | ((values[valuesOffset++] & 0xffffffffL) << 37) | ((values[valuesOffset++] & 0xffffffffL) << 14) | ((values[valuesOffset] & 0xffffffffL) >>> 9); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 55) | ((values[valuesOffset++] & 0xffffffffL) << 32) | ((values[valuesOffset++] & 0xffffffffL) << 9) | ((values[valuesOffset] & 0xffffffffL) >>> 14); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 50) | ((values[valuesOffset++] & 0xffffffffL) << 27) | ((values[valuesOffset++] & 0xffffffffL) << 4) | ((values[valuesOffset] & 0xffffffffL) >>> 19); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 45) | ((values[valuesOffset++] & 0xffffffffL) << 22) | ((values[valuesOffset] & 0xffffffffL) >>> 1); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 63) | ((values[valuesOffset++] & 0xffffffffL) << 40) | ((values[valuesOffset++] & 0xffffffffL) << 17) | ((values[valuesOffset] & 0xffffffffL) >>> 6); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 58) | ((values[valuesOffset++] & 0xffffffffL) << 35) | ((values[valuesOffset++] & 0xffffffffL) << 12) | ((values[valuesOffset] & 0xffffffffL) >>> 11); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 53) | ((values[valuesOffset++] & 0xffffffffL) << 30) | ((values[valuesOffset++] & 0xffffffffL) << 7) | ((values[valuesOffset] & 0xffffffffL) >>> 16); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 48) | ((values[valuesOffset++] & 0xffffffffL) << 25) | ((values[valuesOffset++] & 0xffffffffL) << 2) | ((values[valuesOffset] & 0xffffffffL) >>> 21); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 43) | ((values[valuesOffset++] & 0xffffffffL) << 20) | ((values[valuesOffset] & 0xffffffffL) >>> 3); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 61) | ((values[valuesOffset++] & 0xffffffffL) << 38) | ((values[valuesOffset++] & 0xffffffffL) << 15) | ((values[valuesOffset] & 0xffffffffL) >>> 8); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 56) | ((values[valuesOffset++] & 0xffffffffL) << 33) | ((values[valuesOffset++] & 0xffffffffL) << 10) | ((values[valuesOffset] & 0xffffffffL) >>> 13); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 51) | ((values[valuesOffset++] & 0xffffffffL) << 28) | ((values[valuesOffset++] & 0xffffffffL) << 5) | ((values[valuesOffset] & 0xffffffffL) >>> 18); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 46) | ((values[valuesOffset++] & 0xffffffffL) << 23) | (values[valuesOffset++] & 0xffffffffL); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] << 41) | (values[valuesOffset++] << 18) | (values[valuesOffset] >>> 5); - blocks[blocksOffset++] = (values[valuesOffset++] << 59) | (values[valuesOffset++] << 36) | (values[valuesOffset++] << 13) | (values[valuesOffset] >>> 10); - blocks[blocksOffset++] = (values[valuesOffset++] << 54) | (values[valuesOffset++] << 31) | (values[valuesOffset++] << 8) | (values[valuesOffset] >>> 15); - blocks[blocksOffset++] = (values[valuesOffset++] << 49) | (values[valuesOffset++] << 26) | (values[valuesOffset++] << 3) | (values[valuesOffset] >>> 20); - blocks[blocksOffset++] = (values[valuesOffset++] << 44) | (values[valuesOffset++] << 21) | (values[valuesOffset] >>> 2); - blocks[blocksOffset++] = (values[valuesOffset++] << 62) | (values[valuesOffset++] << 39) | (values[valuesOffset++] << 16) | (values[valuesOffset] >>> 7); - blocks[blocksOffset++] = (values[valuesOffset++] << 57) | (values[valuesOffset++] << 34) | (values[valuesOffset++] << 11) | (values[valuesOffset] >>> 12); - blocks[blocksOffset++] = (values[valuesOffset++] << 52) | (values[valuesOffset++] << 29) | (values[valuesOffset++] << 6) | (values[valuesOffset] >>> 17); - blocks[blocksOffset++] = (values[valuesOffset++] << 47) | (values[valuesOffset++] << 24) | (values[valuesOffset++] << 1) | (values[valuesOffset] >>> 22); - blocks[blocksOffset++] = (values[valuesOffset++] << 42) | (values[valuesOffset++] << 19) | (values[valuesOffset] >>> 4); - blocks[blocksOffset++] = (values[valuesOffset++] << 60) | (values[valuesOffset++] << 37) | (values[valuesOffset++] << 14) | (values[valuesOffset] >>> 9); - blocks[blocksOffset++] = (values[valuesOffset++] << 55) | (values[valuesOffset++] << 32) | (values[valuesOffset++] << 9) | (values[valuesOffset] >>> 14); - blocks[blocksOffset++] = (values[valuesOffset++] << 50) | (values[valuesOffset++] << 27) | (values[valuesOffset++] << 4) | (values[valuesOffset] >>> 19); - blocks[blocksOffset++] = (values[valuesOffset++] << 45) | (values[valuesOffset++] << 22) | (values[valuesOffset] >>> 1); - blocks[blocksOffset++] = (values[valuesOffset++] << 63) | (values[valuesOffset++] << 40) | (values[valuesOffset++] << 17) | (values[valuesOffset] >>> 6); - blocks[blocksOffset++] = (values[valuesOffset++] << 58) | (values[valuesOffset++] << 35) | (values[valuesOffset++] << 12) | (values[valuesOffset] >>> 11); - blocks[blocksOffset++] = (values[valuesOffset++] << 53) | (values[valuesOffset++] << 30) | (values[valuesOffset++] << 7) | (values[valuesOffset] >>> 16); - blocks[blocksOffset++] = (values[valuesOffset++] << 48) | (values[valuesOffset++] << 25) | (values[valuesOffset++] << 2) | (values[valuesOffset] >>> 21); - blocks[blocksOffset++] = (values[valuesOffset++] << 43) | (values[valuesOffset++] << 20) | (values[valuesOffset] >>> 3); - blocks[blocksOffset++] = (values[valuesOffset++] << 61) | (values[valuesOffset++] << 38) | (values[valuesOffset++] << 15) | (values[valuesOffset] >>> 8); - blocks[blocksOffset++] = (values[valuesOffset++] << 56) | (values[valuesOffset++] << 33) | (values[valuesOffset++] << 10) | (values[valuesOffset] >>> 13); - blocks[blocksOffset++] = (values[valuesOffset++] << 51) | (values[valuesOffset++] << 28) | (values[valuesOffset++] << 5) | (values[valuesOffset] >>> 18); - blocks[blocksOffset++] = (values[valuesOffset++] << 46) | (values[valuesOffset++] << 23) | values[valuesOffset++]; - } - } - } diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked24.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked24.java index c8138efc6db..cdca0887ff2 100644 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked24.java +++ b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked24.java @@ -22,15 +22,12 @@ package org.apache.lucene.util.packed; /** * Efficient sequential read/write of packed integers. */ -final class BulkOperationPacked24 extends BulkOperation { - @Override - public int blockCount() { - return 3; - } +final class BulkOperationPacked24 extends BulkOperationPacked { - @Override - public int valueCount() { - return 8; + public BulkOperationPacked24() { + super(24); + assert blockCount() == 3; + assert valueCount() == 8; } @Override @@ -151,26 +148,4 @@ final class BulkOperationPacked24 extends BulkOperation { } } - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 40) | ((values[valuesOffset++] & 0xffffffffL) << 16) | ((values[valuesOffset] & 0xffffffffL) >>> 8); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 56) | ((values[valuesOffset++] & 0xffffffffL) << 32) | ((values[valuesOffset++] & 0xffffffffL) << 8) | ((values[valuesOffset] & 0xffffffffL) >>> 16); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 48) | ((values[valuesOffset++] & 0xffffffffL) << 24) | (values[valuesOffset++] & 0xffffffffL); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] << 40) | (values[valuesOffset++] << 16) | (values[valuesOffset] >>> 8); - blocks[blocksOffset++] = (values[valuesOffset++] << 56) | (values[valuesOffset++] << 32) | (values[valuesOffset++] << 8) | (values[valuesOffset] >>> 16); - blocks[blocksOffset++] = (values[valuesOffset++] << 48) | (values[valuesOffset++] << 24) | values[valuesOffset++]; - } - } - } diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked25.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked25.java deleted file mode 100644 index 518035160fa..00000000000 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked25.java +++ /dev/null @@ -1,840 +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 BulkOperationPacked25 extends BulkOperation { - @Override - public int blockCount() { - return 25; - } - - @Override - public int valueCount() { - return 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 >>> 39); - values[valuesOffset++] = (int) ((block0 >>> 14) & 33554431L); - final long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block0 & 16383L) << 11) | (block1 >>> 53)); - values[valuesOffset++] = (int) ((block1 >>> 28) & 33554431L); - values[valuesOffset++] = (int) ((block1 >>> 3) & 33554431L); - final long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block1 & 7L) << 22) | (block2 >>> 42)); - values[valuesOffset++] = (int) ((block2 >>> 17) & 33554431L); - final long block3 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block2 & 131071L) << 8) | (block3 >>> 56)); - values[valuesOffset++] = (int) ((block3 >>> 31) & 33554431L); - values[valuesOffset++] = (int) ((block3 >>> 6) & 33554431L); - final long block4 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block3 & 63L) << 19) | (block4 >>> 45)); - values[valuesOffset++] = (int) ((block4 >>> 20) & 33554431L); - final long block5 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block4 & 1048575L) << 5) | (block5 >>> 59)); - values[valuesOffset++] = (int) ((block5 >>> 34) & 33554431L); - values[valuesOffset++] = (int) ((block5 >>> 9) & 33554431L); - final long block6 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block5 & 511L) << 16) | (block6 >>> 48)); - values[valuesOffset++] = (int) ((block6 >>> 23) & 33554431L); - final long block7 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block6 & 8388607L) << 2) | (block7 >>> 62)); - values[valuesOffset++] = (int) ((block7 >>> 37) & 33554431L); - values[valuesOffset++] = (int) ((block7 >>> 12) & 33554431L); - final long block8 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block7 & 4095L) << 13) | (block8 >>> 51)); - values[valuesOffset++] = (int) ((block8 >>> 26) & 33554431L); - values[valuesOffset++] = (int) ((block8 >>> 1) & 33554431L); - final long block9 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block8 & 1L) << 24) | (block9 >>> 40)); - values[valuesOffset++] = (int) ((block9 >>> 15) & 33554431L); - final long block10 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block9 & 32767L) << 10) | (block10 >>> 54)); - values[valuesOffset++] = (int) ((block10 >>> 29) & 33554431L); - values[valuesOffset++] = (int) ((block10 >>> 4) & 33554431L); - final long block11 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block10 & 15L) << 21) | (block11 >>> 43)); - values[valuesOffset++] = (int) ((block11 >>> 18) & 33554431L); - final long block12 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block11 & 262143L) << 7) | (block12 >>> 57)); - values[valuesOffset++] = (int) ((block12 >>> 32) & 33554431L); - values[valuesOffset++] = (int) ((block12 >>> 7) & 33554431L); - final long block13 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block12 & 127L) << 18) | (block13 >>> 46)); - values[valuesOffset++] = (int) ((block13 >>> 21) & 33554431L); - final long block14 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block13 & 2097151L) << 4) | (block14 >>> 60)); - values[valuesOffset++] = (int) ((block14 >>> 35) & 33554431L); - values[valuesOffset++] = (int) ((block14 >>> 10) & 33554431L); - final long block15 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block14 & 1023L) << 15) | (block15 >>> 49)); - values[valuesOffset++] = (int) ((block15 >>> 24) & 33554431L); - final long block16 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block15 & 16777215L) << 1) | (block16 >>> 63)); - values[valuesOffset++] = (int) ((block16 >>> 38) & 33554431L); - values[valuesOffset++] = (int) ((block16 >>> 13) & 33554431L); - final long block17 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block16 & 8191L) << 12) | (block17 >>> 52)); - values[valuesOffset++] = (int) ((block17 >>> 27) & 33554431L); - values[valuesOffset++] = (int) ((block17 >>> 2) & 33554431L); - final long block18 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block17 & 3L) << 23) | (block18 >>> 41)); - values[valuesOffset++] = (int) ((block18 >>> 16) & 33554431L); - final long block19 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block18 & 65535L) << 9) | (block19 >>> 55)); - values[valuesOffset++] = (int) ((block19 >>> 30) & 33554431L); - values[valuesOffset++] = (int) ((block19 >>> 5) & 33554431L); - final long block20 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block19 & 31L) << 20) | (block20 >>> 44)); - values[valuesOffset++] = (int) ((block20 >>> 19) & 33554431L); - final long block21 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block20 & 524287L) << 6) | (block21 >>> 58)); - values[valuesOffset++] = (int) ((block21 >>> 33) & 33554431L); - values[valuesOffset++] = (int) ((block21 >>> 8) & 33554431L); - final long block22 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block21 & 255L) << 17) | (block22 >>> 47)); - values[valuesOffset++] = (int) ((block22 >>> 22) & 33554431L); - final long block23 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block22 & 4194303L) << 3) | (block23 >>> 61)); - values[valuesOffset++] = (int) ((block23 >>> 36) & 33554431L); - values[valuesOffset++] = (int) ((block23 >>> 11) & 33554431L); - final long block24 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block23 & 2047L) << 14) | (block24 >>> 50)); - values[valuesOffset++] = (int) ((block24 >>> 25) & 33554431L); - values[valuesOffset++] = (int) (block24 & 33554431L); - } - } - - @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; - final int byte3 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte0 << 17) | (byte1 << 9) | (byte2 << 1) | (byte3 >>> 7); - final int byte4 = blocks[blocksOffset++] & 0xFF; - final int byte5 = blocks[blocksOffset++] & 0xFF; - final int byte6 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte3 & 127) << 18) | (byte4 << 10) | (byte5 << 2) | (byte6 >>> 6); - final int byte7 = blocks[blocksOffset++] & 0xFF; - final int byte8 = blocks[blocksOffset++] & 0xFF; - final int byte9 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte6 & 63) << 19) | (byte7 << 11) | (byte8 << 3) | (byte9 >>> 5); - final int byte10 = blocks[blocksOffset++] & 0xFF; - final int byte11 = blocks[blocksOffset++] & 0xFF; - final int byte12 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte9 & 31) << 20) | (byte10 << 12) | (byte11 << 4) | (byte12 >>> 4); - final int byte13 = blocks[blocksOffset++] & 0xFF; - final int byte14 = blocks[blocksOffset++] & 0xFF; - final int byte15 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte12 & 15) << 21) | (byte13 << 13) | (byte14 << 5) | (byte15 >>> 3); - final int byte16 = blocks[blocksOffset++] & 0xFF; - final int byte17 = blocks[blocksOffset++] & 0xFF; - final int byte18 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte15 & 7) << 22) | (byte16 << 14) | (byte17 << 6) | (byte18 >>> 2); - final int byte19 = blocks[blocksOffset++] & 0xFF; - final int byte20 = blocks[blocksOffset++] & 0xFF; - final int byte21 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte18 & 3) << 23) | (byte19 << 15) | (byte20 << 7) | (byte21 >>> 1); - final int byte22 = blocks[blocksOffset++] & 0xFF; - final int byte23 = blocks[blocksOffset++] & 0xFF; - final int byte24 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte21 & 1) << 24) | (byte22 << 16) | (byte23 << 8) | byte24; - final int byte25 = blocks[blocksOffset++] & 0xFF; - final int byte26 = blocks[blocksOffset++] & 0xFF; - final int byte27 = blocks[blocksOffset++] & 0xFF; - final int byte28 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte25 << 17) | (byte26 << 9) | (byte27 << 1) | (byte28 >>> 7); - final int byte29 = blocks[blocksOffset++] & 0xFF; - final int byte30 = blocks[blocksOffset++] & 0xFF; - final int byte31 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte28 & 127) << 18) | (byte29 << 10) | (byte30 << 2) | (byte31 >>> 6); - final int byte32 = blocks[blocksOffset++] & 0xFF; - final int byte33 = blocks[blocksOffset++] & 0xFF; - final int byte34 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte31 & 63) << 19) | (byte32 << 11) | (byte33 << 3) | (byte34 >>> 5); - final int byte35 = blocks[blocksOffset++] & 0xFF; - final int byte36 = blocks[blocksOffset++] & 0xFF; - final int byte37 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte34 & 31) << 20) | (byte35 << 12) | (byte36 << 4) | (byte37 >>> 4); - final int byte38 = blocks[blocksOffset++] & 0xFF; - final int byte39 = blocks[blocksOffset++] & 0xFF; - final int byte40 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte37 & 15) << 21) | (byte38 << 13) | (byte39 << 5) | (byte40 >>> 3); - final int byte41 = blocks[blocksOffset++] & 0xFF; - final int byte42 = blocks[blocksOffset++] & 0xFF; - final int byte43 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte40 & 7) << 22) | (byte41 << 14) | (byte42 << 6) | (byte43 >>> 2); - final int byte44 = blocks[blocksOffset++] & 0xFF; - final int byte45 = blocks[blocksOffset++] & 0xFF; - final int byte46 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte43 & 3) << 23) | (byte44 << 15) | (byte45 << 7) | (byte46 >>> 1); - final int byte47 = blocks[blocksOffset++] & 0xFF; - final int byte48 = blocks[blocksOffset++] & 0xFF; - final int byte49 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte46 & 1) << 24) | (byte47 << 16) | (byte48 << 8) | byte49; - final int byte50 = blocks[blocksOffset++] & 0xFF; - final int byte51 = blocks[blocksOffset++] & 0xFF; - final int byte52 = blocks[blocksOffset++] & 0xFF; - final int byte53 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte50 << 17) | (byte51 << 9) | (byte52 << 1) | (byte53 >>> 7); - final int byte54 = blocks[blocksOffset++] & 0xFF; - final int byte55 = blocks[blocksOffset++] & 0xFF; - final int byte56 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte53 & 127) << 18) | (byte54 << 10) | (byte55 << 2) | (byte56 >>> 6); - final int byte57 = blocks[blocksOffset++] & 0xFF; - final int byte58 = blocks[blocksOffset++] & 0xFF; - final int byte59 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte56 & 63) << 19) | (byte57 << 11) | (byte58 << 3) | (byte59 >>> 5); - final int byte60 = blocks[blocksOffset++] & 0xFF; - final int byte61 = blocks[blocksOffset++] & 0xFF; - final int byte62 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte59 & 31) << 20) | (byte60 << 12) | (byte61 << 4) | (byte62 >>> 4); - final int byte63 = blocks[blocksOffset++] & 0xFF; - final int byte64 = blocks[blocksOffset++] & 0xFF; - final int byte65 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte62 & 15) << 21) | (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) << 22) | (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) << 23) | (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) << 24) | (byte72 << 16) | (byte73 << 8) | byte74; - final int byte75 = blocks[blocksOffset++] & 0xFF; - final int byte76 = blocks[blocksOffset++] & 0xFF; - final int byte77 = blocks[blocksOffset++] & 0xFF; - final int byte78 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte75 << 17) | (byte76 << 9) | (byte77 << 1) | (byte78 >>> 7); - final int byte79 = blocks[blocksOffset++] & 0xFF; - final int byte80 = blocks[blocksOffset++] & 0xFF; - final int byte81 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte78 & 127) << 18) | (byte79 << 10) | (byte80 << 2) | (byte81 >>> 6); - final int byte82 = blocks[blocksOffset++] & 0xFF; - final int byte83 = blocks[blocksOffset++] & 0xFF; - final int byte84 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte81 & 63) << 19) | (byte82 << 11) | (byte83 << 3) | (byte84 >>> 5); - final int byte85 = blocks[blocksOffset++] & 0xFF; - final int byte86 = blocks[blocksOffset++] & 0xFF; - final int byte87 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte84 & 31) << 20) | (byte85 << 12) | (byte86 << 4) | (byte87 >>> 4); - final int byte88 = blocks[blocksOffset++] & 0xFF; - final int byte89 = blocks[blocksOffset++] & 0xFF; - final int byte90 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte87 & 15) << 21) | (byte88 << 13) | (byte89 << 5) | (byte90 >>> 3); - final int byte91 = blocks[blocksOffset++] & 0xFF; - final int byte92 = blocks[blocksOffset++] & 0xFF; - final int byte93 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte90 & 7) << 22) | (byte91 << 14) | (byte92 << 6) | (byte93 >>> 2); - final int byte94 = blocks[blocksOffset++] & 0xFF; - final int byte95 = blocks[blocksOffset++] & 0xFF; - final int byte96 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte93 & 3) << 23) | (byte94 << 15) | (byte95 << 7) | (byte96 >>> 1); - final int byte97 = blocks[blocksOffset++] & 0xFF; - final int byte98 = blocks[blocksOffset++] & 0xFF; - final int byte99 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte96 & 1) << 24) | (byte97 << 16) | (byte98 << 8) | byte99; - final int byte100 = blocks[blocksOffset++] & 0xFF; - final int byte101 = blocks[blocksOffset++] & 0xFF; - final int byte102 = blocks[blocksOffset++] & 0xFF; - final int byte103 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte100 << 17) | (byte101 << 9) | (byte102 << 1) | (byte103 >>> 7); - final int byte104 = blocks[blocksOffset++] & 0xFF; - final int byte105 = blocks[blocksOffset++] & 0xFF; - final int byte106 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte103 & 127) << 18) | (byte104 << 10) | (byte105 << 2) | (byte106 >>> 6); - final int byte107 = blocks[blocksOffset++] & 0xFF; - final int byte108 = blocks[blocksOffset++] & 0xFF; - final int byte109 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte106 & 63) << 19) | (byte107 << 11) | (byte108 << 3) | (byte109 >>> 5); - final int byte110 = blocks[blocksOffset++] & 0xFF; - final int byte111 = blocks[blocksOffset++] & 0xFF; - final int byte112 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte109 & 31) << 20) | (byte110 << 12) | (byte111 << 4) | (byte112 >>> 4); - final int byte113 = blocks[blocksOffset++] & 0xFF; - final int byte114 = blocks[blocksOffset++] & 0xFF; - final int byte115 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte112 & 15) << 21) | (byte113 << 13) | (byte114 << 5) | (byte115 >>> 3); - final int byte116 = blocks[blocksOffset++] & 0xFF; - final int byte117 = blocks[blocksOffset++] & 0xFF; - final int byte118 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte115 & 7) << 22) | (byte116 << 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) << 23) | (byte119 << 15) | (byte120 << 7) | (byte121 >>> 1); - final int byte122 = blocks[blocksOffset++] & 0xFF; - final int byte123 = blocks[blocksOffset++] & 0xFF; - final int byte124 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte121 & 1) << 24) | (byte122 << 16) | (byte123 << 8) | byte124; - final int byte125 = blocks[blocksOffset++] & 0xFF; - final int byte126 = blocks[blocksOffset++] & 0xFF; - final int byte127 = blocks[blocksOffset++] & 0xFF; - final int byte128 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte125 << 17) | (byte126 << 9) | (byte127 << 1) | (byte128 >>> 7); - final int byte129 = blocks[blocksOffset++] & 0xFF; - final int byte130 = blocks[blocksOffset++] & 0xFF; - final int byte131 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte128 & 127) << 18) | (byte129 << 10) | (byte130 << 2) | (byte131 >>> 6); - final int byte132 = blocks[blocksOffset++] & 0xFF; - final int byte133 = blocks[blocksOffset++] & 0xFF; - final int byte134 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte131 & 63) << 19) | (byte132 << 11) | (byte133 << 3) | (byte134 >>> 5); - final int byte135 = blocks[blocksOffset++] & 0xFF; - final int byte136 = blocks[blocksOffset++] & 0xFF; - final int byte137 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte134 & 31) << 20) | (byte135 << 12) | (byte136 << 4) | (byte137 >>> 4); - final int byte138 = blocks[blocksOffset++] & 0xFF; - final int byte139 = blocks[blocksOffset++] & 0xFF; - final int byte140 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte137 & 15) << 21) | (byte138 << 13) | (byte139 << 5) | (byte140 >>> 3); - final int byte141 = blocks[blocksOffset++] & 0xFF; - final int byte142 = blocks[blocksOffset++] & 0xFF; - final int byte143 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte140 & 7) << 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) << 23) | (byte144 << 15) | (byte145 << 7) | (byte146 >>> 1); - final int byte147 = blocks[blocksOffset++] & 0xFF; - final int byte148 = blocks[blocksOffset++] & 0xFF; - final int byte149 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte146 & 1) << 24) | (byte147 << 16) | (byte148 << 8) | byte149; - final int byte150 = blocks[blocksOffset++] & 0xFF; - final int byte151 = blocks[blocksOffset++] & 0xFF; - final int byte152 = blocks[blocksOffset++] & 0xFF; - final int byte153 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte150 << 17) | (byte151 << 9) | (byte152 << 1) | (byte153 >>> 7); - final int byte154 = blocks[blocksOffset++] & 0xFF; - final int byte155 = blocks[blocksOffset++] & 0xFF; - final int byte156 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte153 & 127) << 18) | (byte154 << 10) | (byte155 << 2) | (byte156 >>> 6); - final int byte157 = blocks[blocksOffset++] & 0xFF; - final int byte158 = blocks[blocksOffset++] & 0xFF; - final int byte159 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte156 & 63) << 19) | (byte157 << 11) | (byte158 << 3) | (byte159 >>> 5); - final int byte160 = blocks[blocksOffset++] & 0xFF; - final int byte161 = blocks[blocksOffset++] & 0xFF; - final int byte162 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte159 & 31) << 20) | (byte160 << 12) | (byte161 << 4) | (byte162 >>> 4); - final int byte163 = blocks[blocksOffset++] & 0xFF; - final int byte164 = blocks[blocksOffset++] & 0xFF; - final int byte165 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte162 & 15) << 21) | (byte163 << 13) | (byte164 << 5) | (byte165 >>> 3); - final int byte166 = blocks[blocksOffset++] & 0xFF; - final int byte167 = blocks[blocksOffset++] & 0xFF; - final int byte168 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte165 & 7) << 22) | (byte166 << 14) | (byte167 << 6) | (byte168 >>> 2); - final int byte169 = blocks[blocksOffset++] & 0xFF; - final int byte170 = blocks[blocksOffset++] & 0xFF; - final int byte171 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte168 & 3) << 23) | (byte169 << 15) | (byte170 << 7) | (byte171 >>> 1); - final int byte172 = blocks[blocksOffset++] & 0xFF; - final int byte173 = blocks[blocksOffset++] & 0xFF; - final int byte174 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte171 & 1) << 24) | (byte172 << 16) | (byte173 << 8) | byte174; - final int byte175 = blocks[blocksOffset++] & 0xFF; - final int byte176 = blocks[blocksOffset++] & 0xFF; - final int byte177 = blocks[blocksOffset++] & 0xFF; - final int byte178 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte175 << 17) | (byte176 << 9) | (byte177 << 1) | (byte178 >>> 7); - final int byte179 = blocks[blocksOffset++] & 0xFF; - final int byte180 = blocks[blocksOffset++] & 0xFF; - final int byte181 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte178 & 127) << 18) | (byte179 << 10) | (byte180 << 2) | (byte181 >>> 6); - final int byte182 = blocks[blocksOffset++] & 0xFF; - final int byte183 = blocks[blocksOffset++] & 0xFF; - final int byte184 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte181 & 63) << 19) | (byte182 << 11) | (byte183 << 3) | (byte184 >>> 5); - final int byte185 = blocks[blocksOffset++] & 0xFF; - final int byte186 = blocks[blocksOffset++] & 0xFF; - final int byte187 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte184 & 31) << 20) | (byte185 << 12) | (byte186 << 4) | (byte187 >>> 4); - final int byte188 = blocks[blocksOffset++] & 0xFF; - final int byte189 = blocks[blocksOffset++] & 0xFF; - final int byte190 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte187 & 15) << 21) | (byte188 << 13) | (byte189 << 5) | (byte190 >>> 3); - final int byte191 = blocks[blocksOffset++] & 0xFF; - final int byte192 = blocks[blocksOffset++] & 0xFF; - final int byte193 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte190 & 7) << 22) | (byte191 << 14) | (byte192 << 6) | (byte193 >>> 2); - final int byte194 = blocks[blocksOffset++] & 0xFF; - final int byte195 = blocks[blocksOffset++] & 0xFF; - final int byte196 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte193 & 3) << 23) | (byte194 << 15) | (byte195 << 7) | (byte196 >>> 1); - final int byte197 = blocks[blocksOffset++] & 0xFF; - final int byte198 = blocks[blocksOffset++] & 0xFF; - final int byte199 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte196 & 1) << 24) | (byte197 << 16) | (byte198 << 8) | byte199; - } - } - - @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 >>> 39; - values[valuesOffset++] = (block0 >>> 14) & 33554431L; - final long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block0 & 16383L) << 11) | (block1 >>> 53); - values[valuesOffset++] = (block1 >>> 28) & 33554431L; - values[valuesOffset++] = (block1 >>> 3) & 33554431L; - final long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block1 & 7L) << 22) | (block2 >>> 42); - values[valuesOffset++] = (block2 >>> 17) & 33554431L; - final long block3 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block2 & 131071L) << 8) | (block3 >>> 56); - values[valuesOffset++] = (block3 >>> 31) & 33554431L; - values[valuesOffset++] = (block3 >>> 6) & 33554431L; - final long block4 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block3 & 63L) << 19) | (block4 >>> 45); - values[valuesOffset++] = (block4 >>> 20) & 33554431L; - final long block5 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block4 & 1048575L) << 5) | (block5 >>> 59); - values[valuesOffset++] = (block5 >>> 34) & 33554431L; - values[valuesOffset++] = (block5 >>> 9) & 33554431L; - final long block6 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block5 & 511L) << 16) | (block6 >>> 48); - values[valuesOffset++] = (block6 >>> 23) & 33554431L; - final long block7 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block6 & 8388607L) << 2) | (block7 >>> 62); - values[valuesOffset++] = (block7 >>> 37) & 33554431L; - values[valuesOffset++] = (block7 >>> 12) & 33554431L; - final long block8 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block7 & 4095L) << 13) | (block8 >>> 51); - values[valuesOffset++] = (block8 >>> 26) & 33554431L; - values[valuesOffset++] = (block8 >>> 1) & 33554431L; - final long block9 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block8 & 1L) << 24) | (block9 >>> 40); - values[valuesOffset++] = (block9 >>> 15) & 33554431L; - final long block10 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block9 & 32767L) << 10) | (block10 >>> 54); - values[valuesOffset++] = (block10 >>> 29) & 33554431L; - values[valuesOffset++] = (block10 >>> 4) & 33554431L; - final long block11 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block10 & 15L) << 21) | (block11 >>> 43); - values[valuesOffset++] = (block11 >>> 18) & 33554431L; - final long block12 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block11 & 262143L) << 7) | (block12 >>> 57); - values[valuesOffset++] = (block12 >>> 32) & 33554431L; - values[valuesOffset++] = (block12 >>> 7) & 33554431L; - final long block13 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block12 & 127L) << 18) | (block13 >>> 46); - values[valuesOffset++] = (block13 >>> 21) & 33554431L; - final long block14 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block13 & 2097151L) << 4) | (block14 >>> 60); - values[valuesOffset++] = (block14 >>> 35) & 33554431L; - values[valuesOffset++] = (block14 >>> 10) & 33554431L; - final long block15 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block14 & 1023L) << 15) | (block15 >>> 49); - values[valuesOffset++] = (block15 >>> 24) & 33554431L; - final long block16 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block15 & 16777215L) << 1) | (block16 >>> 63); - values[valuesOffset++] = (block16 >>> 38) & 33554431L; - values[valuesOffset++] = (block16 >>> 13) & 33554431L; - final long block17 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block16 & 8191L) << 12) | (block17 >>> 52); - values[valuesOffset++] = (block17 >>> 27) & 33554431L; - values[valuesOffset++] = (block17 >>> 2) & 33554431L; - final long block18 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block17 & 3L) << 23) | (block18 >>> 41); - values[valuesOffset++] = (block18 >>> 16) & 33554431L; - final long block19 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block18 & 65535L) << 9) | (block19 >>> 55); - values[valuesOffset++] = (block19 >>> 30) & 33554431L; - values[valuesOffset++] = (block19 >>> 5) & 33554431L; - final long block20 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block19 & 31L) << 20) | (block20 >>> 44); - values[valuesOffset++] = (block20 >>> 19) & 33554431L; - final long block21 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block20 & 524287L) << 6) | (block21 >>> 58); - values[valuesOffset++] = (block21 >>> 33) & 33554431L; - values[valuesOffset++] = (block21 >>> 8) & 33554431L; - final long block22 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block21 & 255L) << 17) | (block22 >>> 47); - values[valuesOffset++] = (block22 >>> 22) & 33554431L; - final long block23 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block22 & 4194303L) << 3) | (block23 >>> 61); - values[valuesOffset++] = (block23 >>> 36) & 33554431L; - values[valuesOffset++] = (block23 >>> 11) & 33554431L; - final long block24 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block23 & 2047L) << 14) | (block24 >>> 50); - values[valuesOffset++] = (block24 >>> 25) & 33554431L; - values[valuesOffset++] = block24 & 33554431L; - } - } - - @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; - final long byte3 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte0 << 17) | (byte1 << 9) | (byte2 << 1) | (byte3 >>> 7); - final long byte4 = blocks[blocksOffset++] & 0xFF; - final long byte5 = blocks[blocksOffset++] & 0xFF; - final long byte6 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte3 & 127) << 18) | (byte4 << 10) | (byte5 << 2) | (byte6 >>> 6); - final long byte7 = blocks[blocksOffset++] & 0xFF; - final long byte8 = blocks[blocksOffset++] & 0xFF; - final long byte9 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte6 & 63) << 19) | (byte7 << 11) | (byte8 << 3) | (byte9 >>> 5); - final long byte10 = blocks[blocksOffset++] & 0xFF; - final long byte11 = blocks[blocksOffset++] & 0xFF; - final long byte12 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte9 & 31) << 20) | (byte10 << 12) | (byte11 << 4) | (byte12 >>> 4); - final long byte13 = blocks[blocksOffset++] & 0xFF; - final long byte14 = blocks[blocksOffset++] & 0xFF; - final long byte15 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte12 & 15) << 21) | (byte13 << 13) | (byte14 << 5) | (byte15 >>> 3); - final long byte16 = blocks[blocksOffset++] & 0xFF; - final long byte17 = blocks[blocksOffset++] & 0xFF; - final long byte18 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte15 & 7) << 22) | (byte16 << 14) | (byte17 << 6) | (byte18 >>> 2); - final long byte19 = blocks[blocksOffset++] & 0xFF; - final long byte20 = blocks[blocksOffset++] & 0xFF; - final long byte21 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte18 & 3) << 23) | (byte19 << 15) | (byte20 << 7) | (byte21 >>> 1); - final long byte22 = blocks[blocksOffset++] & 0xFF; - final long byte23 = blocks[blocksOffset++] & 0xFF; - final long byte24 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte21 & 1) << 24) | (byte22 << 16) | (byte23 << 8) | byte24; - final long byte25 = blocks[blocksOffset++] & 0xFF; - final long byte26 = blocks[blocksOffset++] & 0xFF; - final long byte27 = blocks[blocksOffset++] & 0xFF; - final long byte28 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte25 << 17) | (byte26 << 9) | (byte27 << 1) | (byte28 >>> 7); - final long byte29 = blocks[blocksOffset++] & 0xFF; - final long byte30 = blocks[blocksOffset++] & 0xFF; - final long byte31 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte28 & 127) << 18) | (byte29 << 10) | (byte30 << 2) | (byte31 >>> 6); - final long byte32 = blocks[blocksOffset++] & 0xFF; - final long byte33 = blocks[blocksOffset++] & 0xFF; - final long byte34 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte31 & 63) << 19) | (byte32 << 11) | (byte33 << 3) | (byte34 >>> 5); - final long byte35 = blocks[blocksOffset++] & 0xFF; - final long byte36 = blocks[blocksOffset++] & 0xFF; - final long byte37 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte34 & 31) << 20) | (byte35 << 12) | (byte36 << 4) | (byte37 >>> 4); - final long byte38 = blocks[blocksOffset++] & 0xFF; - final long byte39 = blocks[blocksOffset++] & 0xFF; - final long byte40 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte37 & 15) << 21) | (byte38 << 13) | (byte39 << 5) | (byte40 >>> 3); - final long byte41 = blocks[blocksOffset++] & 0xFF; - final long byte42 = blocks[blocksOffset++] & 0xFF; - final long byte43 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte40 & 7) << 22) | (byte41 << 14) | (byte42 << 6) | (byte43 >>> 2); - final long byte44 = blocks[blocksOffset++] & 0xFF; - final long byte45 = blocks[blocksOffset++] & 0xFF; - final long byte46 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte43 & 3) << 23) | (byte44 << 15) | (byte45 << 7) | (byte46 >>> 1); - final long byte47 = blocks[blocksOffset++] & 0xFF; - final long byte48 = blocks[blocksOffset++] & 0xFF; - final long byte49 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte46 & 1) << 24) | (byte47 << 16) | (byte48 << 8) | byte49; - final long byte50 = blocks[blocksOffset++] & 0xFF; - final long byte51 = blocks[blocksOffset++] & 0xFF; - final long byte52 = blocks[blocksOffset++] & 0xFF; - final long byte53 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte50 << 17) | (byte51 << 9) | (byte52 << 1) | (byte53 >>> 7); - final long byte54 = blocks[blocksOffset++] & 0xFF; - final long byte55 = blocks[blocksOffset++] & 0xFF; - final long byte56 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte53 & 127) << 18) | (byte54 << 10) | (byte55 << 2) | (byte56 >>> 6); - final long byte57 = blocks[blocksOffset++] & 0xFF; - final long byte58 = blocks[blocksOffset++] & 0xFF; - final long byte59 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte56 & 63) << 19) | (byte57 << 11) | (byte58 << 3) | (byte59 >>> 5); - final long byte60 = blocks[blocksOffset++] & 0xFF; - final long byte61 = blocks[blocksOffset++] & 0xFF; - final long byte62 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte59 & 31) << 20) | (byte60 << 12) | (byte61 << 4) | (byte62 >>> 4); - final long byte63 = blocks[blocksOffset++] & 0xFF; - final long byte64 = blocks[blocksOffset++] & 0xFF; - final long byte65 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte62 & 15) << 21) | (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) << 22) | (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) << 23) | (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) << 24) | (byte72 << 16) | (byte73 << 8) | byte74; - final long byte75 = blocks[blocksOffset++] & 0xFF; - final long byte76 = blocks[blocksOffset++] & 0xFF; - final long byte77 = blocks[blocksOffset++] & 0xFF; - final long byte78 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte75 << 17) | (byte76 << 9) | (byte77 << 1) | (byte78 >>> 7); - final long byte79 = blocks[blocksOffset++] & 0xFF; - final long byte80 = blocks[blocksOffset++] & 0xFF; - final long byte81 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte78 & 127) << 18) | (byte79 << 10) | (byte80 << 2) | (byte81 >>> 6); - final long byte82 = blocks[blocksOffset++] & 0xFF; - final long byte83 = blocks[blocksOffset++] & 0xFF; - final long byte84 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte81 & 63) << 19) | (byte82 << 11) | (byte83 << 3) | (byte84 >>> 5); - final long byte85 = blocks[blocksOffset++] & 0xFF; - final long byte86 = blocks[blocksOffset++] & 0xFF; - final long byte87 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte84 & 31) << 20) | (byte85 << 12) | (byte86 << 4) | (byte87 >>> 4); - final long byte88 = blocks[blocksOffset++] & 0xFF; - final long byte89 = blocks[blocksOffset++] & 0xFF; - final long byte90 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte87 & 15) << 21) | (byte88 << 13) | (byte89 << 5) | (byte90 >>> 3); - final long byte91 = blocks[blocksOffset++] & 0xFF; - final long byte92 = blocks[blocksOffset++] & 0xFF; - final long byte93 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte90 & 7) << 22) | (byte91 << 14) | (byte92 << 6) | (byte93 >>> 2); - final long byte94 = blocks[blocksOffset++] & 0xFF; - final long byte95 = blocks[blocksOffset++] & 0xFF; - final long byte96 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte93 & 3) << 23) | (byte94 << 15) | (byte95 << 7) | (byte96 >>> 1); - final long byte97 = blocks[blocksOffset++] & 0xFF; - final long byte98 = blocks[blocksOffset++] & 0xFF; - final long byte99 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte96 & 1) << 24) | (byte97 << 16) | (byte98 << 8) | byte99; - final long byte100 = blocks[blocksOffset++] & 0xFF; - final long byte101 = blocks[blocksOffset++] & 0xFF; - final long byte102 = blocks[blocksOffset++] & 0xFF; - final long byte103 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte100 << 17) | (byte101 << 9) | (byte102 << 1) | (byte103 >>> 7); - final long byte104 = blocks[blocksOffset++] & 0xFF; - final long byte105 = blocks[blocksOffset++] & 0xFF; - final long byte106 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte103 & 127) << 18) | (byte104 << 10) | (byte105 << 2) | (byte106 >>> 6); - final long byte107 = blocks[blocksOffset++] & 0xFF; - final long byte108 = blocks[blocksOffset++] & 0xFF; - final long byte109 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte106 & 63) << 19) | (byte107 << 11) | (byte108 << 3) | (byte109 >>> 5); - final long byte110 = blocks[blocksOffset++] & 0xFF; - final long byte111 = blocks[blocksOffset++] & 0xFF; - final long byte112 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte109 & 31) << 20) | (byte110 << 12) | (byte111 << 4) | (byte112 >>> 4); - final long byte113 = blocks[blocksOffset++] & 0xFF; - final long byte114 = blocks[blocksOffset++] & 0xFF; - final long byte115 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte112 & 15) << 21) | (byte113 << 13) | (byte114 << 5) | (byte115 >>> 3); - final long byte116 = blocks[blocksOffset++] & 0xFF; - final long byte117 = blocks[blocksOffset++] & 0xFF; - final long byte118 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte115 & 7) << 22) | (byte116 << 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) << 23) | (byte119 << 15) | (byte120 << 7) | (byte121 >>> 1); - final long byte122 = blocks[blocksOffset++] & 0xFF; - final long byte123 = blocks[blocksOffset++] & 0xFF; - final long byte124 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte121 & 1) << 24) | (byte122 << 16) | (byte123 << 8) | byte124; - final long byte125 = blocks[blocksOffset++] & 0xFF; - final long byte126 = blocks[blocksOffset++] & 0xFF; - final long byte127 = blocks[blocksOffset++] & 0xFF; - final long byte128 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte125 << 17) | (byte126 << 9) | (byte127 << 1) | (byte128 >>> 7); - final long byte129 = blocks[blocksOffset++] & 0xFF; - final long byte130 = blocks[blocksOffset++] & 0xFF; - final long byte131 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte128 & 127) << 18) | (byte129 << 10) | (byte130 << 2) | (byte131 >>> 6); - final long byte132 = blocks[blocksOffset++] & 0xFF; - final long byte133 = blocks[blocksOffset++] & 0xFF; - final long byte134 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte131 & 63) << 19) | (byte132 << 11) | (byte133 << 3) | (byte134 >>> 5); - final long byte135 = blocks[blocksOffset++] & 0xFF; - final long byte136 = blocks[blocksOffset++] & 0xFF; - final long byte137 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte134 & 31) << 20) | (byte135 << 12) | (byte136 << 4) | (byte137 >>> 4); - final long byte138 = blocks[blocksOffset++] & 0xFF; - final long byte139 = blocks[blocksOffset++] & 0xFF; - final long byte140 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte137 & 15) << 21) | (byte138 << 13) | (byte139 << 5) | (byte140 >>> 3); - final long byte141 = blocks[blocksOffset++] & 0xFF; - final long byte142 = blocks[blocksOffset++] & 0xFF; - final long byte143 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte140 & 7) << 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) << 23) | (byte144 << 15) | (byte145 << 7) | (byte146 >>> 1); - final long byte147 = blocks[blocksOffset++] & 0xFF; - final long byte148 = blocks[blocksOffset++] & 0xFF; - final long byte149 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte146 & 1) << 24) | (byte147 << 16) | (byte148 << 8) | byte149; - final long byte150 = blocks[blocksOffset++] & 0xFF; - final long byte151 = blocks[blocksOffset++] & 0xFF; - final long byte152 = blocks[blocksOffset++] & 0xFF; - final long byte153 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte150 << 17) | (byte151 << 9) | (byte152 << 1) | (byte153 >>> 7); - final long byte154 = blocks[blocksOffset++] & 0xFF; - final long byte155 = blocks[blocksOffset++] & 0xFF; - final long byte156 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte153 & 127) << 18) | (byte154 << 10) | (byte155 << 2) | (byte156 >>> 6); - final long byte157 = blocks[blocksOffset++] & 0xFF; - final long byte158 = blocks[blocksOffset++] & 0xFF; - final long byte159 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte156 & 63) << 19) | (byte157 << 11) | (byte158 << 3) | (byte159 >>> 5); - final long byte160 = blocks[blocksOffset++] & 0xFF; - final long byte161 = blocks[blocksOffset++] & 0xFF; - final long byte162 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte159 & 31) << 20) | (byte160 << 12) | (byte161 << 4) | (byte162 >>> 4); - final long byte163 = blocks[blocksOffset++] & 0xFF; - final long byte164 = blocks[blocksOffset++] & 0xFF; - final long byte165 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte162 & 15) << 21) | (byte163 << 13) | (byte164 << 5) | (byte165 >>> 3); - final long byte166 = blocks[blocksOffset++] & 0xFF; - final long byte167 = blocks[blocksOffset++] & 0xFF; - final long byte168 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte165 & 7) << 22) | (byte166 << 14) | (byte167 << 6) | (byte168 >>> 2); - final long byte169 = blocks[blocksOffset++] & 0xFF; - final long byte170 = blocks[blocksOffset++] & 0xFF; - final long byte171 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte168 & 3) << 23) | (byte169 << 15) | (byte170 << 7) | (byte171 >>> 1); - final long byte172 = blocks[blocksOffset++] & 0xFF; - final long byte173 = blocks[blocksOffset++] & 0xFF; - final long byte174 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte171 & 1) << 24) | (byte172 << 16) | (byte173 << 8) | byte174; - final long byte175 = blocks[blocksOffset++] & 0xFF; - final long byte176 = blocks[blocksOffset++] & 0xFF; - final long byte177 = blocks[blocksOffset++] & 0xFF; - final long byte178 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte175 << 17) | (byte176 << 9) | (byte177 << 1) | (byte178 >>> 7); - final long byte179 = blocks[blocksOffset++] & 0xFF; - final long byte180 = blocks[blocksOffset++] & 0xFF; - final long byte181 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte178 & 127) << 18) | (byte179 << 10) | (byte180 << 2) | (byte181 >>> 6); - final long byte182 = blocks[blocksOffset++] & 0xFF; - final long byte183 = blocks[blocksOffset++] & 0xFF; - final long byte184 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte181 & 63) << 19) | (byte182 << 11) | (byte183 << 3) | (byte184 >>> 5); - final long byte185 = blocks[blocksOffset++] & 0xFF; - final long byte186 = blocks[blocksOffset++] & 0xFF; - final long byte187 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte184 & 31) << 20) | (byte185 << 12) | (byte186 << 4) | (byte187 >>> 4); - final long byte188 = blocks[blocksOffset++] & 0xFF; - final long byte189 = blocks[blocksOffset++] & 0xFF; - final long byte190 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte187 & 15) << 21) | (byte188 << 13) | (byte189 << 5) | (byte190 >>> 3); - final long byte191 = blocks[blocksOffset++] & 0xFF; - final long byte192 = blocks[blocksOffset++] & 0xFF; - final long byte193 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte190 & 7) << 22) | (byte191 << 14) | (byte192 << 6) | (byte193 >>> 2); - final long byte194 = blocks[blocksOffset++] & 0xFF; - final long byte195 = blocks[blocksOffset++] & 0xFF; - final long byte196 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte193 & 3) << 23) | (byte194 << 15) | (byte195 << 7) | (byte196 >>> 1); - final long byte197 = blocks[blocksOffset++] & 0xFF; - final long byte198 = blocks[blocksOffset++] & 0xFF; - final long byte199 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte196 & 1) << 24) | (byte197 << 16) | (byte198 << 8) | byte199; - } - } - - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 39) | ((values[valuesOffset++] & 0xffffffffL) << 14) | ((values[valuesOffset] & 0xffffffffL) >>> 11); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 53) | ((values[valuesOffset++] & 0xffffffffL) << 28) | ((values[valuesOffset++] & 0xffffffffL) << 3) | ((values[valuesOffset] & 0xffffffffL) >>> 22); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 42) | ((values[valuesOffset++] & 0xffffffffL) << 17) | ((values[valuesOffset] & 0xffffffffL) >>> 8); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 56) | ((values[valuesOffset++] & 0xffffffffL) << 31) | ((values[valuesOffset++] & 0xffffffffL) << 6) | ((values[valuesOffset] & 0xffffffffL) >>> 19); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 45) | ((values[valuesOffset++] & 0xffffffffL) << 20) | ((values[valuesOffset] & 0xffffffffL) >>> 5); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 59) | ((values[valuesOffset++] & 0xffffffffL) << 34) | ((values[valuesOffset++] & 0xffffffffL) << 9) | ((values[valuesOffset] & 0xffffffffL) >>> 16); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 48) | ((values[valuesOffset++] & 0xffffffffL) << 23) | ((values[valuesOffset] & 0xffffffffL) >>> 2); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 62) | ((values[valuesOffset++] & 0xffffffffL) << 37) | ((values[valuesOffset++] & 0xffffffffL) << 12) | ((values[valuesOffset] & 0xffffffffL) >>> 13); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 51) | ((values[valuesOffset++] & 0xffffffffL) << 26) | ((values[valuesOffset++] & 0xffffffffL) << 1) | ((values[valuesOffset] & 0xffffffffL) >>> 24); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 40) | ((values[valuesOffset++] & 0xffffffffL) << 15) | ((values[valuesOffset] & 0xffffffffL) >>> 10); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 54) | ((values[valuesOffset++] & 0xffffffffL) << 29) | ((values[valuesOffset++] & 0xffffffffL) << 4) | ((values[valuesOffset] & 0xffffffffL) >>> 21); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 43) | ((values[valuesOffset++] & 0xffffffffL) << 18) | ((values[valuesOffset] & 0xffffffffL) >>> 7); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 57) | ((values[valuesOffset++] & 0xffffffffL) << 32) | ((values[valuesOffset++] & 0xffffffffL) << 7) | ((values[valuesOffset] & 0xffffffffL) >>> 18); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 46) | ((values[valuesOffset++] & 0xffffffffL) << 21) | ((values[valuesOffset] & 0xffffffffL) >>> 4); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 60) | ((values[valuesOffset++] & 0xffffffffL) << 35) | ((values[valuesOffset++] & 0xffffffffL) << 10) | ((values[valuesOffset] & 0xffffffffL) >>> 15); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 49) | ((values[valuesOffset++] & 0xffffffffL) << 24) | ((values[valuesOffset] & 0xffffffffL) >>> 1); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 63) | ((values[valuesOffset++] & 0xffffffffL) << 38) | ((values[valuesOffset++] & 0xffffffffL) << 13) | ((values[valuesOffset] & 0xffffffffL) >>> 12); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 52) | ((values[valuesOffset++] & 0xffffffffL) << 27) | ((values[valuesOffset++] & 0xffffffffL) << 2) | ((values[valuesOffset] & 0xffffffffL) >>> 23); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 41) | ((values[valuesOffset++] & 0xffffffffL) << 16) | ((values[valuesOffset] & 0xffffffffL) >>> 9); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 55) | ((values[valuesOffset++] & 0xffffffffL) << 30) | ((values[valuesOffset++] & 0xffffffffL) << 5) | ((values[valuesOffset] & 0xffffffffL) >>> 20); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 44) | ((values[valuesOffset++] & 0xffffffffL) << 19) | ((values[valuesOffset] & 0xffffffffL) >>> 6); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 58) | ((values[valuesOffset++] & 0xffffffffL) << 33) | ((values[valuesOffset++] & 0xffffffffL) << 8) | ((values[valuesOffset] & 0xffffffffL) >>> 17); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 47) | ((values[valuesOffset++] & 0xffffffffL) << 22) | ((values[valuesOffset] & 0xffffffffL) >>> 3); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 61) | ((values[valuesOffset++] & 0xffffffffL) << 36) | ((values[valuesOffset++] & 0xffffffffL) << 11) | ((values[valuesOffset] & 0xffffffffL) >>> 14); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 50) | ((values[valuesOffset++] & 0xffffffffL) << 25) | (values[valuesOffset++] & 0xffffffffL); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] << 39) | (values[valuesOffset++] << 14) | (values[valuesOffset] >>> 11); - blocks[blocksOffset++] = (values[valuesOffset++] << 53) | (values[valuesOffset++] << 28) | (values[valuesOffset++] << 3) | (values[valuesOffset] >>> 22); - blocks[blocksOffset++] = (values[valuesOffset++] << 42) | (values[valuesOffset++] << 17) | (values[valuesOffset] >>> 8); - blocks[blocksOffset++] = (values[valuesOffset++] << 56) | (values[valuesOffset++] << 31) | (values[valuesOffset++] << 6) | (values[valuesOffset] >>> 19); - blocks[blocksOffset++] = (values[valuesOffset++] << 45) | (values[valuesOffset++] << 20) | (values[valuesOffset] >>> 5); - blocks[blocksOffset++] = (values[valuesOffset++] << 59) | (values[valuesOffset++] << 34) | (values[valuesOffset++] << 9) | (values[valuesOffset] >>> 16); - blocks[blocksOffset++] = (values[valuesOffset++] << 48) | (values[valuesOffset++] << 23) | (values[valuesOffset] >>> 2); - blocks[blocksOffset++] = (values[valuesOffset++] << 62) | (values[valuesOffset++] << 37) | (values[valuesOffset++] << 12) | (values[valuesOffset] >>> 13); - blocks[blocksOffset++] = (values[valuesOffset++] << 51) | (values[valuesOffset++] << 26) | (values[valuesOffset++] << 1) | (values[valuesOffset] >>> 24); - blocks[blocksOffset++] = (values[valuesOffset++] << 40) | (values[valuesOffset++] << 15) | (values[valuesOffset] >>> 10); - blocks[blocksOffset++] = (values[valuesOffset++] << 54) | (values[valuesOffset++] << 29) | (values[valuesOffset++] << 4) | (values[valuesOffset] >>> 21); - blocks[blocksOffset++] = (values[valuesOffset++] << 43) | (values[valuesOffset++] << 18) | (values[valuesOffset] >>> 7); - blocks[blocksOffset++] = (values[valuesOffset++] << 57) | (values[valuesOffset++] << 32) | (values[valuesOffset++] << 7) | (values[valuesOffset] >>> 18); - blocks[blocksOffset++] = (values[valuesOffset++] << 46) | (values[valuesOffset++] << 21) | (values[valuesOffset] >>> 4); - blocks[blocksOffset++] = (values[valuesOffset++] << 60) | (values[valuesOffset++] << 35) | (values[valuesOffset++] << 10) | (values[valuesOffset] >>> 15); - blocks[blocksOffset++] = (values[valuesOffset++] << 49) | (values[valuesOffset++] << 24) | (values[valuesOffset] >>> 1); - blocks[blocksOffset++] = (values[valuesOffset++] << 63) | (values[valuesOffset++] << 38) | (values[valuesOffset++] << 13) | (values[valuesOffset] >>> 12); - blocks[blocksOffset++] = (values[valuesOffset++] << 52) | (values[valuesOffset++] << 27) | (values[valuesOffset++] << 2) | (values[valuesOffset] >>> 23); - blocks[blocksOffset++] = (values[valuesOffset++] << 41) | (values[valuesOffset++] << 16) | (values[valuesOffset] >>> 9); - blocks[blocksOffset++] = (values[valuesOffset++] << 55) | (values[valuesOffset++] << 30) | (values[valuesOffset++] << 5) | (values[valuesOffset] >>> 20); - blocks[blocksOffset++] = (values[valuesOffset++] << 44) | (values[valuesOffset++] << 19) | (values[valuesOffset] >>> 6); - blocks[blocksOffset++] = (values[valuesOffset++] << 58) | (values[valuesOffset++] << 33) | (values[valuesOffset++] << 8) | (values[valuesOffset] >>> 17); - blocks[blocksOffset++] = (values[valuesOffset++] << 47) | (values[valuesOffset++] << 22) | (values[valuesOffset] >>> 3); - blocks[blocksOffset++] = (values[valuesOffset++] << 61) | (values[valuesOffset++] << 36) | (values[valuesOffset++] << 11) | (values[valuesOffset] >>> 14); - blocks[blocksOffset++] = (values[valuesOffset++] << 50) | (values[valuesOffset++] << 25) | values[valuesOffset++]; - } - } - -} diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked26.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked26.java deleted file mode 100644 index 03e3e4a1645..00000000000 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked26.java +++ /dev/null @@ -1,472 +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 BulkOperationPacked26 extends BulkOperation { - @Override - public int blockCount() { - return 13; - } - - @Override - public int valueCount() { - return 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 >>> 38); - values[valuesOffset++] = (int) ((block0 >>> 12) & 67108863L); - final long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block0 & 4095L) << 14) | (block1 >>> 50)); - values[valuesOffset++] = (int) ((block1 >>> 24) & 67108863L); - final long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block1 & 16777215L) << 2) | (block2 >>> 62)); - values[valuesOffset++] = (int) ((block2 >>> 36) & 67108863L); - values[valuesOffset++] = (int) ((block2 >>> 10) & 67108863L); - final long block3 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block2 & 1023L) << 16) | (block3 >>> 48)); - values[valuesOffset++] = (int) ((block3 >>> 22) & 67108863L); - final long block4 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block3 & 4194303L) << 4) | (block4 >>> 60)); - values[valuesOffset++] = (int) ((block4 >>> 34) & 67108863L); - values[valuesOffset++] = (int) ((block4 >>> 8) & 67108863L); - final long block5 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block4 & 255L) << 18) | (block5 >>> 46)); - values[valuesOffset++] = (int) ((block5 >>> 20) & 67108863L); - final long block6 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block5 & 1048575L) << 6) | (block6 >>> 58)); - values[valuesOffset++] = (int) ((block6 >>> 32) & 67108863L); - values[valuesOffset++] = (int) ((block6 >>> 6) & 67108863L); - final long block7 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block6 & 63L) << 20) | (block7 >>> 44)); - values[valuesOffset++] = (int) ((block7 >>> 18) & 67108863L); - final long block8 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block7 & 262143L) << 8) | (block8 >>> 56)); - values[valuesOffset++] = (int) ((block8 >>> 30) & 67108863L); - values[valuesOffset++] = (int) ((block8 >>> 4) & 67108863L); - final long block9 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block8 & 15L) << 22) | (block9 >>> 42)); - values[valuesOffset++] = (int) ((block9 >>> 16) & 67108863L); - final long block10 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block9 & 65535L) << 10) | (block10 >>> 54)); - values[valuesOffset++] = (int) ((block10 >>> 28) & 67108863L); - values[valuesOffset++] = (int) ((block10 >>> 2) & 67108863L); - final long block11 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block10 & 3L) << 24) | (block11 >>> 40)); - values[valuesOffset++] = (int) ((block11 >>> 14) & 67108863L); - final long block12 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block11 & 16383L) << 12) | (block12 >>> 52)); - values[valuesOffset++] = (int) ((block12 >>> 26) & 67108863L); - values[valuesOffset++] = (int) (block12 & 67108863L); - } - } - - @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; - final int byte3 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte0 << 18) | (byte1 << 10) | (byte2 << 2) | (byte3 >>> 6); - final int byte4 = blocks[blocksOffset++] & 0xFF; - final int byte5 = blocks[blocksOffset++] & 0xFF; - final int byte6 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte3 & 63) << 20) | (byte4 << 12) | (byte5 << 4) | (byte6 >>> 4); - final int byte7 = blocks[blocksOffset++] & 0xFF; - final int byte8 = blocks[blocksOffset++] & 0xFF; - final int byte9 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte6 & 15) << 22) | (byte7 << 14) | (byte8 << 6) | (byte9 >>> 2); - final int byte10 = blocks[blocksOffset++] & 0xFF; - final int byte11 = blocks[blocksOffset++] & 0xFF; - final int byte12 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte9 & 3) << 24) | (byte10 << 16) | (byte11 << 8) | byte12; - final int byte13 = blocks[blocksOffset++] & 0xFF; - final int byte14 = blocks[blocksOffset++] & 0xFF; - final int byte15 = blocks[blocksOffset++] & 0xFF; - final int byte16 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte13 << 18) | (byte14 << 10) | (byte15 << 2) | (byte16 >>> 6); - final int byte17 = blocks[blocksOffset++] & 0xFF; - final int byte18 = blocks[blocksOffset++] & 0xFF; - final int byte19 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte16 & 63) << 20) | (byte17 << 12) | (byte18 << 4) | (byte19 >>> 4); - final int byte20 = blocks[blocksOffset++] & 0xFF; - final int byte21 = blocks[blocksOffset++] & 0xFF; - final int byte22 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte19 & 15) << 22) | (byte20 << 14) | (byte21 << 6) | (byte22 >>> 2); - final int byte23 = blocks[blocksOffset++] & 0xFF; - final int byte24 = blocks[blocksOffset++] & 0xFF; - final int byte25 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte22 & 3) << 24) | (byte23 << 16) | (byte24 << 8) | byte25; - final int byte26 = blocks[blocksOffset++] & 0xFF; - final int byte27 = blocks[blocksOffset++] & 0xFF; - final int byte28 = blocks[blocksOffset++] & 0xFF; - final int byte29 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte26 << 18) | (byte27 << 10) | (byte28 << 2) | (byte29 >>> 6); - final int byte30 = blocks[blocksOffset++] & 0xFF; - final int byte31 = blocks[blocksOffset++] & 0xFF; - final int byte32 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte29 & 63) << 20) | (byte30 << 12) | (byte31 << 4) | (byte32 >>> 4); - final int byte33 = blocks[blocksOffset++] & 0xFF; - final int byte34 = blocks[blocksOffset++] & 0xFF; - final int byte35 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte32 & 15) << 22) | (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) << 24) | (byte36 << 16) | (byte37 << 8) | byte38; - final int byte39 = blocks[blocksOffset++] & 0xFF; - final int byte40 = blocks[blocksOffset++] & 0xFF; - final int byte41 = blocks[blocksOffset++] & 0xFF; - final int byte42 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte39 << 18) | (byte40 << 10) | (byte41 << 2) | (byte42 >>> 6); - final int byte43 = blocks[blocksOffset++] & 0xFF; - final int byte44 = blocks[blocksOffset++] & 0xFF; - final int byte45 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte42 & 63) << 20) | (byte43 << 12) | (byte44 << 4) | (byte45 >>> 4); - final int byte46 = blocks[blocksOffset++] & 0xFF; - final int byte47 = blocks[blocksOffset++] & 0xFF; - final int byte48 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte45 & 15) << 22) | (byte46 << 14) | (byte47 << 6) | (byte48 >>> 2); - final int byte49 = blocks[blocksOffset++] & 0xFF; - final int byte50 = blocks[blocksOffset++] & 0xFF; - final int byte51 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte48 & 3) << 24) | (byte49 << 16) | (byte50 << 8) | byte51; - final int byte52 = blocks[blocksOffset++] & 0xFF; - final int byte53 = blocks[blocksOffset++] & 0xFF; - final int byte54 = blocks[blocksOffset++] & 0xFF; - final int byte55 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte52 << 18) | (byte53 << 10) | (byte54 << 2) | (byte55 >>> 6); - final int byte56 = blocks[blocksOffset++] & 0xFF; - final int byte57 = blocks[blocksOffset++] & 0xFF; - final int byte58 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte55 & 63) << 20) | (byte56 << 12) | (byte57 << 4) | (byte58 >>> 4); - final int byte59 = blocks[blocksOffset++] & 0xFF; - final int byte60 = blocks[blocksOffset++] & 0xFF; - final int byte61 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte58 & 15) << 22) | (byte59 << 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) << 24) | (byte62 << 16) | (byte63 << 8) | byte64; - final int byte65 = blocks[blocksOffset++] & 0xFF; - final int byte66 = blocks[blocksOffset++] & 0xFF; - final int byte67 = blocks[blocksOffset++] & 0xFF; - final int byte68 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte65 << 18) | (byte66 << 10) | (byte67 << 2) | (byte68 >>> 6); - final int byte69 = blocks[blocksOffset++] & 0xFF; - final int byte70 = blocks[blocksOffset++] & 0xFF; - final int byte71 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte68 & 63) << 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) << 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) << 24) | (byte75 << 16) | (byte76 << 8) | byte77; - final int byte78 = blocks[blocksOffset++] & 0xFF; - final int byte79 = blocks[blocksOffset++] & 0xFF; - final int byte80 = blocks[blocksOffset++] & 0xFF; - final int byte81 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte78 << 18) | (byte79 << 10) | (byte80 << 2) | (byte81 >>> 6); - final int byte82 = blocks[blocksOffset++] & 0xFF; - final int byte83 = blocks[blocksOffset++] & 0xFF; - final int byte84 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte81 & 63) << 20) | (byte82 << 12) | (byte83 << 4) | (byte84 >>> 4); - final int byte85 = blocks[blocksOffset++] & 0xFF; - final int byte86 = blocks[blocksOffset++] & 0xFF; - final int byte87 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte84 & 15) << 22) | (byte85 << 14) | (byte86 << 6) | (byte87 >>> 2); - final int byte88 = blocks[blocksOffset++] & 0xFF; - final int byte89 = blocks[blocksOffset++] & 0xFF; - final int byte90 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte87 & 3) << 24) | (byte88 << 16) | (byte89 << 8) | byte90; - final int byte91 = blocks[blocksOffset++] & 0xFF; - final int byte92 = blocks[blocksOffset++] & 0xFF; - final int byte93 = blocks[blocksOffset++] & 0xFF; - final int byte94 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte91 << 18) | (byte92 << 10) | (byte93 << 2) | (byte94 >>> 6); - final int byte95 = blocks[blocksOffset++] & 0xFF; - final int byte96 = blocks[blocksOffset++] & 0xFF; - final int byte97 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte94 & 63) << 20) | (byte95 << 12) | (byte96 << 4) | (byte97 >>> 4); - final int byte98 = blocks[blocksOffset++] & 0xFF; - final int byte99 = blocks[blocksOffset++] & 0xFF; - final int byte100 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte97 & 15) << 22) | (byte98 << 14) | (byte99 << 6) | (byte100 >>> 2); - final int byte101 = blocks[blocksOffset++] & 0xFF; - final int byte102 = blocks[blocksOffset++] & 0xFF; - final int byte103 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte100 & 3) << 24) | (byte101 << 16) | (byte102 << 8) | byte103; - } - } - - @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 >>> 38; - values[valuesOffset++] = (block0 >>> 12) & 67108863L; - final long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block0 & 4095L) << 14) | (block1 >>> 50); - values[valuesOffset++] = (block1 >>> 24) & 67108863L; - final long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block1 & 16777215L) << 2) | (block2 >>> 62); - values[valuesOffset++] = (block2 >>> 36) & 67108863L; - values[valuesOffset++] = (block2 >>> 10) & 67108863L; - final long block3 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block2 & 1023L) << 16) | (block3 >>> 48); - values[valuesOffset++] = (block3 >>> 22) & 67108863L; - final long block4 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block3 & 4194303L) << 4) | (block4 >>> 60); - values[valuesOffset++] = (block4 >>> 34) & 67108863L; - values[valuesOffset++] = (block4 >>> 8) & 67108863L; - final long block5 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block4 & 255L) << 18) | (block5 >>> 46); - values[valuesOffset++] = (block5 >>> 20) & 67108863L; - final long block6 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block5 & 1048575L) << 6) | (block6 >>> 58); - values[valuesOffset++] = (block6 >>> 32) & 67108863L; - values[valuesOffset++] = (block6 >>> 6) & 67108863L; - final long block7 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block6 & 63L) << 20) | (block7 >>> 44); - values[valuesOffset++] = (block7 >>> 18) & 67108863L; - final long block8 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block7 & 262143L) << 8) | (block8 >>> 56); - values[valuesOffset++] = (block8 >>> 30) & 67108863L; - values[valuesOffset++] = (block8 >>> 4) & 67108863L; - final long block9 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block8 & 15L) << 22) | (block9 >>> 42); - values[valuesOffset++] = (block9 >>> 16) & 67108863L; - final long block10 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block9 & 65535L) << 10) | (block10 >>> 54); - values[valuesOffset++] = (block10 >>> 28) & 67108863L; - values[valuesOffset++] = (block10 >>> 2) & 67108863L; - final long block11 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block10 & 3L) << 24) | (block11 >>> 40); - values[valuesOffset++] = (block11 >>> 14) & 67108863L; - final long block12 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block11 & 16383L) << 12) | (block12 >>> 52); - values[valuesOffset++] = (block12 >>> 26) & 67108863L; - values[valuesOffset++] = block12 & 67108863L; - } - } - - @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; - final long byte3 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte0 << 18) | (byte1 << 10) | (byte2 << 2) | (byte3 >>> 6); - final long byte4 = blocks[blocksOffset++] & 0xFF; - final long byte5 = blocks[blocksOffset++] & 0xFF; - final long byte6 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte3 & 63) << 20) | (byte4 << 12) | (byte5 << 4) | (byte6 >>> 4); - final long byte7 = blocks[blocksOffset++] & 0xFF; - final long byte8 = blocks[blocksOffset++] & 0xFF; - final long byte9 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte6 & 15) << 22) | (byte7 << 14) | (byte8 << 6) | (byte9 >>> 2); - final long byte10 = blocks[blocksOffset++] & 0xFF; - final long byte11 = blocks[blocksOffset++] & 0xFF; - final long byte12 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte9 & 3) << 24) | (byte10 << 16) | (byte11 << 8) | byte12; - final long byte13 = blocks[blocksOffset++] & 0xFF; - final long byte14 = blocks[blocksOffset++] & 0xFF; - final long byte15 = blocks[blocksOffset++] & 0xFF; - final long byte16 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte13 << 18) | (byte14 << 10) | (byte15 << 2) | (byte16 >>> 6); - final long byte17 = blocks[blocksOffset++] & 0xFF; - final long byte18 = blocks[blocksOffset++] & 0xFF; - final long byte19 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte16 & 63) << 20) | (byte17 << 12) | (byte18 << 4) | (byte19 >>> 4); - final long byte20 = blocks[blocksOffset++] & 0xFF; - final long byte21 = blocks[blocksOffset++] & 0xFF; - final long byte22 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte19 & 15) << 22) | (byte20 << 14) | (byte21 << 6) | (byte22 >>> 2); - final long byte23 = blocks[blocksOffset++] & 0xFF; - final long byte24 = blocks[blocksOffset++] & 0xFF; - final long byte25 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte22 & 3) << 24) | (byte23 << 16) | (byte24 << 8) | byte25; - final long byte26 = blocks[blocksOffset++] & 0xFF; - final long byte27 = blocks[blocksOffset++] & 0xFF; - final long byte28 = blocks[blocksOffset++] & 0xFF; - final long byte29 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte26 << 18) | (byte27 << 10) | (byte28 << 2) | (byte29 >>> 6); - final long byte30 = blocks[blocksOffset++] & 0xFF; - final long byte31 = blocks[blocksOffset++] & 0xFF; - final long byte32 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte29 & 63) << 20) | (byte30 << 12) | (byte31 << 4) | (byte32 >>> 4); - final long byte33 = blocks[blocksOffset++] & 0xFF; - final long byte34 = blocks[blocksOffset++] & 0xFF; - final long byte35 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte32 & 15) << 22) | (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) << 24) | (byte36 << 16) | (byte37 << 8) | byte38; - final long byte39 = blocks[blocksOffset++] & 0xFF; - final long byte40 = blocks[blocksOffset++] & 0xFF; - final long byte41 = blocks[blocksOffset++] & 0xFF; - final long byte42 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte39 << 18) | (byte40 << 10) | (byte41 << 2) | (byte42 >>> 6); - final long byte43 = blocks[blocksOffset++] & 0xFF; - final long byte44 = blocks[blocksOffset++] & 0xFF; - final long byte45 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte42 & 63) << 20) | (byte43 << 12) | (byte44 << 4) | (byte45 >>> 4); - final long byte46 = blocks[blocksOffset++] & 0xFF; - final long byte47 = blocks[blocksOffset++] & 0xFF; - final long byte48 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte45 & 15) << 22) | (byte46 << 14) | (byte47 << 6) | (byte48 >>> 2); - final long byte49 = blocks[blocksOffset++] & 0xFF; - final long byte50 = blocks[blocksOffset++] & 0xFF; - final long byte51 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte48 & 3) << 24) | (byte49 << 16) | (byte50 << 8) | byte51; - final long byte52 = blocks[blocksOffset++] & 0xFF; - final long byte53 = blocks[blocksOffset++] & 0xFF; - final long byte54 = blocks[blocksOffset++] & 0xFF; - final long byte55 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte52 << 18) | (byte53 << 10) | (byte54 << 2) | (byte55 >>> 6); - final long byte56 = blocks[blocksOffset++] & 0xFF; - final long byte57 = blocks[blocksOffset++] & 0xFF; - final long byte58 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte55 & 63) << 20) | (byte56 << 12) | (byte57 << 4) | (byte58 >>> 4); - final long byte59 = blocks[blocksOffset++] & 0xFF; - final long byte60 = blocks[blocksOffset++] & 0xFF; - final long byte61 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte58 & 15) << 22) | (byte59 << 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) << 24) | (byte62 << 16) | (byte63 << 8) | byte64; - final long byte65 = blocks[blocksOffset++] & 0xFF; - final long byte66 = blocks[blocksOffset++] & 0xFF; - final long byte67 = blocks[blocksOffset++] & 0xFF; - final long byte68 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte65 << 18) | (byte66 << 10) | (byte67 << 2) | (byte68 >>> 6); - final long byte69 = blocks[blocksOffset++] & 0xFF; - final long byte70 = blocks[blocksOffset++] & 0xFF; - final long byte71 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte68 & 63) << 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) << 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) << 24) | (byte75 << 16) | (byte76 << 8) | byte77; - final long byte78 = blocks[blocksOffset++] & 0xFF; - final long byte79 = blocks[blocksOffset++] & 0xFF; - final long byte80 = blocks[blocksOffset++] & 0xFF; - final long byte81 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte78 << 18) | (byte79 << 10) | (byte80 << 2) | (byte81 >>> 6); - final long byte82 = blocks[blocksOffset++] & 0xFF; - final long byte83 = blocks[blocksOffset++] & 0xFF; - final long byte84 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte81 & 63) << 20) | (byte82 << 12) | (byte83 << 4) | (byte84 >>> 4); - final long byte85 = blocks[blocksOffset++] & 0xFF; - final long byte86 = blocks[blocksOffset++] & 0xFF; - final long byte87 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte84 & 15) << 22) | (byte85 << 14) | (byte86 << 6) | (byte87 >>> 2); - final long byte88 = blocks[blocksOffset++] & 0xFF; - final long byte89 = blocks[blocksOffset++] & 0xFF; - final long byte90 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte87 & 3) << 24) | (byte88 << 16) | (byte89 << 8) | byte90; - final long byte91 = blocks[blocksOffset++] & 0xFF; - final long byte92 = blocks[blocksOffset++] & 0xFF; - final long byte93 = blocks[blocksOffset++] & 0xFF; - final long byte94 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte91 << 18) | (byte92 << 10) | (byte93 << 2) | (byte94 >>> 6); - final long byte95 = blocks[blocksOffset++] & 0xFF; - final long byte96 = blocks[blocksOffset++] & 0xFF; - final long byte97 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte94 & 63) << 20) | (byte95 << 12) | (byte96 << 4) | (byte97 >>> 4); - final long byte98 = blocks[blocksOffset++] & 0xFF; - final long byte99 = blocks[blocksOffset++] & 0xFF; - final long byte100 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte97 & 15) << 22) | (byte98 << 14) | (byte99 << 6) | (byte100 >>> 2); - final long byte101 = blocks[blocksOffset++] & 0xFF; - final long byte102 = blocks[blocksOffset++] & 0xFF; - final long byte103 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte100 & 3) << 24) | (byte101 << 16) | (byte102 << 8) | byte103; - } - } - - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 38) | ((values[valuesOffset++] & 0xffffffffL) << 12) | ((values[valuesOffset] & 0xffffffffL) >>> 14); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 50) | ((values[valuesOffset++] & 0xffffffffL) << 24) | ((values[valuesOffset] & 0xffffffffL) >>> 2); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 62) | ((values[valuesOffset++] & 0xffffffffL) << 36) | ((values[valuesOffset++] & 0xffffffffL) << 10) | ((values[valuesOffset] & 0xffffffffL) >>> 16); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 48) | ((values[valuesOffset++] & 0xffffffffL) << 22) | ((values[valuesOffset] & 0xffffffffL) >>> 4); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 60) | ((values[valuesOffset++] & 0xffffffffL) << 34) | ((values[valuesOffset++] & 0xffffffffL) << 8) | ((values[valuesOffset] & 0xffffffffL) >>> 18); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 46) | ((values[valuesOffset++] & 0xffffffffL) << 20) | ((values[valuesOffset] & 0xffffffffL) >>> 6); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 58) | ((values[valuesOffset++] & 0xffffffffL) << 32) | ((values[valuesOffset++] & 0xffffffffL) << 6) | ((values[valuesOffset] & 0xffffffffL) >>> 20); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 44) | ((values[valuesOffset++] & 0xffffffffL) << 18) | ((values[valuesOffset] & 0xffffffffL) >>> 8); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 56) | ((values[valuesOffset++] & 0xffffffffL) << 30) | ((values[valuesOffset++] & 0xffffffffL) << 4) | ((values[valuesOffset] & 0xffffffffL) >>> 22); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 42) | ((values[valuesOffset++] & 0xffffffffL) << 16) | ((values[valuesOffset] & 0xffffffffL) >>> 10); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 54) | ((values[valuesOffset++] & 0xffffffffL) << 28) | ((values[valuesOffset++] & 0xffffffffL) << 2) | ((values[valuesOffset] & 0xffffffffL) >>> 24); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 40) | ((values[valuesOffset++] & 0xffffffffL) << 14) | ((values[valuesOffset] & 0xffffffffL) >>> 12); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 52) | ((values[valuesOffset++] & 0xffffffffL) << 26) | (values[valuesOffset++] & 0xffffffffL); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] << 38) | (values[valuesOffset++] << 12) | (values[valuesOffset] >>> 14); - blocks[blocksOffset++] = (values[valuesOffset++] << 50) | (values[valuesOffset++] << 24) | (values[valuesOffset] >>> 2); - blocks[blocksOffset++] = (values[valuesOffset++] << 62) | (values[valuesOffset++] << 36) | (values[valuesOffset++] << 10) | (values[valuesOffset] >>> 16); - blocks[blocksOffset++] = (values[valuesOffset++] << 48) | (values[valuesOffset++] << 22) | (values[valuesOffset] >>> 4); - blocks[blocksOffset++] = (values[valuesOffset++] << 60) | (values[valuesOffset++] << 34) | (values[valuesOffset++] << 8) | (values[valuesOffset] >>> 18); - blocks[blocksOffset++] = (values[valuesOffset++] << 46) | (values[valuesOffset++] << 20) | (values[valuesOffset] >>> 6); - blocks[blocksOffset++] = (values[valuesOffset++] << 58) | (values[valuesOffset++] << 32) | (values[valuesOffset++] << 6) | (values[valuesOffset] >>> 20); - blocks[blocksOffset++] = (values[valuesOffset++] << 44) | (values[valuesOffset++] << 18) | (values[valuesOffset] >>> 8); - blocks[blocksOffset++] = (values[valuesOffset++] << 56) | (values[valuesOffset++] << 30) | (values[valuesOffset++] << 4) | (values[valuesOffset] >>> 22); - blocks[blocksOffset++] = (values[valuesOffset++] << 42) | (values[valuesOffset++] << 16) | (values[valuesOffset] >>> 10); - blocks[blocksOffset++] = (values[valuesOffset++] << 54) | (values[valuesOffset++] << 28) | (values[valuesOffset++] << 2) | (values[valuesOffset] >>> 24); - blocks[blocksOffset++] = (values[valuesOffset++] << 40) | (values[valuesOffset++] << 14) | (values[valuesOffset] >>> 12); - blocks[blocksOffset++] = (values[valuesOffset++] << 52) | (values[valuesOffset++] << 26) | values[valuesOffset++]; - } - } - -} diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked27.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked27.java deleted file mode 100644 index 0dd7837b9de..00000000000 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked27.java +++ /dev/null @@ -1,880 +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 BulkOperationPacked27 extends BulkOperation { - @Override - public int blockCount() { - return 27; - } - - @Override - public int valueCount() { - return 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 >>> 37); - values[valuesOffset++] = (int) ((block0 >>> 10) & 134217727L); - final long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block0 & 1023L) << 17) | (block1 >>> 47)); - values[valuesOffset++] = (int) ((block1 >>> 20) & 134217727L); - final long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block1 & 1048575L) << 7) | (block2 >>> 57)); - values[valuesOffset++] = (int) ((block2 >>> 30) & 134217727L); - values[valuesOffset++] = (int) ((block2 >>> 3) & 134217727L); - final long block3 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block2 & 7L) << 24) | (block3 >>> 40)); - values[valuesOffset++] = (int) ((block3 >>> 13) & 134217727L); - final long block4 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block3 & 8191L) << 14) | (block4 >>> 50)); - values[valuesOffset++] = (int) ((block4 >>> 23) & 134217727L); - final long block5 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block4 & 8388607L) << 4) | (block5 >>> 60)); - values[valuesOffset++] = (int) ((block5 >>> 33) & 134217727L); - values[valuesOffset++] = (int) ((block5 >>> 6) & 134217727L); - final long block6 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block5 & 63L) << 21) | (block6 >>> 43)); - values[valuesOffset++] = (int) ((block6 >>> 16) & 134217727L); - final long block7 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block6 & 65535L) << 11) | (block7 >>> 53)); - values[valuesOffset++] = (int) ((block7 >>> 26) & 134217727L); - final long block8 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block7 & 67108863L) << 1) | (block8 >>> 63)); - values[valuesOffset++] = (int) ((block8 >>> 36) & 134217727L); - values[valuesOffset++] = (int) ((block8 >>> 9) & 134217727L); - final long block9 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block8 & 511L) << 18) | (block9 >>> 46)); - values[valuesOffset++] = (int) ((block9 >>> 19) & 134217727L); - final long block10 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block9 & 524287L) << 8) | (block10 >>> 56)); - values[valuesOffset++] = (int) ((block10 >>> 29) & 134217727L); - values[valuesOffset++] = (int) ((block10 >>> 2) & 134217727L); - final long block11 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block10 & 3L) << 25) | (block11 >>> 39)); - values[valuesOffset++] = (int) ((block11 >>> 12) & 134217727L); - final long block12 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block11 & 4095L) << 15) | (block12 >>> 49)); - values[valuesOffset++] = (int) ((block12 >>> 22) & 134217727L); - final long block13 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block12 & 4194303L) << 5) | (block13 >>> 59)); - values[valuesOffset++] = (int) ((block13 >>> 32) & 134217727L); - values[valuesOffset++] = (int) ((block13 >>> 5) & 134217727L); - final long block14 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block13 & 31L) << 22) | (block14 >>> 42)); - values[valuesOffset++] = (int) ((block14 >>> 15) & 134217727L); - final long block15 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block14 & 32767L) << 12) | (block15 >>> 52)); - values[valuesOffset++] = (int) ((block15 >>> 25) & 134217727L); - final long block16 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block15 & 33554431L) << 2) | (block16 >>> 62)); - values[valuesOffset++] = (int) ((block16 >>> 35) & 134217727L); - values[valuesOffset++] = (int) ((block16 >>> 8) & 134217727L); - final long block17 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block16 & 255L) << 19) | (block17 >>> 45)); - values[valuesOffset++] = (int) ((block17 >>> 18) & 134217727L); - final long block18 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block17 & 262143L) << 9) | (block18 >>> 55)); - values[valuesOffset++] = (int) ((block18 >>> 28) & 134217727L); - values[valuesOffset++] = (int) ((block18 >>> 1) & 134217727L); - final long block19 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block18 & 1L) << 26) | (block19 >>> 38)); - values[valuesOffset++] = (int) ((block19 >>> 11) & 134217727L); - final long block20 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block19 & 2047L) << 16) | (block20 >>> 48)); - values[valuesOffset++] = (int) ((block20 >>> 21) & 134217727L); - final long block21 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block20 & 2097151L) << 6) | (block21 >>> 58)); - values[valuesOffset++] = (int) ((block21 >>> 31) & 134217727L); - values[valuesOffset++] = (int) ((block21 >>> 4) & 134217727L); - final long block22 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block21 & 15L) << 23) | (block22 >>> 41)); - values[valuesOffset++] = (int) ((block22 >>> 14) & 134217727L); - final long block23 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block22 & 16383L) << 13) | (block23 >>> 51)); - values[valuesOffset++] = (int) ((block23 >>> 24) & 134217727L); - final long block24 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block23 & 16777215L) << 3) | (block24 >>> 61)); - values[valuesOffset++] = (int) ((block24 >>> 34) & 134217727L); - values[valuesOffset++] = (int) ((block24 >>> 7) & 134217727L); - final long block25 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block24 & 127L) << 20) | (block25 >>> 44)); - values[valuesOffset++] = (int) ((block25 >>> 17) & 134217727L); - final long block26 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block25 & 131071L) << 10) | (block26 >>> 54)); - values[valuesOffset++] = (int) ((block26 >>> 27) & 134217727L); - values[valuesOffset++] = (int) (block26 & 134217727L); - } - } - - @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; - final int byte3 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte0 << 19) | (byte1 << 11) | (byte2 << 3) | (byte3 >>> 5); - final int byte4 = blocks[blocksOffset++] & 0xFF; - final int byte5 = blocks[blocksOffset++] & 0xFF; - final int byte6 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte3 & 31) << 22) | (byte4 << 14) | (byte5 << 6) | (byte6 >>> 2); - final int byte7 = blocks[blocksOffset++] & 0xFF; - final int byte8 = blocks[blocksOffset++] & 0xFF; - final int byte9 = blocks[blocksOffset++] & 0xFF; - final int byte10 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte6 & 3) << 25) | (byte7 << 17) | (byte8 << 9) | (byte9 << 1) | (byte10 >>> 7); - final int byte11 = blocks[blocksOffset++] & 0xFF; - final int byte12 = blocks[blocksOffset++] & 0xFF; - final int byte13 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte10 & 127) << 20) | (byte11 << 12) | (byte12 << 4) | (byte13 >>> 4); - final int byte14 = blocks[blocksOffset++] & 0xFF; - final int byte15 = blocks[blocksOffset++] & 0xFF; - final int byte16 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte13 & 15) << 23) | (byte14 << 15) | (byte15 << 7) | (byte16 >>> 1); - final int byte17 = blocks[blocksOffset++] & 0xFF; - final int byte18 = blocks[blocksOffset++] & 0xFF; - final int byte19 = blocks[blocksOffset++] & 0xFF; - final int byte20 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte16 & 1) << 26) | (byte17 << 18) | (byte18 << 10) | (byte19 << 2) | (byte20 >>> 6); - final int byte21 = blocks[blocksOffset++] & 0xFF; - final int byte22 = blocks[blocksOffset++] & 0xFF; - final int byte23 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte20 & 63) << 21) | (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) << 24) | (byte24 << 16) | (byte25 << 8) | byte26; - final int byte27 = blocks[blocksOffset++] & 0xFF; - final int byte28 = blocks[blocksOffset++] & 0xFF; - final int byte29 = blocks[blocksOffset++] & 0xFF; - final int byte30 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte27 << 19) | (byte28 << 11) | (byte29 << 3) | (byte30 >>> 5); - final int byte31 = blocks[blocksOffset++] & 0xFF; - final int byte32 = blocks[blocksOffset++] & 0xFF; - final int byte33 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte30 & 31) << 22) | (byte31 << 14) | (byte32 << 6) | (byte33 >>> 2); - final int byte34 = blocks[blocksOffset++] & 0xFF; - final int byte35 = blocks[blocksOffset++] & 0xFF; - final int byte36 = blocks[blocksOffset++] & 0xFF; - final int byte37 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte33 & 3) << 25) | (byte34 << 17) | (byte35 << 9) | (byte36 << 1) | (byte37 >>> 7); - final int byte38 = blocks[blocksOffset++] & 0xFF; - final int byte39 = blocks[blocksOffset++] & 0xFF; - final int byte40 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte37 & 127) << 20) | (byte38 << 12) | (byte39 << 4) | (byte40 >>> 4); - final int byte41 = blocks[blocksOffset++] & 0xFF; - final int byte42 = blocks[blocksOffset++] & 0xFF; - final int byte43 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte40 & 15) << 23) | (byte41 << 15) | (byte42 << 7) | (byte43 >>> 1); - final int byte44 = blocks[blocksOffset++] & 0xFF; - final int byte45 = blocks[blocksOffset++] & 0xFF; - final int byte46 = blocks[blocksOffset++] & 0xFF; - final int byte47 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte43 & 1) << 26) | (byte44 << 18) | (byte45 << 10) | (byte46 << 2) | (byte47 >>> 6); - final int byte48 = blocks[blocksOffset++] & 0xFF; - final int byte49 = blocks[blocksOffset++] & 0xFF; - final int byte50 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte47 & 63) << 21) | (byte48 << 13) | (byte49 << 5) | (byte50 >>> 3); - final int byte51 = blocks[blocksOffset++] & 0xFF; - final int byte52 = blocks[blocksOffset++] & 0xFF; - final int byte53 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte50 & 7) << 24) | (byte51 << 16) | (byte52 << 8) | byte53; - final int byte54 = blocks[blocksOffset++] & 0xFF; - final int byte55 = blocks[blocksOffset++] & 0xFF; - final int byte56 = blocks[blocksOffset++] & 0xFF; - final int byte57 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte54 << 19) | (byte55 << 11) | (byte56 << 3) | (byte57 >>> 5); - final int byte58 = blocks[blocksOffset++] & 0xFF; - final int byte59 = blocks[blocksOffset++] & 0xFF; - final int byte60 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte57 & 31) << 22) | (byte58 << 14) | (byte59 << 6) | (byte60 >>> 2); - final int byte61 = blocks[blocksOffset++] & 0xFF; - final int byte62 = blocks[blocksOffset++] & 0xFF; - final int byte63 = blocks[blocksOffset++] & 0xFF; - final int byte64 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte60 & 3) << 25) | (byte61 << 17) | (byte62 << 9) | (byte63 << 1) | (byte64 >>> 7); - final int byte65 = blocks[blocksOffset++] & 0xFF; - final int byte66 = blocks[blocksOffset++] & 0xFF; - final int byte67 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte64 & 127) << 20) | (byte65 << 12) | (byte66 << 4) | (byte67 >>> 4); - final int byte68 = blocks[blocksOffset++] & 0xFF; - final int byte69 = blocks[blocksOffset++] & 0xFF; - final int byte70 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte67 & 15) << 23) | (byte68 << 15) | (byte69 << 7) | (byte70 >>> 1); - final int byte71 = blocks[blocksOffset++] & 0xFF; - final int byte72 = blocks[blocksOffset++] & 0xFF; - final int byte73 = blocks[blocksOffset++] & 0xFF; - final int byte74 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte70 & 1) << 26) | (byte71 << 18) | (byte72 << 10) | (byte73 << 2) | (byte74 >>> 6); - final int byte75 = blocks[blocksOffset++] & 0xFF; - final int byte76 = blocks[blocksOffset++] & 0xFF; - final int byte77 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte74 & 63) << 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) << 24) | (byte78 << 16) | (byte79 << 8) | byte80; - final int byte81 = blocks[blocksOffset++] & 0xFF; - final int byte82 = blocks[blocksOffset++] & 0xFF; - final int byte83 = blocks[blocksOffset++] & 0xFF; - final int byte84 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte81 << 19) | (byte82 << 11) | (byte83 << 3) | (byte84 >>> 5); - final int byte85 = blocks[blocksOffset++] & 0xFF; - final int byte86 = blocks[blocksOffset++] & 0xFF; - final int byte87 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte84 & 31) << 22) | (byte85 << 14) | (byte86 << 6) | (byte87 >>> 2); - final int byte88 = blocks[blocksOffset++] & 0xFF; - final int byte89 = blocks[blocksOffset++] & 0xFF; - final int byte90 = blocks[blocksOffset++] & 0xFF; - final int byte91 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte87 & 3) << 25) | (byte88 << 17) | (byte89 << 9) | (byte90 << 1) | (byte91 >>> 7); - final int byte92 = blocks[blocksOffset++] & 0xFF; - final int byte93 = blocks[blocksOffset++] & 0xFF; - final int byte94 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte91 & 127) << 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) << 23) | (byte95 << 15) | (byte96 << 7) | (byte97 >>> 1); - final int byte98 = blocks[blocksOffset++] & 0xFF; - final int byte99 = blocks[blocksOffset++] & 0xFF; - final int byte100 = blocks[blocksOffset++] & 0xFF; - final int byte101 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte97 & 1) << 26) | (byte98 << 18) | (byte99 << 10) | (byte100 << 2) | (byte101 >>> 6); - final int byte102 = blocks[blocksOffset++] & 0xFF; - final int byte103 = blocks[blocksOffset++] & 0xFF; - final int byte104 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte101 & 63) << 21) | (byte102 << 13) | (byte103 << 5) | (byte104 >>> 3); - final int byte105 = blocks[blocksOffset++] & 0xFF; - final int byte106 = blocks[blocksOffset++] & 0xFF; - final int byte107 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte104 & 7) << 24) | (byte105 << 16) | (byte106 << 8) | byte107; - final int byte108 = blocks[blocksOffset++] & 0xFF; - final int byte109 = blocks[blocksOffset++] & 0xFF; - final int byte110 = blocks[blocksOffset++] & 0xFF; - final int byte111 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte108 << 19) | (byte109 << 11) | (byte110 << 3) | (byte111 >>> 5); - final int byte112 = blocks[blocksOffset++] & 0xFF; - final int byte113 = blocks[blocksOffset++] & 0xFF; - final int byte114 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte111 & 31) << 22) | (byte112 << 14) | (byte113 << 6) | (byte114 >>> 2); - final int byte115 = blocks[blocksOffset++] & 0xFF; - final int byte116 = blocks[blocksOffset++] & 0xFF; - final int byte117 = blocks[blocksOffset++] & 0xFF; - final int byte118 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte114 & 3) << 25) | (byte115 << 17) | (byte116 << 9) | (byte117 << 1) | (byte118 >>> 7); - final int byte119 = blocks[blocksOffset++] & 0xFF; - final int byte120 = blocks[blocksOffset++] & 0xFF; - final int byte121 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte118 & 127) << 20) | (byte119 << 12) | (byte120 << 4) | (byte121 >>> 4); - final int byte122 = blocks[blocksOffset++] & 0xFF; - final int byte123 = blocks[blocksOffset++] & 0xFF; - final int byte124 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte121 & 15) << 23) | (byte122 << 15) | (byte123 << 7) | (byte124 >>> 1); - final int byte125 = blocks[blocksOffset++] & 0xFF; - final int byte126 = blocks[blocksOffset++] & 0xFF; - final int byte127 = blocks[blocksOffset++] & 0xFF; - final int byte128 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte124 & 1) << 26) | (byte125 << 18) | (byte126 << 10) | (byte127 << 2) | (byte128 >>> 6); - final int byte129 = blocks[blocksOffset++] & 0xFF; - final int byte130 = blocks[blocksOffset++] & 0xFF; - final int byte131 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte128 & 63) << 21) | (byte129 << 13) | (byte130 << 5) | (byte131 >>> 3); - final int byte132 = blocks[blocksOffset++] & 0xFF; - final int byte133 = blocks[blocksOffset++] & 0xFF; - final int byte134 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte131 & 7) << 24) | (byte132 << 16) | (byte133 << 8) | byte134; - final int byte135 = blocks[blocksOffset++] & 0xFF; - final int byte136 = blocks[blocksOffset++] & 0xFF; - final int byte137 = blocks[blocksOffset++] & 0xFF; - final int byte138 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte135 << 19) | (byte136 << 11) | (byte137 << 3) | (byte138 >>> 5); - final int byte139 = blocks[blocksOffset++] & 0xFF; - final int byte140 = blocks[blocksOffset++] & 0xFF; - final int byte141 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte138 & 31) << 22) | (byte139 << 14) | (byte140 << 6) | (byte141 >>> 2); - final int byte142 = blocks[blocksOffset++] & 0xFF; - final int byte143 = blocks[blocksOffset++] & 0xFF; - final int byte144 = blocks[blocksOffset++] & 0xFF; - final int byte145 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte141 & 3) << 25) | (byte142 << 17) | (byte143 << 9) | (byte144 << 1) | (byte145 >>> 7); - final int byte146 = blocks[blocksOffset++] & 0xFF; - final int byte147 = blocks[blocksOffset++] & 0xFF; - final int byte148 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte145 & 127) << 20) | (byte146 << 12) | (byte147 << 4) | (byte148 >>> 4); - final int byte149 = blocks[blocksOffset++] & 0xFF; - final int byte150 = blocks[blocksOffset++] & 0xFF; - final int byte151 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte148 & 15) << 23) | (byte149 << 15) | (byte150 << 7) | (byte151 >>> 1); - final int byte152 = blocks[blocksOffset++] & 0xFF; - final int byte153 = blocks[blocksOffset++] & 0xFF; - final int byte154 = blocks[blocksOffset++] & 0xFF; - final int byte155 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte151 & 1) << 26) | (byte152 << 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) << 21) | (byte156 << 13) | (byte157 << 5) | (byte158 >>> 3); - final int byte159 = blocks[blocksOffset++] & 0xFF; - final int byte160 = blocks[blocksOffset++] & 0xFF; - final int byte161 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte158 & 7) << 24) | (byte159 << 16) | (byte160 << 8) | byte161; - final int byte162 = blocks[blocksOffset++] & 0xFF; - final int byte163 = blocks[blocksOffset++] & 0xFF; - final int byte164 = blocks[blocksOffset++] & 0xFF; - final int byte165 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte162 << 19) | (byte163 << 11) | (byte164 << 3) | (byte165 >>> 5); - final int byte166 = blocks[blocksOffset++] & 0xFF; - final int byte167 = blocks[blocksOffset++] & 0xFF; - final int byte168 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte165 & 31) << 22) | (byte166 << 14) | (byte167 << 6) | (byte168 >>> 2); - final int byte169 = blocks[blocksOffset++] & 0xFF; - final int byte170 = blocks[blocksOffset++] & 0xFF; - final int byte171 = blocks[blocksOffset++] & 0xFF; - final int byte172 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte168 & 3) << 25) | (byte169 << 17) | (byte170 << 9) | (byte171 << 1) | (byte172 >>> 7); - final int byte173 = blocks[blocksOffset++] & 0xFF; - final int byte174 = blocks[blocksOffset++] & 0xFF; - final int byte175 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte172 & 127) << 20) | (byte173 << 12) | (byte174 << 4) | (byte175 >>> 4); - final int byte176 = blocks[blocksOffset++] & 0xFF; - final int byte177 = blocks[blocksOffset++] & 0xFF; - final int byte178 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte175 & 15) << 23) | (byte176 << 15) | (byte177 << 7) | (byte178 >>> 1); - final int byte179 = blocks[blocksOffset++] & 0xFF; - final int byte180 = blocks[blocksOffset++] & 0xFF; - final int byte181 = blocks[blocksOffset++] & 0xFF; - final int byte182 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte178 & 1) << 26) | (byte179 << 18) | (byte180 << 10) | (byte181 << 2) | (byte182 >>> 6); - final int byte183 = blocks[blocksOffset++] & 0xFF; - final int byte184 = blocks[blocksOffset++] & 0xFF; - final int byte185 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte182 & 63) << 21) | (byte183 << 13) | (byte184 << 5) | (byte185 >>> 3); - final int byte186 = blocks[blocksOffset++] & 0xFF; - final int byte187 = blocks[blocksOffset++] & 0xFF; - final int byte188 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte185 & 7) << 24) | (byte186 << 16) | (byte187 << 8) | byte188; - final int byte189 = blocks[blocksOffset++] & 0xFF; - final int byte190 = blocks[blocksOffset++] & 0xFF; - final int byte191 = blocks[blocksOffset++] & 0xFF; - final int byte192 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte189 << 19) | (byte190 << 11) | (byte191 << 3) | (byte192 >>> 5); - final int byte193 = blocks[blocksOffset++] & 0xFF; - final int byte194 = blocks[blocksOffset++] & 0xFF; - final int byte195 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte192 & 31) << 22) | (byte193 << 14) | (byte194 << 6) | (byte195 >>> 2); - final int byte196 = blocks[blocksOffset++] & 0xFF; - final int byte197 = blocks[blocksOffset++] & 0xFF; - final int byte198 = blocks[blocksOffset++] & 0xFF; - final int byte199 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte195 & 3) << 25) | (byte196 << 17) | (byte197 << 9) | (byte198 << 1) | (byte199 >>> 7); - final int byte200 = blocks[blocksOffset++] & 0xFF; - final int byte201 = blocks[blocksOffset++] & 0xFF; - final int byte202 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte199 & 127) << 20) | (byte200 << 12) | (byte201 << 4) | (byte202 >>> 4); - final int byte203 = blocks[blocksOffset++] & 0xFF; - final int byte204 = blocks[blocksOffset++] & 0xFF; - final int byte205 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte202 & 15) << 23) | (byte203 << 15) | (byte204 << 7) | (byte205 >>> 1); - final int byte206 = blocks[blocksOffset++] & 0xFF; - final int byte207 = blocks[blocksOffset++] & 0xFF; - final int byte208 = blocks[blocksOffset++] & 0xFF; - final int byte209 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte205 & 1) << 26) | (byte206 << 18) | (byte207 << 10) | (byte208 << 2) | (byte209 >>> 6); - final int byte210 = blocks[blocksOffset++] & 0xFF; - final int byte211 = blocks[blocksOffset++] & 0xFF; - final int byte212 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte209 & 63) << 21) | (byte210 << 13) | (byte211 << 5) | (byte212 >>> 3); - final int byte213 = blocks[blocksOffset++] & 0xFF; - final int byte214 = blocks[blocksOffset++] & 0xFF; - final int byte215 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte212 & 7) << 24) | (byte213 << 16) | (byte214 << 8) | byte215; - } - } - - @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 >>> 37; - values[valuesOffset++] = (block0 >>> 10) & 134217727L; - final long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block0 & 1023L) << 17) | (block1 >>> 47); - values[valuesOffset++] = (block1 >>> 20) & 134217727L; - final long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block1 & 1048575L) << 7) | (block2 >>> 57); - values[valuesOffset++] = (block2 >>> 30) & 134217727L; - values[valuesOffset++] = (block2 >>> 3) & 134217727L; - final long block3 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block2 & 7L) << 24) | (block3 >>> 40); - values[valuesOffset++] = (block3 >>> 13) & 134217727L; - final long block4 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block3 & 8191L) << 14) | (block4 >>> 50); - values[valuesOffset++] = (block4 >>> 23) & 134217727L; - final long block5 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block4 & 8388607L) << 4) | (block5 >>> 60); - values[valuesOffset++] = (block5 >>> 33) & 134217727L; - values[valuesOffset++] = (block5 >>> 6) & 134217727L; - final long block6 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block5 & 63L) << 21) | (block6 >>> 43); - values[valuesOffset++] = (block6 >>> 16) & 134217727L; - final long block7 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block6 & 65535L) << 11) | (block7 >>> 53); - values[valuesOffset++] = (block7 >>> 26) & 134217727L; - final long block8 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block7 & 67108863L) << 1) | (block8 >>> 63); - values[valuesOffset++] = (block8 >>> 36) & 134217727L; - values[valuesOffset++] = (block8 >>> 9) & 134217727L; - final long block9 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block8 & 511L) << 18) | (block9 >>> 46); - values[valuesOffset++] = (block9 >>> 19) & 134217727L; - final long block10 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block9 & 524287L) << 8) | (block10 >>> 56); - values[valuesOffset++] = (block10 >>> 29) & 134217727L; - values[valuesOffset++] = (block10 >>> 2) & 134217727L; - final long block11 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block10 & 3L) << 25) | (block11 >>> 39); - values[valuesOffset++] = (block11 >>> 12) & 134217727L; - final long block12 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block11 & 4095L) << 15) | (block12 >>> 49); - values[valuesOffset++] = (block12 >>> 22) & 134217727L; - final long block13 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block12 & 4194303L) << 5) | (block13 >>> 59); - values[valuesOffset++] = (block13 >>> 32) & 134217727L; - values[valuesOffset++] = (block13 >>> 5) & 134217727L; - final long block14 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block13 & 31L) << 22) | (block14 >>> 42); - values[valuesOffset++] = (block14 >>> 15) & 134217727L; - final long block15 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block14 & 32767L) << 12) | (block15 >>> 52); - values[valuesOffset++] = (block15 >>> 25) & 134217727L; - final long block16 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block15 & 33554431L) << 2) | (block16 >>> 62); - values[valuesOffset++] = (block16 >>> 35) & 134217727L; - values[valuesOffset++] = (block16 >>> 8) & 134217727L; - final long block17 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block16 & 255L) << 19) | (block17 >>> 45); - values[valuesOffset++] = (block17 >>> 18) & 134217727L; - final long block18 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block17 & 262143L) << 9) | (block18 >>> 55); - values[valuesOffset++] = (block18 >>> 28) & 134217727L; - values[valuesOffset++] = (block18 >>> 1) & 134217727L; - final long block19 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block18 & 1L) << 26) | (block19 >>> 38); - values[valuesOffset++] = (block19 >>> 11) & 134217727L; - final long block20 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block19 & 2047L) << 16) | (block20 >>> 48); - values[valuesOffset++] = (block20 >>> 21) & 134217727L; - final long block21 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block20 & 2097151L) << 6) | (block21 >>> 58); - values[valuesOffset++] = (block21 >>> 31) & 134217727L; - values[valuesOffset++] = (block21 >>> 4) & 134217727L; - final long block22 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block21 & 15L) << 23) | (block22 >>> 41); - values[valuesOffset++] = (block22 >>> 14) & 134217727L; - final long block23 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block22 & 16383L) << 13) | (block23 >>> 51); - values[valuesOffset++] = (block23 >>> 24) & 134217727L; - final long block24 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block23 & 16777215L) << 3) | (block24 >>> 61); - values[valuesOffset++] = (block24 >>> 34) & 134217727L; - values[valuesOffset++] = (block24 >>> 7) & 134217727L; - final long block25 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block24 & 127L) << 20) | (block25 >>> 44); - values[valuesOffset++] = (block25 >>> 17) & 134217727L; - final long block26 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block25 & 131071L) << 10) | (block26 >>> 54); - values[valuesOffset++] = (block26 >>> 27) & 134217727L; - values[valuesOffset++] = block26 & 134217727L; - } - } - - @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; - final long byte3 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte0 << 19) | (byte1 << 11) | (byte2 << 3) | (byte3 >>> 5); - final long byte4 = blocks[blocksOffset++] & 0xFF; - final long byte5 = blocks[blocksOffset++] & 0xFF; - final long byte6 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte3 & 31) << 22) | (byte4 << 14) | (byte5 << 6) | (byte6 >>> 2); - final long byte7 = blocks[blocksOffset++] & 0xFF; - final long byte8 = blocks[blocksOffset++] & 0xFF; - final long byte9 = blocks[blocksOffset++] & 0xFF; - final long byte10 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte6 & 3) << 25) | (byte7 << 17) | (byte8 << 9) | (byte9 << 1) | (byte10 >>> 7); - final long byte11 = blocks[blocksOffset++] & 0xFF; - final long byte12 = blocks[blocksOffset++] & 0xFF; - final long byte13 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte10 & 127) << 20) | (byte11 << 12) | (byte12 << 4) | (byte13 >>> 4); - final long byte14 = blocks[blocksOffset++] & 0xFF; - final long byte15 = blocks[blocksOffset++] & 0xFF; - final long byte16 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte13 & 15) << 23) | (byte14 << 15) | (byte15 << 7) | (byte16 >>> 1); - final long byte17 = blocks[blocksOffset++] & 0xFF; - final long byte18 = blocks[blocksOffset++] & 0xFF; - final long byte19 = blocks[blocksOffset++] & 0xFF; - final long byte20 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte16 & 1) << 26) | (byte17 << 18) | (byte18 << 10) | (byte19 << 2) | (byte20 >>> 6); - final long byte21 = blocks[blocksOffset++] & 0xFF; - final long byte22 = blocks[blocksOffset++] & 0xFF; - final long byte23 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte20 & 63) << 21) | (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) << 24) | (byte24 << 16) | (byte25 << 8) | byte26; - final long byte27 = blocks[blocksOffset++] & 0xFF; - final long byte28 = blocks[blocksOffset++] & 0xFF; - final long byte29 = blocks[blocksOffset++] & 0xFF; - final long byte30 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte27 << 19) | (byte28 << 11) | (byte29 << 3) | (byte30 >>> 5); - final long byte31 = blocks[blocksOffset++] & 0xFF; - final long byte32 = blocks[blocksOffset++] & 0xFF; - final long byte33 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte30 & 31) << 22) | (byte31 << 14) | (byte32 << 6) | (byte33 >>> 2); - final long byte34 = blocks[blocksOffset++] & 0xFF; - final long byte35 = blocks[blocksOffset++] & 0xFF; - final long byte36 = blocks[blocksOffset++] & 0xFF; - final long byte37 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte33 & 3) << 25) | (byte34 << 17) | (byte35 << 9) | (byte36 << 1) | (byte37 >>> 7); - final long byte38 = blocks[blocksOffset++] & 0xFF; - final long byte39 = blocks[blocksOffset++] & 0xFF; - final long byte40 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte37 & 127) << 20) | (byte38 << 12) | (byte39 << 4) | (byte40 >>> 4); - final long byte41 = blocks[blocksOffset++] & 0xFF; - final long byte42 = blocks[blocksOffset++] & 0xFF; - final long byte43 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte40 & 15) << 23) | (byte41 << 15) | (byte42 << 7) | (byte43 >>> 1); - final long byte44 = blocks[blocksOffset++] & 0xFF; - final long byte45 = blocks[blocksOffset++] & 0xFF; - final long byte46 = blocks[blocksOffset++] & 0xFF; - final long byte47 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte43 & 1) << 26) | (byte44 << 18) | (byte45 << 10) | (byte46 << 2) | (byte47 >>> 6); - final long byte48 = blocks[blocksOffset++] & 0xFF; - final long byte49 = blocks[blocksOffset++] & 0xFF; - final long byte50 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte47 & 63) << 21) | (byte48 << 13) | (byte49 << 5) | (byte50 >>> 3); - final long byte51 = blocks[blocksOffset++] & 0xFF; - final long byte52 = blocks[blocksOffset++] & 0xFF; - final long byte53 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte50 & 7) << 24) | (byte51 << 16) | (byte52 << 8) | byte53; - final long byte54 = blocks[blocksOffset++] & 0xFF; - final long byte55 = blocks[blocksOffset++] & 0xFF; - final long byte56 = blocks[blocksOffset++] & 0xFF; - final long byte57 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte54 << 19) | (byte55 << 11) | (byte56 << 3) | (byte57 >>> 5); - final long byte58 = blocks[blocksOffset++] & 0xFF; - final long byte59 = blocks[blocksOffset++] & 0xFF; - final long byte60 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte57 & 31) << 22) | (byte58 << 14) | (byte59 << 6) | (byte60 >>> 2); - final long byte61 = blocks[blocksOffset++] & 0xFF; - final long byte62 = blocks[blocksOffset++] & 0xFF; - final long byte63 = blocks[blocksOffset++] & 0xFF; - final long byte64 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte60 & 3) << 25) | (byte61 << 17) | (byte62 << 9) | (byte63 << 1) | (byte64 >>> 7); - final long byte65 = blocks[blocksOffset++] & 0xFF; - final long byte66 = blocks[blocksOffset++] & 0xFF; - final long byte67 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte64 & 127) << 20) | (byte65 << 12) | (byte66 << 4) | (byte67 >>> 4); - final long byte68 = blocks[blocksOffset++] & 0xFF; - final long byte69 = blocks[blocksOffset++] & 0xFF; - final long byte70 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte67 & 15) << 23) | (byte68 << 15) | (byte69 << 7) | (byte70 >>> 1); - final long byte71 = blocks[blocksOffset++] & 0xFF; - final long byte72 = blocks[blocksOffset++] & 0xFF; - final long byte73 = blocks[blocksOffset++] & 0xFF; - final long byte74 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte70 & 1) << 26) | (byte71 << 18) | (byte72 << 10) | (byte73 << 2) | (byte74 >>> 6); - final long byte75 = blocks[blocksOffset++] & 0xFF; - final long byte76 = blocks[blocksOffset++] & 0xFF; - final long byte77 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte74 & 63) << 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) << 24) | (byte78 << 16) | (byte79 << 8) | byte80; - final long byte81 = blocks[blocksOffset++] & 0xFF; - final long byte82 = blocks[blocksOffset++] & 0xFF; - final long byte83 = blocks[blocksOffset++] & 0xFF; - final long byte84 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte81 << 19) | (byte82 << 11) | (byte83 << 3) | (byte84 >>> 5); - final long byte85 = blocks[blocksOffset++] & 0xFF; - final long byte86 = blocks[blocksOffset++] & 0xFF; - final long byte87 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte84 & 31) << 22) | (byte85 << 14) | (byte86 << 6) | (byte87 >>> 2); - final long byte88 = blocks[blocksOffset++] & 0xFF; - final long byte89 = blocks[blocksOffset++] & 0xFF; - final long byte90 = blocks[blocksOffset++] & 0xFF; - final long byte91 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte87 & 3) << 25) | (byte88 << 17) | (byte89 << 9) | (byte90 << 1) | (byte91 >>> 7); - final long byte92 = blocks[blocksOffset++] & 0xFF; - final long byte93 = blocks[blocksOffset++] & 0xFF; - final long byte94 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte91 & 127) << 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) << 23) | (byte95 << 15) | (byte96 << 7) | (byte97 >>> 1); - final long byte98 = blocks[blocksOffset++] & 0xFF; - final long byte99 = blocks[blocksOffset++] & 0xFF; - final long byte100 = blocks[blocksOffset++] & 0xFF; - final long byte101 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte97 & 1) << 26) | (byte98 << 18) | (byte99 << 10) | (byte100 << 2) | (byte101 >>> 6); - final long byte102 = blocks[blocksOffset++] & 0xFF; - final long byte103 = blocks[blocksOffset++] & 0xFF; - final long byte104 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte101 & 63) << 21) | (byte102 << 13) | (byte103 << 5) | (byte104 >>> 3); - final long byte105 = blocks[blocksOffset++] & 0xFF; - final long byte106 = blocks[blocksOffset++] & 0xFF; - final long byte107 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte104 & 7) << 24) | (byte105 << 16) | (byte106 << 8) | byte107; - final long byte108 = blocks[blocksOffset++] & 0xFF; - final long byte109 = blocks[blocksOffset++] & 0xFF; - final long byte110 = blocks[blocksOffset++] & 0xFF; - final long byte111 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte108 << 19) | (byte109 << 11) | (byte110 << 3) | (byte111 >>> 5); - final long byte112 = blocks[blocksOffset++] & 0xFF; - final long byte113 = blocks[blocksOffset++] & 0xFF; - final long byte114 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte111 & 31) << 22) | (byte112 << 14) | (byte113 << 6) | (byte114 >>> 2); - final long byte115 = blocks[blocksOffset++] & 0xFF; - final long byte116 = blocks[blocksOffset++] & 0xFF; - final long byte117 = blocks[blocksOffset++] & 0xFF; - final long byte118 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte114 & 3) << 25) | (byte115 << 17) | (byte116 << 9) | (byte117 << 1) | (byte118 >>> 7); - final long byte119 = blocks[blocksOffset++] & 0xFF; - final long byte120 = blocks[blocksOffset++] & 0xFF; - final long byte121 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte118 & 127) << 20) | (byte119 << 12) | (byte120 << 4) | (byte121 >>> 4); - final long byte122 = blocks[blocksOffset++] & 0xFF; - final long byte123 = blocks[blocksOffset++] & 0xFF; - final long byte124 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte121 & 15) << 23) | (byte122 << 15) | (byte123 << 7) | (byte124 >>> 1); - final long byte125 = blocks[blocksOffset++] & 0xFF; - final long byte126 = blocks[blocksOffset++] & 0xFF; - final long byte127 = blocks[blocksOffset++] & 0xFF; - final long byte128 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte124 & 1) << 26) | (byte125 << 18) | (byte126 << 10) | (byte127 << 2) | (byte128 >>> 6); - final long byte129 = blocks[blocksOffset++] & 0xFF; - final long byte130 = blocks[blocksOffset++] & 0xFF; - final long byte131 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte128 & 63) << 21) | (byte129 << 13) | (byte130 << 5) | (byte131 >>> 3); - final long byte132 = blocks[blocksOffset++] & 0xFF; - final long byte133 = blocks[blocksOffset++] & 0xFF; - final long byte134 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte131 & 7) << 24) | (byte132 << 16) | (byte133 << 8) | byte134; - final long byte135 = blocks[blocksOffset++] & 0xFF; - final long byte136 = blocks[blocksOffset++] & 0xFF; - final long byte137 = blocks[blocksOffset++] & 0xFF; - final long byte138 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte135 << 19) | (byte136 << 11) | (byte137 << 3) | (byte138 >>> 5); - final long byte139 = blocks[blocksOffset++] & 0xFF; - final long byte140 = blocks[blocksOffset++] & 0xFF; - final long byte141 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte138 & 31) << 22) | (byte139 << 14) | (byte140 << 6) | (byte141 >>> 2); - final long byte142 = blocks[blocksOffset++] & 0xFF; - final long byte143 = blocks[blocksOffset++] & 0xFF; - final long byte144 = blocks[blocksOffset++] & 0xFF; - final long byte145 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte141 & 3) << 25) | (byte142 << 17) | (byte143 << 9) | (byte144 << 1) | (byte145 >>> 7); - final long byte146 = blocks[blocksOffset++] & 0xFF; - final long byte147 = blocks[blocksOffset++] & 0xFF; - final long byte148 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte145 & 127) << 20) | (byte146 << 12) | (byte147 << 4) | (byte148 >>> 4); - final long byte149 = blocks[blocksOffset++] & 0xFF; - final long byte150 = blocks[blocksOffset++] & 0xFF; - final long byte151 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte148 & 15) << 23) | (byte149 << 15) | (byte150 << 7) | (byte151 >>> 1); - final long byte152 = blocks[blocksOffset++] & 0xFF; - final long byte153 = blocks[blocksOffset++] & 0xFF; - final long byte154 = blocks[blocksOffset++] & 0xFF; - final long byte155 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte151 & 1) << 26) | (byte152 << 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) << 21) | (byte156 << 13) | (byte157 << 5) | (byte158 >>> 3); - final long byte159 = blocks[blocksOffset++] & 0xFF; - final long byte160 = blocks[blocksOffset++] & 0xFF; - final long byte161 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte158 & 7) << 24) | (byte159 << 16) | (byte160 << 8) | byte161; - final long byte162 = blocks[blocksOffset++] & 0xFF; - final long byte163 = blocks[blocksOffset++] & 0xFF; - final long byte164 = blocks[blocksOffset++] & 0xFF; - final long byte165 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte162 << 19) | (byte163 << 11) | (byte164 << 3) | (byte165 >>> 5); - final long byte166 = blocks[blocksOffset++] & 0xFF; - final long byte167 = blocks[blocksOffset++] & 0xFF; - final long byte168 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte165 & 31) << 22) | (byte166 << 14) | (byte167 << 6) | (byte168 >>> 2); - final long byte169 = blocks[blocksOffset++] & 0xFF; - final long byte170 = blocks[blocksOffset++] & 0xFF; - final long byte171 = blocks[blocksOffset++] & 0xFF; - final long byte172 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte168 & 3) << 25) | (byte169 << 17) | (byte170 << 9) | (byte171 << 1) | (byte172 >>> 7); - final long byte173 = blocks[blocksOffset++] & 0xFF; - final long byte174 = blocks[blocksOffset++] & 0xFF; - final long byte175 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte172 & 127) << 20) | (byte173 << 12) | (byte174 << 4) | (byte175 >>> 4); - final long byte176 = blocks[blocksOffset++] & 0xFF; - final long byte177 = blocks[blocksOffset++] & 0xFF; - final long byte178 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte175 & 15) << 23) | (byte176 << 15) | (byte177 << 7) | (byte178 >>> 1); - final long byte179 = blocks[blocksOffset++] & 0xFF; - final long byte180 = blocks[blocksOffset++] & 0xFF; - final long byte181 = blocks[blocksOffset++] & 0xFF; - final long byte182 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte178 & 1) << 26) | (byte179 << 18) | (byte180 << 10) | (byte181 << 2) | (byte182 >>> 6); - final long byte183 = blocks[blocksOffset++] & 0xFF; - final long byte184 = blocks[blocksOffset++] & 0xFF; - final long byte185 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte182 & 63) << 21) | (byte183 << 13) | (byte184 << 5) | (byte185 >>> 3); - final long byte186 = blocks[blocksOffset++] & 0xFF; - final long byte187 = blocks[blocksOffset++] & 0xFF; - final long byte188 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte185 & 7) << 24) | (byte186 << 16) | (byte187 << 8) | byte188; - final long byte189 = blocks[blocksOffset++] & 0xFF; - final long byte190 = blocks[blocksOffset++] & 0xFF; - final long byte191 = blocks[blocksOffset++] & 0xFF; - final long byte192 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte189 << 19) | (byte190 << 11) | (byte191 << 3) | (byte192 >>> 5); - final long byte193 = blocks[blocksOffset++] & 0xFF; - final long byte194 = blocks[blocksOffset++] & 0xFF; - final long byte195 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte192 & 31) << 22) | (byte193 << 14) | (byte194 << 6) | (byte195 >>> 2); - final long byte196 = blocks[blocksOffset++] & 0xFF; - final long byte197 = blocks[blocksOffset++] & 0xFF; - final long byte198 = blocks[blocksOffset++] & 0xFF; - final long byte199 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte195 & 3) << 25) | (byte196 << 17) | (byte197 << 9) | (byte198 << 1) | (byte199 >>> 7); - final long byte200 = blocks[blocksOffset++] & 0xFF; - final long byte201 = blocks[blocksOffset++] & 0xFF; - final long byte202 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte199 & 127) << 20) | (byte200 << 12) | (byte201 << 4) | (byte202 >>> 4); - final long byte203 = blocks[blocksOffset++] & 0xFF; - final long byte204 = blocks[blocksOffset++] & 0xFF; - final long byte205 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte202 & 15) << 23) | (byte203 << 15) | (byte204 << 7) | (byte205 >>> 1); - final long byte206 = blocks[blocksOffset++] & 0xFF; - final long byte207 = blocks[blocksOffset++] & 0xFF; - final long byte208 = blocks[blocksOffset++] & 0xFF; - final long byte209 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte205 & 1) << 26) | (byte206 << 18) | (byte207 << 10) | (byte208 << 2) | (byte209 >>> 6); - final long byte210 = blocks[blocksOffset++] & 0xFF; - final long byte211 = blocks[blocksOffset++] & 0xFF; - final long byte212 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte209 & 63) << 21) | (byte210 << 13) | (byte211 << 5) | (byte212 >>> 3); - final long byte213 = blocks[blocksOffset++] & 0xFF; - final long byte214 = blocks[blocksOffset++] & 0xFF; - final long byte215 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte212 & 7) << 24) | (byte213 << 16) | (byte214 << 8) | byte215; - } - } - - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 37) | ((values[valuesOffset++] & 0xffffffffL) << 10) | ((values[valuesOffset] & 0xffffffffL) >>> 17); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 47) | ((values[valuesOffset++] & 0xffffffffL) << 20) | ((values[valuesOffset] & 0xffffffffL) >>> 7); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 57) | ((values[valuesOffset++] & 0xffffffffL) << 30) | ((values[valuesOffset++] & 0xffffffffL) << 3) | ((values[valuesOffset] & 0xffffffffL) >>> 24); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 40) | ((values[valuesOffset++] & 0xffffffffL) << 13) | ((values[valuesOffset] & 0xffffffffL) >>> 14); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 50) | ((values[valuesOffset++] & 0xffffffffL) << 23) | ((values[valuesOffset] & 0xffffffffL) >>> 4); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 60) | ((values[valuesOffset++] & 0xffffffffL) << 33) | ((values[valuesOffset++] & 0xffffffffL) << 6) | ((values[valuesOffset] & 0xffffffffL) >>> 21); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 43) | ((values[valuesOffset++] & 0xffffffffL) << 16) | ((values[valuesOffset] & 0xffffffffL) >>> 11); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 53) | ((values[valuesOffset++] & 0xffffffffL) << 26) | ((values[valuesOffset] & 0xffffffffL) >>> 1); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 63) | ((values[valuesOffset++] & 0xffffffffL) << 36) | ((values[valuesOffset++] & 0xffffffffL) << 9) | ((values[valuesOffset] & 0xffffffffL) >>> 18); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 46) | ((values[valuesOffset++] & 0xffffffffL) << 19) | ((values[valuesOffset] & 0xffffffffL) >>> 8); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 56) | ((values[valuesOffset++] & 0xffffffffL) << 29) | ((values[valuesOffset++] & 0xffffffffL) << 2) | ((values[valuesOffset] & 0xffffffffL) >>> 25); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 39) | ((values[valuesOffset++] & 0xffffffffL) << 12) | ((values[valuesOffset] & 0xffffffffL) >>> 15); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 49) | ((values[valuesOffset++] & 0xffffffffL) << 22) | ((values[valuesOffset] & 0xffffffffL) >>> 5); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 59) | ((values[valuesOffset++] & 0xffffffffL) << 32) | ((values[valuesOffset++] & 0xffffffffL) << 5) | ((values[valuesOffset] & 0xffffffffL) >>> 22); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 42) | ((values[valuesOffset++] & 0xffffffffL) << 15) | ((values[valuesOffset] & 0xffffffffL) >>> 12); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 52) | ((values[valuesOffset++] & 0xffffffffL) << 25) | ((values[valuesOffset] & 0xffffffffL) >>> 2); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 62) | ((values[valuesOffset++] & 0xffffffffL) << 35) | ((values[valuesOffset++] & 0xffffffffL) << 8) | ((values[valuesOffset] & 0xffffffffL) >>> 19); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 45) | ((values[valuesOffset++] & 0xffffffffL) << 18) | ((values[valuesOffset] & 0xffffffffL) >>> 9); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 55) | ((values[valuesOffset++] & 0xffffffffL) << 28) | ((values[valuesOffset++] & 0xffffffffL) << 1) | ((values[valuesOffset] & 0xffffffffL) >>> 26); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 38) | ((values[valuesOffset++] & 0xffffffffL) << 11) | ((values[valuesOffset] & 0xffffffffL) >>> 16); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 48) | ((values[valuesOffset++] & 0xffffffffL) << 21) | ((values[valuesOffset] & 0xffffffffL) >>> 6); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 58) | ((values[valuesOffset++] & 0xffffffffL) << 31) | ((values[valuesOffset++] & 0xffffffffL) << 4) | ((values[valuesOffset] & 0xffffffffL) >>> 23); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 41) | ((values[valuesOffset++] & 0xffffffffL) << 14) | ((values[valuesOffset] & 0xffffffffL) >>> 13); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 51) | ((values[valuesOffset++] & 0xffffffffL) << 24) | ((values[valuesOffset] & 0xffffffffL) >>> 3); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 61) | ((values[valuesOffset++] & 0xffffffffL) << 34) | ((values[valuesOffset++] & 0xffffffffL) << 7) | ((values[valuesOffset] & 0xffffffffL) >>> 20); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 44) | ((values[valuesOffset++] & 0xffffffffL) << 17) | ((values[valuesOffset] & 0xffffffffL) >>> 10); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 54) | ((values[valuesOffset++] & 0xffffffffL) << 27) | (values[valuesOffset++] & 0xffffffffL); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] << 37) | (values[valuesOffset++] << 10) | (values[valuesOffset] >>> 17); - blocks[blocksOffset++] = (values[valuesOffset++] << 47) | (values[valuesOffset++] << 20) | (values[valuesOffset] >>> 7); - blocks[blocksOffset++] = (values[valuesOffset++] << 57) | (values[valuesOffset++] << 30) | (values[valuesOffset++] << 3) | (values[valuesOffset] >>> 24); - blocks[blocksOffset++] = (values[valuesOffset++] << 40) | (values[valuesOffset++] << 13) | (values[valuesOffset] >>> 14); - blocks[blocksOffset++] = (values[valuesOffset++] << 50) | (values[valuesOffset++] << 23) | (values[valuesOffset] >>> 4); - blocks[blocksOffset++] = (values[valuesOffset++] << 60) | (values[valuesOffset++] << 33) | (values[valuesOffset++] << 6) | (values[valuesOffset] >>> 21); - blocks[blocksOffset++] = (values[valuesOffset++] << 43) | (values[valuesOffset++] << 16) | (values[valuesOffset] >>> 11); - blocks[blocksOffset++] = (values[valuesOffset++] << 53) | (values[valuesOffset++] << 26) | (values[valuesOffset] >>> 1); - blocks[blocksOffset++] = (values[valuesOffset++] << 63) | (values[valuesOffset++] << 36) | (values[valuesOffset++] << 9) | (values[valuesOffset] >>> 18); - blocks[blocksOffset++] = (values[valuesOffset++] << 46) | (values[valuesOffset++] << 19) | (values[valuesOffset] >>> 8); - blocks[blocksOffset++] = (values[valuesOffset++] << 56) | (values[valuesOffset++] << 29) | (values[valuesOffset++] << 2) | (values[valuesOffset] >>> 25); - blocks[blocksOffset++] = (values[valuesOffset++] << 39) | (values[valuesOffset++] << 12) | (values[valuesOffset] >>> 15); - blocks[blocksOffset++] = (values[valuesOffset++] << 49) | (values[valuesOffset++] << 22) | (values[valuesOffset] >>> 5); - blocks[blocksOffset++] = (values[valuesOffset++] << 59) | (values[valuesOffset++] << 32) | (values[valuesOffset++] << 5) | (values[valuesOffset] >>> 22); - blocks[blocksOffset++] = (values[valuesOffset++] << 42) | (values[valuesOffset++] << 15) | (values[valuesOffset] >>> 12); - blocks[blocksOffset++] = (values[valuesOffset++] << 52) | (values[valuesOffset++] << 25) | (values[valuesOffset] >>> 2); - blocks[blocksOffset++] = (values[valuesOffset++] << 62) | (values[valuesOffset++] << 35) | (values[valuesOffset++] << 8) | (values[valuesOffset] >>> 19); - blocks[blocksOffset++] = (values[valuesOffset++] << 45) | (values[valuesOffset++] << 18) | (values[valuesOffset] >>> 9); - blocks[blocksOffset++] = (values[valuesOffset++] << 55) | (values[valuesOffset++] << 28) | (values[valuesOffset++] << 1) | (values[valuesOffset] >>> 26); - blocks[blocksOffset++] = (values[valuesOffset++] << 38) | (values[valuesOffset++] << 11) | (values[valuesOffset] >>> 16); - blocks[blocksOffset++] = (values[valuesOffset++] << 48) | (values[valuesOffset++] << 21) | (values[valuesOffset] >>> 6); - blocks[blocksOffset++] = (values[valuesOffset++] << 58) | (values[valuesOffset++] << 31) | (values[valuesOffset++] << 4) | (values[valuesOffset] >>> 23); - blocks[blocksOffset++] = (values[valuesOffset++] << 41) | (values[valuesOffset++] << 14) | (values[valuesOffset] >>> 13); - blocks[blocksOffset++] = (values[valuesOffset++] << 51) | (values[valuesOffset++] << 24) | (values[valuesOffset] >>> 3); - blocks[blocksOffset++] = (values[valuesOffset++] << 61) | (values[valuesOffset++] << 34) | (values[valuesOffset++] << 7) | (values[valuesOffset] >>> 20); - blocks[blocksOffset++] = (values[valuesOffset++] << 44) | (values[valuesOffset++] << 17) | (values[valuesOffset] >>> 10); - blocks[blocksOffset++] = (values[valuesOffset++] << 54) | (values[valuesOffset++] << 27) | values[valuesOffset++]; - } - } - -} diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked28.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked28.java deleted file mode 100644 index 64a0f313373..00000000000 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked28.java +++ /dev/null @@ -1,288 +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 BulkOperationPacked28 extends BulkOperation { - @Override - public int blockCount() { - return 7; - } - - @Override - public int valueCount() { - return 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 >>> 36); - values[valuesOffset++] = (int) ((block0 >>> 8) & 268435455L); - final long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block0 & 255L) << 20) | (block1 >>> 44)); - values[valuesOffset++] = (int) ((block1 >>> 16) & 268435455L); - final long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block1 & 65535L) << 12) | (block2 >>> 52)); - values[valuesOffset++] = (int) ((block2 >>> 24) & 268435455L); - final long block3 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block2 & 16777215L) << 4) | (block3 >>> 60)); - values[valuesOffset++] = (int) ((block3 >>> 32) & 268435455L); - values[valuesOffset++] = (int) ((block3 >>> 4) & 268435455L); - final long block4 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block3 & 15L) << 24) | (block4 >>> 40)); - values[valuesOffset++] = (int) ((block4 >>> 12) & 268435455L); - final long block5 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block4 & 4095L) << 16) | (block5 >>> 48)); - values[valuesOffset++] = (int) ((block5 >>> 20) & 268435455L); - final long block6 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block5 & 1048575L) << 8) | (block6 >>> 56)); - values[valuesOffset++] = (int) ((block6 >>> 28) & 268435455L); - values[valuesOffset++] = (int) (block6 & 268435455L); - } - } - - @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; - final int byte3 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte0 << 20) | (byte1 << 12) | (byte2 << 4) | (byte3 >>> 4); - final int byte4 = blocks[blocksOffset++] & 0xFF; - final int byte5 = blocks[blocksOffset++] & 0xFF; - final int byte6 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte3 & 15) << 24) | (byte4 << 16) | (byte5 << 8) | byte6; - final int byte7 = blocks[blocksOffset++] & 0xFF; - final int byte8 = blocks[blocksOffset++] & 0xFF; - final int byte9 = blocks[blocksOffset++] & 0xFF; - final int byte10 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte7 << 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) << 24) | (byte11 << 16) | (byte12 << 8) | byte13; - final int byte14 = blocks[blocksOffset++] & 0xFF; - final int byte15 = blocks[blocksOffset++] & 0xFF; - final int byte16 = blocks[blocksOffset++] & 0xFF; - final int byte17 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte14 << 20) | (byte15 << 12) | (byte16 << 4) | (byte17 >>> 4); - final int byte18 = blocks[blocksOffset++] & 0xFF; - final int byte19 = blocks[blocksOffset++] & 0xFF; - final int byte20 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte17 & 15) << 24) | (byte18 << 16) | (byte19 << 8) | byte20; - final int byte21 = blocks[blocksOffset++] & 0xFF; - final int byte22 = blocks[blocksOffset++] & 0xFF; - final int byte23 = blocks[blocksOffset++] & 0xFF; - final int byte24 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte21 << 20) | (byte22 << 12) | (byte23 << 4) | (byte24 >>> 4); - final int byte25 = blocks[blocksOffset++] & 0xFF; - final int byte26 = blocks[blocksOffset++] & 0xFF; - final int byte27 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte24 & 15) << 24) | (byte25 << 16) | (byte26 << 8) | byte27; - final int byte28 = blocks[blocksOffset++] & 0xFF; - final int byte29 = blocks[blocksOffset++] & 0xFF; - final int byte30 = blocks[blocksOffset++] & 0xFF; - final int byte31 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte28 << 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) << 24) | (byte32 << 16) | (byte33 << 8) | byte34; - final int byte35 = blocks[blocksOffset++] & 0xFF; - final int byte36 = blocks[blocksOffset++] & 0xFF; - final int byte37 = blocks[blocksOffset++] & 0xFF; - final int byte38 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte35 << 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) << 24) | (byte39 << 16) | (byte40 << 8) | byte41; - final int byte42 = blocks[blocksOffset++] & 0xFF; - final int byte43 = blocks[blocksOffset++] & 0xFF; - final int byte44 = blocks[blocksOffset++] & 0xFF; - final int byte45 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte42 << 20) | (byte43 << 12) | (byte44 << 4) | (byte45 >>> 4); - final int byte46 = blocks[blocksOffset++] & 0xFF; - final int byte47 = blocks[blocksOffset++] & 0xFF; - final int byte48 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte45 & 15) << 24) | (byte46 << 16) | (byte47 << 8) | byte48; - final int byte49 = blocks[blocksOffset++] & 0xFF; - final int byte50 = blocks[blocksOffset++] & 0xFF; - final int byte51 = blocks[blocksOffset++] & 0xFF; - final int byte52 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte49 << 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) << 24) | (byte53 << 16) | (byte54 << 8) | byte55; - } - } - - @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 >>> 36; - values[valuesOffset++] = (block0 >>> 8) & 268435455L; - final long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block0 & 255L) << 20) | (block1 >>> 44); - values[valuesOffset++] = (block1 >>> 16) & 268435455L; - final long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block1 & 65535L) << 12) | (block2 >>> 52); - values[valuesOffset++] = (block2 >>> 24) & 268435455L; - final long block3 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block2 & 16777215L) << 4) | (block3 >>> 60); - values[valuesOffset++] = (block3 >>> 32) & 268435455L; - values[valuesOffset++] = (block3 >>> 4) & 268435455L; - final long block4 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block3 & 15L) << 24) | (block4 >>> 40); - values[valuesOffset++] = (block4 >>> 12) & 268435455L; - final long block5 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block4 & 4095L) << 16) | (block5 >>> 48); - values[valuesOffset++] = (block5 >>> 20) & 268435455L; - final long block6 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block5 & 1048575L) << 8) | (block6 >>> 56); - values[valuesOffset++] = (block6 >>> 28) & 268435455L; - values[valuesOffset++] = block6 & 268435455L; - } - } - - @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; - final long byte3 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte0 << 20) | (byte1 << 12) | (byte2 << 4) | (byte3 >>> 4); - final long byte4 = blocks[blocksOffset++] & 0xFF; - final long byte5 = blocks[blocksOffset++] & 0xFF; - final long byte6 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte3 & 15) << 24) | (byte4 << 16) | (byte5 << 8) | byte6; - final long byte7 = blocks[blocksOffset++] & 0xFF; - final long byte8 = blocks[blocksOffset++] & 0xFF; - final long byte9 = blocks[blocksOffset++] & 0xFF; - final long byte10 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte7 << 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) << 24) | (byte11 << 16) | (byte12 << 8) | byte13; - final long byte14 = blocks[blocksOffset++] & 0xFF; - final long byte15 = blocks[blocksOffset++] & 0xFF; - final long byte16 = blocks[blocksOffset++] & 0xFF; - final long byte17 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte14 << 20) | (byte15 << 12) | (byte16 << 4) | (byte17 >>> 4); - final long byte18 = blocks[blocksOffset++] & 0xFF; - final long byte19 = blocks[blocksOffset++] & 0xFF; - final long byte20 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte17 & 15) << 24) | (byte18 << 16) | (byte19 << 8) | byte20; - final long byte21 = blocks[blocksOffset++] & 0xFF; - final long byte22 = blocks[blocksOffset++] & 0xFF; - final long byte23 = blocks[blocksOffset++] & 0xFF; - final long byte24 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte21 << 20) | (byte22 << 12) | (byte23 << 4) | (byte24 >>> 4); - final long byte25 = blocks[blocksOffset++] & 0xFF; - final long byte26 = blocks[blocksOffset++] & 0xFF; - final long byte27 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte24 & 15) << 24) | (byte25 << 16) | (byte26 << 8) | byte27; - final long byte28 = blocks[blocksOffset++] & 0xFF; - final long byte29 = blocks[blocksOffset++] & 0xFF; - final long byte30 = blocks[blocksOffset++] & 0xFF; - final long byte31 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte28 << 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) << 24) | (byte32 << 16) | (byte33 << 8) | byte34; - final long byte35 = blocks[blocksOffset++] & 0xFF; - final long byte36 = blocks[blocksOffset++] & 0xFF; - final long byte37 = blocks[blocksOffset++] & 0xFF; - final long byte38 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte35 << 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) << 24) | (byte39 << 16) | (byte40 << 8) | byte41; - final long byte42 = blocks[blocksOffset++] & 0xFF; - final long byte43 = blocks[blocksOffset++] & 0xFF; - final long byte44 = blocks[blocksOffset++] & 0xFF; - final long byte45 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte42 << 20) | (byte43 << 12) | (byte44 << 4) | (byte45 >>> 4); - final long byte46 = blocks[blocksOffset++] & 0xFF; - final long byte47 = blocks[blocksOffset++] & 0xFF; - final long byte48 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte45 & 15) << 24) | (byte46 << 16) | (byte47 << 8) | byte48; - final long byte49 = blocks[blocksOffset++] & 0xFF; - final long byte50 = blocks[blocksOffset++] & 0xFF; - final long byte51 = blocks[blocksOffset++] & 0xFF; - final long byte52 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte49 << 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) << 24) | (byte53 << 16) | (byte54 << 8) | byte55; - } - } - - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 36) | ((values[valuesOffset++] & 0xffffffffL) << 8) | ((values[valuesOffset] & 0xffffffffL) >>> 20); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 44) | ((values[valuesOffset++] & 0xffffffffL) << 16) | ((values[valuesOffset] & 0xffffffffL) >>> 12); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 52) | ((values[valuesOffset++] & 0xffffffffL) << 24) | ((values[valuesOffset] & 0xffffffffL) >>> 4); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 60) | ((values[valuesOffset++] & 0xffffffffL) << 32) | ((values[valuesOffset++] & 0xffffffffL) << 4) | ((values[valuesOffset] & 0xffffffffL) >>> 24); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 40) | ((values[valuesOffset++] & 0xffffffffL) << 12) | ((values[valuesOffset] & 0xffffffffL) >>> 16); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 48) | ((values[valuesOffset++] & 0xffffffffL) << 20) | ((values[valuesOffset] & 0xffffffffL) >>> 8); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 56) | ((values[valuesOffset++] & 0xffffffffL) << 28) | (values[valuesOffset++] & 0xffffffffL); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] << 36) | (values[valuesOffset++] << 8) | (values[valuesOffset] >>> 20); - blocks[blocksOffset++] = (values[valuesOffset++] << 44) | (values[valuesOffset++] << 16) | (values[valuesOffset] >>> 12); - blocks[blocksOffset++] = (values[valuesOffset++] << 52) | (values[valuesOffset++] << 24) | (values[valuesOffset] >>> 4); - blocks[blocksOffset++] = (values[valuesOffset++] << 60) | (values[valuesOffset++] << 32) | (values[valuesOffset++] << 4) | (values[valuesOffset] >>> 24); - blocks[blocksOffset++] = (values[valuesOffset++] << 40) | (values[valuesOffset++] << 12) | (values[valuesOffset] >>> 16); - blocks[blocksOffset++] = (values[valuesOffset++] << 48) | (values[valuesOffset++] << 20) | (values[valuesOffset] >>> 8); - blocks[blocksOffset++] = (values[valuesOffset++] << 56) | (values[valuesOffset++] << 28) | values[valuesOffset++]; - } - } - -} diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked29.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked29.java deleted file mode 100644 index a880c8c488c..00000000000 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked29.java +++ /dev/null @@ -1,920 +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 BulkOperationPacked29 extends BulkOperation { - @Override - public int blockCount() { - return 29; - } - - @Override - public int valueCount() { - return 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 >>> 35); - values[valuesOffset++] = (int) ((block0 >>> 6) & 536870911L); - final long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block0 & 63L) << 23) | (block1 >>> 41)); - values[valuesOffset++] = (int) ((block1 >>> 12) & 536870911L); - final long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block1 & 4095L) << 17) | (block2 >>> 47)); - values[valuesOffset++] = (int) ((block2 >>> 18) & 536870911L); - final long block3 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block2 & 262143L) << 11) | (block3 >>> 53)); - values[valuesOffset++] = (int) ((block3 >>> 24) & 536870911L); - final long block4 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block3 & 16777215L) << 5) | (block4 >>> 59)); - values[valuesOffset++] = (int) ((block4 >>> 30) & 536870911L); - values[valuesOffset++] = (int) ((block4 >>> 1) & 536870911L); - final long block5 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block4 & 1L) << 28) | (block5 >>> 36)); - values[valuesOffset++] = (int) ((block5 >>> 7) & 536870911L); - final long block6 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block5 & 127L) << 22) | (block6 >>> 42)); - values[valuesOffset++] = (int) ((block6 >>> 13) & 536870911L); - final long block7 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block6 & 8191L) << 16) | (block7 >>> 48)); - values[valuesOffset++] = (int) ((block7 >>> 19) & 536870911L); - final long block8 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block7 & 524287L) << 10) | (block8 >>> 54)); - values[valuesOffset++] = (int) ((block8 >>> 25) & 536870911L); - final long block9 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block8 & 33554431L) << 4) | (block9 >>> 60)); - values[valuesOffset++] = (int) ((block9 >>> 31) & 536870911L); - values[valuesOffset++] = (int) ((block9 >>> 2) & 536870911L); - final long block10 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block9 & 3L) << 27) | (block10 >>> 37)); - values[valuesOffset++] = (int) ((block10 >>> 8) & 536870911L); - final long block11 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block10 & 255L) << 21) | (block11 >>> 43)); - values[valuesOffset++] = (int) ((block11 >>> 14) & 536870911L); - final long block12 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block11 & 16383L) << 15) | (block12 >>> 49)); - values[valuesOffset++] = (int) ((block12 >>> 20) & 536870911L); - final long block13 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block12 & 1048575L) << 9) | (block13 >>> 55)); - values[valuesOffset++] = (int) ((block13 >>> 26) & 536870911L); - final long block14 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block13 & 67108863L) << 3) | (block14 >>> 61)); - values[valuesOffset++] = (int) ((block14 >>> 32) & 536870911L); - values[valuesOffset++] = (int) ((block14 >>> 3) & 536870911L); - final long block15 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block14 & 7L) << 26) | (block15 >>> 38)); - values[valuesOffset++] = (int) ((block15 >>> 9) & 536870911L); - final long block16 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block15 & 511L) << 20) | (block16 >>> 44)); - values[valuesOffset++] = (int) ((block16 >>> 15) & 536870911L); - final long block17 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block16 & 32767L) << 14) | (block17 >>> 50)); - values[valuesOffset++] = (int) ((block17 >>> 21) & 536870911L); - final long block18 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block17 & 2097151L) << 8) | (block18 >>> 56)); - values[valuesOffset++] = (int) ((block18 >>> 27) & 536870911L); - final long block19 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block18 & 134217727L) << 2) | (block19 >>> 62)); - values[valuesOffset++] = (int) ((block19 >>> 33) & 536870911L); - values[valuesOffset++] = (int) ((block19 >>> 4) & 536870911L); - final long block20 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block19 & 15L) << 25) | (block20 >>> 39)); - values[valuesOffset++] = (int) ((block20 >>> 10) & 536870911L); - final long block21 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block20 & 1023L) << 19) | (block21 >>> 45)); - values[valuesOffset++] = (int) ((block21 >>> 16) & 536870911L); - final long block22 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block21 & 65535L) << 13) | (block22 >>> 51)); - values[valuesOffset++] = (int) ((block22 >>> 22) & 536870911L); - final long block23 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block22 & 4194303L) << 7) | (block23 >>> 57)); - values[valuesOffset++] = (int) ((block23 >>> 28) & 536870911L); - final long block24 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block23 & 268435455L) << 1) | (block24 >>> 63)); - values[valuesOffset++] = (int) ((block24 >>> 34) & 536870911L); - values[valuesOffset++] = (int) ((block24 >>> 5) & 536870911L); - final long block25 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block24 & 31L) << 24) | (block25 >>> 40)); - values[valuesOffset++] = (int) ((block25 >>> 11) & 536870911L); - final long block26 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block25 & 2047L) << 18) | (block26 >>> 46)); - values[valuesOffset++] = (int) ((block26 >>> 17) & 536870911L); - final long block27 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block26 & 131071L) << 12) | (block27 >>> 52)); - values[valuesOffset++] = (int) ((block27 >>> 23) & 536870911L); - final long block28 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block27 & 8388607L) << 6) | (block28 >>> 58)); - values[valuesOffset++] = (int) ((block28 >>> 29) & 536870911L); - values[valuesOffset++] = (int) (block28 & 536870911L); - } - } - - @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; - final int byte3 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte0 << 21) | (byte1 << 13) | (byte2 << 5) | (byte3 >>> 3); - final int byte4 = blocks[blocksOffset++] & 0xFF; - final int byte5 = blocks[blocksOffset++] & 0xFF; - final int byte6 = blocks[blocksOffset++] & 0xFF; - final int byte7 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte3 & 7) << 26) | (byte4 << 18) | (byte5 << 10) | (byte6 << 2) | (byte7 >>> 6); - final int byte8 = blocks[blocksOffset++] & 0xFF; - final int byte9 = blocks[blocksOffset++] & 0xFF; - final int byte10 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte7 & 63) << 23) | (byte8 << 15) | (byte9 << 7) | (byte10 >>> 1); - final int byte11 = blocks[blocksOffset++] & 0xFF; - final int byte12 = blocks[blocksOffset++] & 0xFF; - final int byte13 = blocks[blocksOffset++] & 0xFF; - final int byte14 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte10 & 1) << 28) | (byte11 << 20) | (byte12 << 12) | (byte13 << 4) | (byte14 >>> 4); - final int byte15 = blocks[blocksOffset++] & 0xFF; - final int byte16 = blocks[blocksOffset++] & 0xFF; - final int byte17 = blocks[blocksOffset++] & 0xFF; - final int byte18 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte14 & 15) << 25) | (byte15 << 17) | (byte16 << 9) | (byte17 << 1) | (byte18 >>> 7); - final int byte19 = blocks[blocksOffset++] & 0xFF; - final int byte20 = blocks[blocksOffset++] & 0xFF; - final int byte21 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte18 & 127) << 22) | (byte19 << 14) | (byte20 << 6) | (byte21 >>> 2); - final int byte22 = blocks[blocksOffset++] & 0xFF; - final int byte23 = blocks[blocksOffset++] & 0xFF; - final int byte24 = blocks[blocksOffset++] & 0xFF; - final int byte25 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte21 & 3) << 27) | (byte22 << 19) | (byte23 << 11) | (byte24 << 3) | (byte25 >>> 5); - final int byte26 = blocks[blocksOffset++] & 0xFF; - final int byte27 = blocks[blocksOffset++] & 0xFF; - final int byte28 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte25 & 31) << 24) | (byte26 << 16) | (byte27 << 8) | byte28; - final int byte29 = blocks[blocksOffset++] & 0xFF; - final int byte30 = blocks[blocksOffset++] & 0xFF; - final int byte31 = blocks[blocksOffset++] & 0xFF; - final int byte32 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte29 << 21) | (byte30 << 13) | (byte31 << 5) | (byte32 >>> 3); - final int byte33 = blocks[blocksOffset++] & 0xFF; - final int byte34 = blocks[blocksOffset++] & 0xFF; - final int byte35 = blocks[blocksOffset++] & 0xFF; - final int byte36 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte32 & 7) << 26) | (byte33 << 18) | (byte34 << 10) | (byte35 << 2) | (byte36 >>> 6); - final int byte37 = blocks[blocksOffset++] & 0xFF; - final int byte38 = blocks[blocksOffset++] & 0xFF; - final int byte39 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte36 & 63) << 23) | (byte37 << 15) | (byte38 << 7) | (byte39 >>> 1); - final int byte40 = blocks[blocksOffset++] & 0xFF; - final int byte41 = blocks[blocksOffset++] & 0xFF; - final int byte42 = blocks[blocksOffset++] & 0xFF; - final int byte43 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte39 & 1) << 28) | (byte40 << 20) | (byte41 << 12) | (byte42 << 4) | (byte43 >>> 4); - final int byte44 = blocks[blocksOffset++] & 0xFF; - final int byte45 = blocks[blocksOffset++] & 0xFF; - final int byte46 = blocks[blocksOffset++] & 0xFF; - final int byte47 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte43 & 15) << 25) | (byte44 << 17) | (byte45 << 9) | (byte46 << 1) | (byte47 >>> 7); - final int byte48 = blocks[blocksOffset++] & 0xFF; - final int byte49 = blocks[blocksOffset++] & 0xFF; - final int byte50 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte47 & 127) << 22) | (byte48 << 14) | (byte49 << 6) | (byte50 >>> 2); - final int byte51 = blocks[blocksOffset++] & 0xFF; - final int byte52 = blocks[blocksOffset++] & 0xFF; - final int byte53 = blocks[blocksOffset++] & 0xFF; - final int byte54 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte50 & 3) << 27) | (byte51 << 19) | (byte52 << 11) | (byte53 << 3) | (byte54 >>> 5); - final int byte55 = blocks[blocksOffset++] & 0xFF; - final int byte56 = blocks[blocksOffset++] & 0xFF; - final int byte57 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte54 & 31) << 24) | (byte55 << 16) | (byte56 << 8) | byte57; - final int byte58 = blocks[blocksOffset++] & 0xFF; - final int byte59 = blocks[blocksOffset++] & 0xFF; - final int byte60 = blocks[blocksOffset++] & 0xFF; - final int byte61 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte58 << 21) | (byte59 << 13) | (byte60 << 5) | (byte61 >>> 3); - final int byte62 = blocks[blocksOffset++] & 0xFF; - final int byte63 = blocks[blocksOffset++] & 0xFF; - final int byte64 = blocks[blocksOffset++] & 0xFF; - final int byte65 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte61 & 7) << 26) | (byte62 << 18) | (byte63 << 10) | (byte64 << 2) | (byte65 >>> 6); - final int byte66 = blocks[blocksOffset++] & 0xFF; - final int byte67 = blocks[blocksOffset++] & 0xFF; - final int byte68 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte65 & 63) << 23) | (byte66 << 15) | (byte67 << 7) | (byte68 >>> 1); - final int byte69 = blocks[blocksOffset++] & 0xFF; - final int byte70 = blocks[blocksOffset++] & 0xFF; - final int byte71 = blocks[blocksOffset++] & 0xFF; - final int byte72 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte68 & 1) << 28) | (byte69 << 20) | (byte70 << 12) | (byte71 << 4) | (byte72 >>> 4); - final int byte73 = blocks[blocksOffset++] & 0xFF; - final int byte74 = blocks[blocksOffset++] & 0xFF; - final int byte75 = blocks[blocksOffset++] & 0xFF; - final int byte76 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte72 & 15) << 25) | (byte73 << 17) | (byte74 << 9) | (byte75 << 1) | (byte76 >>> 7); - final int byte77 = blocks[blocksOffset++] & 0xFF; - final int byte78 = blocks[blocksOffset++] & 0xFF; - final int byte79 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte76 & 127) << 22) | (byte77 << 14) | (byte78 << 6) | (byte79 >>> 2); - final int byte80 = blocks[blocksOffset++] & 0xFF; - final int byte81 = blocks[blocksOffset++] & 0xFF; - final int byte82 = blocks[blocksOffset++] & 0xFF; - final int byte83 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte79 & 3) << 27) | (byte80 << 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) << 24) | (byte84 << 16) | (byte85 << 8) | byte86; - final int byte87 = blocks[blocksOffset++] & 0xFF; - final int byte88 = blocks[blocksOffset++] & 0xFF; - final int byte89 = blocks[blocksOffset++] & 0xFF; - final int byte90 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte87 << 21) | (byte88 << 13) | (byte89 << 5) | (byte90 >>> 3); - final int byte91 = blocks[blocksOffset++] & 0xFF; - final int byte92 = blocks[blocksOffset++] & 0xFF; - final int byte93 = blocks[blocksOffset++] & 0xFF; - final int byte94 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte90 & 7) << 26) | (byte91 << 18) | (byte92 << 10) | (byte93 << 2) | (byte94 >>> 6); - final int byte95 = blocks[blocksOffset++] & 0xFF; - final int byte96 = blocks[blocksOffset++] & 0xFF; - final int byte97 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte94 & 63) << 23) | (byte95 << 15) | (byte96 << 7) | (byte97 >>> 1); - final int byte98 = blocks[blocksOffset++] & 0xFF; - final int byte99 = blocks[blocksOffset++] & 0xFF; - final int byte100 = blocks[blocksOffset++] & 0xFF; - final int byte101 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte97 & 1) << 28) | (byte98 << 20) | (byte99 << 12) | (byte100 << 4) | (byte101 >>> 4); - final int byte102 = blocks[blocksOffset++] & 0xFF; - final int byte103 = blocks[blocksOffset++] & 0xFF; - final int byte104 = blocks[blocksOffset++] & 0xFF; - final int byte105 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte101 & 15) << 25) | (byte102 << 17) | (byte103 << 9) | (byte104 << 1) | (byte105 >>> 7); - final int byte106 = blocks[blocksOffset++] & 0xFF; - final int byte107 = blocks[blocksOffset++] & 0xFF; - final int byte108 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte105 & 127) << 22) | (byte106 << 14) | (byte107 << 6) | (byte108 >>> 2); - final int byte109 = blocks[blocksOffset++] & 0xFF; - final int byte110 = blocks[blocksOffset++] & 0xFF; - final int byte111 = blocks[blocksOffset++] & 0xFF; - final int byte112 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte108 & 3) << 27) | (byte109 << 19) | (byte110 << 11) | (byte111 << 3) | (byte112 >>> 5); - final int byte113 = blocks[blocksOffset++] & 0xFF; - final int byte114 = blocks[blocksOffset++] & 0xFF; - final int byte115 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte112 & 31) << 24) | (byte113 << 16) | (byte114 << 8) | byte115; - final int byte116 = blocks[blocksOffset++] & 0xFF; - final int byte117 = blocks[blocksOffset++] & 0xFF; - final int byte118 = blocks[blocksOffset++] & 0xFF; - final int byte119 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte116 << 21) | (byte117 << 13) | (byte118 << 5) | (byte119 >>> 3); - final int byte120 = blocks[blocksOffset++] & 0xFF; - final int byte121 = blocks[blocksOffset++] & 0xFF; - final int byte122 = blocks[blocksOffset++] & 0xFF; - final int byte123 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte119 & 7) << 26) | (byte120 << 18) | (byte121 << 10) | (byte122 << 2) | (byte123 >>> 6); - final int byte124 = blocks[blocksOffset++] & 0xFF; - final int byte125 = blocks[blocksOffset++] & 0xFF; - final int byte126 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte123 & 63) << 23) | (byte124 << 15) | (byte125 << 7) | (byte126 >>> 1); - final int byte127 = blocks[blocksOffset++] & 0xFF; - final int byte128 = blocks[blocksOffset++] & 0xFF; - final int byte129 = blocks[blocksOffset++] & 0xFF; - final int byte130 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte126 & 1) << 28) | (byte127 << 20) | (byte128 << 12) | (byte129 << 4) | (byte130 >>> 4); - final int byte131 = blocks[blocksOffset++] & 0xFF; - final int byte132 = blocks[blocksOffset++] & 0xFF; - final int byte133 = blocks[blocksOffset++] & 0xFF; - final int byte134 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte130 & 15) << 25) | (byte131 << 17) | (byte132 << 9) | (byte133 << 1) | (byte134 >>> 7); - final int byte135 = blocks[blocksOffset++] & 0xFF; - final int byte136 = blocks[blocksOffset++] & 0xFF; - final int byte137 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte134 & 127) << 22) | (byte135 << 14) | (byte136 << 6) | (byte137 >>> 2); - final int byte138 = blocks[blocksOffset++] & 0xFF; - final int byte139 = blocks[blocksOffset++] & 0xFF; - final int byte140 = blocks[blocksOffset++] & 0xFF; - final int byte141 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte137 & 3) << 27) | (byte138 << 19) | (byte139 << 11) | (byte140 << 3) | (byte141 >>> 5); - final int byte142 = blocks[blocksOffset++] & 0xFF; - final int byte143 = blocks[blocksOffset++] & 0xFF; - final int byte144 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte141 & 31) << 24) | (byte142 << 16) | (byte143 << 8) | byte144; - final int byte145 = blocks[blocksOffset++] & 0xFF; - final int byte146 = blocks[blocksOffset++] & 0xFF; - final int byte147 = blocks[blocksOffset++] & 0xFF; - final int byte148 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte145 << 21) | (byte146 << 13) | (byte147 << 5) | (byte148 >>> 3); - final int byte149 = blocks[blocksOffset++] & 0xFF; - final int byte150 = blocks[blocksOffset++] & 0xFF; - final int byte151 = blocks[blocksOffset++] & 0xFF; - final int byte152 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte148 & 7) << 26) | (byte149 << 18) | (byte150 << 10) | (byte151 << 2) | (byte152 >>> 6); - final int byte153 = blocks[blocksOffset++] & 0xFF; - final int byte154 = blocks[blocksOffset++] & 0xFF; - final int byte155 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte152 & 63) << 23) | (byte153 << 15) | (byte154 << 7) | (byte155 >>> 1); - final int byte156 = blocks[blocksOffset++] & 0xFF; - final int byte157 = blocks[blocksOffset++] & 0xFF; - final int byte158 = blocks[blocksOffset++] & 0xFF; - final int byte159 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte155 & 1) << 28) | (byte156 << 20) | (byte157 << 12) | (byte158 << 4) | (byte159 >>> 4); - final int byte160 = blocks[blocksOffset++] & 0xFF; - final int byte161 = blocks[blocksOffset++] & 0xFF; - final int byte162 = blocks[blocksOffset++] & 0xFF; - final int byte163 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte159 & 15) << 25) | (byte160 << 17) | (byte161 << 9) | (byte162 << 1) | (byte163 >>> 7); - final int byte164 = blocks[blocksOffset++] & 0xFF; - final int byte165 = blocks[blocksOffset++] & 0xFF; - final int byte166 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte163 & 127) << 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; - final int byte170 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte166 & 3) << 27) | (byte167 << 19) | (byte168 << 11) | (byte169 << 3) | (byte170 >>> 5); - final int byte171 = blocks[blocksOffset++] & 0xFF; - final int byte172 = blocks[blocksOffset++] & 0xFF; - final int byte173 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte170 & 31) << 24) | (byte171 << 16) | (byte172 << 8) | byte173; - final int byte174 = blocks[blocksOffset++] & 0xFF; - final int byte175 = blocks[blocksOffset++] & 0xFF; - final int byte176 = blocks[blocksOffset++] & 0xFF; - final int byte177 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte174 << 21) | (byte175 << 13) | (byte176 << 5) | (byte177 >>> 3); - final int byte178 = blocks[blocksOffset++] & 0xFF; - final int byte179 = blocks[blocksOffset++] & 0xFF; - final int byte180 = blocks[blocksOffset++] & 0xFF; - final int byte181 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte177 & 7) << 26) | (byte178 << 18) | (byte179 << 10) | (byte180 << 2) | (byte181 >>> 6); - final int byte182 = blocks[blocksOffset++] & 0xFF; - final int byte183 = blocks[blocksOffset++] & 0xFF; - final int byte184 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte181 & 63) << 23) | (byte182 << 15) | (byte183 << 7) | (byte184 >>> 1); - final int byte185 = blocks[blocksOffset++] & 0xFF; - final int byte186 = blocks[blocksOffset++] & 0xFF; - final int byte187 = blocks[blocksOffset++] & 0xFF; - final int byte188 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte184 & 1) << 28) | (byte185 << 20) | (byte186 << 12) | (byte187 << 4) | (byte188 >>> 4); - final int byte189 = blocks[blocksOffset++] & 0xFF; - final int byte190 = blocks[blocksOffset++] & 0xFF; - final int byte191 = blocks[blocksOffset++] & 0xFF; - final int byte192 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte188 & 15) << 25) | (byte189 << 17) | (byte190 << 9) | (byte191 << 1) | (byte192 >>> 7); - final int byte193 = blocks[blocksOffset++] & 0xFF; - final int byte194 = blocks[blocksOffset++] & 0xFF; - final int byte195 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte192 & 127) << 22) | (byte193 << 14) | (byte194 << 6) | (byte195 >>> 2); - final int byte196 = blocks[blocksOffset++] & 0xFF; - final int byte197 = blocks[blocksOffset++] & 0xFF; - final int byte198 = blocks[blocksOffset++] & 0xFF; - final int byte199 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte195 & 3) << 27) | (byte196 << 19) | (byte197 << 11) | (byte198 << 3) | (byte199 >>> 5); - final int byte200 = blocks[blocksOffset++] & 0xFF; - final int byte201 = blocks[blocksOffset++] & 0xFF; - final int byte202 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte199 & 31) << 24) | (byte200 << 16) | (byte201 << 8) | byte202; - final int byte203 = blocks[blocksOffset++] & 0xFF; - final int byte204 = blocks[blocksOffset++] & 0xFF; - final int byte205 = blocks[blocksOffset++] & 0xFF; - final int byte206 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte203 << 21) | (byte204 << 13) | (byte205 << 5) | (byte206 >>> 3); - final int byte207 = blocks[blocksOffset++] & 0xFF; - final int byte208 = blocks[blocksOffset++] & 0xFF; - final int byte209 = blocks[blocksOffset++] & 0xFF; - final int byte210 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte206 & 7) << 26) | (byte207 << 18) | (byte208 << 10) | (byte209 << 2) | (byte210 >>> 6); - final int byte211 = blocks[blocksOffset++] & 0xFF; - final int byte212 = blocks[blocksOffset++] & 0xFF; - final int byte213 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte210 & 63) << 23) | (byte211 << 15) | (byte212 << 7) | (byte213 >>> 1); - final int byte214 = blocks[blocksOffset++] & 0xFF; - final int byte215 = blocks[blocksOffset++] & 0xFF; - final int byte216 = blocks[blocksOffset++] & 0xFF; - final int byte217 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte213 & 1) << 28) | (byte214 << 20) | (byte215 << 12) | (byte216 << 4) | (byte217 >>> 4); - final int byte218 = blocks[blocksOffset++] & 0xFF; - final int byte219 = blocks[blocksOffset++] & 0xFF; - final int byte220 = blocks[blocksOffset++] & 0xFF; - final int byte221 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte217 & 15) << 25) | (byte218 << 17) | (byte219 << 9) | (byte220 << 1) | (byte221 >>> 7); - final int byte222 = blocks[blocksOffset++] & 0xFF; - final int byte223 = blocks[blocksOffset++] & 0xFF; - final int byte224 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte221 & 127) << 22) | (byte222 << 14) | (byte223 << 6) | (byte224 >>> 2); - final int byte225 = blocks[blocksOffset++] & 0xFF; - final int byte226 = blocks[blocksOffset++] & 0xFF; - final int byte227 = blocks[blocksOffset++] & 0xFF; - final int byte228 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte224 & 3) << 27) | (byte225 << 19) | (byte226 << 11) | (byte227 << 3) | (byte228 >>> 5); - final int byte229 = blocks[blocksOffset++] & 0xFF; - final int byte230 = blocks[blocksOffset++] & 0xFF; - final int byte231 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte228 & 31) << 24) | (byte229 << 16) | (byte230 << 8) | byte231; - } - } - - @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 >>> 35; - values[valuesOffset++] = (block0 >>> 6) & 536870911L; - final long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block0 & 63L) << 23) | (block1 >>> 41); - values[valuesOffset++] = (block1 >>> 12) & 536870911L; - final long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block1 & 4095L) << 17) | (block2 >>> 47); - values[valuesOffset++] = (block2 >>> 18) & 536870911L; - final long block3 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block2 & 262143L) << 11) | (block3 >>> 53); - values[valuesOffset++] = (block3 >>> 24) & 536870911L; - final long block4 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block3 & 16777215L) << 5) | (block4 >>> 59); - values[valuesOffset++] = (block4 >>> 30) & 536870911L; - values[valuesOffset++] = (block4 >>> 1) & 536870911L; - final long block5 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block4 & 1L) << 28) | (block5 >>> 36); - values[valuesOffset++] = (block5 >>> 7) & 536870911L; - final long block6 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block5 & 127L) << 22) | (block6 >>> 42); - values[valuesOffset++] = (block6 >>> 13) & 536870911L; - final long block7 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block6 & 8191L) << 16) | (block7 >>> 48); - values[valuesOffset++] = (block7 >>> 19) & 536870911L; - final long block8 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block7 & 524287L) << 10) | (block8 >>> 54); - values[valuesOffset++] = (block8 >>> 25) & 536870911L; - final long block9 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block8 & 33554431L) << 4) | (block9 >>> 60); - values[valuesOffset++] = (block9 >>> 31) & 536870911L; - values[valuesOffset++] = (block9 >>> 2) & 536870911L; - final long block10 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block9 & 3L) << 27) | (block10 >>> 37); - values[valuesOffset++] = (block10 >>> 8) & 536870911L; - final long block11 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block10 & 255L) << 21) | (block11 >>> 43); - values[valuesOffset++] = (block11 >>> 14) & 536870911L; - final long block12 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block11 & 16383L) << 15) | (block12 >>> 49); - values[valuesOffset++] = (block12 >>> 20) & 536870911L; - final long block13 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block12 & 1048575L) << 9) | (block13 >>> 55); - values[valuesOffset++] = (block13 >>> 26) & 536870911L; - final long block14 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block13 & 67108863L) << 3) | (block14 >>> 61); - values[valuesOffset++] = (block14 >>> 32) & 536870911L; - values[valuesOffset++] = (block14 >>> 3) & 536870911L; - final long block15 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block14 & 7L) << 26) | (block15 >>> 38); - values[valuesOffset++] = (block15 >>> 9) & 536870911L; - final long block16 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block15 & 511L) << 20) | (block16 >>> 44); - values[valuesOffset++] = (block16 >>> 15) & 536870911L; - final long block17 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block16 & 32767L) << 14) | (block17 >>> 50); - values[valuesOffset++] = (block17 >>> 21) & 536870911L; - final long block18 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block17 & 2097151L) << 8) | (block18 >>> 56); - values[valuesOffset++] = (block18 >>> 27) & 536870911L; - final long block19 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block18 & 134217727L) << 2) | (block19 >>> 62); - values[valuesOffset++] = (block19 >>> 33) & 536870911L; - values[valuesOffset++] = (block19 >>> 4) & 536870911L; - final long block20 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block19 & 15L) << 25) | (block20 >>> 39); - values[valuesOffset++] = (block20 >>> 10) & 536870911L; - final long block21 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block20 & 1023L) << 19) | (block21 >>> 45); - values[valuesOffset++] = (block21 >>> 16) & 536870911L; - final long block22 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block21 & 65535L) << 13) | (block22 >>> 51); - values[valuesOffset++] = (block22 >>> 22) & 536870911L; - final long block23 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block22 & 4194303L) << 7) | (block23 >>> 57); - values[valuesOffset++] = (block23 >>> 28) & 536870911L; - final long block24 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block23 & 268435455L) << 1) | (block24 >>> 63); - values[valuesOffset++] = (block24 >>> 34) & 536870911L; - values[valuesOffset++] = (block24 >>> 5) & 536870911L; - final long block25 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block24 & 31L) << 24) | (block25 >>> 40); - values[valuesOffset++] = (block25 >>> 11) & 536870911L; - final long block26 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block25 & 2047L) << 18) | (block26 >>> 46); - values[valuesOffset++] = (block26 >>> 17) & 536870911L; - final long block27 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block26 & 131071L) << 12) | (block27 >>> 52); - values[valuesOffset++] = (block27 >>> 23) & 536870911L; - final long block28 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block27 & 8388607L) << 6) | (block28 >>> 58); - values[valuesOffset++] = (block28 >>> 29) & 536870911L; - values[valuesOffset++] = block28 & 536870911L; - } - } - - @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; - final long byte3 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte0 << 21) | (byte1 << 13) | (byte2 << 5) | (byte3 >>> 3); - final long byte4 = blocks[blocksOffset++] & 0xFF; - final long byte5 = blocks[blocksOffset++] & 0xFF; - final long byte6 = blocks[blocksOffset++] & 0xFF; - final long byte7 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte3 & 7) << 26) | (byte4 << 18) | (byte5 << 10) | (byte6 << 2) | (byte7 >>> 6); - final long byte8 = blocks[blocksOffset++] & 0xFF; - final long byte9 = blocks[blocksOffset++] & 0xFF; - final long byte10 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte7 & 63) << 23) | (byte8 << 15) | (byte9 << 7) | (byte10 >>> 1); - final long byte11 = blocks[blocksOffset++] & 0xFF; - final long byte12 = blocks[blocksOffset++] & 0xFF; - final long byte13 = blocks[blocksOffset++] & 0xFF; - final long byte14 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte10 & 1) << 28) | (byte11 << 20) | (byte12 << 12) | (byte13 << 4) | (byte14 >>> 4); - final long byte15 = blocks[blocksOffset++] & 0xFF; - final long byte16 = blocks[blocksOffset++] & 0xFF; - final long byte17 = blocks[blocksOffset++] & 0xFF; - final long byte18 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte14 & 15) << 25) | (byte15 << 17) | (byte16 << 9) | (byte17 << 1) | (byte18 >>> 7); - final long byte19 = blocks[blocksOffset++] & 0xFF; - final long byte20 = blocks[blocksOffset++] & 0xFF; - final long byte21 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte18 & 127) << 22) | (byte19 << 14) | (byte20 << 6) | (byte21 >>> 2); - final long byte22 = blocks[blocksOffset++] & 0xFF; - final long byte23 = blocks[blocksOffset++] & 0xFF; - final long byte24 = blocks[blocksOffset++] & 0xFF; - final long byte25 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte21 & 3) << 27) | (byte22 << 19) | (byte23 << 11) | (byte24 << 3) | (byte25 >>> 5); - final long byte26 = blocks[blocksOffset++] & 0xFF; - final long byte27 = blocks[blocksOffset++] & 0xFF; - final long byte28 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte25 & 31) << 24) | (byte26 << 16) | (byte27 << 8) | byte28; - final long byte29 = blocks[blocksOffset++] & 0xFF; - final long byte30 = blocks[blocksOffset++] & 0xFF; - final long byte31 = blocks[blocksOffset++] & 0xFF; - final long byte32 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte29 << 21) | (byte30 << 13) | (byte31 << 5) | (byte32 >>> 3); - final long byte33 = blocks[blocksOffset++] & 0xFF; - final long byte34 = blocks[blocksOffset++] & 0xFF; - final long byte35 = blocks[blocksOffset++] & 0xFF; - final long byte36 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte32 & 7) << 26) | (byte33 << 18) | (byte34 << 10) | (byte35 << 2) | (byte36 >>> 6); - final long byte37 = blocks[blocksOffset++] & 0xFF; - final long byte38 = blocks[blocksOffset++] & 0xFF; - final long byte39 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte36 & 63) << 23) | (byte37 << 15) | (byte38 << 7) | (byte39 >>> 1); - final long byte40 = blocks[blocksOffset++] & 0xFF; - final long byte41 = blocks[blocksOffset++] & 0xFF; - final long byte42 = blocks[blocksOffset++] & 0xFF; - final long byte43 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte39 & 1) << 28) | (byte40 << 20) | (byte41 << 12) | (byte42 << 4) | (byte43 >>> 4); - final long byte44 = blocks[blocksOffset++] & 0xFF; - final long byte45 = blocks[blocksOffset++] & 0xFF; - final long byte46 = blocks[blocksOffset++] & 0xFF; - final long byte47 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte43 & 15) << 25) | (byte44 << 17) | (byte45 << 9) | (byte46 << 1) | (byte47 >>> 7); - final long byte48 = blocks[blocksOffset++] & 0xFF; - final long byte49 = blocks[blocksOffset++] & 0xFF; - final long byte50 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte47 & 127) << 22) | (byte48 << 14) | (byte49 << 6) | (byte50 >>> 2); - final long byte51 = blocks[blocksOffset++] & 0xFF; - final long byte52 = blocks[blocksOffset++] & 0xFF; - final long byte53 = blocks[blocksOffset++] & 0xFF; - final long byte54 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte50 & 3) << 27) | (byte51 << 19) | (byte52 << 11) | (byte53 << 3) | (byte54 >>> 5); - final long byte55 = blocks[blocksOffset++] & 0xFF; - final long byte56 = blocks[blocksOffset++] & 0xFF; - final long byte57 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte54 & 31) << 24) | (byte55 << 16) | (byte56 << 8) | byte57; - final long byte58 = blocks[blocksOffset++] & 0xFF; - final long byte59 = blocks[blocksOffset++] & 0xFF; - final long byte60 = blocks[blocksOffset++] & 0xFF; - final long byte61 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte58 << 21) | (byte59 << 13) | (byte60 << 5) | (byte61 >>> 3); - final long byte62 = blocks[blocksOffset++] & 0xFF; - final long byte63 = blocks[blocksOffset++] & 0xFF; - final long byte64 = blocks[blocksOffset++] & 0xFF; - final long byte65 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte61 & 7) << 26) | (byte62 << 18) | (byte63 << 10) | (byte64 << 2) | (byte65 >>> 6); - final long byte66 = blocks[blocksOffset++] & 0xFF; - final long byte67 = blocks[blocksOffset++] & 0xFF; - final long byte68 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte65 & 63) << 23) | (byte66 << 15) | (byte67 << 7) | (byte68 >>> 1); - final long byte69 = blocks[blocksOffset++] & 0xFF; - final long byte70 = blocks[blocksOffset++] & 0xFF; - final long byte71 = blocks[blocksOffset++] & 0xFF; - final long byte72 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte68 & 1) << 28) | (byte69 << 20) | (byte70 << 12) | (byte71 << 4) | (byte72 >>> 4); - final long byte73 = blocks[blocksOffset++] & 0xFF; - final long byte74 = blocks[blocksOffset++] & 0xFF; - final long byte75 = blocks[blocksOffset++] & 0xFF; - final long byte76 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte72 & 15) << 25) | (byte73 << 17) | (byte74 << 9) | (byte75 << 1) | (byte76 >>> 7); - final long byte77 = blocks[blocksOffset++] & 0xFF; - final long byte78 = blocks[blocksOffset++] & 0xFF; - final long byte79 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte76 & 127) << 22) | (byte77 << 14) | (byte78 << 6) | (byte79 >>> 2); - final long byte80 = blocks[blocksOffset++] & 0xFF; - final long byte81 = blocks[blocksOffset++] & 0xFF; - final long byte82 = blocks[blocksOffset++] & 0xFF; - final long byte83 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte79 & 3) << 27) | (byte80 << 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) << 24) | (byte84 << 16) | (byte85 << 8) | byte86; - final long byte87 = blocks[blocksOffset++] & 0xFF; - final long byte88 = blocks[blocksOffset++] & 0xFF; - final long byte89 = blocks[blocksOffset++] & 0xFF; - final long byte90 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte87 << 21) | (byte88 << 13) | (byte89 << 5) | (byte90 >>> 3); - final long byte91 = blocks[blocksOffset++] & 0xFF; - final long byte92 = blocks[blocksOffset++] & 0xFF; - final long byte93 = blocks[blocksOffset++] & 0xFF; - final long byte94 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte90 & 7) << 26) | (byte91 << 18) | (byte92 << 10) | (byte93 << 2) | (byte94 >>> 6); - final long byte95 = blocks[blocksOffset++] & 0xFF; - final long byte96 = blocks[blocksOffset++] & 0xFF; - final long byte97 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte94 & 63) << 23) | (byte95 << 15) | (byte96 << 7) | (byte97 >>> 1); - final long byte98 = blocks[blocksOffset++] & 0xFF; - final long byte99 = blocks[blocksOffset++] & 0xFF; - final long byte100 = blocks[blocksOffset++] & 0xFF; - final long byte101 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte97 & 1) << 28) | (byte98 << 20) | (byte99 << 12) | (byte100 << 4) | (byte101 >>> 4); - final long byte102 = blocks[blocksOffset++] & 0xFF; - final long byte103 = blocks[blocksOffset++] & 0xFF; - final long byte104 = blocks[blocksOffset++] & 0xFF; - final long byte105 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte101 & 15) << 25) | (byte102 << 17) | (byte103 << 9) | (byte104 << 1) | (byte105 >>> 7); - final long byte106 = blocks[blocksOffset++] & 0xFF; - final long byte107 = blocks[blocksOffset++] & 0xFF; - final long byte108 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte105 & 127) << 22) | (byte106 << 14) | (byte107 << 6) | (byte108 >>> 2); - final long byte109 = blocks[blocksOffset++] & 0xFF; - final long byte110 = blocks[blocksOffset++] & 0xFF; - final long byte111 = blocks[blocksOffset++] & 0xFF; - final long byte112 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte108 & 3) << 27) | (byte109 << 19) | (byte110 << 11) | (byte111 << 3) | (byte112 >>> 5); - final long byte113 = blocks[blocksOffset++] & 0xFF; - final long byte114 = blocks[blocksOffset++] & 0xFF; - final long byte115 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte112 & 31) << 24) | (byte113 << 16) | (byte114 << 8) | byte115; - final long byte116 = blocks[blocksOffset++] & 0xFF; - final long byte117 = blocks[blocksOffset++] & 0xFF; - final long byte118 = blocks[blocksOffset++] & 0xFF; - final long byte119 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte116 << 21) | (byte117 << 13) | (byte118 << 5) | (byte119 >>> 3); - final long byte120 = blocks[blocksOffset++] & 0xFF; - final long byte121 = blocks[blocksOffset++] & 0xFF; - final long byte122 = blocks[blocksOffset++] & 0xFF; - final long byte123 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte119 & 7) << 26) | (byte120 << 18) | (byte121 << 10) | (byte122 << 2) | (byte123 >>> 6); - final long byte124 = blocks[blocksOffset++] & 0xFF; - final long byte125 = blocks[blocksOffset++] & 0xFF; - final long byte126 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte123 & 63) << 23) | (byte124 << 15) | (byte125 << 7) | (byte126 >>> 1); - final long byte127 = blocks[blocksOffset++] & 0xFF; - final long byte128 = blocks[blocksOffset++] & 0xFF; - final long byte129 = blocks[blocksOffset++] & 0xFF; - final long byte130 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte126 & 1) << 28) | (byte127 << 20) | (byte128 << 12) | (byte129 << 4) | (byte130 >>> 4); - final long byte131 = blocks[blocksOffset++] & 0xFF; - final long byte132 = blocks[blocksOffset++] & 0xFF; - final long byte133 = blocks[blocksOffset++] & 0xFF; - final long byte134 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte130 & 15) << 25) | (byte131 << 17) | (byte132 << 9) | (byte133 << 1) | (byte134 >>> 7); - final long byte135 = blocks[blocksOffset++] & 0xFF; - final long byte136 = blocks[blocksOffset++] & 0xFF; - final long byte137 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte134 & 127) << 22) | (byte135 << 14) | (byte136 << 6) | (byte137 >>> 2); - final long byte138 = blocks[blocksOffset++] & 0xFF; - final long byte139 = blocks[blocksOffset++] & 0xFF; - final long byte140 = blocks[blocksOffset++] & 0xFF; - final long byte141 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte137 & 3) << 27) | (byte138 << 19) | (byte139 << 11) | (byte140 << 3) | (byte141 >>> 5); - final long byte142 = blocks[blocksOffset++] & 0xFF; - final long byte143 = blocks[blocksOffset++] & 0xFF; - final long byte144 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte141 & 31) << 24) | (byte142 << 16) | (byte143 << 8) | byte144; - final long byte145 = blocks[blocksOffset++] & 0xFF; - final long byte146 = blocks[blocksOffset++] & 0xFF; - final long byte147 = blocks[blocksOffset++] & 0xFF; - final long byte148 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte145 << 21) | (byte146 << 13) | (byte147 << 5) | (byte148 >>> 3); - final long byte149 = blocks[blocksOffset++] & 0xFF; - final long byte150 = blocks[blocksOffset++] & 0xFF; - final long byte151 = blocks[blocksOffset++] & 0xFF; - final long byte152 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte148 & 7) << 26) | (byte149 << 18) | (byte150 << 10) | (byte151 << 2) | (byte152 >>> 6); - final long byte153 = blocks[blocksOffset++] & 0xFF; - final long byte154 = blocks[blocksOffset++] & 0xFF; - final long byte155 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte152 & 63) << 23) | (byte153 << 15) | (byte154 << 7) | (byte155 >>> 1); - final long byte156 = blocks[blocksOffset++] & 0xFF; - final long byte157 = blocks[blocksOffset++] & 0xFF; - final long byte158 = blocks[blocksOffset++] & 0xFF; - final long byte159 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte155 & 1) << 28) | (byte156 << 20) | (byte157 << 12) | (byte158 << 4) | (byte159 >>> 4); - final long byte160 = blocks[blocksOffset++] & 0xFF; - final long byte161 = blocks[blocksOffset++] & 0xFF; - final long byte162 = blocks[blocksOffset++] & 0xFF; - final long byte163 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte159 & 15) << 25) | (byte160 << 17) | (byte161 << 9) | (byte162 << 1) | (byte163 >>> 7); - final long byte164 = blocks[blocksOffset++] & 0xFF; - final long byte165 = blocks[blocksOffset++] & 0xFF; - final long byte166 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte163 & 127) << 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; - final long byte170 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte166 & 3) << 27) | (byte167 << 19) | (byte168 << 11) | (byte169 << 3) | (byte170 >>> 5); - final long byte171 = blocks[blocksOffset++] & 0xFF; - final long byte172 = blocks[blocksOffset++] & 0xFF; - final long byte173 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte170 & 31) << 24) | (byte171 << 16) | (byte172 << 8) | byte173; - final long byte174 = blocks[blocksOffset++] & 0xFF; - final long byte175 = blocks[blocksOffset++] & 0xFF; - final long byte176 = blocks[blocksOffset++] & 0xFF; - final long byte177 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte174 << 21) | (byte175 << 13) | (byte176 << 5) | (byte177 >>> 3); - final long byte178 = blocks[blocksOffset++] & 0xFF; - final long byte179 = blocks[blocksOffset++] & 0xFF; - final long byte180 = blocks[blocksOffset++] & 0xFF; - final long byte181 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte177 & 7) << 26) | (byte178 << 18) | (byte179 << 10) | (byte180 << 2) | (byte181 >>> 6); - final long byte182 = blocks[blocksOffset++] & 0xFF; - final long byte183 = blocks[blocksOffset++] & 0xFF; - final long byte184 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte181 & 63) << 23) | (byte182 << 15) | (byte183 << 7) | (byte184 >>> 1); - final long byte185 = blocks[blocksOffset++] & 0xFF; - final long byte186 = blocks[blocksOffset++] & 0xFF; - final long byte187 = blocks[blocksOffset++] & 0xFF; - final long byte188 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte184 & 1) << 28) | (byte185 << 20) | (byte186 << 12) | (byte187 << 4) | (byte188 >>> 4); - final long byte189 = blocks[blocksOffset++] & 0xFF; - final long byte190 = blocks[blocksOffset++] & 0xFF; - final long byte191 = blocks[blocksOffset++] & 0xFF; - final long byte192 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte188 & 15) << 25) | (byte189 << 17) | (byte190 << 9) | (byte191 << 1) | (byte192 >>> 7); - final long byte193 = blocks[blocksOffset++] & 0xFF; - final long byte194 = blocks[blocksOffset++] & 0xFF; - final long byte195 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte192 & 127) << 22) | (byte193 << 14) | (byte194 << 6) | (byte195 >>> 2); - final long byte196 = blocks[blocksOffset++] & 0xFF; - final long byte197 = blocks[blocksOffset++] & 0xFF; - final long byte198 = blocks[blocksOffset++] & 0xFF; - final long byte199 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte195 & 3) << 27) | (byte196 << 19) | (byte197 << 11) | (byte198 << 3) | (byte199 >>> 5); - final long byte200 = blocks[blocksOffset++] & 0xFF; - final long byte201 = blocks[blocksOffset++] & 0xFF; - final long byte202 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte199 & 31) << 24) | (byte200 << 16) | (byte201 << 8) | byte202; - final long byte203 = blocks[blocksOffset++] & 0xFF; - final long byte204 = blocks[blocksOffset++] & 0xFF; - final long byte205 = blocks[blocksOffset++] & 0xFF; - final long byte206 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte203 << 21) | (byte204 << 13) | (byte205 << 5) | (byte206 >>> 3); - final long byte207 = blocks[blocksOffset++] & 0xFF; - final long byte208 = blocks[blocksOffset++] & 0xFF; - final long byte209 = blocks[blocksOffset++] & 0xFF; - final long byte210 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte206 & 7) << 26) | (byte207 << 18) | (byte208 << 10) | (byte209 << 2) | (byte210 >>> 6); - final long byte211 = blocks[blocksOffset++] & 0xFF; - final long byte212 = blocks[blocksOffset++] & 0xFF; - final long byte213 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte210 & 63) << 23) | (byte211 << 15) | (byte212 << 7) | (byte213 >>> 1); - final long byte214 = blocks[blocksOffset++] & 0xFF; - final long byte215 = blocks[blocksOffset++] & 0xFF; - final long byte216 = blocks[blocksOffset++] & 0xFF; - final long byte217 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte213 & 1) << 28) | (byte214 << 20) | (byte215 << 12) | (byte216 << 4) | (byte217 >>> 4); - final long byte218 = blocks[blocksOffset++] & 0xFF; - final long byte219 = blocks[blocksOffset++] & 0xFF; - final long byte220 = blocks[blocksOffset++] & 0xFF; - final long byte221 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte217 & 15) << 25) | (byte218 << 17) | (byte219 << 9) | (byte220 << 1) | (byte221 >>> 7); - final long byte222 = blocks[blocksOffset++] & 0xFF; - final long byte223 = blocks[blocksOffset++] & 0xFF; - final long byte224 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte221 & 127) << 22) | (byte222 << 14) | (byte223 << 6) | (byte224 >>> 2); - final long byte225 = blocks[blocksOffset++] & 0xFF; - final long byte226 = blocks[blocksOffset++] & 0xFF; - final long byte227 = blocks[blocksOffset++] & 0xFF; - final long byte228 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte224 & 3) << 27) | (byte225 << 19) | (byte226 << 11) | (byte227 << 3) | (byte228 >>> 5); - final long byte229 = blocks[blocksOffset++] & 0xFF; - final long byte230 = blocks[blocksOffset++] & 0xFF; - final long byte231 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte228 & 31) << 24) | (byte229 << 16) | (byte230 << 8) | byte231; - } - } - - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 35) | ((values[valuesOffset++] & 0xffffffffL) << 6) | ((values[valuesOffset] & 0xffffffffL) >>> 23); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 41) | ((values[valuesOffset++] & 0xffffffffL) << 12) | ((values[valuesOffset] & 0xffffffffL) >>> 17); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 47) | ((values[valuesOffset++] & 0xffffffffL) << 18) | ((values[valuesOffset] & 0xffffffffL) >>> 11); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 53) | ((values[valuesOffset++] & 0xffffffffL) << 24) | ((values[valuesOffset] & 0xffffffffL) >>> 5); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 59) | ((values[valuesOffset++] & 0xffffffffL) << 30) | ((values[valuesOffset++] & 0xffffffffL) << 1) | ((values[valuesOffset] & 0xffffffffL) >>> 28); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 36) | ((values[valuesOffset++] & 0xffffffffL) << 7) | ((values[valuesOffset] & 0xffffffffL) >>> 22); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 42) | ((values[valuesOffset++] & 0xffffffffL) << 13) | ((values[valuesOffset] & 0xffffffffL) >>> 16); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 48) | ((values[valuesOffset++] & 0xffffffffL) << 19) | ((values[valuesOffset] & 0xffffffffL) >>> 10); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 54) | ((values[valuesOffset++] & 0xffffffffL) << 25) | ((values[valuesOffset] & 0xffffffffL) >>> 4); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 60) | ((values[valuesOffset++] & 0xffffffffL) << 31) | ((values[valuesOffset++] & 0xffffffffL) << 2) | ((values[valuesOffset] & 0xffffffffL) >>> 27); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 37) | ((values[valuesOffset++] & 0xffffffffL) << 8) | ((values[valuesOffset] & 0xffffffffL) >>> 21); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 43) | ((values[valuesOffset++] & 0xffffffffL) << 14) | ((values[valuesOffset] & 0xffffffffL) >>> 15); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 49) | ((values[valuesOffset++] & 0xffffffffL) << 20) | ((values[valuesOffset] & 0xffffffffL) >>> 9); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 55) | ((values[valuesOffset++] & 0xffffffffL) << 26) | ((values[valuesOffset] & 0xffffffffL) >>> 3); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 61) | ((values[valuesOffset++] & 0xffffffffL) << 32) | ((values[valuesOffset++] & 0xffffffffL) << 3) | ((values[valuesOffset] & 0xffffffffL) >>> 26); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 38) | ((values[valuesOffset++] & 0xffffffffL) << 9) | ((values[valuesOffset] & 0xffffffffL) >>> 20); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 44) | ((values[valuesOffset++] & 0xffffffffL) << 15) | ((values[valuesOffset] & 0xffffffffL) >>> 14); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 50) | ((values[valuesOffset++] & 0xffffffffL) << 21) | ((values[valuesOffset] & 0xffffffffL) >>> 8); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 56) | ((values[valuesOffset++] & 0xffffffffL) << 27) | ((values[valuesOffset] & 0xffffffffL) >>> 2); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 62) | ((values[valuesOffset++] & 0xffffffffL) << 33) | ((values[valuesOffset++] & 0xffffffffL) << 4) | ((values[valuesOffset] & 0xffffffffL) >>> 25); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 39) | ((values[valuesOffset++] & 0xffffffffL) << 10) | ((values[valuesOffset] & 0xffffffffL) >>> 19); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 45) | ((values[valuesOffset++] & 0xffffffffL) << 16) | ((values[valuesOffset] & 0xffffffffL) >>> 13); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 51) | ((values[valuesOffset++] & 0xffffffffL) << 22) | ((values[valuesOffset] & 0xffffffffL) >>> 7); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 57) | ((values[valuesOffset++] & 0xffffffffL) << 28) | ((values[valuesOffset] & 0xffffffffL) >>> 1); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 63) | ((values[valuesOffset++] & 0xffffffffL) << 34) | ((values[valuesOffset++] & 0xffffffffL) << 5) | ((values[valuesOffset] & 0xffffffffL) >>> 24); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 40) | ((values[valuesOffset++] & 0xffffffffL) << 11) | ((values[valuesOffset] & 0xffffffffL) >>> 18); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 46) | ((values[valuesOffset++] & 0xffffffffL) << 17) | ((values[valuesOffset] & 0xffffffffL) >>> 12); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 52) | ((values[valuesOffset++] & 0xffffffffL) << 23) | ((values[valuesOffset] & 0xffffffffL) >>> 6); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 58) | ((values[valuesOffset++] & 0xffffffffL) << 29) | (values[valuesOffset++] & 0xffffffffL); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] << 35) | (values[valuesOffset++] << 6) | (values[valuesOffset] >>> 23); - blocks[blocksOffset++] = (values[valuesOffset++] << 41) | (values[valuesOffset++] << 12) | (values[valuesOffset] >>> 17); - blocks[blocksOffset++] = (values[valuesOffset++] << 47) | (values[valuesOffset++] << 18) | (values[valuesOffset] >>> 11); - blocks[blocksOffset++] = (values[valuesOffset++] << 53) | (values[valuesOffset++] << 24) | (values[valuesOffset] >>> 5); - blocks[blocksOffset++] = (values[valuesOffset++] << 59) | (values[valuesOffset++] << 30) | (values[valuesOffset++] << 1) | (values[valuesOffset] >>> 28); - blocks[blocksOffset++] = (values[valuesOffset++] << 36) | (values[valuesOffset++] << 7) | (values[valuesOffset] >>> 22); - blocks[blocksOffset++] = (values[valuesOffset++] << 42) | (values[valuesOffset++] << 13) | (values[valuesOffset] >>> 16); - blocks[blocksOffset++] = (values[valuesOffset++] << 48) | (values[valuesOffset++] << 19) | (values[valuesOffset] >>> 10); - blocks[blocksOffset++] = (values[valuesOffset++] << 54) | (values[valuesOffset++] << 25) | (values[valuesOffset] >>> 4); - blocks[blocksOffset++] = (values[valuesOffset++] << 60) | (values[valuesOffset++] << 31) | (values[valuesOffset++] << 2) | (values[valuesOffset] >>> 27); - blocks[blocksOffset++] = (values[valuesOffset++] << 37) | (values[valuesOffset++] << 8) | (values[valuesOffset] >>> 21); - blocks[blocksOffset++] = (values[valuesOffset++] << 43) | (values[valuesOffset++] << 14) | (values[valuesOffset] >>> 15); - blocks[blocksOffset++] = (values[valuesOffset++] << 49) | (values[valuesOffset++] << 20) | (values[valuesOffset] >>> 9); - blocks[blocksOffset++] = (values[valuesOffset++] << 55) | (values[valuesOffset++] << 26) | (values[valuesOffset] >>> 3); - blocks[blocksOffset++] = (values[valuesOffset++] << 61) | (values[valuesOffset++] << 32) | (values[valuesOffset++] << 3) | (values[valuesOffset] >>> 26); - blocks[blocksOffset++] = (values[valuesOffset++] << 38) | (values[valuesOffset++] << 9) | (values[valuesOffset] >>> 20); - blocks[blocksOffset++] = (values[valuesOffset++] << 44) | (values[valuesOffset++] << 15) | (values[valuesOffset] >>> 14); - blocks[blocksOffset++] = (values[valuesOffset++] << 50) | (values[valuesOffset++] << 21) | (values[valuesOffset] >>> 8); - blocks[blocksOffset++] = (values[valuesOffset++] << 56) | (values[valuesOffset++] << 27) | (values[valuesOffset] >>> 2); - blocks[blocksOffset++] = (values[valuesOffset++] << 62) | (values[valuesOffset++] << 33) | (values[valuesOffset++] << 4) | (values[valuesOffset] >>> 25); - blocks[blocksOffset++] = (values[valuesOffset++] << 39) | (values[valuesOffset++] << 10) | (values[valuesOffset] >>> 19); - blocks[blocksOffset++] = (values[valuesOffset++] << 45) | (values[valuesOffset++] << 16) | (values[valuesOffset] >>> 13); - blocks[blocksOffset++] = (values[valuesOffset++] << 51) | (values[valuesOffset++] << 22) | (values[valuesOffset] >>> 7); - blocks[blocksOffset++] = (values[valuesOffset++] << 57) | (values[valuesOffset++] << 28) | (values[valuesOffset] >>> 1); - blocks[blocksOffset++] = (values[valuesOffset++] << 63) | (values[valuesOffset++] << 34) | (values[valuesOffset++] << 5) | (values[valuesOffset] >>> 24); - blocks[blocksOffset++] = (values[valuesOffset++] << 40) | (values[valuesOffset++] << 11) | (values[valuesOffset] >>> 18); - blocks[blocksOffset++] = (values[valuesOffset++] << 46) | (values[valuesOffset++] << 17) | (values[valuesOffset] >>> 12); - blocks[blocksOffset++] = (values[valuesOffset++] << 52) | (values[valuesOffset++] << 23) | (values[valuesOffset] >>> 6); - blocks[blocksOffset++] = (values[valuesOffset++] << 58) | (values[valuesOffset++] << 29) | values[valuesOffset++]; - } - } - -} diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked3.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked3.java index 7e280757572..d303dacc61d 100644 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked3.java +++ b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked3.java @@ -22,15 +22,12 @@ package org.apache.lucene.util.packed; /** * Efficient sequential read/write of packed integers. */ -final class BulkOperationPacked3 extends BulkOperation { - @Override - public int blockCount() { - return 3; - } +final class BulkOperationPacked3 extends BulkOperationPacked { - @Override - public int valueCount() { - return 64; + public BulkOperationPacked3() { + super(3); + assert blockCount() == 3; + assert valueCount() == 64; } @Override @@ -375,26 +372,4 @@ final class BulkOperationPacked3 extends BulkOperation { } } - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 61) | ((values[valuesOffset++] & 0xffffffffL) << 58) | ((values[valuesOffset++] & 0xffffffffL) << 55) | ((values[valuesOffset++] & 0xffffffffL) << 52) | ((values[valuesOffset++] & 0xffffffffL) << 49) | ((values[valuesOffset++] & 0xffffffffL) << 46) | ((values[valuesOffset++] & 0xffffffffL) << 43) | ((values[valuesOffset++] & 0xffffffffL) << 40) | ((values[valuesOffset++] & 0xffffffffL) << 37) | ((values[valuesOffset++] & 0xffffffffL) << 34) | ((values[valuesOffset++] & 0xffffffffL) << 31) | ((values[valuesOffset++] & 0xffffffffL) << 28) | ((values[valuesOffset++] & 0xffffffffL) << 25) | ((values[valuesOffset++] & 0xffffffffL) << 22) | ((values[valuesOffset++] & 0xffffffffL) << 19) | ((values[valuesOffset++] & 0xffffffffL) << 16) | ((values[valuesOffset++] & 0xffffffffL) << 13) | ((values[valuesOffset++] & 0xffffffffL) << 10) | ((values[valuesOffset++] & 0xffffffffL) << 7) | ((values[valuesOffset++] & 0xffffffffL) << 4) | ((values[valuesOffset++] & 0xffffffffL) << 1) | ((values[valuesOffset] & 0xffffffffL) >>> 2); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 62) | ((values[valuesOffset++] & 0xffffffffL) << 59) | ((values[valuesOffset++] & 0xffffffffL) << 56) | ((values[valuesOffset++] & 0xffffffffL) << 53) | ((values[valuesOffset++] & 0xffffffffL) << 50) | ((values[valuesOffset++] & 0xffffffffL) << 47) | ((values[valuesOffset++] & 0xffffffffL) << 44) | ((values[valuesOffset++] & 0xffffffffL) << 41) | ((values[valuesOffset++] & 0xffffffffL) << 38) | ((values[valuesOffset++] & 0xffffffffL) << 35) | ((values[valuesOffset++] & 0xffffffffL) << 32) | ((values[valuesOffset++] & 0xffffffffL) << 29) | ((values[valuesOffset++] & 0xffffffffL) << 26) | ((values[valuesOffset++] & 0xffffffffL) << 23) | ((values[valuesOffset++] & 0xffffffffL) << 20) | ((values[valuesOffset++] & 0xffffffffL) << 17) | ((values[valuesOffset++] & 0xffffffffL) << 14) | ((values[valuesOffset++] & 0xffffffffL) << 11) | ((values[valuesOffset++] & 0xffffffffL) << 8) | ((values[valuesOffset++] & 0xffffffffL) << 5) | ((values[valuesOffset++] & 0xffffffffL) << 2) | ((values[valuesOffset] & 0xffffffffL) >>> 1); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 63) | ((values[valuesOffset++] & 0xffffffffL) << 60) | ((values[valuesOffset++] & 0xffffffffL) << 57) | ((values[valuesOffset++] & 0xffffffffL) << 54) | ((values[valuesOffset++] & 0xffffffffL) << 51) | ((values[valuesOffset++] & 0xffffffffL) << 48) | ((values[valuesOffset++] & 0xffffffffL) << 45) | ((values[valuesOffset++] & 0xffffffffL) << 42) | ((values[valuesOffset++] & 0xffffffffL) << 39) | ((values[valuesOffset++] & 0xffffffffL) << 36) | ((values[valuesOffset++] & 0xffffffffL) << 33) | ((values[valuesOffset++] & 0xffffffffL) << 30) | ((values[valuesOffset++] & 0xffffffffL) << 27) | ((values[valuesOffset++] & 0xffffffffL) << 24) | ((values[valuesOffset++] & 0xffffffffL) << 21) | ((values[valuesOffset++] & 0xffffffffL) << 18) | ((values[valuesOffset++] & 0xffffffffL) << 15) | ((values[valuesOffset++] & 0xffffffffL) << 12) | ((values[valuesOffset++] & 0xffffffffL) << 9) | ((values[valuesOffset++] & 0xffffffffL) << 6) | ((values[valuesOffset++] & 0xffffffffL) << 3) | (values[valuesOffset++] & 0xffffffffL); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] << 61) | (values[valuesOffset++] << 58) | (values[valuesOffset++] << 55) | (values[valuesOffset++] << 52) | (values[valuesOffset++] << 49) | (values[valuesOffset++] << 46) | (values[valuesOffset++] << 43) | (values[valuesOffset++] << 40) | (values[valuesOffset++] << 37) | (values[valuesOffset++] << 34) | (values[valuesOffset++] << 31) | (values[valuesOffset++] << 28) | (values[valuesOffset++] << 25) | (values[valuesOffset++] << 22) | (values[valuesOffset++] << 19) | (values[valuesOffset++] << 16) | (values[valuesOffset++] << 13) | (values[valuesOffset++] << 10) | (values[valuesOffset++] << 7) | (values[valuesOffset++] << 4) | (values[valuesOffset++] << 1) | (values[valuesOffset] >>> 2); - blocks[blocksOffset++] = (values[valuesOffset++] << 62) | (values[valuesOffset++] << 59) | (values[valuesOffset++] << 56) | (values[valuesOffset++] << 53) | (values[valuesOffset++] << 50) | (values[valuesOffset++] << 47) | (values[valuesOffset++] << 44) | (values[valuesOffset++] << 41) | (values[valuesOffset++] << 38) | (values[valuesOffset++] << 35) | (values[valuesOffset++] << 32) | (values[valuesOffset++] << 29) | (values[valuesOffset++] << 26) | (values[valuesOffset++] << 23) | (values[valuesOffset++] << 20) | (values[valuesOffset++] << 17) | (values[valuesOffset++] << 14) | (values[valuesOffset++] << 11) | (values[valuesOffset++] << 8) | (values[valuesOffset++] << 5) | (values[valuesOffset++] << 2) | (values[valuesOffset] >>> 1); - blocks[blocksOffset++] = (values[valuesOffset++] << 63) | (values[valuesOffset++] << 60) | (values[valuesOffset++] << 57) | (values[valuesOffset++] << 54) | (values[valuesOffset++] << 51) | (values[valuesOffset++] << 48) | (values[valuesOffset++] << 45) | (values[valuesOffset++] << 42) | (values[valuesOffset++] << 39) | (values[valuesOffset++] << 36) | (values[valuesOffset++] << 33) | (values[valuesOffset++] << 30) | (values[valuesOffset++] << 27) | (values[valuesOffset++] << 24) | (values[valuesOffset++] << 21) | (values[valuesOffset++] << 18) | (values[valuesOffset++] << 15) | (values[valuesOffset++] << 12) | (values[valuesOffset++] << 9) | (values[valuesOffset++] << 6) | (values[valuesOffset++] << 3) | values[valuesOffset++]; - } - } - } diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked30.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked30.java deleted file mode 100644 index 9f32731c61c..00000000000 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked30.java +++ /dev/null @@ -1,512 +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 BulkOperationPacked30 extends BulkOperation { - @Override - public int blockCount() { - return 15; - } - - @Override - public int valueCount() { - return 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 >>> 34); - values[valuesOffset++] = (int) ((block0 >>> 4) & 1073741823L); - final long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block0 & 15L) << 26) | (block1 >>> 38)); - values[valuesOffset++] = (int) ((block1 >>> 8) & 1073741823L); - final long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block1 & 255L) << 22) | (block2 >>> 42)); - values[valuesOffset++] = (int) ((block2 >>> 12) & 1073741823L); - final long block3 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block2 & 4095L) << 18) | (block3 >>> 46)); - values[valuesOffset++] = (int) ((block3 >>> 16) & 1073741823L); - final long block4 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block3 & 65535L) << 14) | (block4 >>> 50)); - values[valuesOffset++] = (int) ((block4 >>> 20) & 1073741823L); - final long block5 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block4 & 1048575L) << 10) | (block5 >>> 54)); - values[valuesOffset++] = (int) ((block5 >>> 24) & 1073741823L); - final long block6 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block5 & 16777215L) << 6) | (block6 >>> 58)); - values[valuesOffset++] = (int) ((block6 >>> 28) & 1073741823L); - final long block7 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block6 & 268435455L) << 2) | (block7 >>> 62)); - values[valuesOffset++] = (int) ((block7 >>> 32) & 1073741823L); - values[valuesOffset++] = (int) ((block7 >>> 2) & 1073741823L); - final long block8 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block7 & 3L) << 28) | (block8 >>> 36)); - values[valuesOffset++] = (int) ((block8 >>> 6) & 1073741823L); - final long block9 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block8 & 63L) << 24) | (block9 >>> 40)); - values[valuesOffset++] = (int) ((block9 >>> 10) & 1073741823L); - final long block10 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block9 & 1023L) << 20) | (block10 >>> 44)); - values[valuesOffset++] = (int) ((block10 >>> 14) & 1073741823L); - final long block11 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block10 & 16383L) << 16) | (block11 >>> 48)); - values[valuesOffset++] = (int) ((block11 >>> 18) & 1073741823L); - final long block12 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block11 & 262143L) << 12) | (block12 >>> 52)); - values[valuesOffset++] = (int) ((block12 >>> 22) & 1073741823L); - final long block13 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block12 & 4194303L) << 8) | (block13 >>> 56)); - values[valuesOffset++] = (int) ((block13 >>> 26) & 1073741823L); - final long block14 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block13 & 67108863L) << 4) | (block14 >>> 60)); - values[valuesOffset++] = (int) ((block14 >>> 30) & 1073741823L); - values[valuesOffset++] = (int) (block14 & 1073741823L); - } - } - - @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; - final int byte3 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte0 << 22) | (byte1 << 14) | (byte2 << 6) | (byte3 >>> 2); - final int byte4 = blocks[blocksOffset++] & 0xFF; - final int byte5 = blocks[blocksOffset++] & 0xFF; - final int byte6 = blocks[blocksOffset++] & 0xFF; - final int byte7 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte3 & 3) << 28) | (byte4 << 20) | (byte5 << 12) | (byte6 << 4) | (byte7 >>> 4); - final int byte8 = blocks[blocksOffset++] & 0xFF; - final int byte9 = blocks[blocksOffset++] & 0xFF; - final int byte10 = blocks[blocksOffset++] & 0xFF; - final int byte11 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte7 & 15) << 26) | (byte8 << 18) | (byte9 << 10) | (byte10 << 2) | (byte11 >>> 6); - final int byte12 = blocks[blocksOffset++] & 0xFF; - final int byte13 = blocks[blocksOffset++] & 0xFF; - final int byte14 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte11 & 63) << 24) | (byte12 << 16) | (byte13 << 8) | byte14; - final int byte15 = blocks[blocksOffset++] & 0xFF; - final int byte16 = blocks[blocksOffset++] & 0xFF; - final int byte17 = blocks[blocksOffset++] & 0xFF; - final int byte18 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte15 << 22) | (byte16 << 14) | (byte17 << 6) | (byte18 >>> 2); - final int byte19 = blocks[blocksOffset++] & 0xFF; - final int byte20 = blocks[blocksOffset++] & 0xFF; - final int byte21 = blocks[blocksOffset++] & 0xFF; - final int byte22 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte18 & 3) << 28) | (byte19 << 20) | (byte20 << 12) | (byte21 << 4) | (byte22 >>> 4); - final int byte23 = blocks[blocksOffset++] & 0xFF; - final int byte24 = blocks[blocksOffset++] & 0xFF; - final int byte25 = blocks[blocksOffset++] & 0xFF; - final int byte26 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte22 & 15) << 26) | (byte23 << 18) | (byte24 << 10) | (byte25 << 2) | (byte26 >>> 6); - final int byte27 = blocks[blocksOffset++] & 0xFF; - final int byte28 = blocks[blocksOffset++] & 0xFF; - final int byte29 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte26 & 63) << 24) | (byte27 << 16) | (byte28 << 8) | byte29; - final int byte30 = blocks[blocksOffset++] & 0xFF; - final int byte31 = blocks[blocksOffset++] & 0xFF; - final int byte32 = blocks[blocksOffset++] & 0xFF; - final int byte33 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte30 << 22) | (byte31 << 14) | (byte32 << 6) | (byte33 >>> 2); - final int byte34 = blocks[blocksOffset++] & 0xFF; - final int byte35 = blocks[blocksOffset++] & 0xFF; - final int byte36 = blocks[blocksOffset++] & 0xFF; - final int byte37 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte33 & 3) << 28) | (byte34 << 20) | (byte35 << 12) | (byte36 << 4) | (byte37 >>> 4); - final int byte38 = blocks[blocksOffset++] & 0xFF; - final int byte39 = blocks[blocksOffset++] & 0xFF; - final int byte40 = blocks[blocksOffset++] & 0xFF; - final int byte41 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte37 & 15) << 26) | (byte38 << 18) | (byte39 << 10) | (byte40 << 2) | (byte41 >>> 6); - final int byte42 = blocks[blocksOffset++] & 0xFF; - final int byte43 = blocks[blocksOffset++] & 0xFF; - final int byte44 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte41 & 63) << 24) | (byte42 << 16) | (byte43 << 8) | byte44; - final int byte45 = blocks[blocksOffset++] & 0xFF; - final int byte46 = blocks[blocksOffset++] & 0xFF; - final int byte47 = blocks[blocksOffset++] & 0xFF; - final int byte48 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte45 << 22) | (byte46 << 14) | (byte47 << 6) | (byte48 >>> 2); - final int byte49 = blocks[blocksOffset++] & 0xFF; - final int byte50 = blocks[blocksOffset++] & 0xFF; - final int byte51 = blocks[blocksOffset++] & 0xFF; - final int byte52 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte48 & 3) << 28) | (byte49 << 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; - final int byte56 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte52 & 15) << 26) | (byte53 << 18) | (byte54 << 10) | (byte55 << 2) | (byte56 >>> 6); - final int byte57 = blocks[blocksOffset++] & 0xFF; - final int byte58 = blocks[blocksOffset++] & 0xFF; - final int byte59 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte56 & 63) << 24) | (byte57 << 16) | (byte58 << 8) | byte59; - final int byte60 = blocks[blocksOffset++] & 0xFF; - final int byte61 = blocks[blocksOffset++] & 0xFF; - final int byte62 = blocks[blocksOffset++] & 0xFF; - final int byte63 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte60 << 22) | (byte61 << 14) | (byte62 << 6) | (byte63 >>> 2); - final int byte64 = blocks[blocksOffset++] & 0xFF; - final int byte65 = blocks[blocksOffset++] & 0xFF; - final int byte66 = blocks[blocksOffset++] & 0xFF; - final int byte67 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte63 & 3) << 28) | (byte64 << 20) | (byte65 << 12) | (byte66 << 4) | (byte67 >>> 4); - final int byte68 = blocks[blocksOffset++] & 0xFF; - final int byte69 = blocks[blocksOffset++] & 0xFF; - final int byte70 = blocks[blocksOffset++] & 0xFF; - final int byte71 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte67 & 15) << 26) | (byte68 << 18) | (byte69 << 10) | (byte70 << 2) | (byte71 >>> 6); - final int byte72 = blocks[blocksOffset++] & 0xFF; - final int byte73 = blocks[blocksOffset++] & 0xFF; - final int byte74 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte71 & 63) << 24) | (byte72 << 16) | (byte73 << 8) | byte74; - final int byte75 = blocks[blocksOffset++] & 0xFF; - final int byte76 = blocks[blocksOffset++] & 0xFF; - final int byte77 = blocks[blocksOffset++] & 0xFF; - final int byte78 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte75 << 22) | (byte76 << 14) | (byte77 << 6) | (byte78 >>> 2); - final int byte79 = blocks[blocksOffset++] & 0xFF; - final int byte80 = blocks[blocksOffset++] & 0xFF; - final int byte81 = blocks[blocksOffset++] & 0xFF; - final int byte82 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte78 & 3) << 28) | (byte79 << 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; - final int byte86 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte82 & 15) << 26) | (byte83 << 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) << 24) | (byte87 << 16) | (byte88 << 8) | byte89; - final int byte90 = blocks[blocksOffset++] & 0xFF; - final int byte91 = blocks[blocksOffset++] & 0xFF; - final int byte92 = blocks[blocksOffset++] & 0xFF; - final int byte93 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte90 << 22) | (byte91 << 14) | (byte92 << 6) | (byte93 >>> 2); - final int byte94 = blocks[blocksOffset++] & 0xFF; - final int byte95 = blocks[blocksOffset++] & 0xFF; - final int byte96 = blocks[blocksOffset++] & 0xFF; - final int byte97 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte93 & 3) << 28) | (byte94 << 20) | (byte95 << 12) | (byte96 << 4) | (byte97 >>> 4); - final int byte98 = blocks[blocksOffset++] & 0xFF; - final int byte99 = blocks[blocksOffset++] & 0xFF; - final int byte100 = blocks[blocksOffset++] & 0xFF; - final int byte101 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte97 & 15) << 26) | (byte98 << 18) | (byte99 << 10) | (byte100 << 2) | (byte101 >>> 6); - final int byte102 = blocks[blocksOffset++] & 0xFF; - final int byte103 = blocks[blocksOffset++] & 0xFF; - final int byte104 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte101 & 63) << 24) | (byte102 << 16) | (byte103 << 8) | byte104; - final int byte105 = blocks[blocksOffset++] & 0xFF; - final int byte106 = blocks[blocksOffset++] & 0xFF; - final int byte107 = blocks[blocksOffset++] & 0xFF; - final int byte108 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte105 << 22) | (byte106 << 14) | (byte107 << 6) | (byte108 >>> 2); - final int byte109 = blocks[blocksOffset++] & 0xFF; - final int byte110 = blocks[blocksOffset++] & 0xFF; - final int byte111 = blocks[blocksOffset++] & 0xFF; - final int byte112 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte108 & 3) << 28) | (byte109 << 20) | (byte110 << 12) | (byte111 << 4) | (byte112 >>> 4); - final int byte113 = blocks[blocksOffset++] & 0xFF; - final int byte114 = blocks[blocksOffset++] & 0xFF; - final int byte115 = blocks[blocksOffset++] & 0xFF; - final int byte116 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte112 & 15) << 26) | (byte113 << 18) | (byte114 << 10) | (byte115 << 2) | (byte116 >>> 6); - final int byte117 = blocks[blocksOffset++] & 0xFF; - final int byte118 = blocks[blocksOffset++] & 0xFF; - final int byte119 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte116 & 63) << 24) | (byte117 << 16) | (byte118 << 8) | byte119; - } - } - - @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 >>> 34; - values[valuesOffset++] = (block0 >>> 4) & 1073741823L; - final long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block0 & 15L) << 26) | (block1 >>> 38); - values[valuesOffset++] = (block1 >>> 8) & 1073741823L; - final long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block1 & 255L) << 22) | (block2 >>> 42); - values[valuesOffset++] = (block2 >>> 12) & 1073741823L; - final long block3 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block2 & 4095L) << 18) | (block3 >>> 46); - values[valuesOffset++] = (block3 >>> 16) & 1073741823L; - final long block4 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block3 & 65535L) << 14) | (block4 >>> 50); - values[valuesOffset++] = (block4 >>> 20) & 1073741823L; - final long block5 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block4 & 1048575L) << 10) | (block5 >>> 54); - values[valuesOffset++] = (block5 >>> 24) & 1073741823L; - final long block6 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block5 & 16777215L) << 6) | (block6 >>> 58); - values[valuesOffset++] = (block6 >>> 28) & 1073741823L; - final long block7 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block6 & 268435455L) << 2) | (block7 >>> 62); - values[valuesOffset++] = (block7 >>> 32) & 1073741823L; - values[valuesOffset++] = (block7 >>> 2) & 1073741823L; - final long block8 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block7 & 3L) << 28) | (block8 >>> 36); - values[valuesOffset++] = (block8 >>> 6) & 1073741823L; - final long block9 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block8 & 63L) << 24) | (block9 >>> 40); - values[valuesOffset++] = (block9 >>> 10) & 1073741823L; - final long block10 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block9 & 1023L) << 20) | (block10 >>> 44); - values[valuesOffset++] = (block10 >>> 14) & 1073741823L; - final long block11 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block10 & 16383L) << 16) | (block11 >>> 48); - values[valuesOffset++] = (block11 >>> 18) & 1073741823L; - final long block12 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block11 & 262143L) << 12) | (block12 >>> 52); - values[valuesOffset++] = (block12 >>> 22) & 1073741823L; - final long block13 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block12 & 4194303L) << 8) | (block13 >>> 56); - values[valuesOffset++] = (block13 >>> 26) & 1073741823L; - final long block14 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block13 & 67108863L) << 4) | (block14 >>> 60); - values[valuesOffset++] = (block14 >>> 30) & 1073741823L; - values[valuesOffset++] = block14 & 1073741823L; - } - } - - @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; - final long byte3 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte0 << 22) | (byte1 << 14) | (byte2 << 6) | (byte3 >>> 2); - final long byte4 = blocks[blocksOffset++] & 0xFF; - final long byte5 = blocks[blocksOffset++] & 0xFF; - final long byte6 = blocks[blocksOffset++] & 0xFF; - final long byte7 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte3 & 3) << 28) | (byte4 << 20) | (byte5 << 12) | (byte6 << 4) | (byte7 >>> 4); - final long byte8 = blocks[blocksOffset++] & 0xFF; - final long byte9 = blocks[blocksOffset++] & 0xFF; - final long byte10 = blocks[blocksOffset++] & 0xFF; - final long byte11 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte7 & 15) << 26) | (byte8 << 18) | (byte9 << 10) | (byte10 << 2) | (byte11 >>> 6); - final long byte12 = blocks[blocksOffset++] & 0xFF; - final long byte13 = blocks[blocksOffset++] & 0xFF; - final long byte14 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte11 & 63) << 24) | (byte12 << 16) | (byte13 << 8) | byte14; - final long byte15 = blocks[blocksOffset++] & 0xFF; - final long byte16 = blocks[blocksOffset++] & 0xFF; - final long byte17 = blocks[blocksOffset++] & 0xFF; - final long byte18 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte15 << 22) | (byte16 << 14) | (byte17 << 6) | (byte18 >>> 2); - final long byte19 = blocks[blocksOffset++] & 0xFF; - final long byte20 = blocks[blocksOffset++] & 0xFF; - final long byte21 = blocks[blocksOffset++] & 0xFF; - final long byte22 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte18 & 3) << 28) | (byte19 << 20) | (byte20 << 12) | (byte21 << 4) | (byte22 >>> 4); - final long byte23 = blocks[blocksOffset++] & 0xFF; - final long byte24 = blocks[blocksOffset++] & 0xFF; - final long byte25 = blocks[blocksOffset++] & 0xFF; - final long byte26 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte22 & 15) << 26) | (byte23 << 18) | (byte24 << 10) | (byte25 << 2) | (byte26 >>> 6); - final long byte27 = blocks[blocksOffset++] & 0xFF; - final long byte28 = blocks[blocksOffset++] & 0xFF; - final long byte29 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte26 & 63) << 24) | (byte27 << 16) | (byte28 << 8) | byte29; - final long byte30 = blocks[blocksOffset++] & 0xFF; - final long byte31 = blocks[blocksOffset++] & 0xFF; - final long byte32 = blocks[blocksOffset++] & 0xFF; - final long byte33 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte30 << 22) | (byte31 << 14) | (byte32 << 6) | (byte33 >>> 2); - final long byte34 = blocks[blocksOffset++] & 0xFF; - final long byte35 = blocks[blocksOffset++] & 0xFF; - final long byte36 = blocks[blocksOffset++] & 0xFF; - final long byte37 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte33 & 3) << 28) | (byte34 << 20) | (byte35 << 12) | (byte36 << 4) | (byte37 >>> 4); - final long byte38 = blocks[blocksOffset++] & 0xFF; - final long byte39 = blocks[blocksOffset++] & 0xFF; - final long byte40 = blocks[blocksOffset++] & 0xFF; - final long byte41 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte37 & 15) << 26) | (byte38 << 18) | (byte39 << 10) | (byte40 << 2) | (byte41 >>> 6); - final long byte42 = blocks[blocksOffset++] & 0xFF; - final long byte43 = blocks[blocksOffset++] & 0xFF; - final long byte44 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte41 & 63) << 24) | (byte42 << 16) | (byte43 << 8) | byte44; - final long byte45 = blocks[blocksOffset++] & 0xFF; - final long byte46 = blocks[blocksOffset++] & 0xFF; - final long byte47 = blocks[blocksOffset++] & 0xFF; - final long byte48 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte45 << 22) | (byte46 << 14) | (byte47 << 6) | (byte48 >>> 2); - final long byte49 = blocks[blocksOffset++] & 0xFF; - final long byte50 = blocks[blocksOffset++] & 0xFF; - final long byte51 = blocks[blocksOffset++] & 0xFF; - final long byte52 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte48 & 3) << 28) | (byte49 << 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; - final long byte56 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte52 & 15) << 26) | (byte53 << 18) | (byte54 << 10) | (byte55 << 2) | (byte56 >>> 6); - final long byte57 = blocks[blocksOffset++] & 0xFF; - final long byte58 = blocks[blocksOffset++] & 0xFF; - final long byte59 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte56 & 63) << 24) | (byte57 << 16) | (byte58 << 8) | byte59; - final long byte60 = blocks[blocksOffset++] & 0xFF; - final long byte61 = blocks[blocksOffset++] & 0xFF; - final long byte62 = blocks[blocksOffset++] & 0xFF; - final long byte63 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte60 << 22) | (byte61 << 14) | (byte62 << 6) | (byte63 >>> 2); - final long byte64 = blocks[blocksOffset++] & 0xFF; - final long byte65 = blocks[blocksOffset++] & 0xFF; - final long byte66 = blocks[blocksOffset++] & 0xFF; - final long byte67 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte63 & 3) << 28) | (byte64 << 20) | (byte65 << 12) | (byte66 << 4) | (byte67 >>> 4); - final long byte68 = blocks[blocksOffset++] & 0xFF; - final long byte69 = blocks[blocksOffset++] & 0xFF; - final long byte70 = blocks[blocksOffset++] & 0xFF; - final long byte71 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte67 & 15) << 26) | (byte68 << 18) | (byte69 << 10) | (byte70 << 2) | (byte71 >>> 6); - final long byte72 = blocks[blocksOffset++] & 0xFF; - final long byte73 = blocks[blocksOffset++] & 0xFF; - final long byte74 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte71 & 63) << 24) | (byte72 << 16) | (byte73 << 8) | byte74; - final long byte75 = blocks[blocksOffset++] & 0xFF; - final long byte76 = blocks[blocksOffset++] & 0xFF; - final long byte77 = blocks[blocksOffset++] & 0xFF; - final long byte78 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte75 << 22) | (byte76 << 14) | (byte77 << 6) | (byte78 >>> 2); - final long byte79 = blocks[blocksOffset++] & 0xFF; - final long byte80 = blocks[blocksOffset++] & 0xFF; - final long byte81 = blocks[blocksOffset++] & 0xFF; - final long byte82 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte78 & 3) << 28) | (byte79 << 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; - final long byte86 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte82 & 15) << 26) | (byte83 << 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) << 24) | (byte87 << 16) | (byte88 << 8) | byte89; - final long byte90 = blocks[blocksOffset++] & 0xFF; - final long byte91 = blocks[blocksOffset++] & 0xFF; - final long byte92 = blocks[blocksOffset++] & 0xFF; - final long byte93 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte90 << 22) | (byte91 << 14) | (byte92 << 6) | (byte93 >>> 2); - final long byte94 = blocks[blocksOffset++] & 0xFF; - final long byte95 = blocks[blocksOffset++] & 0xFF; - final long byte96 = blocks[blocksOffset++] & 0xFF; - final long byte97 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte93 & 3) << 28) | (byte94 << 20) | (byte95 << 12) | (byte96 << 4) | (byte97 >>> 4); - final long byte98 = blocks[blocksOffset++] & 0xFF; - final long byte99 = blocks[blocksOffset++] & 0xFF; - final long byte100 = blocks[blocksOffset++] & 0xFF; - final long byte101 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte97 & 15) << 26) | (byte98 << 18) | (byte99 << 10) | (byte100 << 2) | (byte101 >>> 6); - final long byte102 = blocks[blocksOffset++] & 0xFF; - final long byte103 = blocks[blocksOffset++] & 0xFF; - final long byte104 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte101 & 63) << 24) | (byte102 << 16) | (byte103 << 8) | byte104; - final long byte105 = blocks[blocksOffset++] & 0xFF; - final long byte106 = blocks[blocksOffset++] & 0xFF; - final long byte107 = blocks[blocksOffset++] & 0xFF; - final long byte108 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte105 << 22) | (byte106 << 14) | (byte107 << 6) | (byte108 >>> 2); - final long byte109 = blocks[blocksOffset++] & 0xFF; - final long byte110 = blocks[blocksOffset++] & 0xFF; - final long byte111 = blocks[blocksOffset++] & 0xFF; - final long byte112 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte108 & 3) << 28) | (byte109 << 20) | (byte110 << 12) | (byte111 << 4) | (byte112 >>> 4); - final long byte113 = blocks[blocksOffset++] & 0xFF; - final long byte114 = blocks[blocksOffset++] & 0xFF; - final long byte115 = blocks[blocksOffset++] & 0xFF; - final long byte116 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte112 & 15) << 26) | (byte113 << 18) | (byte114 << 10) | (byte115 << 2) | (byte116 >>> 6); - final long byte117 = blocks[blocksOffset++] & 0xFF; - final long byte118 = blocks[blocksOffset++] & 0xFF; - final long byte119 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte116 & 63) << 24) | (byte117 << 16) | (byte118 << 8) | byte119; - } - } - - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 34) | ((values[valuesOffset++] & 0xffffffffL) << 4) | ((values[valuesOffset] & 0xffffffffL) >>> 26); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 38) | ((values[valuesOffset++] & 0xffffffffL) << 8) | ((values[valuesOffset] & 0xffffffffL) >>> 22); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 42) | ((values[valuesOffset++] & 0xffffffffL) << 12) | ((values[valuesOffset] & 0xffffffffL) >>> 18); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 46) | ((values[valuesOffset++] & 0xffffffffL) << 16) | ((values[valuesOffset] & 0xffffffffL) >>> 14); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 50) | ((values[valuesOffset++] & 0xffffffffL) << 20) | ((values[valuesOffset] & 0xffffffffL) >>> 10); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 54) | ((values[valuesOffset++] & 0xffffffffL) << 24) | ((values[valuesOffset] & 0xffffffffL) >>> 6); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 58) | ((values[valuesOffset++] & 0xffffffffL) << 28) | ((values[valuesOffset] & 0xffffffffL) >>> 2); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 62) | ((values[valuesOffset++] & 0xffffffffL) << 32) | ((values[valuesOffset++] & 0xffffffffL) << 2) | ((values[valuesOffset] & 0xffffffffL) >>> 28); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 36) | ((values[valuesOffset++] & 0xffffffffL) << 6) | ((values[valuesOffset] & 0xffffffffL) >>> 24); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 40) | ((values[valuesOffset++] & 0xffffffffL) << 10) | ((values[valuesOffset] & 0xffffffffL) >>> 20); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 44) | ((values[valuesOffset++] & 0xffffffffL) << 14) | ((values[valuesOffset] & 0xffffffffL) >>> 16); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 48) | ((values[valuesOffset++] & 0xffffffffL) << 18) | ((values[valuesOffset] & 0xffffffffL) >>> 12); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 52) | ((values[valuesOffset++] & 0xffffffffL) << 22) | ((values[valuesOffset] & 0xffffffffL) >>> 8); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 56) | ((values[valuesOffset++] & 0xffffffffL) << 26) | ((values[valuesOffset] & 0xffffffffL) >>> 4); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 60) | ((values[valuesOffset++] & 0xffffffffL) << 30) | (values[valuesOffset++] & 0xffffffffL); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] << 34) | (values[valuesOffset++] << 4) | (values[valuesOffset] >>> 26); - blocks[blocksOffset++] = (values[valuesOffset++] << 38) | (values[valuesOffset++] << 8) | (values[valuesOffset] >>> 22); - blocks[blocksOffset++] = (values[valuesOffset++] << 42) | (values[valuesOffset++] << 12) | (values[valuesOffset] >>> 18); - blocks[blocksOffset++] = (values[valuesOffset++] << 46) | (values[valuesOffset++] << 16) | (values[valuesOffset] >>> 14); - blocks[blocksOffset++] = (values[valuesOffset++] << 50) | (values[valuesOffset++] << 20) | (values[valuesOffset] >>> 10); - blocks[blocksOffset++] = (values[valuesOffset++] << 54) | (values[valuesOffset++] << 24) | (values[valuesOffset] >>> 6); - blocks[blocksOffset++] = (values[valuesOffset++] << 58) | (values[valuesOffset++] << 28) | (values[valuesOffset] >>> 2); - blocks[blocksOffset++] = (values[valuesOffset++] << 62) | (values[valuesOffset++] << 32) | (values[valuesOffset++] << 2) | (values[valuesOffset] >>> 28); - blocks[blocksOffset++] = (values[valuesOffset++] << 36) | (values[valuesOffset++] << 6) | (values[valuesOffset] >>> 24); - blocks[blocksOffset++] = (values[valuesOffset++] << 40) | (values[valuesOffset++] << 10) | (values[valuesOffset] >>> 20); - blocks[blocksOffset++] = (values[valuesOffset++] << 44) | (values[valuesOffset++] << 14) | (values[valuesOffset] >>> 16); - blocks[blocksOffset++] = (values[valuesOffset++] << 48) | (values[valuesOffset++] << 18) | (values[valuesOffset] >>> 12); - blocks[blocksOffset++] = (values[valuesOffset++] << 52) | (values[valuesOffset++] << 22) | (values[valuesOffset] >>> 8); - blocks[blocksOffset++] = (values[valuesOffset++] << 56) | (values[valuesOffset++] << 26) | (values[valuesOffset] >>> 4); - blocks[blocksOffset++] = (values[valuesOffset++] << 60) | (values[valuesOffset++] << 30) | values[valuesOffset++]; - } - } - -} diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked31.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked31.java deleted file mode 100644 index 63fa0babe92..00000000000 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked31.java +++ /dev/null @@ -1,960 +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 BulkOperationPacked31 extends BulkOperation { - @Override - public int blockCount() { - return 31; - } - - @Override - public int valueCount() { - return 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 >>> 33); - values[valuesOffset++] = (int) ((block0 >>> 2) & 2147483647L); - final long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block0 & 3L) << 29) | (block1 >>> 35)); - values[valuesOffset++] = (int) ((block1 >>> 4) & 2147483647L); - final long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block1 & 15L) << 27) | (block2 >>> 37)); - values[valuesOffset++] = (int) ((block2 >>> 6) & 2147483647L); - final long block3 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block2 & 63L) << 25) | (block3 >>> 39)); - values[valuesOffset++] = (int) ((block3 >>> 8) & 2147483647L); - final long block4 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block3 & 255L) << 23) | (block4 >>> 41)); - values[valuesOffset++] = (int) ((block4 >>> 10) & 2147483647L); - final long block5 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block4 & 1023L) << 21) | (block5 >>> 43)); - values[valuesOffset++] = (int) ((block5 >>> 12) & 2147483647L); - final long block6 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block5 & 4095L) << 19) | (block6 >>> 45)); - values[valuesOffset++] = (int) ((block6 >>> 14) & 2147483647L); - final long block7 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block6 & 16383L) << 17) | (block7 >>> 47)); - values[valuesOffset++] = (int) ((block7 >>> 16) & 2147483647L); - final long block8 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block7 & 65535L) << 15) | (block8 >>> 49)); - values[valuesOffset++] = (int) ((block8 >>> 18) & 2147483647L); - final long block9 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block8 & 262143L) << 13) | (block9 >>> 51)); - values[valuesOffset++] = (int) ((block9 >>> 20) & 2147483647L); - final long block10 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block9 & 1048575L) << 11) | (block10 >>> 53)); - values[valuesOffset++] = (int) ((block10 >>> 22) & 2147483647L); - final long block11 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block10 & 4194303L) << 9) | (block11 >>> 55)); - values[valuesOffset++] = (int) ((block11 >>> 24) & 2147483647L); - final long block12 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block11 & 16777215L) << 7) | (block12 >>> 57)); - values[valuesOffset++] = (int) ((block12 >>> 26) & 2147483647L); - final long block13 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block12 & 67108863L) << 5) | (block13 >>> 59)); - values[valuesOffset++] = (int) ((block13 >>> 28) & 2147483647L); - final long block14 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block13 & 268435455L) << 3) | (block14 >>> 61)); - values[valuesOffset++] = (int) ((block14 >>> 30) & 2147483647L); - final long block15 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block14 & 1073741823L) << 1) | (block15 >>> 63)); - values[valuesOffset++] = (int) ((block15 >>> 32) & 2147483647L); - values[valuesOffset++] = (int) ((block15 >>> 1) & 2147483647L); - final long block16 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block15 & 1L) << 30) | (block16 >>> 34)); - values[valuesOffset++] = (int) ((block16 >>> 3) & 2147483647L); - final long block17 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block16 & 7L) << 28) | (block17 >>> 36)); - values[valuesOffset++] = (int) ((block17 >>> 5) & 2147483647L); - final long block18 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block17 & 31L) << 26) | (block18 >>> 38)); - values[valuesOffset++] = (int) ((block18 >>> 7) & 2147483647L); - final long block19 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block18 & 127L) << 24) | (block19 >>> 40)); - values[valuesOffset++] = (int) ((block19 >>> 9) & 2147483647L); - final long block20 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block19 & 511L) << 22) | (block20 >>> 42)); - values[valuesOffset++] = (int) ((block20 >>> 11) & 2147483647L); - final long block21 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block20 & 2047L) << 20) | (block21 >>> 44)); - values[valuesOffset++] = (int) ((block21 >>> 13) & 2147483647L); - final long block22 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block21 & 8191L) << 18) | (block22 >>> 46)); - values[valuesOffset++] = (int) ((block22 >>> 15) & 2147483647L); - final long block23 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block22 & 32767L) << 16) | (block23 >>> 48)); - values[valuesOffset++] = (int) ((block23 >>> 17) & 2147483647L); - final long block24 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block23 & 131071L) << 14) | (block24 >>> 50)); - values[valuesOffset++] = (int) ((block24 >>> 19) & 2147483647L); - final long block25 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block24 & 524287L) << 12) | (block25 >>> 52)); - values[valuesOffset++] = (int) ((block25 >>> 21) & 2147483647L); - final long block26 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block25 & 2097151L) << 10) | (block26 >>> 54)); - values[valuesOffset++] = (int) ((block26 >>> 23) & 2147483647L); - final long block27 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block26 & 8388607L) << 8) | (block27 >>> 56)); - values[valuesOffset++] = (int) ((block27 >>> 25) & 2147483647L); - final long block28 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block27 & 33554431L) << 6) | (block28 >>> 58)); - values[valuesOffset++] = (int) ((block28 >>> 27) & 2147483647L); - final long block29 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block28 & 134217727L) << 4) | (block29 >>> 60)); - values[valuesOffset++] = (int) ((block29 >>> 29) & 2147483647L); - final long block30 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (((block29 & 536870911L) << 2) | (block30 >>> 62)); - values[valuesOffset++] = (int) ((block30 >>> 31) & 2147483647L); - values[valuesOffset++] = (int) (block30 & 2147483647L); - } - } - - @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; - final int byte3 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte0 << 23) | (byte1 << 15) | (byte2 << 7) | (byte3 >>> 1); - final int byte4 = blocks[blocksOffset++] & 0xFF; - final int byte5 = blocks[blocksOffset++] & 0xFF; - final int byte6 = blocks[blocksOffset++] & 0xFF; - final int byte7 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte3 & 1) << 30) | (byte4 << 22) | (byte5 << 14) | (byte6 << 6) | (byte7 >>> 2); - final int byte8 = blocks[blocksOffset++] & 0xFF; - final int byte9 = blocks[blocksOffset++] & 0xFF; - final int byte10 = blocks[blocksOffset++] & 0xFF; - final int byte11 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte7 & 3) << 29) | (byte8 << 21) | (byte9 << 13) | (byte10 << 5) | (byte11 >>> 3); - final int byte12 = blocks[blocksOffset++] & 0xFF; - final int byte13 = blocks[blocksOffset++] & 0xFF; - final int byte14 = blocks[blocksOffset++] & 0xFF; - final int byte15 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte11 & 7) << 28) | (byte12 << 20) | (byte13 << 12) | (byte14 << 4) | (byte15 >>> 4); - final int byte16 = blocks[blocksOffset++] & 0xFF; - final int byte17 = blocks[blocksOffset++] & 0xFF; - final int byte18 = blocks[blocksOffset++] & 0xFF; - final int byte19 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte15 & 15) << 27) | (byte16 << 19) | (byte17 << 11) | (byte18 << 3) | (byte19 >>> 5); - final int byte20 = blocks[blocksOffset++] & 0xFF; - final int byte21 = blocks[blocksOffset++] & 0xFF; - final int byte22 = blocks[blocksOffset++] & 0xFF; - final int byte23 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte19 & 31) << 26) | (byte20 << 18) | (byte21 << 10) | (byte22 << 2) | (byte23 >>> 6); - final int byte24 = blocks[blocksOffset++] & 0xFF; - final int byte25 = blocks[blocksOffset++] & 0xFF; - final int byte26 = blocks[blocksOffset++] & 0xFF; - final int byte27 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte23 & 63) << 25) | (byte24 << 17) | (byte25 << 9) | (byte26 << 1) | (byte27 >>> 7); - final int byte28 = blocks[blocksOffset++] & 0xFF; - final int byte29 = blocks[blocksOffset++] & 0xFF; - final int byte30 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte27 & 127) << 24) | (byte28 << 16) | (byte29 << 8) | byte30; - final int byte31 = blocks[blocksOffset++] & 0xFF; - final int byte32 = blocks[blocksOffset++] & 0xFF; - final int byte33 = blocks[blocksOffset++] & 0xFF; - final int byte34 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte31 << 23) | (byte32 << 15) | (byte33 << 7) | (byte34 >>> 1); - final int byte35 = blocks[blocksOffset++] & 0xFF; - final int byte36 = blocks[blocksOffset++] & 0xFF; - final int byte37 = blocks[blocksOffset++] & 0xFF; - final int byte38 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte34 & 1) << 30) | (byte35 << 22) | (byte36 << 14) | (byte37 << 6) | (byte38 >>> 2); - final int byte39 = blocks[blocksOffset++] & 0xFF; - final int byte40 = blocks[blocksOffset++] & 0xFF; - final int byte41 = blocks[blocksOffset++] & 0xFF; - final int byte42 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte38 & 3) << 29) | (byte39 << 21) | (byte40 << 13) | (byte41 << 5) | (byte42 >>> 3); - final int byte43 = blocks[blocksOffset++] & 0xFF; - final int byte44 = blocks[blocksOffset++] & 0xFF; - final int byte45 = blocks[blocksOffset++] & 0xFF; - final int byte46 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte42 & 7) << 28) | (byte43 << 20) | (byte44 << 12) | (byte45 << 4) | (byte46 >>> 4); - final int byte47 = blocks[blocksOffset++] & 0xFF; - final int byte48 = blocks[blocksOffset++] & 0xFF; - final int byte49 = blocks[blocksOffset++] & 0xFF; - final int byte50 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte46 & 15) << 27) | (byte47 << 19) | (byte48 << 11) | (byte49 << 3) | (byte50 >>> 5); - final int byte51 = blocks[blocksOffset++] & 0xFF; - final int byte52 = blocks[blocksOffset++] & 0xFF; - final int byte53 = blocks[blocksOffset++] & 0xFF; - final int byte54 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte50 & 31) << 26) | (byte51 << 18) | (byte52 << 10) | (byte53 << 2) | (byte54 >>> 6); - final int byte55 = blocks[blocksOffset++] & 0xFF; - final int byte56 = blocks[blocksOffset++] & 0xFF; - final int byte57 = blocks[blocksOffset++] & 0xFF; - final int byte58 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte54 & 63) << 25) | (byte55 << 17) | (byte56 << 9) | (byte57 << 1) | (byte58 >>> 7); - final int byte59 = blocks[blocksOffset++] & 0xFF; - final int byte60 = blocks[blocksOffset++] & 0xFF; - final int byte61 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte58 & 127) << 24) | (byte59 << 16) | (byte60 << 8) | byte61; - final int byte62 = blocks[blocksOffset++] & 0xFF; - final int byte63 = blocks[blocksOffset++] & 0xFF; - final int byte64 = blocks[blocksOffset++] & 0xFF; - final int byte65 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte62 << 23) | (byte63 << 15) | (byte64 << 7) | (byte65 >>> 1); - final int byte66 = blocks[blocksOffset++] & 0xFF; - final int byte67 = blocks[blocksOffset++] & 0xFF; - final int byte68 = blocks[blocksOffset++] & 0xFF; - final int byte69 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte65 & 1) << 30) | (byte66 << 22) | (byte67 << 14) | (byte68 << 6) | (byte69 >>> 2); - final int byte70 = blocks[blocksOffset++] & 0xFF; - final int byte71 = blocks[blocksOffset++] & 0xFF; - final int byte72 = blocks[blocksOffset++] & 0xFF; - final int byte73 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte69 & 3) << 29) | (byte70 << 21) | (byte71 << 13) | (byte72 << 5) | (byte73 >>> 3); - final int byte74 = blocks[blocksOffset++] & 0xFF; - final int byte75 = blocks[blocksOffset++] & 0xFF; - final int byte76 = blocks[blocksOffset++] & 0xFF; - final int byte77 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte73 & 7) << 28) | (byte74 << 20) | (byte75 << 12) | (byte76 << 4) | (byte77 >>> 4); - final int byte78 = blocks[blocksOffset++] & 0xFF; - final int byte79 = blocks[blocksOffset++] & 0xFF; - final int byte80 = blocks[blocksOffset++] & 0xFF; - final int byte81 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte77 & 15) << 27) | (byte78 << 19) | (byte79 << 11) | (byte80 << 3) | (byte81 >>> 5); - final int byte82 = blocks[blocksOffset++] & 0xFF; - final int byte83 = blocks[blocksOffset++] & 0xFF; - final int byte84 = blocks[blocksOffset++] & 0xFF; - final int byte85 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte81 & 31) << 26) | (byte82 << 18) | (byte83 << 10) | (byte84 << 2) | (byte85 >>> 6); - final int byte86 = blocks[blocksOffset++] & 0xFF; - final int byte87 = blocks[blocksOffset++] & 0xFF; - final int byte88 = blocks[blocksOffset++] & 0xFF; - final int byte89 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte85 & 63) << 25) | (byte86 << 17) | (byte87 << 9) | (byte88 << 1) | (byte89 >>> 7); - final int byte90 = blocks[blocksOffset++] & 0xFF; - final int byte91 = blocks[blocksOffset++] & 0xFF; - final int byte92 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte89 & 127) << 24) | (byte90 << 16) | (byte91 << 8) | byte92; - final int byte93 = blocks[blocksOffset++] & 0xFF; - final int byte94 = blocks[blocksOffset++] & 0xFF; - final int byte95 = blocks[blocksOffset++] & 0xFF; - final int byte96 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte93 << 23) | (byte94 << 15) | (byte95 << 7) | (byte96 >>> 1); - final int byte97 = blocks[blocksOffset++] & 0xFF; - final int byte98 = blocks[blocksOffset++] & 0xFF; - final int byte99 = blocks[blocksOffset++] & 0xFF; - final int byte100 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte96 & 1) << 30) | (byte97 << 22) | (byte98 << 14) | (byte99 << 6) | (byte100 >>> 2); - final int byte101 = blocks[blocksOffset++] & 0xFF; - final int byte102 = blocks[blocksOffset++] & 0xFF; - final int byte103 = blocks[blocksOffset++] & 0xFF; - final int byte104 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte100 & 3) << 29) | (byte101 << 21) | (byte102 << 13) | (byte103 << 5) | (byte104 >>> 3); - final int byte105 = blocks[blocksOffset++] & 0xFF; - final int byte106 = blocks[blocksOffset++] & 0xFF; - final int byte107 = blocks[blocksOffset++] & 0xFF; - final int byte108 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte104 & 7) << 28) | (byte105 << 20) | (byte106 << 12) | (byte107 << 4) | (byte108 >>> 4); - final int byte109 = blocks[blocksOffset++] & 0xFF; - final int byte110 = blocks[blocksOffset++] & 0xFF; - final int byte111 = blocks[blocksOffset++] & 0xFF; - final int byte112 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte108 & 15) << 27) | (byte109 << 19) | (byte110 << 11) | (byte111 << 3) | (byte112 >>> 5); - final int byte113 = blocks[blocksOffset++] & 0xFF; - final int byte114 = blocks[blocksOffset++] & 0xFF; - final int byte115 = blocks[blocksOffset++] & 0xFF; - final int byte116 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte112 & 31) << 26) | (byte113 << 18) | (byte114 << 10) | (byte115 << 2) | (byte116 >>> 6); - final int byte117 = blocks[blocksOffset++] & 0xFF; - final int byte118 = blocks[blocksOffset++] & 0xFF; - final int byte119 = blocks[blocksOffset++] & 0xFF; - final int byte120 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte116 & 63) << 25) | (byte117 << 17) | (byte118 << 9) | (byte119 << 1) | (byte120 >>> 7); - final int byte121 = blocks[blocksOffset++] & 0xFF; - final int byte122 = blocks[blocksOffset++] & 0xFF; - final int byte123 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte120 & 127) << 24) | (byte121 << 16) | (byte122 << 8) | byte123; - final int byte124 = blocks[blocksOffset++] & 0xFF; - final int byte125 = blocks[blocksOffset++] & 0xFF; - final int byte126 = blocks[blocksOffset++] & 0xFF; - final int byte127 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte124 << 23) | (byte125 << 15) | (byte126 << 7) | (byte127 >>> 1); - final int byte128 = blocks[blocksOffset++] & 0xFF; - final int byte129 = blocks[blocksOffset++] & 0xFF; - final int byte130 = blocks[blocksOffset++] & 0xFF; - final int byte131 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte127 & 1) << 30) | (byte128 << 22) | (byte129 << 14) | (byte130 << 6) | (byte131 >>> 2); - final int byte132 = blocks[blocksOffset++] & 0xFF; - final int byte133 = blocks[blocksOffset++] & 0xFF; - final int byte134 = blocks[blocksOffset++] & 0xFF; - final int byte135 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte131 & 3) << 29) | (byte132 << 21) | (byte133 << 13) | (byte134 << 5) | (byte135 >>> 3); - final int byte136 = blocks[blocksOffset++] & 0xFF; - final int byte137 = blocks[blocksOffset++] & 0xFF; - final int byte138 = blocks[blocksOffset++] & 0xFF; - final int byte139 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte135 & 7) << 28) | (byte136 << 20) | (byte137 << 12) | (byte138 << 4) | (byte139 >>> 4); - final int byte140 = blocks[blocksOffset++] & 0xFF; - final int byte141 = blocks[blocksOffset++] & 0xFF; - final int byte142 = blocks[blocksOffset++] & 0xFF; - final int byte143 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte139 & 15) << 27) | (byte140 << 19) | (byte141 << 11) | (byte142 << 3) | (byte143 >>> 5); - final int byte144 = blocks[blocksOffset++] & 0xFF; - final int byte145 = blocks[blocksOffset++] & 0xFF; - final int byte146 = blocks[blocksOffset++] & 0xFF; - final int byte147 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte143 & 31) << 26) | (byte144 << 18) | (byte145 << 10) | (byte146 << 2) | (byte147 >>> 6); - final int byte148 = blocks[blocksOffset++] & 0xFF; - final int byte149 = blocks[blocksOffset++] & 0xFF; - final int byte150 = blocks[blocksOffset++] & 0xFF; - final int byte151 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte147 & 63) << 25) | (byte148 << 17) | (byte149 << 9) | (byte150 << 1) | (byte151 >>> 7); - final int byte152 = blocks[blocksOffset++] & 0xFF; - final int byte153 = blocks[blocksOffset++] & 0xFF; - final int byte154 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte151 & 127) << 24) | (byte152 << 16) | (byte153 << 8) | byte154; - final int byte155 = blocks[blocksOffset++] & 0xFF; - final int byte156 = blocks[blocksOffset++] & 0xFF; - final int byte157 = blocks[blocksOffset++] & 0xFF; - final int byte158 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte155 << 23) | (byte156 << 15) | (byte157 << 7) | (byte158 >>> 1); - final int byte159 = blocks[blocksOffset++] & 0xFF; - final int byte160 = blocks[blocksOffset++] & 0xFF; - final int byte161 = blocks[blocksOffset++] & 0xFF; - final int byte162 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte158 & 1) << 30) | (byte159 << 22) | (byte160 << 14) | (byte161 << 6) | (byte162 >>> 2); - final int byte163 = blocks[blocksOffset++] & 0xFF; - final int byte164 = blocks[blocksOffset++] & 0xFF; - final int byte165 = blocks[blocksOffset++] & 0xFF; - final int byte166 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte162 & 3) << 29) | (byte163 << 21) | (byte164 << 13) | (byte165 << 5) | (byte166 >>> 3); - final int byte167 = blocks[blocksOffset++] & 0xFF; - final int byte168 = blocks[blocksOffset++] & 0xFF; - final int byte169 = blocks[blocksOffset++] & 0xFF; - final int byte170 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte166 & 7) << 28) | (byte167 << 20) | (byte168 << 12) | (byte169 << 4) | (byte170 >>> 4); - final int byte171 = blocks[blocksOffset++] & 0xFF; - final int byte172 = blocks[blocksOffset++] & 0xFF; - final int byte173 = blocks[blocksOffset++] & 0xFF; - final int byte174 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte170 & 15) << 27) | (byte171 << 19) | (byte172 << 11) | (byte173 << 3) | (byte174 >>> 5); - final int byte175 = blocks[blocksOffset++] & 0xFF; - final int byte176 = blocks[blocksOffset++] & 0xFF; - final int byte177 = blocks[blocksOffset++] & 0xFF; - final int byte178 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte174 & 31) << 26) | (byte175 << 18) | (byte176 << 10) | (byte177 << 2) | (byte178 >>> 6); - final int byte179 = blocks[blocksOffset++] & 0xFF; - final int byte180 = blocks[blocksOffset++] & 0xFF; - final int byte181 = blocks[blocksOffset++] & 0xFF; - final int byte182 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte178 & 63) << 25) | (byte179 << 17) | (byte180 << 9) | (byte181 << 1) | (byte182 >>> 7); - final int byte183 = blocks[blocksOffset++] & 0xFF; - final int byte184 = blocks[blocksOffset++] & 0xFF; - final int byte185 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte182 & 127) << 24) | (byte183 << 16) | (byte184 << 8) | byte185; - final int byte186 = blocks[blocksOffset++] & 0xFF; - final int byte187 = blocks[blocksOffset++] & 0xFF; - final int byte188 = blocks[blocksOffset++] & 0xFF; - final int byte189 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte186 << 23) | (byte187 << 15) | (byte188 << 7) | (byte189 >>> 1); - final int byte190 = blocks[blocksOffset++] & 0xFF; - final int byte191 = blocks[blocksOffset++] & 0xFF; - final int byte192 = blocks[blocksOffset++] & 0xFF; - final int byte193 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte189 & 1) << 30) | (byte190 << 22) | (byte191 << 14) | (byte192 << 6) | (byte193 >>> 2); - final int byte194 = blocks[blocksOffset++] & 0xFF; - final int byte195 = blocks[blocksOffset++] & 0xFF; - final int byte196 = blocks[blocksOffset++] & 0xFF; - final int byte197 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte193 & 3) << 29) | (byte194 << 21) | (byte195 << 13) | (byte196 << 5) | (byte197 >>> 3); - final int byte198 = blocks[blocksOffset++] & 0xFF; - final int byte199 = blocks[blocksOffset++] & 0xFF; - final int byte200 = blocks[blocksOffset++] & 0xFF; - final int byte201 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte197 & 7) << 28) | (byte198 << 20) | (byte199 << 12) | (byte200 << 4) | (byte201 >>> 4); - final int byte202 = blocks[blocksOffset++] & 0xFF; - final int byte203 = blocks[blocksOffset++] & 0xFF; - final int byte204 = blocks[blocksOffset++] & 0xFF; - final int byte205 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte201 & 15) << 27) | (byte202 << 19) | (byte203 << 11) | (byte204 << 3) | (byte205 >>> 5); - final int byte206 = blocks[blocksOffset++] & 0xFF; - final int byte207 = blocks[blocksOffset++] & 0xFF; - final int byte208 = blocks[blocksOffset++] & 0xFF; - final int byte209 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte205 & 31) << 26) | (byte206 << 18) | (byte207 << 10) | (byte208 << 2) | (byte209 >>> 6); - final int byte210 = blocks[blocksOffset++] & 0xFF; - final int byte211 = blocks[blocksOffset++] & 0xFF; - final int byte212 = blocks[blocksOffset++] & 0xFF; - final int byte213 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte209 & 63) << 25) | (byte210 << 17) | (byte211 << 9) | (byte212 << 1) | (byte213 >>> 7); - final int byte214 = blocks[blocksOffset++] & 0xFF; - final int byte215 = blocks[blocksOffset++] & 0xFF; - final int byte216 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte213 & 127) << 24) | (byte214 << 16) | (byte215 << 8) | byte216; - final int byte217 = blocks[blocksOffset++] & 0xFF; - final int byte218 = blocks[blocksOffset++] & 0xFF; - final int byte219 = blocks[blocksOffset++] & 0xFF; - final int byte220 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte217 << 23) | (byte218 << 15) | (byte219 << 7) | (byte220 >>> 1); - final int byte221 = blocks[blocksOffset++] & 0xFF; - final int byte222 = blocks[blocksOffset++] & 0xFF; - final int byte223 = blocks[blocksOffset++] & 0xFF; - final int byte224 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte220 & 1) << 30) | (byte221 << 22) | (byte222 << 14) | (byte223 << 6) | (byte224 >>> 2); - final int byte225 = blocks[blocksOffset++] & 0xFF; - final int byte226 = blocks[blocksOffset++] & 0xFF; - final int byte227 = blocks[blocksOffset++] & 0xFF; - final int byte228 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte224 & 3) << 29) | (byte225 << 21) | (byte226 << 13) | (byte227 << 5) | (byte228 >>> 3); - final int byte229 = blocks[blocksOffset++] & 0xFF; - final int byte230 = blocks[blocksOffset++] & 0xFF; - final int byte231 = blocks[blocksOffset++] & 0xFF; - final int byte232 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte228 & 7) << 28) | (byte229 << 20) | (byte230 << 12) | (byte231 << 4) | (byte232 >>> 4); - final int byte233 = blocks[blocksOffset++] & 0xFF; - final int byte234 = blocks[blocksOffset++] & 0xFF; - final int byte235 = blocks[blocksOffset++] & 0xFF; - final int byte236 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte232 & 15) << 27) | (byte233 << 19) | (byte234 << 11) | (byte235 << 3) | (byte236 >>> 5); - final int byte237 = blocks[blocksOffset++] & 0xFF; - final int byte238 = blocks[blocksOffset++] & 0xFF; - final int byte239 = blocks[blocksOffset++] & 0xFF; - final int byte240 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte236 & 31) << 26) | (byte237 << 18) | (byte238 << 10) | (byte239 << 2) | (byte240 >>> 6); - final int byte241 = blocks[blocksOffset++] & 0xFF; - final int byte242 = blocks[blocksOffset++] & 0xFF; - final int byte243 = blocks[blocksOffset++] & 0xFF; - final int byte244 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte240 & 63) << 25) | (byte241 << 17) | (byte242 << 9) | (byte243 << 1) | (byte244 >>> 7); - final int byte245 = blocks[blocksOffset++] & 0xFF; - final int byte246 = blocks[blocksOffset++] & 0xFF; - final int byte247 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte244 & 127) << 24) | (byte245 << 16) | (byte246 << 8) | byte247; - } - } - - @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 >>> 33; - values[valuesOffset++] = (block0 >>> 2) & 2147483647L; - final long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block0 & 3L) << 29) | (block1 >>> 35); - values[valuesOffset++] = (block1 >>> 4) & 2147483647L; - final long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block1 & 15L) << 27) | (block2 >>> 37); - values[valuesOffset++] = (block2 >>> 6) & 2147483647L; - final long block3 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block2 & 63L) << 25) | (block3 >>> 39); - values[valuesOffset++] = (block3 >>> 8) & 2147483647L; - final long block4 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block3 & 255L) << 23) | (block4 >>> 41); - values[valuesOffset++] = (block4 >>> 10) & 2147483647L; - final long block5 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block4 & 1023L) << 21) | (block5 >>> 43); - values[valuesOffset++] = (block5 >>> 12) & 2147483647L; - final long block6 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block5 & 4095L) << 19) | (block6 >>> 45); - values[valuesOffset++] = (block6 >>> 14) & 2147483647L; - final long block7 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block6 & 16383L) << 17) | (block7 >>> 47); - values[valuesOffset++] = (block7 >>> 16) & 2147483647L; - final long block8 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block7 & 65535L) << 15) | (block8 >>> 49); - values[valuesOffset++] = (block8 >>> 18) & 2147483647L; - final long block9 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block8 & 262143L) << 13) | (block9 >>> 51); - values[valuesOffset++] = (block9 >>> 20) & 2147483647L; - final long block10 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block9 & 1048575L) << 11) | (block10 >>> 53); - values[valuesOffset++] = (block10 >>> 22) & 2147483647L; - final long block11 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block10 & 4194303L) << 9) | (block11 >>> 55); - values[valuesOffset++] = (block11 >>> 24) & 2147483647L; - final long block12 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block11 & 16777215L) << 7) | (block12 >>> 57); - values[valuesOffset++] = (block12 >>> 26) & 2147483647L; - final long block13 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block12 & 67108863L) << 5) | (block13 >>> 59); - values[valuesOffset++] = (block13 >>> 28) & 2147483647L; - final long block14 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block13 & 268435455L) << 3) | (block14 >>> 61); - values[valuesOffset++] = (block14 >>> 30) & 2147483647L; - final long block15 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block14 & 1073741823L) << 1) | (block15 >>> 63); - values[valuesOffset++] = (block15 >>> 32) & 2147483647L; - values[valuesOffset++] = (block15 >>> 1) & 2147483647L; - final long block16 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block15 & 1L) << 30) | (block16 >>> 34); - values[valuesOffset++] = (block16 >>> 3) & 2147483647L; - final long block17 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block16 & 7L) << 28) | (block17 >>> 36); - values[valuesOffset++] = (block17 >>> 5) & 2147483647L; - final long block18 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block17 & 31L) << 26) | (block18 >>> 38); - values[valuesOffset++] = (block18 >>> 7) & 2147483647L; - final long block19 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block18 & 127L) << 24) | (block19 >>> 40); - values[valuesOffset++] = (block19 >>> 9) & 2147483647L; - final long block20 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block19 & 511L) << 22) | (block20 >>> 42); - values[valuesOffset++] = (block20 >>> 11) & 2147483647L; - final long block21 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block20 & 2047L) << 20) | (block21 >>> 44); - values[valuesOffset++] = (block21 >>> 13) & 2147483647L; - final long block22 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block21 & 8191L) << 18) | (block22 >>> 46); - values[valuesOffset++] = (block22 >>> 15) & 2147483647L; - final long block23 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block22 & 32767L) << 16) | (block23 >>> 48); - values[valuesOffset++] = (block23 >>> 17) & 2147483647L; - final long block24 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block23 & 131071L) << 14) | (block24 >>> 50); - values[valuesOffset++] = (block24 >>> 19) & 2147483647L; - final long block25 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block24 & 524287L) << 12) | (block25 >>> 52); - values[valuesOffset++] = (block25 >>> 21) & 2147483647L; - final long block26 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block25 & 2097151L) << 10) | (block26 >>> 54); - values[valuesOffset++] = (block26 >>> 23) & 2147483647L; - final long block27 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block26 & 8388607L) << 8) | (block27 >>> 56); - values[valuesOffset++] = (block27 >>> 25) & 2147483647L; - final long block28 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block27 & 33554431L) << 6) | (block28 >>> 58); - values[valuesOffset++] = (block28 >>> 27) & 2147483647L; - final long block29 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block28 & 134217727L) << 4) | (block29 >>> 60); - values[valuesOffset++] = (block29 >>> 29) & 2147483647L; - final long block30 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block29 & 536870911L) << 2) | (block30 >>> 62); - values[valuesOffset++] = (block30 >>> 31) & 2147483647L; - values[valuesOffset++] = block30 & 2147483647L; - } - } - - @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; - final long byte3 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte0 << 23) | (byte1 << 15) | (byte2 << 7) | (byte3 >>> 1); - final long byte4 = blocks[blocksOffset++] & 0xFF; - final long byte5 = blocks[blocksOffset++] & 0xFF; - final long byte6 = blocks[blocksOffset++] & 0xFF; - final long byte7 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte3 & 1) << 30) | (byte4 << 22) | (byte5 << 14) | (byte6 << 6) | (byte7 >>> 2); - final long byte8 = blocks[blocksOffset++] & 0xFF; - final long byte9 = blocks[blocksOffset++] & 0xFF; - final long byte10 = blocks[blocksOffset++] & 0xFF; - final long byte11 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte7 & 3) << 29) | (byte8 << 21) | (byte9 << 13) | (byte10 << 5) | (byte11 >>> 3); - final long byte12 = blocks[blocksOffset++] & 0xFF; - final long byte13 = blocks[blocksOffset++] & 0xFF; - final long byte14 = blocks[blocksOffset++] & 0xFF; - final long byte15 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte11 & 7) << 28) | (byte12 << 20) | (byte13 << 12) | (byte14 << 4) | (byte15 >>> 4); - final long byte16 = blocks[blocksOffset++] & 0xFF; - final long byte17 = blocks[blocksOffset++] & 0xFF; - final long byte18 = blocks[blocksOffset++] & 0xFF; - final long byte19 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte15 & 15) << 27) | (byte16 << 19) | (byte17 << 11) | (byte18 << 3) | (byte19 >>> 5); - final long byte20 = blocks[blocksOffset++] & 0xFF; - final long byte21 = blocks[blocksOffset++] & 0xFF; - final long byte22 = blocks[blocksOffset++] & 0xFF; - final long byte23 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte19 & 31) << 26) | (byte20 << 18) | (byte21 << 10) | (byte22 << 2) | (byte23 >>> 6); - final long byte24 = blocks[blocksOffset++] & 0xFF; - final long byte25 = blocks[blocksOffset++] & 0xFF; - final long byte26 = blocks[blocksOffset++] & 0xFF; - final long byte27 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte23 & 63) << 25) | (byte24 << 17) | (byte25 << 9) | (byte26 << 1) | (byte27 >>> 7); - final long byte28 = blocks[blocksOffset++] & 0xFF; - final long byte29 = blocks[blocksOffset++] & 0xFF; - final long byte30 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte27 & 127) << 24) | (byte28 << 16) | (byte29 << 8) | byte30; - final long byte31 = blocks[blocksOffset++] & 0xFF; - final long byte32 = blocks[blocksOffset++] & 0xFF; - final long byte33 = blocks[blocksOffset++] & 0xFF; - final long byte34 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte31 << 23) | (byte32 << 15) | (byte33 << 7) | (byte34 >>> 1); - final long byte35 = blocks[blocksOffset++] & 0xFF; - final long byte36 = blocks[blocksOffset++] & 0xFF; - final long byte37 = blocks[blocksOffset++] & 0xFF; - final long byte38 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte34 & 1) << 30) | (byte35 << 22) | (byte36 << 14) | (byte37 << 6) | (byte38 >>> 2); - final long byte39 = blocks[blocksOffset++] & 0xFF; - final long byte40 = blocks[blocksOffset++] & 0xFF; - final long byte41 = blocks[blocksOffset++] & 0xFF; - final long byte42 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte38 & 3) << 29) | (byte39 << 21) | (byte40 << 13) | (byte41 << 5) | (byte42 >>> 3); - final long byte43 = blocks[blocksOffset++] & 0xFF; - final long byte44 = blocks[blocksOffset++] & 0xFF; - final long byte45 = blocks[blocksOffset++] & 0xFF; - final long byte46 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte42 & 7) << 28) | (byte43 << 20) | (byte44 << 12) | (byte45 << 4) | (byte46 >>> 4); - final long byte47 = blocks[blocksOffset++] & 0xFF; - final long byte48 = blocks[blocksOffset++] & 0xFF; - final long byte49 = blocks[blocksOffset++] & 0xFF; - final long byte50 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte46 & 15) << 27) | (byte47 << 19) | (byte48 << 11) | (byte49 << 3) | (byte50 >>> 5); - final long byte51 = blocks[blocksOffset++] & 0xFF; - final long byte52 = blocks[blocksOffset++] & 0xFF; - final long byte53 = blocks[blocksOffset++] & 0xFF; - final long byte54 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte50 & 31) << 26) | (byte51 << 18) | (byte52 << 10) | (byte53 << 2) | (byte54 >>> 6); - final long byte55 = blocks[blocksOffset++] & 0xFF; - final long byte56 = blocks[blocksOffset++] & 0xFF; - final long byte57 = blocks[blocksOffset++] & 0xFF; - final long byte58 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte54 & 63) << 25) | (byte55 << 17) | (byte56 << 9) | (byte57 << 1) | (byte58 >>> 7); - final long byte59 = blocks[blocksOffset++] & 0xFF; - final long byte60 = blocks[blocksOffset++] & 0xFF; - final long byte61 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte58 & 127) << 24) | (byte59 << 16) | (byte60 << 8) | byte61; - final long byte62 = blocks[blocksOffset++] & 0xFF; - final long byte63 = blocks[blocksOffset++] & 0xFF; - final long byte64 = blocks[blocksOffset++] & 0xFF; - final long byte65 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte62 << 23) | (byte63 << 15) | (byte64 << 7) | (byte65 >>> 1); - final long byte66 = blocks[blocksOffset++] & 0xFF; - final long byte67 = blocks[blocksOffset++] & 0xFF; - final long byte68 = blocks[blocksOffset++] & 0xFF; - final long byte69 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte65 & 1) << 30) | (byte66 << 22) | (byte67 << 14) | (byte68 << 6) | (byte69 >>> 2); - final long byte70 = blocks[blocksOffset++] & 0xFF; - final long byte71 = blocks[blocksOffset++] & 0xFF; - final long byte72 = blocks[blocksOffset++] & 0xFF; - final long byte73 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte69 & 3) << 29) | (byte70 << 21) | (byte71 << 13) | (byte72 << 5) | (byte73 >>> 3); - final long byte74 = blocks[blocksOffset++] & 0xFF; - final long byte75 = blocks[blocksOffset++] & 0xFF; - final long byte76 = blocks[blocksOffset++] & 0xFF; - final long byte77 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte73 & 7) << 28) | (byte74 << 20) | (byte75 << 12) | (byte76 << 4) | (byte77 >>> 4); - final long byte78 = blocks[blocksOffset++] & 0xFF; - final long byte79 = blocks[blocksOffset++] & 0xFF; - final long byte80 = blocks[blocksOffset++] & 0xFF; - final long byte81 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte77 & 15) << 27) | (byte78 << 19) | (byte79 << 11) | (byte80 << 3) | (byte81 >>> 5); - final long byte82 = blocks[blocksOffset++] & 0xFF; - final long byte83 = blocks[blocksOffset++] & 0xFF; - final long byte84 = blocks[blocksOffset++] & 0xFF; - final long byte85 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte81 & 31) << 26) | (byte82 << 18) | (byte83 << 10) | (byte84 << 2) | (byte85 >>> 6); - final long byte86 = blocks[blocksOffset++] & 0xFF; - final long byte87 = blocks[blocksOffset++] & 0xFF; - final long byte88 = blocks[blocksOffset++] & 0xFF; - final long byte89 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte85 & 63) << 25) | (byte86 << 17) | (byte87 << 9) | (byte88 << 1) | (byte89 >>> 7); - final long byte90 = blocks[blocksOffset++] & 0xFF; - final long byte91 = blocks[blocksOffset++] & 0xFF; - final long byte92 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte89 & 127) << 24) | (byte90 << 16) | (byte91 << 8) | byte92; - final long byte93 = blocks[blocksOffset++] & 0xFF; - final long byte94 = blocks[blocksOffset++] & 0xFF; - final long byte95 = blocks[blocksOffset++] & 0xFF; - final long byte96 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte93 << 23) | (byte94 << 15) | (byte95 << 7) | (byte96 >>> 1); - final long byte97 = blocks[blocksOffset++] & 0xFF; - final long byte98 = blocks[blocksOffset++] & 0xFF; - final long byte99 = blocks[blocksOffset++] & 0xFF; - final long byte100 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte96 & 1) << 30) | (byte97 << 22) | (byte98 << 14) | (byte99 << 6) | (byte100 >>> 2); - final long byte101 = blocks[blocksOffset++] & 0xFF; - final long byte102 = blocks[blocksOffset++] & 0xFF; - final long byte103 = blocks[blocksOffset++] & 0xFF; - final long byte104 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte100 & 3) << 29) | (byte101 << 21) | (byte102 << 13) | (byte103 << 5) | (byte104 >>> 3); - final long byte105 = blocks[blocksOffset++] & 0xFF; - final long byte106 = blocks[blocksOffset++] & 0xFF; - final long byte107 = blocks[blocksOffset++] & 0xFF; - final long byte108 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte104 & 7) << 28) | (byte105 << 20) | (byte106 << 12) | (byte107 << 4) | (byte108 >>> 4); - final long byte109 = blocks[blocksOffset++] & 0xFF; - final long byte110 = blocks[blocksOffset++] & 0xFF; - final long byte111 = blocks[blocksOffset++] & 0xFF; - final long byte112 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte108 & 15) << 27) | (byte109 << 19) | (byte110 << 11) | (byte111 << 3) | (byte112 >>> 5); - final long byte113 = blocks[blocksOffset++] & 0xFF; - final long byte114 = blocks[blocksOffset++] & 0xFF; - final long byte115 = blocks[blocksOffset++] & 0xFF; - final long byte116 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte112 & 31) << 26) | (byte113 << 18) | (byte114 << 10) | (byte115 << 2) | (byte116 >>> 6); - final long byte117 = blocks[blocksOffset++] & 0xFF; - final long byte118 = blocks[blocksOffset++] & 0xFF; - final long byte119 = blocks[blocksOffset++] & 0xFF; - final long byte120 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte116 & 63) << 25) | (byte117 << 17) | (byte118 << 9) | (byte119 << 1) | (byte120 >>> 7); - final long byte121 = blocks[blocksOffset++] & 0xFF; - final long byte122 = blocks[blocksOffset++] & 0xFF; - final long byte123 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte120 & 127) << 24) | (byte121 << 16) | (byte122 << 8) | byte123; - final long byte124 = blocks[blocksOffset++] & 0xFF; - final long byte125 = blocks[blocksOffset++] & 0xFF; - final long byte126 = blocks[blocksOffset++] & 0xFF; - final long byte127 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte124 << 23) | (byte125 << 15) | (byte126 << 7) | (byte127 >>> 1); - final long byte128 = blocks[blocksOffset++] & 0xFF; - final long byte129 = blocks[blocksOffset++] & 0xFF; - final long byte130 = blocks[blocksOffset++] & 0xFF; - final long byte131 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte127 & 1) << 30) | (byte128 << 22) | (byte129 << 14) | (byte130 << 6) | (byte131 >>> 2); - final long byte132 = blocks[blocksOffset++] & 0xFF; - final long byte133 = blocks[blocksOffset++] & 0xFF; - final long byte134 = blocks[blocksOffset++] & 0xFF; - final long byte135 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte131 & 3) << 29) | (byte132 << 21) | (byte133 << 13) | (byte134 << 5) | (byte135 >>> 3); - final long byte136 = blocks[blocksOffset++] & 0xFF; - final long byte137 = blocks[blocksOffset++] & 0xFF; - final long byte138 = blocks[blocksOffset++] & 0xFF; - final long byte139 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte135 & 7) << 28) | (byte136 << 20) | (byte137 << 12) | (byte138 << 4) | (byte139 >>> 4); - final long byte140 = blocks[blocksOffset++] & 0xFF; - final long byte141 = blocks[blocksOffset++] & 0xFF; - final long byte142 = blocks[blocksOffset++] & 0xFF; - final long byte143 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte139 & 15) << 27) | (byte140 << 19) | (byte141 << 11) | (byte142 << 3) | (byte143 >>> 5); - final long byte144 = blocks[blocksOffset++] & 0xFF; - final long byte145 = blocks[blocksOffset++] & 0xFF; - final long byte146 = blocks[blocksOffset++] & 0xFF; - final long byte147 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte143 & 31) << 26) | (byte144 << 18) | (byte145 << 10) | (byte146 << 2) | (byte147 >>> 6); - final long byte148 = blocks[blocksOffset++] & 0xFF; - final long byte149 = blocks[blocksOffset++] & 0xFF; - final long byte150 = blocks[blocksOffset++] & 0xFF; - final long byte151 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte147 & 63) << 25) | (byte148 << 17) | (byte149 << 9) | (byte150 << 1) | (byte151 >>> 7); - final long byte152 = blocks[blocksOffset++] & 0xFF; - final long byte153 = blocks[blocksOffset++] & 0xFF; - final long byte154 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte151 & 127) << 24) | (byte152 << 16) | (byte153 << 8) | byte154; - final long byte155 = blocks[blocksOffset++] & 0xFF; - final long byte156 = blocks[blocksOffset++] & 0xFF; - final long byte157 = blocks[blocksOffset++] & 0xFF; - final long byte158 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte155 << 23) | (byte156 << 15) | (byte157 << 7) | (byte158 >>> 1); - final long byte159 = blocks[blocksOffset++] & 0xFF; - final long byte160 = blocks[blocksOffset++] & 0xFF; - final long byte161 = blocks[blocksOffset++] & 0xFF; - final long byte162 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte158 & 1) << 30) | (byte159 << 22) | (byte160 << 14) | (byte161 << 6) | (byte162 >>> 2); - final long byte163 = blocks[blocksOffset++] & 0xFF; - final long byte164 = blocks[blocksOffset++] & 0xFF; - final long byte165 = blocks[blocksOffset++] & 0xFF; - final long byte166 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte162 & 3) << 29) | (byte163 << 21) | (byte164 << 13) | (byte165 << 5) | (byte166 >>> 3); - final long byte167 = blocks[blocksOffset++] & 0xFF; - final long byte168 = blocks[blocksOffset++] & 0xFF; - final long byte169 = blocks[blocksOffset++] & 0xFF; - final long byte170 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte166 & 7) << 28) | (byte167 << 20) | (byte168 << 12) | (byte169 << 4) | (byte170 >>> 4); - final long byte171 = blocks[blocksOffset++] & 0xFF; - final long byte172 = blocks[blocksOffset++] & 0xFF; - final long byte173 = blocks[blocksOffset++] & 0xFF; - final long byte174 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte170 & 15) << 27) | (byte171 << 19) | (byte172 << 11) | (byte173 << 3) | (byte174 >>> 5); - final long byte175 = blocks[blocksOffset++] & 0xFF; - final long byte176 = blocks[blocksOffset++] & 0xFF; - final long byte177 = blocks[blocksOffset++] & 0xFF; - final long byte178 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte174 & 31) << 26) | (byte175 << 18) | (byte176 << 10) | (byte177 << 2) | (byte178 >>> 6); - final long byte179 = blocks[blocksOffset++] & 0xFF; - final long byte180 = blocks[blocksOffset++] & 0xFF; - final long byte181 = blocks[blocksOffset++] & 0xFF; - final long byte182 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte178 & 63) << 25) | (byte179 << 17) | (byte180 << 9) | (byte181 << 1) | (byte182 >>> 7); - final long byte183 = blocks[blocksOffset++] & 0xFF; - final long byte184 = blocks[blocksOffset++] & 0xFF; - final long byte185 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte182 & 127) << 24) | (byte183 << 16) | (byte184 << 8) | byte185; - final long byte186 = blocks[blocksOffset++] & 0xFF; - final long byte187 = blocks[blocksOffset++] & 0xFF; - final long byte188 = blocks[blocksOffset++] & 0xFF; - final long byte189 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte186 << 23) | (byte187 << 15) | (byte188 << 7) | (byte189 >>> 1); - final long byte190 = blocks[blocksOffset++] & 0xFF; - final long byte191 = blocks[blocksOffset++] & 0xFF; - final long byte192 = blocks[blocksOffset++] & 0xFF; - final long byte193 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte189 & 1) << 30) | (byte190 << 22) | (byte191 << 14) | (byte192 << 6) | (byte193 >>> 2); - final long byte194 = blocks[blocksOffset++] & 0xFF; - final long byte195 = blocks[blocksOffset++] & 0xFF; - final long byte196 = blocks[blocksOffset++] & 0xFF; - final long byte197 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte193 & 3) << 29) | (byte194 << 21) | (byte195 << 13) | (byte196 << 5) | (byte197 >>> 3); - final long byte198 = blocks[blocksOffset++] & 0xFF; - final long byte199 = blocks[blocksOffset++] & 0xFF; - final long byte200 = blocks[blocksOffset++] & 0xFF; - final long byte201 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte197 & 7) << 28) | (byte198 << 20) | (byte199 << 12) | (byte200 << 4) | (byte201 >>> 4); - final long byte202 = blocks[blocksOffset++] & 0xFF; - final long byte203 = blocks[blocksOffset++] & 0xFF; - final long byte204 = blocks[blocksOffset++] & 0xFF; - final long byte205 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte201 & 15) << 27) | (byte202 << 19) | (byte203 << 11) | (byte204 << 3) | (byte205 >>> 5); - final long byte206 = blocks[blocksOffset++] & 0xFF; - final long byte207 = blocks[blocksOffset++] & 0xFF; - final long byte208 = blocks[blocksOffset++] & 0xFF; - final long byte209 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte205 & 31) << 26) | (byte206 << 18) | (byte207 << 10) | (byte208 << 2) | (byte209 >>> 6); - final long byte210 = blocks[blocksOffset++] & 0xFF; - final long byte211 = blocks[blocksOffset++] & 0xFF; - final long byte212 = blocks[blocksOffset++] & 0xFF; - final long byte213 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte209 & 63) << 25) | (byte210 << 17) | (byte211 << 9) | (byte212 << 1) | (byte213 >>> 7); - final long byte214 = blocks[blocksOffset++] & 0xFF; - final long byte215 = blocks[blocksOffset++] & 0xFF; - final long byte216 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte213 & 127) << 24) | (byte214 << 16) | (byte215 << 8) | byte216; - final long byte217 = blocks[blocksOffset++] & 0xFF; - final long byte218 = blocks[blocksOffset++] & 0xFF; - final long byte219 = blocks[blocksOffset++] & 0xFF; - final long byte220 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte217 << 23) | (byte218 << 15) | (byte219 << 7) | (byte220 >>> 1); - final long byte221 = blocks[blocksOffset++] & 0xFF; - final long byte222 = blocks[blocksOffset++] & 0xFF; - final long byte223 = blocks[blocksOffset++] & 0xFF; - final long byte224 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte220 & 1) << 30) | (byte221 << 22) | (byte222 << 14) | (byte223 << 6) | (byte224 >>> 2); - final long byte225 = blocks[blocksOffset++] & 0xFF; - final long byte226 = blocks[blocksOffset++] & 0xFF; - final long byte227 = blocks[blocksOffset++] & 0xFF; - final long byte228 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte224 & 3) << 29) | (byte225 << 21) | (byte226 << 13) | (byte227 << 5) | (byte228 >>> 3); - final long byte229 = blocks[blocksOffset++] & 0xFF; - final long byte230 = blocks[blocksOffset++] & 0xFF; - final long byte231 = blocks[blocksOffset++] & 0xFF; - final long byte232 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte228 & 7) << 28) | (byte229 << 20) | (byte230 << 12) | (byte231 << 4) | (byte232 >>> 4); - final long byte233 = blocks[blocksOffset++] & 0xFF; - final long byte234 = blocks[blocksOffset++] & 0xFF; - final long byte235 = blocks[blocksOffset++] & 0xFF; - final long byte236 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte232 & 15) << 27) | (byte233 << 19) | (byte234 << 11) | (byte235 << 3) | (byte236 >>> 5); - final long byte237 = blocks[blocksOffset++] & 0xFF; - final long byte238 = blocks[blocksOffset++] & 0xFF; - final long byte239 = blocks[blocksOffset++] & 0xFF; - final long byte240 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte236 & 31) << 26) | (byte237 << 18) | (byte238 << 10) | (byte239 << 2) | (byte240 >>> 6); - final long byte241 = blocks[blocksOffset++] & 0xFF; - final long byte242 = blocks[blocksOffset++] & 0xFF; - final long byte243 = blocks[blocksOffset++] & 0xFF; - final long byte244 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte240 & 63) << 25) | (byte241 << 17) | (byte242 << 9) | (byte243 << 1) | (byte244 >>> 7); - final long byte245 = blocks[blocksOffset++] & 0xFF; - final long byte246 = blocks[blocksOffset++] & 0xFF; - final long byte247 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte244 & 127) << 24) | (byte245 << 16) | (byte246 << 8) | byte247; - } - } - - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 33) | ((values[valuesOffset++] & 0xffffffffL) << 2) | ((values[valuesOffset] & 0xffffffffL) >>> 29); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 35) | ((values[valuesOffset++] & 0xffffffffL) << 4) | ((values[valuesOffset] & 0xffffffffL) >>> 27); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 37) | ((values[valuesOffset++] & 0xffffffffL) << 6) | ((values[valuesOffset] & 0xffffffffL) >>> 25); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 39) | ((values[valuesOffset++] & 0xffffffffL) << 8) | ((values[valuesOffset] & 0xffffffffL) >>> 23); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 41) | ((values[valuesOffset++] & 0xffffffffL) << 10) | ((values[valuesOffset] & 0xffffffffL) >>> 21); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 43) | ((values[valuesOffset++] & 0xffffffffL) << 12) | ((values[valuesOffset] & 0xffffffffL) >>> 19); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 45) | ((values[valuesOffset++] & 0xffffffffL) << 14) | ((values[valuesOffset] & 0xffffffffL) >>> 17); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 47) | ((values[valuesOffset++] & 0xffffffffL) << 16) | ((values[valuesOffset] & 0xffffffffL) >>> 15); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 49) | ((values[valuesOffset++] & 0xffffffffL) << 18) | ((values[valuesOffset] & 0xffffffffL) >>> 13); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 51) | ((values[valuesOffset++] & 0xffffffffL) << 20) | ((values[valuesOffset] & 0xffffffffL) >>> 11); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 53) | ((values[valuesOffset++] & 0xffffffffL) << 22) | ((values[valuesOffset] & 0xffffffffL) >>> 9); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 55) | ((values[valuesOffset++] & 0xffffffffL) << 24) | ((values[valuesOffset] & 0xffffffffL) >>> 7); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 57) | ((values[valuesOffset++] & 0xffffffffL) << 26) | ((values[valuesOffset] & 0xffffffffL) >>> 5); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 59) | ((values[valuesOffset++] & 0xffffffffL) << 28) | ((values[valuesOffset] & 0xffffffffL) >>> 3); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 61) | ((values[valuesOffset++] & 0xffffffffL) << 30) | ((values[valuesOffset] & 0xffffffffL) >>> 1); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 63) | ((values[valuesOffset++] & 0xffffffffL) << 32) | ((values[valuesOffset++] & 0xffffffffL) << 1) | ((values[valuesOffset] & 0xffffffffL) >>> 30); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 34) | ((values[valuesOffset++] & 0xffffffffL) << 3) | ((values[valuesOffset] & 0xffffffffL) >>> 28); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 36) | ((values[valuesOffset++] & 0xffffffffL) << 5) | ((values[valuesOffset] & 0xffffffffL) >>> 26); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 38) | ((values[valuesOffset++] & 0xffffffffL) << 7) | ((values[valuesOffset] & 0xffffffffL) >>> 24); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 40) | ((values[valuesOffset++] & 0xffffffffL) << 9) | ((values[valuesOffset] & 0xffffffffL) >>> 22); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 42) | ((values[valuesOffset++] & 0xffffffffL) << 11) | ((values[valuesOffset] & 0xffffffffL) >>> 20); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 44) | ((values[valuesOffset++] & 0xffffffffL) << 13) | ((values[valuesOffset] & 0xffffffffL) >>> 18); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 46) | ((values[valuesOffset++] & 0xffffffffL) << 15) | ((values[valuesOffset] & 0xffffffffL) >>> 16); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 48) | ((values[valuesOffset++] & 0xffffffffL) << 17) | ((values[valuesOffset] & 0xffffffffL) >>> 14); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 50) | ((values[valuesOffset++] & 0xffffffffL) << 19) | ((values[valuesOffset] & 0xffffffffL) >>> 12); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 52) | ((values[valuesOffset++] & 0xffffffffL) << 21) | ((values[valuesOffset] & 0xffffffffL) >>> 10); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 54) | ((values[valuesOffset++] & 0xffffffffL) << 23) | ((values[valuesOffset] & 0xffffffffL) >>> 8); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 56) | ((values[valuesOffset++] & 0xffffffffL) << 25) | ((values[valuesOffset] & 0xffffffffL) >>> 6); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 58) | ((values[valuesOffset++] & 0xffffffffL) << 27) | ((values[valuesOffset] & 0xffffffffL) >>> 4); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 60) | ((values[valuesOffset++] & 0xffffffffL) << 29) | ((values[valuesOffset] & 0xffffffffL) >>> 2); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 62) | ((values[valuesOffset++] & 0xffffffffL) << 31) | (values[valuesOffset++] & 0xffffffffL); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] << 33) | (values[valuesOffset++] << 2) | (values[valuesOffset] >>> 29); - blocks[blocksOffset++] = (values[valuesOffset++] << 35) | (values[valuesOffset++] << 4) | (values[valuesOffset] >>> 27); - blocks[blocksOffset++] = (values[valuesOffset++] << 37) | (values[valuesOffset++] << 6) | (values[valuesOffset] >>> 25); - blocks[blocksOffset++] = (values[valuesOffset++] << 39) | (values[valuesOffset++] << 8) | (values[valuesOffset] >>> 23); - blocks[blocksOffset++] = (values[valuesOffset++] << 41) | (values[valuesOffset++] << 10) | (values[valuesOffset] >>> 21); - blocks[blocksOffset++] = (values[valuesOffset++] << 43) | (values[valuesOffset++] << 12) | (values[valuesOffset] >>> 19); - blocks[blocksOffset++] = (values[valuesOffset++] << 45) | (values[valuesOffset++] << 14) | (values[valuesOffset] >>> 17); - blocks[blocksOffset++] = (values[valuesOffset++] << 47) | (values[valuesOffset++] << 16) | (values[valuesOffset] >>> 15); - blocks[blocksOffset++] = (values[valuesOffset++] << 49) | (values[valuesOffset++] << 18) | (values[valuesOffset] >>> 13); - blocks[blocksOffset++] = (values[valuesOffset++] << 51) | (values[valuesOffset++] << 20) | (values[valuesOffset] >>> 11); - blocks[blocksOffset++] = (values[valuesOffset++] << 53) | (values[valuesOffset++] << 22) | (values[valuesOffset] >>> 9); - blocks[blocksOffset++] = (values[valuesOffset++] << 55) | (values[valuesOffset++] << 24) | (values[valuesOffset] >>> 7); - blocks[blocksOffset++] = (values[valuesOffset++] << 57) | (values[valuesOffset++] << 26) | (values[valuesOffset] >>> 5); - blocks[blocksOffset++] = (values[valuesOffset++] << 59) | (values[valuesOffset++] << 28) | (values[valuesOffset] >>> 3); - blocks[blocksOffset++] = (values[valuesOffset++] << 61) | (values[valuesOffset++] << 30) | (values[valuesOffset] >>> 1); - blocks[blocksOffset++] = (values[valuesOffset++] << 63) | (values[valuesOffset++] << 32) | (values[valuesOffset++] << 1) | (values[valuesOffset] >>> 30); - blocks[blocksOffset++] = (values[valuesOffset++] << 34) | (values[valuesOffset++] << 3) | (values[valuesOffset] >>> 28); - blocks[blocksOffset++] = (values[valuesOffset++] << 36) | (values[valuesOffset++] << 5) | (values[valuesOffset] >>> 26); - blocks[blocksOffset++] = (values[valuesOffset++] << 38) | (values[valuesOffset++] << 7) | (values[valuesOffset] >>> 24); - blocks[blocksOffset++] = (values[valuesOffset++] << 40) | (values[valuesOffset++] << 9) | (values[valuesOffset] >>> 22); - blocks[blocksOffset++] = (values[valuesOffset++] << 42) | (values[valuesOffset++] << 11) | (values[valuesOffset] >>> 20); - blocks[blocksOffset++] = (values[valuesOffset++] << 44) | (values[valuesOffset++] << 13) | (values[valuesOffset] >>> 18); - blocks[blocksOffset++] = (values[valuesOffset++] << 46) | (values[valuesOffset++] << 15) | (values[valuesOffset] >>> 16); - blocks[blocksOffset++] = (values[valuesOffset++] << 48) | (values[valuesOffset++] << 17) | (values[valuesOffset] >>> 14); - blocks[blocksOffset++] = (values[valuesOffset++] << 50) | (values[valuesOffset++] << 19) | (values[valuesOffset] >>> 12); - blocks[blocksOffset++] = (values[valuesOffset++] << 52) | (values[valuesOffset++] << 21) | (values[valuesOffset] >>> 10); - blocks[blocksOffset++] = (values[valuesOffset++] << 54) | (values[valuesOffset++] << 23) | (values[valuesOffset] >>> 8); - blocks[blocksOffset++] = (values[valuesOffset++] << 56) | (values[valuesOffset++] << 25) | (values[valuesOffset] >>> 6); - blocks[blocksOffset++] = (values[valuesOffset++] << 58) | (values[valuesOffset++] << 27) | (values[valuesOffset] >>> 4); - blocks[blocksOffset++] = (values[valuesOffset++] << 60) | (values[valuesOffset++] << 29) | (values[valuesOffset] >>> 2); - blocks[blocksOffset++] = (values[valuesOffset++] << 62) | (values[valuesOffset++] << 31) | values[valuesOffset++]; - } - } - -} diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked32.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked32.java deleted file mode 100644 index b8cb4bc15e8..00000000000 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked32.java +++ /dev/null @@ -1,112 +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 BulkOperationPacked32 extends BulkOperation { - @Override - public int blockCount() { - return 1; - } - - @Override - public int valueCount() { - return 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 block0 = blocks[blocksOffset++]; - values[valuesOffset++] = (int) (block0 >>> 32); - values[valuesOffset++] = (int) (block0 & 4294967295L); - } - } - - @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; - final int byte3 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte0 << 24) | (byte1 << 16) | (byte2 << 8) | byte3; - final int byte4 = blocks[blocksOffset++] & 0xFF; - final int byte5 = blocks[blocksOffset++] & 0xFF; - final int byte6 = blocks[blocksOffset++] & 0xFF; - final int byte7 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte4 << 24) | (byte5 << 16) | (byte6 << 8) | byte7; - } - } - - @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 >>> 32; - values[valuesOffset++] = block0 & 4294967295L; - } - } - - @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; - final long byte3 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte0 << 24) | (byte1 << 16) | (byte2 << 8) | byte3; - final long byte4 = blocks[blocksOffset++] & 0xFF; - final long byte5 = blocks[blocksOffset++] & 0xFF; - final long byte6 = blocks[blocksOffset++] & 0xFF; - final long byte7 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte4 << 24) | (byte5 << 16) | (byte6 << 8) | byte7; - } - } - - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 32) | (values[valuesOffset++] & 0xffffffffL); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] << 32) | values[valuesOffset++]; - } - } - -} diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked33.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked33.java deleted file mode 100644 index 4519a20c5d0..00000000000 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked33.java +++ /dev/null @@ -1,569 +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 BulkOperationPacked33 extends BulkOperation { - @Override - public int blockCount() { - return 33; - } - - @Override - public int valueCount() { - return 64; - } - - @Override - public void decode(long[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) { - throw new UnsupportedOperationException(); - } - - @Override - public void decode(byte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) { - throw new UnsupportedOperationException(); - } - - @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 >>> 31; - final long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block0 & 2147483647L) << 2) | (block1 >>> 62); - values[valuesOffset++] = (block1 >>> 29) & 8589934591L; - final long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block1 & 536870911L) << 4) | (block2 >>> 60); - values[valuesOffset++] = (block2 >>> 27) & 8589934591L; - final long block3 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block2 & 134217727L) << 6) | (block3 >>> 58); - values[valuesOffset++] = (block3 >>> 25) & 8589934591L; - final long block4 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block3 & 33554431L) << 8) | (block4 >>> 56); - values[valuesOffset++] = (block4 >>> 23) & 8589934591L; - final long block5 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block4 & 8388607L) << 10) | (block5 >>> 54); - values[valuesOffset++] = (block5 >>> 21) & 8589934591L; - final long block6 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block5 & 2097151L) << 12) | (block6 >>> 52); - values[valuesOffset++] = (block6 >>> 19) & 8589934591L; - final long block7 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block6 & 524287L) << 14) | (block7 >>> 50); - values[valuesOffset++] = (block7 >>> 17) & 8589934591L; - final long block8 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block7 & 131071L) << 16) | (block8 >>> 48); - values[valuesOffset++] = (block8 >>> 15) & 8589934591L; - final long block9 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block8 & 32767L) << 18) | (block9 >>> 46); - values[valuesOffset++] = (block9 >>> 13) & 8589934591L; - final long block10 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block9 & 8191L) << 20) | (block10 >>> 44); - values[valuesOffset++] = (block10 >>> 11) & 8589934591L; - final long block11 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block10 & 2047L) << 22) | (block11 >>> 42); - values[valuesOffset++] = (block11 >>> 9) & 8589934591L; - final long block12 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block11 & 511L) << 24) | (block12 >>> 40); - values[valuesOffset++] = (block12 >>> 7) & 8589934591L; - final long block13 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block12 & 127L) << 26) | (block13 >>> 38); - values[valuesOffset++] = (block13 >>> 5) & 8589934591L; - final long block14 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block13 & 31L) << 28) | (block14 >>> 36); - values[valuesOffset++] = (block14 >>> 3) & 8589934591L; - final long block15 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block14 & 7L) << 30) | (block15 >>> 34); - values[valuesOffset++] = (block15 >>> 1) & 8589934591L; - final long block16 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block15 & 1L) << 32) | (block16 >>> 32); - final long block17 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block16 & 4294967295L) << 1) | (block17 >>> 63); - values[valuesOffset++] = (block17 >>> 30) & 8589934591L; - final long block18 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block17 & 1073741823L) << 3) | (block18 >>> 61); - values[valuesOffset++] = (block18 >>> 28) & 8589934591L; - final long block19 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block18 & 268435455L) << 5) | (block19 >>> 59); - values[valuesOffset++] = (block19 >>> 26) & 8589934591L; - final long block20 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block19 & 67108863L) << 7) | (block20 >>> 57); - values[valuesOffset++] = (block20 >>> 24) & 8589934591L; - final long block21 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block20 & 16777215L) << 9) | (block21 >>> 55); - values[valuesOffset++] = (block21 >>> 22) & 8589934591L; - final long block22 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block21 & 4194303L) << 11) | (block22 >>> 53); - values[valuesOffset++] = (block22 >>> 20) & 8589934591L; - final long block23 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block22 & 1048575L) << 13) | (block23 >>> 51); - values[valuesOffset++] = (block23 >>> 18) & 8589934591L; - final long block24 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block23 & 262143L) << 15) | (block24 >>> 49); - values[valuesOffset++] = (block24 >>> 16) & 8589934591L; - final long block25 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block24 & 65535L) << 17) | (block25 >>> 47); - values[valuesOffset++] = (block25 >>> 14) & 8589934591L; - final long block26 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block25 & 16383L) << 19) | (block26 >>> 45); - values[valuesOffset++] = (block26 >>> 12) & 8589934591L; - final long block27 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block26 & 4095L) << 21) | (block27 >>> 43); - values[valuesOffset++] = (block27 >>> 10) & 8589934591L; - final long block28 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block27 & 1023L) << 23) | (block28 >>> 41); - values[valuesOffset++] = (block28 >>> 8) & 8589934591L; - final long block29 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block28 & 255L) << 25) | (block29 >>> 39); - values[valuesOffset++] = (block29 >>> 6) & 8589934591L; - final long block30 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block29 & 63L) << 27) | (block30 >>> 37); - values[valuesOffset++] = (block30 >>> 4) & 8589934591L; - final long block31 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block30 & 15L) << 29) | (block31 >>> 35); - values[valuesOffset++] = (block31 >>> 2) & 8589934591L; - final long block32 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block31 & 3L) << 31) | (block32 >>> 33); - values[valuesOffset++] = block32 & 8589934591L; - } - } - - @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; - final long byte3 = blocks[blocksOffset++] & 0xFF; - final long byte4 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte0 << 25) | (byte1 << 17) | (byte2 << 9) | (byte3 << 1) | (byte4 >>> 7); - final long byte5 = blocks[blocksOffset++] & 0xFF; - final long byte6 = blocks[blocksOffset++] & 0xFF; - final long byte7 = blocks[blocksOffset++] & 0xFF; - final long byte8 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte4 & 127) << 26) | (byte5 << 18) | (byte6 << 10) | (byte7 << 2) | (byte8 >>> 6); - final long byte9 = blocks[blocksOffset++] & 0xFF; - final long byte10 = blocks[blocksOffset++] & 0xFF; - final long byte11 = blocks[blocksOffset++] & 0xFF; - final long byte12 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte8 & 63) << 27) | (byte9 << 19) | (byte10 << 11) | (byte11 << 3) | (byte12 >>> 5); - final long byte13 = blocks[blocksOffset++] & 0xFF; - final long byte14 = blocks[blocksOffset++] & 0xFF; - final long byte15 = blocks[blocksOffset++] & 0xFF; - final long byte16 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte12 & 31) << 28) | (byte13 << 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; - final long byte20 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte16 & 15) << 29) | (byte17 << 21) | (byte18 << 13) | (byte19 << 5) | (byte20 >>> 3); - final long byte21 = blocks[blocksOffset++] & 0xFF; - final long byte22 = blocks[blocksOffset++] & 0xFF; - final long byte23 = blocks[blocksOffset++] & 0xFF; - final long byte24 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte20 & 7) << 30) | (byte21 << 22) | (byte22 << 14) | (byte23 << 6) | (byte24 >>> 2); - final long byte25 = blocks[blocksOffset++] & 0xFF; - final long byte26 = blocks[blocksOffset++] & 0xFF; - final long byte27 = blocks[blocksOffset++] & 0xFF; - final long byte28 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte24 & 3) << 31) | (byte25 << 23) | (byte26 << 15) | (byte27 << 7) | (byte28 >>> 1); - final long byte29 = blocks[blocksOffset++] & 0xFF; - final long byte30 = blocks[blocksOffset++] & 0xFF; - final long byte31 = blocks[blocksOffset++] & 0xFF; - final long byte32 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte28 & 1) << 32) | (byte29 << 24) | (byte30 << 16) | (byte31 << 8) | byte32; - final long byte33 = blocks[blocksOffset++] & 0xFF; - final long byte34 = blocks[blocksOffset++] & 0xFF; - final long byte35 = blocks[blocksOffset++] & 0xFF; - final long byte36 = blocks[blocksOffset++] & 0xFF; - final long byte37 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte33 << 25) | (byte34 << 17) | (byte35 << 9) | (byte36 << 1) | (byte37 >>> 7); - final long byte38 = blocks[blocksOffset++] & 0xFF; - final long byte39 = blocks[blocksOffset++] & 0xFF; - final long byte40 = blocks[blocksOffset++] & 0xFF; - final long byte41 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte37 & 127) << 26) | (byte38 << 18) | (byte39 << 10) | (byte40 << 2) | (byte41 >>> 6); - final long byte42 = blocks[blocksOffset++] & 0xFF; - final long byte43 = blocks[blocksOffset++] & 0xFF; - final long byte44 = blocks[blocksOffset++] & 0xFF; - final long byte45 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte41 & 63) << 27) | (byte42 << 19) | (byte43 << 11) | (byte44 << 3) | (byte45 >>> 5); - final long byte46 = blocks[blocksOffset++] & 0xFF; - final long byte47 = blocks[blocksOffset++] & 0xFF; - final long byte48 = blocks[blocksOffset++] & 0xFF; - final long byte49 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte45 & 31) << 28) | (byte46 << 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; - final long byte53 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte49 & 15) << 29) | (byte50 << 21) | (byte51 << 13) | (byte52 << 5) | (byte53 >>> 3); - final long byte54 = blocks[blocksOffset++] & 0xFF; - final long byte55 = blocks[blocksOffset++] & 0xFF; - final long byte56 = blocks[blocksOffset++] & 0xFF; - final long byte57 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte53 & 7) << 30) | (byte54 << 22) | (byte55 << 14) | (byte56 << 6) | (byte57 >>> 2); - final long byte58 = blocks[blocksOffset++] & 0xFF; - final long byte59 = blocks[blocksOffset++] & 0xFF; - final long byte60 = blocks[blocksOffset++] & 0xFF; - final long byte61 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte57 & 3) << 31) | (byte58 << 23) | (byte59 << 15) | (byte60 << 7) | (byte61 >>> 1); - final long byte62 = blocks[blocksOffset++] & 0xFF; - final long byte63 = blocks[blocksOffset++] & 0xFF; - final long byte64 = blocks[blocksOffset++] & 0xFF; - final long byte65 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte61 & 1) << 32) | (byte62 << 24) | (byte63 << 16) | (byte64 << 8) | byte65; - final long byte66 = blocks[blocksOffset++] & 0xFF; - final long byte67 = blocks[blocksOffset++] & 0xFF; - final long byte68 = blocks[blocksOffset++] & 0xFF; - final long byte69 = blocks[blocksOffset++] & 0xFF; - final long byte70 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte66 << 25) | (byte67 << 17) | (byte68 << 9) | (byte69 << 1) | (byte70 >>> 7); - final long byte71 = blocks[blocksOffset++] & 0xFF; - final long byte72 = blocks[blocksOffset++] & 0xFF; - final long byte73 = blocks[blocksOffset++] & 0xFF; - final long byte74 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte70 & 127) << 26) | (byte71 << 18) | (byte72 << 10) | (byte73 << 2) | (byte74 >>> 6); - final long byte75 = blocks[blocksOffset++] & 0xFF; - final long byte76 = blocks[blocksOffset++] & 0xFF; - final long byte77 = blocks[blocksOffset++] & 0xFF; - final long byte78 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte74 & 63) << 27) | (byte75 << 19) | (byte76 << 11) | (byte77 << 3) | (byte78 >>> 5); - final long byte79 = blocks[blocksOffset++] & 0xFF; - final long byte80 = blocks[blocksOffset++] & 0xFF; - final long byte81 = blocks[blocksOffset++] & 0xFF; - final long byte82 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte78 & 31) << 28) | (byte79 << 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; - final long byte86 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte82 & 15) << 29) | (byte83 << 21) | (byte84 << 13) | (byte85 << 5) | (byte86 >>> 3); - final long byte87 = blocks[blocksOffset++] & 0xFF; - final long byte88 = blocks[blocksOffset++] & 0xFF; - final long byte89 = blocks[blocksOffset++] & 0xFF; - final long byte90 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte86 & 7) << 30) | (byte87 << 22) | (byte88 << 14) | (byte89 << 6) | (byte90 >>> 2); - final long byte91 = blocks[blocksOffset++] & 0xFF; - final long byte92 = blocks[blocksOffset++] & 0xFF; - final long byte93 = blocks[blocksOffset++] & 0xFF; - final long byte94 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte90 & 3) << 31) | (byte91 << 23) | (byte92 << 15) | (byte93 << 7) | (byte94 >>> 1); - final long byte95 = blocks[blocksOffset++] & 0xFF; - final long byte96 = blocks[blocksOffset++] & 0xFF; - final long byte97 = blocks[blocksOffset++] & 0xFF; - final long byte98 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte94 & 1) << 32) | (byte95 << 24) | (byte96 << 16) | (byte97 << 8) | byte98; - final long byte99 = blocks[blocksOffset++] & 0xFF; - final long byte100 = blocks[blocksOffset++] & 0xFF; - final long byte101 = blocks[blocksOffset++] & 0xFF; - final long byte102 = blocks[blocksOffset++] & 0xFF; - final long byte103 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte99 << 25) | (byte100 << 17) | (byte101 << 9) | (byte102 << 1) | (byte103 >>> 7); - final long byte104 = blocks[blocksOffset++] & 0xFF; - final long byte105 = blocks[blocksOffset++] & 0xFF; - final long byte106 = blocks[blocksOffset++] & 0xFF; - final long byte107 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte103 & 127) << 26) | (byte104 << 18) | (byte105 << 10) | (byte106 << 2) | (byte107 >>> 6); - final long byte108 = blocks[blocksOffset++] & 0xFF; - final long byte109 = blocks[blocksOffset++] & 0xFF; - final long byte110 = blocks[blocksOffset++] & 0xFF; - final long byte111 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte107 & 63) << 27) | (byte108 << 19) | (byte109 << 11) | (byte110 << 3) | (byte111 >>> 5); - final long byte112 = blocks[blocksOffset++] & 0xFF; - final long byte113 = blocks[blocksOffset++] & 0xFF; - final long byte114 = blocks[blocksOffset++] & 0xFF; - final long byte115 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte111 & 31) << 28) | (byte112 << 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; - final long byte119 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte115 & 15) << 29) | (byte116 << 21) | (byte117 << 13) | (byte118 << 5) | (byte119 >>> 3); - final long byte120 = blocks[blocksOffset++] & 0xFF; - final long byte121 = blocks[blocksOffset++] & 0xFF; - final long byte122 = blocks[blocksOffset++] & 0xFF; - final long byte123 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte119 & 7) << 30) | (byte120 << 22) | (byte121 << 14) | (byte122 << 6) | (byte123 >>> 2); - final long byte124 = blocks[blocksOffset++] & 0xFF; - final long byte125 = blocks[blocksOffset++] & 0xFF; - final long byte126 = blocks[blocksOffset++] & 0xFF; - final long byte127 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte123 & 3) << 31) | (byte124 << 23) | (byte125 << 15) | (byte126 << 7) | (byte127 >>> 1); - final long byte128 = blocks[blocksOffset++] & 0xFF; - final long byte129 = blocks[blocksOffset++] & 0xFF; - final long byte130 = blocks[blocksOffset++] & 0xFF; - final long byte131 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte127 & 1) << 32) | (byte128 << 24) | (byte129 << 16) | (byte130 << 8) | byte131; - final long byte132 = blocks[blocksOffset++] & 0xFF; - final long byte133 = blocks[blocksOffset++] & 0xFF; - final long byte134 = blocks[blocksOffset++] & 0xFF; - final long byte135 = blocks[blocksOffset++] & 0xFF; - final long byte136 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte132 << 25) | (byte133 << 17) | (byte134 << 9) | (byte135 << 1) | (byte136 >>> 7); - final long byte137 = blocks[blocksOffset++] & 0xFF; - final long byte138 = blocks[blocksOffset++] & 0xFF; - final long byte139 = blocks[blocksOffset++] & 0xFF; - final long byte140 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte136 & 127) << 26) | (byte137 << 18) | (byte138 << 10) | (byte139 << 2) | (byte140 >>> 6); - final long byte141 = blocks[blocksOffset++] & 0xFF; - final long byte142 = blocks[blocksOffset++] & 0xFF; - final long byte143 = blocks[blocksOffset++] & 0xFF; - final long byte144 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte140 & 63) << 27) | (byte141 << 19) | (byte142 << 11) | (byte143 << 3) | (byte144 >>> 5); - final long byte145 = blocks[blocksOffset++] & 0xFF; - final long byte146 = blocks[blocksOffset++] & 0xFF; - final long byte147 = blocks[blocksOffset++] & 0xFF; - final long byte148 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte144 & 31) << 28) | (byte145 << 20) | (byte146 << 12) | (byte147 << 4) | (byte148 >>> 4); - final long byte149 = blocks[blocksOffset++] & 0xFF; - final long byte150 = blocks[blocksOffset++] & 0xFF; - final long byte151 = blocks[blocksOffset++] & 0xFF; - final long byte152 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte148 & 15) << 29) | (byte149 << 21) | (byte150 << 13) | (byte151 << 5) | (byte152 >>> 3); - final long byte153 = blocks[blocksOffset++] & 0xFF; - final long byte154 = blocks[blocksOffset++] & 0xFF; - final long byte155 = blocks[blocksOffset++] & 0xFF; - final long byte156 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte152 & 7) << 30) | (byte153 << 22) | (byte154 << 14) | (byte155 << 6) | (byte156 >>> 2); - final long byte157 = blocks[blocksOffset++] & 0xFF; - final long byte158 = blocks[blocksOffset++] & 0xFF; - final long byte159 = blocks[blocksOffset++] & 0xFF; - final long byte160 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte156 & 3) << 31) | (byte157 << 23) | (byte158 << 15) | (byte159 << 7) | (byte160 >>> 1); - final long byte161 = blocks[blocksOffset++] & 0xFF; - final long byte162 = blocks[blocksOffset++] & 0xFF; - final long byte163 = blocks[blocksOffset++] & 0xFF; - final long byte164 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte160 & 1) << 32) | (byte161 << 24) | (byte162 << 16) | (byte163 << 8) | byte164; - final long byte165 = blocks[blocksOffset++] & 0xFF; - final long byte166 = blocks[blocksOffset++] & 0xFF; - final long byte167 = blocks[blocksOffset++] & 0xFF; - final long byte168 = blocks[blocksOffset++] & 0xFF; - final long byte169 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte165 << 25) | (byte166 << 17) | (byte167 << 9) | (byte168 << 1) | (byte169 >>> 7); - final long byte170 = blocks[blocksOffset++] & 0xFF; - final long byte171 = blocks[blocksOffset++] & 0xFF; - final long byte172 = blocks[blocksOffset++] & 0xFF; - final long byte173 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte169 & 127) << 26) | (byte170 << 18) | (byte171 << 10) | (byte172 << 2) | (byte173 >>> 6); - final long byte174 = blocks[blocksOffset++] & 0xFF; - final long byte175 = blocks[blocksOffset++] & 0xFF; - final long byte176 = blocks[blocksOffset++] & 0xFF; - final long byte177 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte173 & 63) << 27) | (byte174 << 19) | (byte175 << 11) | (byte176 << 3) | (byte177 >>> 5); - final long byte178 = blocks[blocksOffset++] & 0xFF; - final long byte179 = blocks[blocksOffset++] & 0xFF; - final long byte180 = blocks[blocksOffset++] & 0xFF; - final long byte181 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte177 & 31) << 28) | (byte178 << 20) | (byte179 << 12) | (byte180 << 4) | (byte181 >>> 4); - final long byte182 = blocks[blocksOffset++] & 0xFF; - final long byte183 = blocks[blocksOffset++] & 0xFF; - final long byte184 = blocks[blocksOffset++] & 0xFF; - final long byte185 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte181 & 15) << 29) | (byte182 << 21) | (byte183 << 13) | (byte184 << 5) | (byte185 >>> 3); - final long byte186 = blocks[blocksOffset++] & 0xFF; - final long byte187 = blocks[blocksOffset++] & 0xFF; - final long byte188 = blocks[blocksOffset++] & 0xFF; - final long byte189 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte185 & 7) << 30) | (byte186 << 22) | (byte187 << 14) | (byte188 << 6) | (byte189 >>> 2); - final long byte190 = blocks[blocksOffset++] & 0xFF; - final long byte191 = blocks[blocksOffset++] & 0xFF; - final long byte192 = blocks[blocksOffset++] & 0xFF; - final long byte193 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte189 & 3) << 31) | (byte190 << 23) | (byte191 << 15) | (byte192 << 7) | (byte193 >>> 1); - final long byte194 = blocks[blocksOffset++] & 0xFF; - final long byte195 = blocks[blocksOffset++] & 0xFF; - final long byte196 = blocks[blocksOffset++] & 0xFF; - final long byte197 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte193 & 1) << 32) | (byte194 << 24) | (byte195 << 16) | (byte196 << 8) | byte197; - final long byte198 = blocks[blocksOffset++] & 0xFF; - final long byte199 = blocks[blocksOffset++] & 0xFF; - final long byte200 = blocks[blocksOffset++] & 0xFF; - final long byte201 = blocks[blocksOffset++] & 0xFF; - final long byte202 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte198 << 25) | (byte199 << 17) | (byte200 << 9) | (byte201 << 1) | (byte202 >>> 7); - final long byte203 = blocks[blocksOffset++] & 0xFF; - final long byte204 = blocks[blocksOffset++] & 0xFF; - final long byte205 = blocks[blocksOffset++] & 0xFF; - final long byte206 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte202 & 127) << 26) | (byte203 << 18) | (byte204 << 10) | (byte205 << 2) | (byte206 >>> 6); - final long byte207 = blocks[blocksOffset++] & 0xFF; - final long byte208 = blocks[blocksOffset++] & 0xFF; - final long byte209 = blocks[blocksOffset++] & 0xFF; - final long byte210 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte206 & 63) << 27) | (byte207 << 19) | (byte208 << 11) | (byte209 << 3) | (byte210 >>> 5); - final long byte211 = blocks[blocksOffset++] & 0xFF; - final long byte212 = blocks[blocksOffset++] & 0xFF; - final long byte213 = blocks[blocksOffset++] & 0xFF; - final long byte214 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte210 & 31) << 28) | (byte211 << 20) | (byte212 << 12) | (byte213 << 4) | (byte214 >>> 4); - final long byte215 = blocks[blocksOffset++] & 0xFF; - final long byte216 = blocks[blocksOffset++] & 0xFF; - final long byte217 = blocks[blocksOffset++] & 0xFF; - final long byte218 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte214 & 15) << 29) | (byte215 << 21) | (byte216 << 13) | (byte217 << 5) | (byte218 >>> 3); - final long byte219 = blocks[blocksOffset++] & 0xFF; - final long byte220 = blocks[blocksOffset++] & 0xFF; - final long byte221 = blocks[blocksOffset++] & 0xFF; - final long byte222 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte218 & 7) << 30) | (byte219 << 22) | (byte220 << 14) | (byte221 << 6) | (byte222 >>> 2); - final long byte223 = blocks[blocksOffset++] & 0xFF; - final long byte224 = blocks[blocksOffset++] & 0xFF; - final long byte225 = blocks[blocksOffset++] & 0xFF; - final long byte226 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte222 & 3) << 31) | (byte223 << 23) | (byte224 << 15) | (byte225 << 7) | (byte226 >>> 1); - final long byte227 = blocks[blocksOffset++] & 0xFF; - final long byte228 = blocks[blocksOffset++] & 0xFF; - final long byte229 = blocks[blocksOffset++] & 0xFF; - final long byte230 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte226 & 1) << 32) | (byte227 << 24) | (byte228 << 16) | (byte229 << 8) | byte230; - final long byte231 = blocks[blocksOffset++] & 0xFF; - final long byte232 = blocks[blocksOffset++] & 0xFF; - final long byte233 = blocks[blocksOffset++] & 0xFF; - final long byte234 = blocks[blocksOffset++] & 0xFF; - final long byte235 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte231 << 25) | (byte232 << 17) | (byte233 << 9) | (byte234 << 1) | (byte235 >>> 7); - final long byte236 = blocks[blocksOffset++] & 0xFF; - final long byte237 = blocks[blocksOffset++] & 0xFF; - final long byte238 = blocks[blocksOffset++] & 0xFF; - final long byte239 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte235 & 127) << 26) | (byte236 << 18) | (byte237 << 10) | (byte238 << 2) | (byte239 >>> 6); - final long byte240 = blocks[blocksOffset++] & 0xFF; - final long byte241 = blocks[blocksOffset++] & 0xFF; - final long byte242 = blocks[blocksOffset++] & 0xFF; - final long byte243 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte239 & 63) << 27) | (byte240 << 19) | (byte241 << 11) | (byte242 << 3) | (byte243 >>> 5); - final long byte244 = blocks[blocksOffset++] & 0xFF; - final long byte245 = blocks[blocksOffset++] & 0xFF; - final long byte246 = blocks[blocksOffset++] & 0xFF; - final long byte247 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte243 & 31) << 28) | (byte244 << 20) | (byte245 << 12) | (byte246 << 4) | (byte247 >>> 4); - final long byte248 = blocks[blocksOffset++] & 0xFF; - final long byte249 = blocks[blocksOffset++] & 0xFF; - final long byte250 = blocks[blocksOffset++] & 0xFF; - final long byte251 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte247 & 15) << 29) | (byte248 << 21) | (byte249 << 13) | (byte250 << 5) | (byte251 >>> 3); - final long byte252 = blocks[blocksOffset++] & 0xFF; - final long byte253 = blocks[blocksOffset++] & 0xFF; - final long byte254 = blocks[blocksOffset++] & 0xFF; - final long byte255 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte251 & 7) << 30) | (byte252 << 22) | (byte253 << 14) | (byte254 << 6) | (byte255 >>> 2); - final long byte256 = blocks[blocksOffset++] & 0xFF; - final long byte257 = blocks[blocksOffset++] & 0xFF; - final long byte258 = blocks[blocksOffset++] & 0xFF; - final long byte259 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte255 & 3) << 31) | (byte256 << 23) | (byte257 << 15) | (byte258 << 7) | (byte259 >>> 1); - final long byte260 = blocks[blocksOffset++] & 0xFF; - final long byte261 = blocks[blocksOffset++] & 0xFF; - final long byte262 = blocks[blocksOffset++] & 0xFF; - final long byte263 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte259 & 1) << 32) | (byte260 << 24) | (byte261 << 16) | (byte262 << 8) | byte263; - } - } - - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 31) | ((values[valuesOffset] & 0xffffffffL) >>> 2); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 62) | ((values[valuesOffset++] & 0xffffffffL) << 29) | ((values[valuesOffset] & 0xffffffffL) >>> 4); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 60) | ((values[valuesOffset++] & 0xffffffffL) << 27) | ((values[valuesOffset] & 0xffffffffL) >>> 6); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 58) | ((values[valuesOffset++] & 0xffffffffL) << 25) | ((values[valuesOffset] & 0xffffffffL) >>> 8); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 56) | ((values[valuesOffset++] & 0xffffffffL) << 23) | ((values[valuesOffset] & 0xffffffffL) >>> 10); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 54) | ((values[valuesOffset++] & 0xffffffffL) << 21) | ((values[valuesOffset] & 0xffffffffL) >>> 12); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 52) | ((values[valuesOffset++] & 0xffffffffL) << 19) | ((values[valuesOffset] & 0xffffffffL) >>> 14); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 50) | ((values[valuesOffset++] & 0xffffffffL) << 17) | ((values[valuesOffset] & 0xffffffffL) >>> 16); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 48) | ((values[valuesOffset++] & 0xffffffffL) << 15) | ((values[valuesOffset] & 0xffffffffL) >>> 18); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 46) | ((values[valuesOffset++] & 0xffffffffL) << 13) | ((values[valuesOffset] & 0xffffffffL) >>> 20); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 44) | ((values[valuesOffset++] & 0xffffffffL) << 11) | ((values[valuesOffset] & 0xffffffffL) >>> 22); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 42) | ((values[valuesOffset++] & 0xffffffffL) << 9) | ((values[valuesOffset] & 0xffffffffL) >>> 24); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 40) | ((values[valuesOffset++] & 0xffffffffL) << 7) | ((values[valuesOffset] & 0xffffffffL) >>> 26); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 38) | ((values[valuesOffset++] & 0xffffffffL) << 5) | ((values[valuesOffset] & 0xffffffffL) >>> 28); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 36) | ((values[valuesOffset++] & 0xffffffffL) << 3) | ((values[valuesOffset] & 0xffffffffL) >>> 30); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 34) | ((values[valuesOffset++] & 0xffffffffL) << 1) | ((values[valuesOffset] & 0xffffffffL) >>> 32); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 32) | ((values[valuesOffset] & 0xffffffffL) >>> 1); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 63) | ((values[valuesOffset++] & 0xffffffffL) << 30) | ((values[valuesOffset] & 0xffffffffL) >>> 3); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 61) | ((values[valuesOffset++] & 0xffffffffL) << 28) | ((values[valuesOffset] & 0xffffffffL) >>> 5); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 59) | ((values[valuesOffset++] & 0xffffffffL) << 26) | ((values[valuesOffset] & 0xffffffffL) >>> 7); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 57) | ((values[valuesOffset++] & 0xffffffffL) << 24) | ((values[valuesOffset] & 0xffffffffL) >>> 9); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 55) | ((values[valuesOffset++] & 0xffffffffL) << 22) | ((values[valuesOffset] & 0xffffffffL) >>> 11); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 53) | ((values[valuesOffset++] & 0xffffffffL) << 20) | ((values[valuesOffset] & 0xffffffffL) >>> 13); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 51) | ((values[valuesOffset++] & 0xffffffffL) << 18) | ((values[valuesOffset] & 0xffffffffL) >>> 15); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 49) | ((values[valuesOffset++] & 0xffffffffL) << 16) | ((values[valuesOffset] & 0xffffffffL) >>> 17); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 47) | ((values[valuesOffset++] & 0xffffffffL) << 14) | ((values[valuesOffset] & 0xffffffffL) >>> 19); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 45) | ((values[valuesOffset++] & 0xffffffffL) << 12) | ((values[valuesOffset] & 0xffffffffL) >>> 21); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 43) | ((values[valuesOffset++] & 0xffffffffL) << 10) | ((values[valuesOffset] & 0xffffffffL) >>> 23); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 41) | ((values[valuesOffset++] & 0xffffffffL) << 8) | ((values[valuesOffset] & 0xffffffffL) >>> 25); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 39) | ((values[valuesOffset++] & 0xffffffffL) << 6) | ((values[valuesOffset] & 0xffffffffL) >>> 27); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 37) | ((values[valuesOffset++] & 0xffffffffL) << 4) | ((values[valuesOffset] & 0xffffffffL) >>> 29); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 35) | ((values[valuesOffset++] & 0xffffffffL) << 2) | ((values[valuesOffset] & 0xffffffffL) >>> 31); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 33) | (values[valuesOffset++] & 0xffffffffL); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] << 31) | (values[valuesOffset] >>> 2); - blocks[blocksOffset++] = (values[valuesOffset++] << 62) | (values[valuesOffset++] << 29) | (values[valuesOffset] >>> 4); - blocks[blocksOffset++] = (values[valuesOffset++] << 60) | (values[valuesOffset++] << 27) | (values[valuesOffset] >>> 6); - blocks[blocksOffset++] = (values[valuesOffset++] << 58) | (values[valuesOffset++] << 25) | (values[valuesOffset] >>> 8); - blocks[blocksOffset++] = (values[valuesOffset++] << 56) | (values[valuesOffset++] << 23) | (values[valuesOffset] >>> 10); - blocks[blocksOffset++] = (values[valuesOffset++] << 54) | (values[valuesOffset++] << 21) | (values[valuesOffset] >>> 12); - blocks[blocksOffset++] = (values[valuesOffset++] << 52) | (values[valuesOffset++] << 19) | (values[valuesOffset] >>> 14); - blocks[blocksOffset++] = (values[valuesOffset++] << 50) | (values[valuesOffset++] << 17) | (values[valuesOffset] >>> 16); - blocks[blocksOffset++] = (values[valuesOffset++] << 48) | (values[valuesOffset++] << 15) | (values[valuesOffset] >>> 18); - blocks[blocksOffset++] = (values[valuesOffset++] << 46) | (values[valuesOffset++] << 13) | (values[valuesOffset] >>> 20); - blocks[blocksOffset++] = (values[valuesOffset++] << 44) | (values[valuesOffset++] << 11) | (values[valuesOffset] >>> 22); - blocks[blocksOffset++] = (values[valuesOffset++] << 42) | (values[valuesOffset++] << 9) | (values[valuesOffset] >>> 24); - blocks[blocksOffset++] = (values[valuesOffset++] << 40) | (values[valuesOffset++] << 7) | (values[valuesOffset] >>> 26); - blocks[blocksOffset++] = (values[valuesOffset++] << 38) | (values[valuesOffset++] << 5) | (values[valuesOffset] >>> 28); - blocks[blocksOffset++] = (values[valuesOffset++] << 36) | (values[valuesOffset++] << 3) | (values[valuesOffset] >>> 30); - blocks[blocksOffset++] = (values[valuesOffset++] << 34) | (values[valuesOffset++] << 1) | (values[valuesOffset] >>> 32); - blocks[blocksOffset++] = (values[valuesOffset++] << 32) | (values[valuesOffset] >>> 1); - blocks[blocksOffset++] = (values[valuesOffset++] << 63) | (values[valuesOffset++] << 30) | (values[valuesOffset] >>> 3); - blocks[blocksOffset++] = (values[valuesOffset++] << 61) | (values[valuesOffset++] << 28) | (values[valuesOffset] >>> 5); - blocks[blocksOffset++] = (values[valuesOffset++] << 59) | (values[valuesOffset++] << 26) | (values[valuesOffset] >>> 7); - blocks[blocksOffset++] = (values[valuesOffset++] << 57) | (values[valuesOffset++] << 24) | (values[valuesOffset] >>> 9); - blocks[blocksOffset++] = (values[valuesOffset++] << 55) | (values[valuesOffset++] << 22) | (values[valuesOffset] >>> 11); - blocks[blocksOffset++] = (values[valuesOffset++] << 53) | (values[valuesOffset++] << 20) | (values[valuesOffset] >>> 13); - blocks[blocksOffset++] = (values[valuesOffset++] << 51) | (values[valuesOffset++] << 18) | (values[valuesOffset] >>> 15); - blocks[blocksOffset++] = (values[valuesOffset++] << 49) | (values[valuesOffset++] << 16) | (values[valuesOffset] >>> 17); - blocks[blocksOffset++] = (values[valuesOffset++] << 47) | (values[valuesOffset++] << 14) | (values[valuesOffset] >>> 19); - blocks[blocksOffset++] = (values[valuesOffset++] << 45) | (values[valuesOffset++] << 12) | (values[valuesOffset] >>> 21); - blocks[blocksOffset++] = (values[valuesOffset++] << 43) | (values[valuesOffset++] << 10) | (values[valuesOffset] >>> 23); - blocks[blocksOffset++] = (values[valuesOffset++] << 41) | (values[valuesOffset++] << 8) | (values[valuesOffset] >>> 25); - blocks[blocksOffset++] = (values[valuesOffset++] << 39) | (values[valuesOffset++] << 6) | (values[valuesOffset] >>> 27); - blocks[blocksOffset++] = (values[valuesOffset++] << 37) | (values[valuesOffset++] << 4) | (values[valuesOffset] >>> 29); - blocks[blocksOffset++] = (values[valuesOffset++] << 35) | (values[valuesOffset++] << 2) | (values[valuesOffset] >>> 31); - blocks[blocksOffset++] = (values[valuesOffset++] << 33) | values[valuesOffset++]; - } - } - -} diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked34.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked34.java deleted file mode 100644 index 60d3d45aab7..00000000000 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked34.java +++ /dev/null @@ -1,329 +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 BulkOperationPacked34 extends BulkOperation { - @Override - public int blockCount() { - return 17; - } - - @Override - public int valueCount() { - return 32; - } - - @Override - public void decode(long[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) { - throw new UnsupportedOperationException(); - } - - @Override - public void decode(byte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) { - throw new UnsupportedOperationException(); - } - - @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 >>> 30; - final long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block0 & 1073741823L) << 4) | (block1 >>> 60); - values[valuesOffset++] = (block1 >>> 26) & 17179869183L; - final long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block1 & 67108863L) << 8) | (block2 >>> 56); - values[valuesOffset++] = (block2 >>> 22) & 17179869183L; - final long block3 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block2 & 4194303L) << 12) | (block3 >>> 52); - values[valuesOffset++] = (block3 >>> 18) & 17179869183L; - final long block4 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block3 & 262143L) << 16) | (block4 >>> 48); - values[valuesOffset++] = (block4 >>> 14) & 17179869183L; - final long block5 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block4 & 16383L) << 20) | (block5 >>> 44); - values[valuesOffset++] = (block5 >>> 10) & 17179869183L; - final long block6 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block5 & 1023L) << 24) | (block6 >>> 40); - values[valuesOffset++] = (block6 >>> 6) & 17179869183L; - final long block7 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block6 & 63L) << 28) | (block7 >>> 36); - values[valuesOffset++] = (block7 >>> 2) & 17179869183L; - final long block8 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block7 & 3L) << 32) | (block8 >>> 32); - final long block9 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block8 & 4294967295L) << 2) | (block9 >>> 62); - values[valuesOffset++] = (block9 >>> 28) & 17179869183L; - final long block10 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block9 & 268435455L) << 6) | (block10 >>> 58); - values[valuesOffset++] = (block10 >>> 24) & 17179869183L; - final long block11 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block10 & 16777215L) << 10) | (block11 >>> 54); - values[valuesOffset++] = (block11 >>> 20) & 17179869183L; - final long block12 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block11 & 1048575L) << 14) | (block12 >>> 50); - values[valuesOffset++] = (block12 >>> 16) & 17179869183L; - final long block13 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block12 & 65535L) << 18) | (block13 >>> 46); - values[valuesOffset++] = (block13 >>> 12) & 17179869183L; - final long block14 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block13 & 4095L) << 22) | (block14 >>> 42); - values[valuesOffset++] = (block14 >>> 8) & 17179869183L; - final long block15 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block14 & 255L) << 26) | (block15 >>> 38); - values[valuesOffset++] = (block15 >>> 4) & 17179869183L; - final long block16 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block15 & 15L) << 30) | (block16 >>> 34); - values[valuesOffset++] = block16 & 17179869183L; - } - } - - @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; - final long byte3 = blocks[blocksOffset++] & 0xFF; - final long byte4 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte0 << 26) | (byte1 << 18) | (byte2 << 10) | (byte3 << 2) | (byte4 >>> 6); - final long byte5 = blocks[blocksOffset++] & 0xFF; - final long byte6 = blocks[blocksOffset++] & 0xFF; - final long byte7 = blocks[blocksOffset++] & 0xFF; - final long byte8 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte4 & 63) << 28) | (byte5 << 20) | (byte6 << 12) | (byte7 << 4) | (byte8 >>> 4); - final long byte9 = blocks[blocksOffset++] & 0xFF; - final long byte10 = blocks[blocksOffset++] & 0xFF; - final long byte11 = blocks[blocksOffset++] & 0xFF; - final long byte12 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte8 & 15) << 30) | (byte9 << 22) | (byte10 << 14) | (byte11 << 6) | (byte12 >>> 2); - final long byte13 = blocks[blocksOffset++] & 0xFF; - final long byte14 = blocks[blocksOffset++] & 0xFF; - final long byte15 = blocks[blocksOffset++] & 0xFF; - final long byte16 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte12 & 3) << 32) | (byte13 << 24) | (byte14 << 16) | (byte15 << 8) | byte16; - final long byte17 = blocks[blocksOffset++] & 0xFF; - final long byte18 = blocks[blocksOffset++] & 0xFF; - final long byte19 = blocks[blocksOffset++] & 0xFF; - final long byte20 = blocks[blocksOffset++] & 0xFF; - final long byte21 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte17 << 26) | (byte18 << 18) | (byte19 << 10) | (byte20 << 2) | (byte21 >>> 6); - final long byte22 = blocks[blocksOffset++] & 0xFF; - final long byte23 = blocks[blocksOffset++] & 0xFF; - final long byte24 = blocks[blocksOffset++] & 0xFF; - final long byte25 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte21 & 63) << 28) | (byte22 << 20) | (byte23 << 12) | (byte24 << 4) | (byte25 >>> 4); - final long byte26 = blocks[blocksOffset++] & 0xFF; - final long byte27 = blocks[blocksOffset++] & 0xFF; - final long byte28 = blocks[blocksOffset++] & 0xFF; - final long byte29 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte25 & 15) << 30) | (byte26 << 22) | (byte27 << 14) | (byte28 << 6) | (byte29 >>> 2); - final long byte30 = blocks[blocksOffset++] & 0xFF; - final long byte31 = blocks[blocksOffset++] & 0xFF; - final long byte32 = blocks[blocksOffset++] & 0xFF; - final long byte33 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte29 & 3) << 32) | (byte30 << 24) | (byte31 << 16) | (byte32 << 8) | byte33; - final long byte34 = blocks[blocksOffset++] & 0xFF; - final long byte35 = blocks[blocksOffset++] & 0xFF; - final long byte36 = blocks[blocksOffset++] & 0xFF; - final long byte37 = blocks[blocksOffset++] & 0xFF; - final long byte38 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte34 << 26) | (byte35 << 18) | (byte36 << 10) | (byte37 << 2) | (byte38 >>> 6); - final long byte39 = blocks[blocksOffset++] & 0xFF; - final long byte40 = blocks[blocksOffset++] & 0xFF; - final long byte41 = blocks[blocksOffset++] & 0xFF; - final long byte42 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte38 & 63) << 28) | (byte39 << 20) | (byte40 << 12) | (byte41 << 4) | (byte42 >>> 4); - final long byte43 = blocks[blocksOffset++] & 0xFF; - final long byte44 = blocks[blocksOffset++] & 0xFF; - final long byte45 = blocks[blocksOffset++] & 0xFF; - final long byte46 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte42 & 15) << 30) | (byte43 << 22) | (byte44 << 14) | (byte45 << 6) | (byte46 >>> 2); - final long byte47 = blocks[blocksOffset++] & 0xFF; - final long byte48 = blocks[blocksOffset++] & 0xFF; - final long byte49 = blocks[blocksOffset++] & 0xFF; - final long byte50 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte46 & 3) << 32) | (byte47 << 24) | (byte48 << 16) | (byte49 << 8) | byte50; - final long byte51 = blocks[blocksOffset++] & 0xFF; - final long byte52 = blocks[blocksOffset++] & 0xFF; - final long byte53 = blocks[blocksOffset++] & 0xFF; - final long byte54 = blocks[blocksOffset++] & 0xFF; - final long byte55 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte51 << 26) | (byte52 << 18) | (byte53 << 10) | (byte54 << 2) | (byte55 >>> 6); - final long byte56 = blocks[blocksOffset++] & 0xFF; - final long byte57 = blocks[blocksOffset++] & 0xFF; - final long byte58 = blocks[blocksOffset++] & 0xFF; - final long byte59 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte55 & 63) << 28) | (byte56 << 20) | (byte57 << 12) | (byte58 << 4) | (byte59 >>> 4); - final long byte60 = blocks[blocksOffset++] & 0xFF; - final long byte61 = blocks[blocksOffset++] & 0xFF; - final long byte62 = blocks[blocksOffset++] & 0xFF; - final long byte63 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte59 & 15) << 30) | (byte60 << 22) | (byte61 << 14) | (byte62 << 6) | (byte63 >>> 2); - final long byte64 = blocks[blocksOffset++] & 0xFF; - final long byte65 = blocks[blocksOffset++] & 0xFF; - final long byte66 = blocks[blocksOffset++] & 0xFF; - final long byte67 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte63 & 3) << 32) | (byte64 << 24) | (byte65 << 16) | (byte66 << 8) | byte67; - final long byte68 = blocks[blocksOffset++] & 0xFF; - final long byte69 = blocks[blocksOffset++] & 0xFF; - final long byte70 = blocks[blocksOffset++] & 0xFF; - final long byte71 = blocks[blocksOffset++] & 0xFF; - final long byte72 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte68 << 26) | (byte69 << 18) | (byte70 << 10) | (byte71 << 2) | (byte72 >>> 6); - final long byte73 = blocks[blocksOffset++] & 0xFF; - final long byte74 = blocks[blocksOffset++] & 0xFF; - final long byte75 = blocks[blocksOffset++] & 0xFF; - final long byte76 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte72 & 63) << 28) | (byte73 << 20) | (byte74 << 12) | (byte75 << 4) | (byte76 >>> 4); - final long byte77 = blocks[blocksOffset++] & 0xFF; - final long byte78 = blocks[blocksOffset++] & 0xFF; - final long byte79 = blocks[blocksOffset++] & 0xFF; - final long byte80 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte76 & 15) << 30) | (byte77 << 22) | (byte78 << 14) | (byte79 << 6) | (byte80 >>> 2); - final long byte81 = blocks[blocksOffset++] & 0xFF; - final long byte82 = blocks[blocksOffset++] & 0xFF; - final long byte83 = blocks[blocksOffset++] & 0xFF; - final long byte84 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte80 & 3) << 32) | (byte81 << 24) | (byte82 << 16) | (byte83 << 8) | byte84; - final long byte85 = blocks[blocksOffset++] & 0xFF; - final long byte86 = blocks[blocksOffset++] & 0xFF; - final long byte87 = blocks[blocksOffset++] & 0xFF; - final long byte88 = blocks[blocksOffset++] & 0xFF; - final long byte89 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte85 << 26) | (byte86 << 18) | (byte87 << 10) | (byte88 << 2) | (byte89 >>> 6); - final long byte90 = blocks[blocksOffset++] & 0xFF; - final long byte91 = blocks[blocksOffset++] & 0xFF; - final long byte92 = blocks[blocksOffset++] & 0xFF; - final long byte93 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte89 & 63) << 28) | (byte90 << 20) | (byte91 << 12) | (byte92 << 4) | (byte93 >>> 4); - final long byte94 = blocks[blocksOffset++] & 0xFF; - final long byte95 = blocks[blocksOffset++] & 0xFF; - final long byte96 = blocks[blocksOffset++] & 0xFF; - final long byte97 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte93 & 15) << 30) | (byte94 << 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; - final long byte101 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte97 & 3) << 32) | (byte98 << 24) | (byte99 << 16) | (byte100 << 8) | byte101; - final long byte102 = blocks[blocksOffset++] & 0xFF; - final long byte103 = blocks[blocksOffset++] & 0xFF; - final long byte104 = blocks[blocksOffset++] & 0xFF; - final long byte105 = blocks[blocksOffset++] & 0xFF; - final long byte106 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte102 << 26) | (byte103 << 18) | (byte104 << 10) | (byte105 << 2) | (byte106 >>> 6); - final long byte107 = blocks[blocksOffset++] & 0xFF; - final long byte108 = blocks[blocksOffset++] & 0xFF; - final long byte109 = blocks[blocksOffset++] & 0xFF; - final long byte110 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte106 & 63) << 28) | (byte107 << 20) | (byte108 << 12) | (byte109 << 4) | (byte110 >>> 4); - final long byte111 = blocks[blocksOffset++] & 0xFF; - final long byte112 = blocks[blocksOffset++] & 0xFF; - final long byte113 = blocks[blocksOffset++] & 0xFF; - final long byte114 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte110 & 15) << 30) | (byte111 << 22) | (byte112 << 14) | (byte113 << 6) | (byte114 >>> 2); - final long byte115 = blocks[blocksOffset++] & 0xFF; - final long byte116 = blocks[blocksOffset++] & 0xFF; - final long byte117 = blocks[blocksOffset++] & 0xFF; - final long byte118 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte114 & 3) << 32) | (byte115 << 24) | (byte116 << 16) | (byte117 << 8) | byte118; - final long byte119 = blocks[blocksOffset++] & 0xFF; - final long byte120 = blocks[blocksOffset++] & 0xFF; - final long byte121 = blocks[blocksOffset++] & 0xFF; - final long byte122 = blocks[blocksOffset++] & 0xFF; - final long byte123 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte119 << 26) | (byte120 << 18) | (byte121 << 10) | (byte122 << 2) | (byte123 >>> 6); - final long byte124 = blocks[blocksOffset++] & 0xFF; - final long byte125 = blocks[blocksOffset++] & 0xFF; - final long byte126 = blocks[blocksOffset++] & 0xFF; - final long byte127 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte123 & 63) << 28) | (byte124 << 20) | (byte125 << 12) | (byte126 << 4) | (byte127 >>> 4); - final long byte128 = blocks[blocksOffset++] & 0xFF; - final long byte129 = blocks[blocksOffset++] & 0xFF; - final long byte130 = blocks[blocksOffset++] & 0xFF; - final long byte131 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte127 & 15) << 30) | (byte128 << 22) | (byte129 << 14) | (byte130 << 6) | (byte131 >>> 2); - final long byte132 = blocks[blocksOffset++] & 0xFF; - final long byte133 = blocks[blocksOffset++] & 0xFF; - final long byte134 = blocks[blocksOffset++] & 0xFF; - final long byte135 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte131 & 3) << 32) | (byte132 << 24) | (byte133 << 16) | (byte134 << 8) | byte135; - } - } - - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 30) | ((values[valuesOffset] & 0xffffffffL) >>> 4); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 60) | ((values[valuesOffset++] & 0xffffffffL) << 26) | ((values[valuesOffset] & 0xffffffffL) >>> 8); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 56) | ((values[valuesOffset++] & 0xffffffffL) << 22) | ((values[valuesOffset] & 0xffffffffL) >>> 12); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 52) | ((values[valuesOffset++] & 0xffffffffL) << 18) | ((values[valuesOffset] & 0xffffffffL) >>> 16); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 48) | ((values[valuesOffset++] & 0xffffffffL) << 14) | ((values[valuesOffset] & 0xffffffffL) >>> 20); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 44) | ((values[valuesOffset++] & 0xffffffffL) << 10) | ((values[valuesOffset] & 0xffffffffL) >>> 24); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 40) | ((values[valuesOffset++] & 0xffffffffL) << 6) | ((values[valuesOffset] & 0xffffffffL) >>> 28); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 36) | ((values[valuesOffset++] & 0xffffffffL) << 2) | ((values[valuesOffset] & 0xffffffffL) >>> 32); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 32) | ((values[valuesOffset] & 0xffffffffL) >>> 2); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 62) | ((values[valuesOffset++] & 0xffffffffL) << 28) | ((values[valuesOffset] & 0xffffffffL) >>> 6); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 58) | ((values[valuesOffset++] & 0xffffffffL) << 24) | ((values[valuesOffset] & 0xffffffffL) >>> 10); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 54) | ((values[valuesOffset++] & 0xffffffffL) << 20) | ((values[valuesOffset] & 0xffffffffL) >>> 14); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 50) | ((values[valuesOffset++] & 0xffffffffL) << 16) | ((values[valuesOffset] & 0xffffffffL) >>> 18); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 46) | ((values[valuesOffset++] & 0xffffffffL) << 12) | ((values[valuesOffset] & 0xffffffffL) >>> 22); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 42) | ((values[valuesOffset++] & 0xffffffffL) << 8) | ((values[valuesOffset] & 0xffffffffL) >>> 26); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 38) | ((values[valuesOffset++] & 0xffffffffL) << 4) | ((values[valuesOffset] & 0xffffffffL) >>> 30); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 34) | (values[valuesOffset++] & 0xffffffffL); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] << 30) | (values[valuesOffset] >>> 4); - blocks[blocksOffset++] = (values[valuesOffset++] << 60) | (values[valuesOffset++] << 26) | (values[valuesOffset] >>> 8); - blocks[blocksOffset++] = (values[valuesOffset++] << 56) | (values[valuesOffset++] << 22) | (values[valuesOffset] >>> 12); - blocks[blocksOffset++] = (values[valuesOffset++] << 52) | (values[valuesOffset++] << 18) | (values[valuesOffset] >>> 16); - blocks[blocksOffset++] = (values[valuesOffset++] << 48) | (values[valuesOffset++] << 14) | (values[valuesOffset] >>> 20); - blocks[blocksOffset++] = (values[valuesOffset++] << 44) | (values[valuesOffset++] << 10) | (values[valuesOffset] >>> 24); - blocks[blocksOffset++] = (values[valuesOffset++] << 40) | (values[valuesOffset++] << 6) | (values[valuesOffset] >>> 28); - blocks[blocksOffset++] = (values[valuesOffset++] << 36) | (values[valuesOffset++] << 2) | (values[valuesOffset] >>> 32); - blocks[blocksOffset++] = (values[valuesOffset++] << 32) | (values[valuesOffset] >>> 2); - blocks[blocksOffset++] = (values[valuesOffset++] << 62) | (values[valuesOffset++] << 28) | (values[valuesOffset] >>> 6); - blocks[blocksOffset++] = (values[valuesOffset++] << 58) | (values[valuesOffset++] << 24) | (values[valuesOffset] >>> 10); - blocks[blocksOffset++] = (values[valuesOffset++] << 54) | (values[valuesOffset++] << 20) | (values[valuesOffset] >>> 14); - blocks[blocksOffset++] = (values[valuesOffset++] << 50) | (values[valuesOffset++] << 16) | (values[valuesOffset] >>> 18); - blocks[blocksOffset++] = (values[valuesOffset++] << 46) | (values[valuesOffset++] << 12) | (values[valuesOffset] >>> 22); - blocks[blocksOffset++] = (values[valuesOffset++] << 42) | (values[valuesOffset++] << 8) | (values[valuesOffset] >>> 26); - blocks[blocksOffset++] = (values[valuesOffset++] << 38) | (values[valuesOffset++] << 4) | (values[valuesOffset] >>> 30); - blocks[blocksOffset++] = (values[valuesOffset++] << 34) | values[valuesOffset++]; - } - } - -} diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked35.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked35.java deleted file mode 100644 index ffc4560078e..00000000000 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked35.java +++ /dev/null @@ -1,591 +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 BulkOperationPacked35 extends BulkOperation { - @Override - public int blockCount() { - return 35; - } - - @Override - public int valueCount() { - return 64; - } - - @Override - public void decode(long[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) { - throw new UnsupportedOperationException(); - } - - @Override - public void decode(byte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) { - throw new UnsupportedOperationException(); - } - - @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 >>> 29; - final long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block0 & 536870911L) << 6) | (block1 >>> 58); - values[valuesOffset++] = (block1 >>> 23) & 34359738367L; - final long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block1 & 8388607L) << 12) | (block2 >>> 52); - values[valuesOffset++] = (block2 >>> 17) & 34359738367L; - final long block3 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block2 & 131071L) << 18) | (block3 >>> 46); - values[valuesOffset++] = (block3 >>> 11) & 34359738367L; - final long block4 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block3 & 2047L) << 24) | (block4 >>> 40); - values[valuesOffset++] = (block4 >>> 5) & 34359738367L; - final long block5 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block4 & 31L) << 30) | (block5 >>> 34); - final long block6 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block5 & 17179869183L) << 1) | (block6 >>> 63); - values[valuesOffset++] = (block6 >>> 28) & 34359738367L; - final long block7 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block6 & 268435455L) << 7) | (block7 >>> 57); - values[valuesOffset++] = (block7 >>> 22) & 34359738367L; - final long block8 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block7 & 4194303L) << 13) | (block8 >>> 51); - values[valuesOffset++] = (block8 >>> 16) & 34359738367L; - final long block9 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block8 & 65535L) << 19) | (block9 >>> 45); - values[valuesOffset++] = (block9 >>> 10) & 34359738367L; - final long block10 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block9 & 1023L) << 25) | (block10 >>> 39); - values[valuesOffset++] = (block10 >>> 4) & 34359738367L; - final long block11 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block10 & 15L) << 31) | (block11 >>> 33); - final long block12 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block11 & 8589934591L) << 2) | (block12 >>> 62); - values[valuesOffset++] = (block12 >>> 27) & 34359738367L; - final long block13 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block12 & 134217727L) << 8) | (block13 >>> 56); - values[valuesOffset++] = (block13 >>> 21) & 34359738367L; - final long block14 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block13 & 2097151L) << 14) | (block14 >>> 50); - values[valuesOffset++] = (block14 >>> 15) & 34359738367L; - final long block15 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block14 & 32767L) << 20) | (block15 >>> 44); - values[valuesOffset++] = (block15 >>> 9) & 34359738367L; - final long block16 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block15 & 511L) << 26) | (block16 >>> 38); - values[valuesOffset++] = (block16 >>> 3) & 34359738367L; - final long block17 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block16 & 7L) << 32) | (block17 >>> 32); - final long block18 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block17 & 4294967295L) << 3) | (block18 >>> 61); - values[valuesOffset++] = (block18 >>> 26) & 34359738367L; - final long block19 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block18 & 67108863L) << 9) | (block19 >>> 55); - values[valuesOffset++] = (block19 >>> 20) & 34359738367L; - final long block20 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block19 & 1048575L) << 15) | (block20 >>> 49); - values[valuesOffset++] = (block20 >>> 14) & 34359738367L; - final long block21 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block20 & 16383L) << 21) | (block21 >>> 43); - values[valuesOffset++] = (block21 >>> 8) & 34359738367L; - final long block22 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block21 & 255L) << 27) | (block22 >>> 37); - values[valuesOffset++] = (block22 >>> 2) & 34359738367L; - final long block23 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block22 & 3L) << 33) | (block23 >>> 31); - final long block24 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block23 & 2147483647L) << 4) | (block24 >>> 60); - values[valuesOffset++] = (block24 >>> 25) & 34359738367L; - final long block25 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block24 & 33554431L) << 10) | (block25 >>> 54); - values[valuesOffset++] = (block25 >>> 19) & 34359738367L; - final long block26 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block25 & 524287L) << 16) | (block26 >>> 48); - values[valuesOffset++] = (block26 >>> 13) & 34359738367L; - final long block27 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block26 & 8191L) << 22) | (block27 >>> 42); - values[valuesOffset++] = (block27 >>> 7) & 34359738367L; - final long block28 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block27 & 127L) << 28) | (block28 >>> 36); - values[valuesOffset++] = (block28 >>> 1) & 34359738367L; - final long block29 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block28 & 1L) << 34) | (block29 >>> 30); - final long block30 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block29 & 1073741823L) << 5) | (block30 >>> 59); - values[valuesOffset++] = (block30 >>> 24) & 34359738367L; - final long block31 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block30 & 16777215L) << 11) | (block31 >>> 53); - values[valuesOffset++] = (block31 >>> 18) & 34359738367L; - final long block32 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block31 & 262143L) << 17) | (block32 >>> 47); - values[valuesOffset++] = (block32 >>> 12) & 34359738367L; - final long block33 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block32 & 4095L) << 23) | (block33 >>> 41); - values[valuesOffset++] = (block33 >>> 6) & 34359738367L; - final long block34 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block33 & 63L) << 29) | (block34 >>> 35); - values[valuesOffset++] = block34 & 34359738367L; - } - } - - @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; - final long byte3 = blocks[blocksOffset++] & 0xFF; - final long byte4 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte0 << 27) | (byte1 << 19) | (byte2 << 11) | (byte3 << 3) | (byte4 >>> 5); - final long byte5 = blocks[blocksOffset++] & 0xFF; - final long byte6 = blocks[blocksOffset++] & 0xFF; - final long byte7 = blocks[blocksOffset++] & 0xFF; - final long byte8 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte4 & 31) << 30) | (byte5 << 22) | (byte6 << 14) | (byte7 << 6) | (byte8 >>> 2); - final long byte9 = blocks[blocksOffset++] & 0xFF; - final long byte10 = blocks[blocksOffset++] & 0xFF; - final long byte11 = blocks[blocksOffset++] & 0xFF; - final long byte12 = blocks[blocksOffset++] & 0xFF; - final long byte13 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte8 & 3) << 33) | (byte9 << 25) | (byte10 << 17) | (byte11 << 9) | (byte12 << 1) | (byte13 >>> 7); - final long byte14 = blocks[blocksOffset++] & 0xFF; - final long byte15 = blocks[blocksOffset++] & 0xFF; - final long byte16 = blocks[blocksOffset++] & 0xFF; - final long byte17 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte13 & 127) << 28) | (byte14 << 20) | (byte15 << 12) | (byte16 << 4) | (byte17 >>> 4); - final long byte18 = blocks[blocksOffset++] & 0xFF; - final long byte19 = blocks[blocksOffset++] & 0xFF; - final long byte20 = blocks[blocksOffset++] & 0xFF; - final long byte21 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte17 & 15) << 31) | (byte18 << 23) | (byte19 << 15) | (byte20 << 7) | (byte21 >>> 1); - final long byte22 = blocks[blocksOffset++] & 0xFF; - final long byte23 = blocks[blocksOffset++] & 0xFF; - final long byte24 = blocks[blocksOffset++] & 0xFF; - final long byte25 = blocks[blocksOffset++] & 0xFF; - final long byte26 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte21 & 1) << 34) | (byte22 << 26) | (byte23 << 18) | (byte24 << 10) | (byte25 << 2) | (byte26 >>> 6); - final long byte27 = blocks[blocksOffset++] & 0xFF; - final long byte28 = blocks[blocksOffset++] & 0xFF; - final long byte29 = blocks[blocksOffset++] & 0xFF; - final long byte30 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte26 & 63) << 29) | (byte27 << 21) | (byte28 << 13) | (byte29 << 5) | (byte30 >>> 3); - final long byte31 = blocks[blocksOffset++] & 0xFF; - final long byte32 = blocks[blocksOffset++] & 0xFF; - final long byte33 = blocks[blocksOffset++] & 0xFF; - final long byte34 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte30 & 7) << 32) | (byte31 << 24) | (byte32 << 16) | (byte33 << 8) | byte34; - final long byte35 = blocks[blocksOffset++] & 0xFF; - final long byte36 = blocks[blocksOffset++] & 0xFF; - final long byte37 = blocks[blocksOffset++] & 0xFF; - final long byte38 = blocks[blocksOffset++] & 0xFF; - final long byte39 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte35 << 27) | (byte36 << 19) | (byte37 << 11) | (byte38 << 3) | (byte39 >>> 5); - final long byte40 = blocks[blocksOffset++] & 0xFF; - final long byte41 = blocks[blocksOffset++] & 0xFF; - final long byte42 = blocks[blocksOffset++] & 0xFF; - final long byte43 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte39 & 31) << 30) | (byte40 << 22) | (byte41 << 14) | (byte42 << 6) | (byte43 >>> 2); - final long byte44 = blocks[blocksOffset++] & 0xFF; - final long byte45 = blocks[blocksOffset++] & 0xFF; - final long byte46 = blocks[blocksOffset++] & 0xFF; - final long byte47 = blocks[blocksOffset++] & 0xFF; - final long byte48 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte43 & 3) << 33) | (byte44 << 25) | (byte45 << 17) | (byte46 << 9) | (byte47 << 1) | (byte48 >>> 7); - final long byte49 = blocks[blocksOffset++] & 0xFF; - final long byte50 = blocks[blocksOffset++] & 0xFF; - final long byte51 = blocks[blocksOffset++] & 0xFF; - final long byte52 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte48 & 127) << 28) | (byte49 << 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; - final long byte56 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte52 & 15) << 31) | (byte53 << 23) | (byte54 << 15) | (byte55 << 7) | (byte56 >>> 1); - final long byte57 = blocks[blocksOffset++] & 0xFF; - final long byte58 = blocks[blocksOffset++] & 0xFF; - final long byte59 = blocks[blocksOffset++] & 0xFF; - final long byte60 = blocks[blocksOffset++] & 0xFF; - final long byte61 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte56 & 1) << 34) | (byte57 << 26) | (byte58 << 18) | (byte59 << 10) | (byte60 << 2) | (byte61 >>> 6); - final long byte62 = blocks[blocksOffset++] & 0xFF; - final long byte63 = blocks[blocksOffset++] & 0xFF; - final long byte64 = blocks[blocksOffset++] & 0xFF; - final long byte65 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte61 & 63) << 29) | (byte62 << 21) | (byte63 << 13) | (byte64 << 5) | (byte65 >>> 3); - final long byte66 = blocks[blocksOffset++] & 0xFF; - final long byte67 = blocks[blocksOffset++] & 0xFF; - final long byte68 = blocks[blocksOffset++] & 0xFF; - final long byte69 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte65 & 7) << 32) | (byte66 << 24) | (byte67 << 16) | (byte68 << 8) | byte69; - final long byte70 = blocks[blocksOffset++] & 0xFF; - final long byte71 = blocks[blocksOffset++] & 0xFF; - final long byte72 = blocks[blocksOffset++] & 0xFF; - final long byte73 = blocks[blocksOffset++] & 0xFF; - final long byte74 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte70 << 27) | (byte71 << 19) | (byte72 << 11) | (byte73 << 3) | (byte74 >>> 5); - final long byte75 = blocks[blocksOffset++] & 0xFF; - final long byte76 = blocks[blocksOffset++] & 0xFF; - final long byte77 = blocks[blocksOffset++] & 0xFF; - final long byte78 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte74 & 31) << 30) | (byte75 << 22) | (byte76 << 14) | (byte77 << 6) | (byte78 >>> 2); - final long byte79 = blocks[blocksOffset++] & 0xFF; - final long byte80 = blocks[blocksOffset++] & 0xFF; - final long byte81 = blocks[blocksOffset++] & 0xFF; - final long byte82 = blocks[blocksOffset++] & 0xFF; - final long byte83 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte78 & 3) << 33) | (byte79 << 25) | (byte80 << 17) | (byte81 << 9) | (byte82 << 1) | (byte83 >>> 7); - final long byte84 = blocks[blocksOffset++] & 0xFF; - final long byte85 = blocks[blocksOffset++] & 0xFF; - final long byte86 = blocks[blocksOffset++] & 0xFF; - final long byte87 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte83 & 127) << 28) | (byte84 << 20) | (byte85 << 12) | (byte86 << 4) | (byte87 >>> 4); - final long byte88 = blocks[blocksOffset++] & 0xFF; - final long byte89 = blocks[blocksOffset++] & 0xFF; - final long byte90 = blocks[blocksOffset++] & 0xFF; - final long byte91 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte87 & 15) << 31) | (byte88 << 23) | (byte89 << 15) | (byte90 << 7) | (byte91 >>> 1); - final long byte92 = blocks[blocksOffset++] & 0xFF; - final long byte93 = blocks[blocksOffset++] & 0xFF; - final long byte94 = blocks[blocksOffset++] & 0xFF; - final long byte95 = blocks[blocksOffset++] & 0xFF; - final long byte96 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte91 & 1) << 34) | (byte92 << 26) | (byte93 << 18) | (byte94 << 10) | (byte95 << 2) | (byte96 >>> 6); - final long byte97 = blocks[blocksOffset++] & 0xFF; - final long byte98 = blocks[blocksOffset++] & 0xFF; - final long byte99 = blocks[blocksOffset++] & 0xFF; - final long byte100 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte96 & 63) << 29) | (byte97 << 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; - final long byte104 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte100 & 7) << 32) | (byte101 << 24) | (byte102 << 16) | (byte103 << 8) | byte104; - final long byte105 = blocks[blocksOffset++] & 0xFF; - final long byte106 = blocks[blocksOffset++] & 0xFF; - final long byte107 = blocks[blocksOffset++] & 0xFF; - final long byte108 = blocks[blocksOffset++] & 0xFF; - final long byte109 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte105 << 27) | (byte106 << 19) | (byte107 << 11) | (byte108 << 3) | (byte109 >>> 5); - final long byte110 = blocks[blocksOffset++] & 0xFF; - final long byte111 = blocks[blocksOffset++] & 0xFF; - final long byte112 = blocks[blocksOffset++] & 0xFF; - final long byte113 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte109 & 31) << 30) | (byte110 << 22) | (byte111 << 14) | (byte112 << 6) | (byte113 >>> 2); - final long byte114 = blocks[blocksOffset++] & 0xFF; - final long byte115 = blocks[blocksOffset++] & 0xFF; - final long byte116 = blocks[blocksOffset++] & 0xFF; - final long byte117 = blocks[blocksOffset++] & 0xFF; - final long byte118 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte113 & 3) << 33) | (byte114 << 25) | (byte115 << 17) | (byte116 << 9) | (byte117 << 1) | (byte118 >>> 7); - final long byte119 = blocks[blocksOffset++] & 0xFF; - final long byte120 = blocks[blocksOffset++] & 0xFF; - final long byte121 = blocks[blocksOffset++] & 0xFF; - final long byte122 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte118 & 127) << 28) | (byte119 << 20) | (byte120 << 12) | (byte121 << 4) | (byte122 >>> 4); - final long byte123 = blocks[blocksOffset++] & 0xFF; - final long byte124 = blocks[blocksOffset++] & 0xFF; - final long byte125 = blocks[blocksOffset++] & 0xFF; - final long byte126 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte122 & 15) << 31) | (byte123 << 23) | (byte124 << 15) | (byte125 << 7) | (byte126 >>> 1); - final long byte127 = blocks[blocksOffset++] & 0xFF; - final long byte128 = blocks[blocksOffset++] & 0xFF; - final long byte129 = blocks[blocksOffset++] & 0xFF; - final long byte130 = blocks[blocksOffset++] & 0xFF; - final long byte131 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte126 & 1) << 34) | (byte127 << 26) | (byte128 << 18) | (byte129 << 10) | (byte130 << 2) | (byte131 >>> 6); - final long byte132 = blocks[blocksOffset++] & 0xFF; - final long byte133 = blocks[blocksOffset++] & 0xFF; - final long byte134 = blocks[blocksOffset++] & 0xFF; - final long byte135 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte131 & 63) << 29) | (byte132 << 21) | (byte133 << 13) | (byte134 << 5) | (byte135 >>> 3); - final long byte136 = blocks[blocksOffset++] & 0xFF; - final long byte137 = blocks[blocksOffset++] & 0xFF; - final long byte138 = blocks[blocksOffset++] & 0xFF; - final long byte139 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte135 & 7) << 32) | (byte136 << 24) | (byte137 << 16) | (byte138 << 8) | byte139; - final long byte140 = blocks[blocksOffset++] & 0xFF; - final long byte141 = blocks[blocksOffset++] & 0xFF; - final long byte142 = blocks[blocksOffset++] & 0xFF; - final long byte143 = blocks[blocksOffset++] & 0xFF; - final long byte144 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte140 << 27) | (byte141 << 19) | (byte142 << 11) | (byte143 << 3) | (byte144 >>> 5); - final long byte145 = blocks[blocksOffset++] & 0xFF; - final long byte146 = blocks[blocksOffset++] & 0xFF; - final long byte147 = blocks[blocksOffset++] & 0xFF; - final long byte148 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte144 & 31) << 30) | (byte145 << 22) | (byte146 << 14) | (byte147 << 6) | (byte148 >>> 2); - final long byte149 = blocks[blocksOffset++] & 0xFF; - final long byte150 = blocks[blocksOffset++] & 0xFF; - final long byte151 = blocks[blocksOffset++] & 0xFF; - final long byte152 = blocks[blocksOffset++] & 0xFF; - final long byte153 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte148 & 3) << 33) | (byte149 << 25) | (byte150 << 17) | (byte151 << 9) | (byte152 << 1) | (byte153 >>> 7); - final long byte154 = blocks[blocksOffset++] & 0xFF; - final long byte155 = blocks[blocksOffset++] & 0xFF; - final long byte156 = blocks[blocksOffset++] & 0xFF; - final long byte157 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte153 & 127) << 28) | (byte154 << 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; - final long byte161 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte157 & 15) << 31) | (byte158 << 23) | (byte159 << 15) | (byte160 << 7) | (byte161 >>> 1); - final long byte162 = blocks[blocksOffset++] & 0xFF; - final long byte163 = blocks[blocksOffset++] & 0xFF; - final long byte164 = blocks[blocksOffset++] & 0xFF; - final long byte165 = blocks[blocksOffset++] & 0xFF; - final long byte166 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte161 & 1) << 34) | (byte162 << 26) | (byte163 << 18) | (byte164 << 10) | (byte165 << 2) | (byte166 >>> 6); - final long byte167 = blocks[blocksOffset++] & 0xFF; - final long byte168 = blocks[blocksOffset++] & 0xFF; - final long byte169 = blocks[blocksOffset++] & 0xFF; - final long byte170 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte166 & 63) << 29) | (byte167 << 21) | (byte168 << 13) | (byte169 << 5) | (byte170 >>> 3); - final long byte171 = blocks[blocksOffset++] & 0xFF; - final long byte172 = blocks[blocksOffset++] & 0xFF; - final long byte173 = blocks[blocksOffset++] & 0xFF; - final long byte174 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte170 & 7) << 32) | (byte171 << 24) | (byte172 << 16) | (byte173 << 8) | byte174; - final long byte175 = blocks[blocksOffset++] & 0xFF; - final long byte176 = blocks[blocksOffset++] & 0xFF; - final long byte177 = blocks[blocksOffset++] & 0xFF; - final long byte178 = blocks[blocksOffset++] & 0xFF; - final long byte179 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte175 << 27) | (byte176 << 19) | (byte177 << 11) | (byte178 << 3) | (byte179 >>> 5); - final long byte180 = blocks[blocksOffset++] & 0xFF; - final long byte181 = blocks[blocksOffset++] & 0xFF; - final long byte182 = blocks[blocksOffset++] & 0xFF; - final long byte183 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte179 & 31) << 30) | (byte180 << 22) | (byte181 << 14) | (byte182 << 6) | (byte183 >>> 2); - final long byte184 = blocks[blocksOffset++] & 0xFF; - final long byte185 = blocks[blocksOffset++] & 0xFF; - final long byte186 = blocks[blocksOffset++] & 0xFF; - final long byte187 = blocks[blocksOffset++] & 0xFF; - final long byte188 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte183 & 3) << 33) | (byte184 << 25) | (byte185 << 17) | (byte186 << 9) | (byte187 << 1) | (byte188 >>> 7); - final long byte189 = blocks[blocksOffset++] & 0xFF; - final long byte190 = blocks[blocksOffset++] & 0xFF; - final long byte191 = blocks[blocksOffset++] & 0xFF; - final long byte192 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte188 & 127) << 28) | (byte189 << 20) | (byte190 << 12) | (byte191 << 4) | (byte192 >>> 4); - final long byte193 = blocks[blocksOffset++] & 0xFF; - final long byte194 = blocks[blocksOffset++] & 0xFF; - final long byte195 = blocks[blocksOffset++] & 0xFF; - final long byte196 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte192 & 15) << 31) | (byte193 << 23) | (byte194 << 15) | (byte195 << 7) | (byte196 >>> 1); - final long byte197 = blocks[blocksOffset++] & 0xFF; - final long byte198 = blocks[blocksOffset++] & 0xFF; - final long byte199 = blocks[blocksOffset++] & 0xFF; - final long byte200 = blocks[blocksOffset++] & 0xFF; - final long byte201 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte196 & 1) << 34) | (byte197 << 26) | (byte198 << 18) | (byte199 << 10) | (byte200 << 2) | (byte201 >>> 6); - final long byte202 = blocks[blocksOffset++] & 0xFF; - final long byte203 = blocks[blocksOffset++] & 0xFF; - final long byte204 = blocks[blocksOffset++] & 0xFF; - final long byte205 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte201 & 63) << 29) | (byte202 << 21) | (byte203 << 13) | (byte204 << 5) | (byte205 >>> 3); - final long byte206 = blocks[blocksOffset++] & 0xFF; - final long byte207 = blocks[blocksOffset++] & 0xFF; - final long byte208 = blocks[blocksOffset++] & 0xFF; - final long byte209 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte205 & 7) << 32) | (byte206 << 24) | (byte207 << 16) | (byte208 << 8) | byte209; - final long byte210 = blocks[blocksOffset++] & 0xFF; - final long byte211 = blocks[blocksOffset++] & 0xFF; - final long byte212 = blocks[blocksOffset++] & 0xFF; - final long byte213 = blocks[blocksOffset++] & 0xFF; - final long byte214 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte210 << 27) | (byte211 << 19) | (byte212 << 11) | (byte213 << 3) | (byte214 >>> 5); - final long byte215 = blocks[blocksOffset++] & 0xFF; - final long byte216 = blocks[blocksOffset++] & 0xFF; - final long byte217 = blocks[blocksOffset++] & 0xFF; - final long byte218 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte214 & 31) << 30) | (byte215 << 22) | (byte216 << 14) | (byte217 << 6) | (byte218 >>> 2); - final long byte219 = blocks[blocksOffset++] & 0xFF; - final long byte220 = blocks[blocksOffset++] & 0xFF; - final long byte221 = blocks[blocksOffset++] & 0xFF; - final long byte222 = blocks[blocksOffset++] & 0xFF; - final long byte223 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte218 & 3) << 33) | (byte219 << 25) | (byte220 << 17) | (byte221 << 9) | (byte222 << 1) | (byte223 >>> 7); - final long byte224 = blocks[blocksOffset++] & 0xFF; - final long byte225 = blocks[blocksOffset++] & 0xFF; - final long byte226 = blocks[blocksOffset++] & 0xFF; - final long byte227 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte223 & 127) << 28) | (byte224 << 20) | (byte225 << 12) | (byte226 << 4) | (byte227 >>> 4); - final long byte228 = blocks[blocksOffset++] & 0xFF; - final long byte229 = blocks[blocksOffset++] & 0xFF; - final long byte230 = blocks[blocksOffset++] & 0xFF; - final long byte231 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte227 & 15) << 31) | (byte228 << 23) | (byte229 << 15) | (byte230 << 7) | (byte231 >>> 1); - final long byte232 = blocks[blocksOffset++] & 0xFF; - final long byte233 = blocks[blocksOffset++] & 0xFF; - final long byte234 = blocks[blocksOffset++] & 0xFF; - final long byte235 = blocks[blocksOffset++] & 0xFF; - final long byte236 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte231 & 1) << 34) | (byte232 << 26) | (byte233 << 18) | (byte234 << 10) | (byte235 << 2) | (byte236 >>> 6); - final long byte237 = blocks[blocksOffset++] & 0xFF; - final long byte238 = blocks[blocksOffset++] & 0xFF; - final long byte239 = blocks[blocksOffset++] & 0xFF; - final long byte240 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte236 & 63) << 29) | (byte237 << 21) | (byte238 << 13) | (byte239 << 5) | (byte240 >>> 3); - final long byte241 = blocks[blocksOffset++] & 0xFF; - final long byte242 = blocks[blocksOffset++] & 0xFF; - final long byte243 = blocks[blocksOffset++] & 0xFF; - final long byte244 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte240 & 7) << 32) | (byte241 << 24) | (byte242 << 16) | (byte243 << 8) | byte244; - final long byte245 = blocks[blocksOffset++] & 0xFF; - final long byte246 = blocks[blocksOffset++] & 0xFF; - final long byte247 = blocks[blocksOffset++] & 0xFF; - final long byte248 = blocks[blocksOffset++] & 0xFF; - final long byte249 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte245 << 27) | (byte246 << 19) | (byte247 << 11) | (byte248 << 3) | (byte249 >>> 5); - final long byte250 = blocks[blocksOffset++] & 0xFF; - final long byte251 = blocks[blocksOffset++] & 0xFF; - final long byte252 = blocks[blocksOffset++] & 0xFF; - final long byte253 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte249 & 31) << 30) | (byte250 << 22) | (byte251 << 14) | (byte252 << 6) | (byte253 >>> 2); - final long byte254 = blocks[blocksOffset++] & 0xFF; - final long byte255 = blocks[blocksOffset++] & 0xFF; - final long byte256 = blocks[blocksOffset++] & 0xFF; - final long byte257 = blocks[blocksOffset++] & 0xFF; - final long byte258 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte253 & 3) << 33) | (byte254 << 25) | (byte255 << 17) | (byte256 << 9) | (byte257 << 1) | (byte258 >>> 7); - final long byte259 = blocks[blocksOffset++] & 0xFF; - final long byte260 = blocks[blocksOffset++] & 0xFF; - final long byte261 = blocks[blocksOffset++] & 0xFF; - final long byte262 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte258 & 127) << 28) | (byte259 << 20) | (byte260 << 12) | (byte261 << 4) | (byte262 >>> 4); - final long byte263 = blocks[blocksOffset++] & 0xFF; - final long byte264 = blocks[blocksOffset++] & 0xFF; - final long byte265 = blocks[blocksOffset++] & 0xFF; - final long byte266 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte262 & 15) << 31) | (byte263 << 23) | (byte264 << 15) | (byte265 << 7) | (byte266 >>> 1); - final long byte267 = blocks[blocksOffset++] & 0xFF; - final long byte268 = blocks[blocksOffset++] & 0xFF; - final long byte269 = blocks[blocksOffset++] & 0xFF; - final long byte270 = blocks[blocksOffset++] & 0xFF; - final long byte271 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte266 & 1) << 34) | (byte267 << 26) | (byte268 << 18) | (byte269 << 10) | (byte270 << 2) | (byte271 >>> 6); - final long byte272 = blocks[blocksOffset++] & 0xFF; - final long byte273 = blocks[blocksOffset++] & 0xFF; - final long byte274 = blocks[blocksOffset++] & 0xFF; - final long byte275 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte271 & 63) << 29) | (byte272 << 21) | (byte273 << 13) | (byte274 << 5) | (byte275 >>> 3); - final long byte276 = blocks[blocksOffset++] & 0xFF; - final long byte277 = blocks[blocksOffset++] & 0xFF; - final long byte278 = blocks[blocksOffset++] & 0xFF; - final long byte279 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte275 & 7) << 32) | (byte276 << 24) | (byte277 << 16) | (byte278 << 8) | byte279; - } - } - - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 29) | ((values[valuesOffset] & 0xffffffffL) >>> 6); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 58) | ((values[valuesOffset++] & 0xffffffffL) << 23) | ((values[valuesOffset] & 0xffffffffL) >>> 12); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 52) | ((values[valuesOffset++] & 0xffffffffL) << 17) | ((values[valuesOffset] & 0xffffffffL) >>> 18); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 46) | ((values[valuesOffset++] & 0xffffffffL) << 11) | ((values[valuesOffset] & 0xffffffffL) >>> 24); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 40) | ((values[valuesOffset++] & 0xffffffffL) << 5) | ((values[valuesOffset] & 0xffffffffL) >>> 30); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 34) | ((values[valuesOffset] & 0xffffffffL) >>> 1); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 63) | ((values[valuesOffset++] & 0xffffffffL) << 28) | ((values[valuesOffset] & 0xffffffffL) >>> 7); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 57) | ((values[valuesOffset++] & 0xffffffffL) << 22) | ((values[valuesOffset] & 0xffffffffL) >>> 13); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 51) | ((values[valuesOffset++] & 0xffffffffL) << 16) | ((values[valuesOffset] & 0xffffffffL) >>> 19); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 45) | ((values[valuesOffset++] & 0xffffffffL) << 10) | ((values[valuesOffset] & 0xffffffffL) >>> 25); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 39) | ((values[valuesOffset++] & 0xffffffffL) << 4) | ((values[valuesOffset] & 0xffffffffL) >>> 31); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 33) | ((values[valuesOffset] & 0xffffffffL) >>> 2); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 62) | ((values[valuesOffset++] & 0xffffffffL) << 27) | ((values[valuesOffset] & 0xffffffffL) >>> 8); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 56) | ((values[valuesOffset++] & 0xffffffffL) << 21) | ((values[valuesOffset] & 0xffffffffL) >>> 14); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 50) | ((values[valuesOffset++] & 0xffffffffL) << 15) | ((values[valuesOffset] & 0xffffffffL) >>> 20); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 44) | ((values[valuesOffset++] & 0xffffffffL) << 9) | ((values[valuesOffset] & 0xffffffffL) >>> 26); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 38) | ((values[valuesOffset++] & 0xffffffffL) << 3) | ((values[valuesOffset] & 0xffffffffL) >>> 32); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 32) | ((values[valuesOffset] & 0xffffffffL) >>> 3); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 61) | ((values[valuesOffset++] & 0xffffffffL) << 26) | ((values[valuesOffset] & 0xffffffffL) >>> 9); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 55) | ((values[valuesOffset++] & 0xffffffffL) << 20) | ((values[valuesOffset] & 0xffffffffL) >>> 15); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 49) | ((values[valuesOffset++] & 0xffffffffL) << 14) | ((values[valuesOffset] & 0xffffffffL) >>> 21); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 43) | ((values[valuesOffset++] & 0xffffffffL) << 8) | ((values[valuesOffset] & 0xffffffffL) >>> 27); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 37) | ((values[valuesOffset++] & 0xffffffffL) << 2) | ((values[valuesOffset] & 0xffffffffL) >>> 33); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 31) | ((values[valuesOffset] & 0xffffffffL) >>> 4); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 60) | ((values[valuesOffset++] & 0xffffffffL) << 25) | ((values[valuesOffset] & 0xffffffffL) >>> 10); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 54) | ((values[valuesOffset++] & 0xffffffffL) << 19) | ((values[valuesOffset] & 0xffffffffL) >>> 16); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 48) | ((values[valuesOffset++] & 0xffffffffL) << 13) | ((values[valuesOffset] & 0xffffffffL) >>> 22); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 42) | ((values[valuesOffset++] & 0xffffffffL) << 7) | ((values[valuesOffset] & 0xffffffffL) >>> 28); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 36) | ((values[valuesOffset++] & 0xffffffffL) << 1) | ((values[valuesOffset] & 0xffffffffL) >>> 34); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 30) | ((values[valuesOffset] & 0xffffffffL) >>> 5); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 59) | ((values[valuesOffset++] & 0xffffffffL) << 24) | ((values[valuesOffset] & 0xffffffffL) >>> 11); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 53) | ((values[valuesOffset++] & 0xffffffffL) << 18) | ((values[valuesOffset] & 0xffffffffL) >>> 17); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 47) | ((values[valuesOffset++] & 0xffffffffL) << 12) | ((values[valuesOffset] & 0xffffffffL) >>> 23); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 41) | ((values[valuesOffset++] & 0xffffffffL) << 6) | ((values[valuesOffset] & 0xffffffffL) >>> 29); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 35) | (values[valuesOffset++] & 0xffffffffL); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] << 29) | (values[valuesOffset] >>> 6); - blocks[blocksOffset++] = (values[valuesOffset++] << 58) | (values[valuesOffset++] << 23) | (values[valuesOffset] >>> 12); - blocks[blocksOffset++] = (values[valuesOffset++] << 52) | (values[valuesOffset++] << 17) | (values[valuesOffset] >>> 18); - blocks[blocksOffset++] = (values[valuesOffset++] << 46) | (values[valuesOffset++] << 11) | (values[valuesOffset] >>> 24); - blocks[blocksOffset++] = (values[valuesOffset++] << 40) | (values[valuesOffset++] << 5) | (values[valuesOffset] >>> 30); - blocks[blocksOffset++] = (values[valuesOffset++] << 34) | (values[valuesOffset] >>> 1); - blocks[blocksOffset++] = (values[valuesOffset++] << 63) | (values[valuesOffset++] << 28) | (values[valuesOffset] >>> 7); - blocks[blocksOffset++] = (values[valuesOffset++] << 57) | (values[valuesOffset++] << 22) | (values[valuesOffset] >>> 13); - blocks[blocksOffset++] = (values[valuesOffset++] << 51) | (values[valuesOffset++] << 16) | (values[valuesOffset] >>> 19); - blocks[blocksOffset++] = (values[valuesOffset++] << 45) | (values[valuesOffset++] << 10) | (values[valuesOffset] >>> 25); - blocks[blocksOffset++] = (values[valuesOffset++] << 39) | (values[valuesOffset++] << 4) | (values[valuesOffset] >>> 31); - blocks[blocksOffset++] = (values[valuesOffset++] << 33) | (values[valuesOffset] >>> 2); - blocks[blocksOffset++] = (values[valuesOffset++] << 62) | (values[valuesOffset++] << 27) | (values[valuesOffset] >>> 8); - blocks[blocksOffset++] = (values[valuesOffset++] << 56) | (values[valuesOffset++] << 21) | (values[valuesOffset] >>> 14); - blocks[blocksOffset++] = (values[valuesOffset++] << 50) | (values[valuesOffset++] << 15) | (values[valuesOffset] >>> 20); - blocks[blocksOffset++] = (values[valuesOffset++] << 44) | (values[valuesOffset++] << 9) | (values[valuesOffset] >>> 26); - blocks[blocksOffset++] = (values[valuesOffset++] << 38) | (values[valuesOffset++] << 3) | (values[valuesOffset] >>> 32); - blocks[blocksOffset++] = (values[valuesOffset++] << 32) | (values[valuesOffset] >>> 3); - blocks[blocksOffset++] = (values[valuesOffset++] << 61) | (values[valuesOffset++] << 26) | (values[valuesOffset] >>> 9); - blocks[blocksOffset++] = (values[valuesOffset++] << 55) | (values[valuesOffset++] << 20) | (values[valuesOffset] >>> 15); - blocks[blocksOffset++] = (values[valuesOffset++] << 49) | (values[valuesOffset++] << 14) | (values[valuesOffset] >>> 21); - blocks[blocksOffset++] = (values[valuesOffset++] << 43) | (values[valuesOffset++] << 8) | (values[valuesOffset] >>> 27); - blocks[blocksOffset++] = (values[valuesOffset++] << 37) | (values[valuesOffset++] << 2) | (values[valuesOffset] >>> 33); - blocks[blocksOffset++] = (values[valuesOffset++] << 31) | (values[valuesOffset] >>> 4); - blocks[blocksOffset++] = (values[valuesOffset++] << 60) | (values[valuesOffset++] << 25) | (values[valuesOffset] >>> 10); - blocks[blocksOffset++] = (values[valuesOffset++] << 54) | (values[valuesOffset++] << 19) | (values[valuesOffset] >>> 16); - blocks[blocksOffset++] = (values[valuesOffset++] << 48) | (values[valuesOffset++] << 13) | (values[valuesOffset] >>> 22); - blocks[blocksOffset++] = (values[valuesOffset++] << 42) | (values[valuesOffset++] << 7) | (values[valuesOffset] >>> 28); - blocks[blocksOffset++] = (values[valuesOffset++] << 36) | (values[valuesOffset++] << 1) | (values[valuesOffset] >>> 34); - blocks[blocksOffset++] = (values[valuesOffset++] << 30) | (values[valuesOffset] >>> 5); - blocks[blocksOffset++] = (values[valuesOffset++] << 59) | (values[valuesOffset++] << 24) | (values[valuesOffset] >>> 11); - blocks[blocksOffset++] = (values[valuesOffset++] << 53) | (values[valuesOffset++] << 18) | (values[valuesOffset] >>> 17); - blocks[blocksOffset++] = (values[valuesOffset++] << 47) | (values[valuesOffset++] << 12) | (values[valuesOffset] >>> 23); - blocks[blocksOffset++] = (values[valuesOffset++] << 41) | (values[valuesOffset++] << 6) | (values[valuesOffset] >>> 29); - blocks[blocksOffset++] = (values[valuesOffset++] << 35) | values[valuesOffset++]; - } - } - -} diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked36.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked36.java deleted file mode 100644 index f9f5f09ad45..00000000000 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked36.java +++ /dev/null @@ -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 BulkOperationPacked36 extends BulkOperation { - @Override - public int blockCount() { - return 9; - } - - @Override - public int valueCount() { - return 16; - } - - @Override - public void decode(long[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) { - throw new UnsupportedOperationException(); - } - - @Override - public void decode(byte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) { - throw new UnsupportedOperationException(); - } - - @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 >>> 28; - final long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block0 & 268435455L) << 8) | (block1 >>> 56); - values[valuesOffset++] = (block1 >>> 20) & 68719476735L; - final long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block1 & 1048575L) << 16) | (block2 >>> 48); - values[valuesOffset++] = (block2 >>> 12) & 68719476735L; - final long block3 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block2 & 4095L) << 24) | (block3 >>> 40); - values[valuesOffset++] = (block3 >>> 4) & 68719476735L; - final long block4 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block3 & 15L) << 32) | (block4 >>> 32); - final long block5 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block4 & 4294967295L) << 4) | (block5 >>> 60); - values[valuesOffset++] = (block5 >>> 24) & 68719476735L; - final long block6 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block5 & 16777215L) << 12) | (block6 >>> 52); - values[valuesOffset++] = (block6 >>> 16) & 68719476735L; - final long block7 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block6 & 65535L) << 20) | (block7 >>> 44); - values[valuesOffset++] = (block7 >>> 8) & 68719476735L; - final long block8 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block7 & 255L) << 28) | (block8 >>> 36); - values[valuesOffset++] = block8 & 68719476735L; - } - } - - @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; - final long byte3 = blocks[blocksOffset++] & 0xFF; - final long byte4 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte0 << 28) | (byte1 << 20) | (byte2 << 12) | (byte3 << 4) | (byte4 >>> 4); - final long byte5 = blocks[blocksOffset++] & 0xFF; - final long byte6 = blocks[blocksOffset++] & 0xFF; - final long byte7 = blocks[blocksOffset++] & 0xFF; - final long byte8 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte4 & 15) << 32) | (byte5 << 24) | (byte6 << 16) | (byte7 << 8) | byte8; - final long byte9 = blocks[blocksOffset++] & 0xFF; - final long byte10 = blocks[blocksOffset++] & 0xFF; - final long byte11 = blocks[blocksOffset++] & 0xFF; - final long byte12 = blocks[blocksOffset++] & 0xFF; - final long byte13 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte9 << 28) | (byte10 << 20) | (byte11 << 12) | (byte12 << 4) | (byte13 >>> 4); - final long byte14 = blocks[blocksOffset++] & 0xFF; - final long byte15 = blocks[blocksOffset++] & 0xFF; - final long byte16 = blocks[blocksOffset++] & 0xFF; - final long byte17 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte13 & 15) << 32) | (byte14 << 24) | (byte15 << 16) | (byte16 << 8) | byte17; - final long byte18 = blocks[blocksOffset++] & 0xFF; - final long byte19 = blocks[blocksOffset++] & 0xFF; - final long byte20 = blocks[blocksOffset++] & 0xFF; - final long byte21 = blocks[blocksOffset++] & 0xFF; - final long byte22 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte18 << 28) | (byte19 << 20) | (byte20 << 12) | (byte21 << 4) | (byte22 >>> 4); - final long byte23 = blocks[blocksOffset++] & 0xFF; - final long byte24 = blocks[blocksOffset++] & 0xFF; - final long byte25 = blocks[blocksOffset++] & 0xFF; - final long byte26 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte22 & 15) << 32) | (byte23 << 24) | (byte24 << 16) | (byte25 << 8) | byte26; - final long byte27 = blocks[blocksOffset++] & 0xFF; - final long byte28 = blocks[blocksOffset++] & 0xFF; - final long byte29 = blocks[blocksOffset++] & 0xFF; - final long byte30 = blocks[blocksOffset++] & 0xFF; - final long byte31 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte27 << 28) | (byte28 << 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; - final long byte35 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte31 & 15) << 32) | (byte32 << 24) | (byte33 << 16) | (byte34 << 8) | byte35; - final long byte36 = blocks[blocksOffset++] & 0xFF; - final long byte37 = blocks[blocksOffset++] & 0xFF; - final long byte38 = blocks[blocksOffset++] & 0xFF; - final long byte39 = blocks[blocksOffset++] & 0xFF; - final long byte40 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte36 << 28) | (byte37 << 20) | (byte38 << 12) | (byte39 << 4) | (byte40 >>> 4); - final long byte41 = blocks[blocksOffset++] & 0xFF; - final long byte42 = blocks[blocksOffset++] & 0xFF; - final long byte43 = blocks[blocksOffset++] & 0xFF; - final long byte44 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte40 & 15) << 32) | (byte41 << 24) | (byte42 << 16) | (byte43 << 8) | byte44; - final long byte45 = blocks[blocksOffset++] & 0xFF; - final long byte46 = blocks[blocksOffset++] & 0xFF; - final long byte47 = blocks[blocksOffset++] & 0xFF; - final long byte48 = blocks[blocksOffset++] & 0xFF; - final long byte49 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte45 << 28) | (byte46 << 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; - final long byte53 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte49 & 15) << 32) | (byte50 << 24) | (byte51 << 16) | (byte52 << 8) | byte53; - final long byte54 = blocks[blocksOffset++] & 0xFF; - final long byte55 = blocks[blocksOffset++] & 0xFF; - final long byte56 = blocks[blocksOffset++] & 0xFF; - final long byte57 = blocks[blocksOffset++] & 0xFF; - final long byte58 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte54 << 28) | (byte55 << 20) | (byte56 << 12) | (byte57 << 4) | (byte58 >>> 4); - final long byte59 = blocks[blocksOffset++] & 0xFF; - final long byte60 = blocks[blocksOffset++] & 0xFF; - final long byte61 = blocks[blocksOffset++] & 0xFF; - final long byte62 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte58 & 15) << 32) | (byte59 << 24) | (byte60 << 16) | (byte61 << 8) | byte62; - final long byte63 = blocks[blocksOffset++] & 0xFF; - final long byte64 = blocks[blocksOffset++] & 0xFF; - final long byte65 = blocks[blocksOffset++] & 0xFF; - final long byte66 = blocks[blocksOffset++] & 0xFF; - final long byte67 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte63 << 28) | (byte64 << 20) | (byte65 << 12) | (byte66 << 4) | (byte67 >>> 4); - final long byte68 = blocks[blocksOffset++] & 0xFF; - final long byte69 = blocks[blocksOffset++] & 0xFF; - final long byte70 = blocks[blocksOffset++] & 0xFF; - final long byte71 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte67 & 15) << 32) | (byte68 << 24) | (byte69 << 16) | (byte70 << 8) | byte71; - } - } - - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 28) | ((values[valuesOffset] & 0xffffffffL) >>> 8); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 56) | ((values[valuesOffset++] & 0xffffffffL) << 20) | ((values[valuesOffset] & 0xffffffffL) >>> 16); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 48) | ((values[valuesOffset++] & 0xffffffffL) << 12) | ((values[valuesOffset] & 0xffffffffL) >>> 24); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 40) | ((values[valuesOffset++] & 0xffffffffL) << 4) | ((values[valuesOffset] & 0xffffffffL) >>> 32); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 32) | ((values[valuesOffset] & 0xffffffffL) >>> 4); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 60) | ((values[valuesOffset++] & 0xffffffffL) << 24) | ((values[valuesOffset] & 0xffffffffL) >>> 12); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 52) | ((values[valuesOffset++] & 0xffffffffL) << 16) | ((values[valuesOffset] & 0xffffffffL) >>> 20); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 44) | ((values[valuesOffset++] & 0xffffffffL) << 8) | ((values[valuesOffset] & 0xffffffffL) >>> 28); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 36) | (values[valuesOffset++] & 0xffffffffL); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] << 28) | (values[valuesOffset] >>> 8); - blocks[blocksOffset++] = (values[valuesOffset++] << 56) | (values[valuesOffset++] << 20) | (values[valuesOffset] >>> 16); - blocks[blocksOffset++] = (values[valuesOffset++] << 48) | (values[valuesOffset++] << 12) | (values[valuesOffset] >>> 24); - blocks[blocksOffset++] = (values[valuesOffset++] << 40) | (values[valuesOffset++] << 4) | (values[valuesOffset] >>> 32); - blocks[blocksOffset++] = (values[valuesOffset++] << 32) | (values[valuesOffset] >>> 4); - blocks[blocksOffset++] = (values[valuesOffset++] << 60) | (values[valuesOffset++] << 24) | (values[valuesOffset] >>> 12); - blocks[blocksOffset++] = (values[valuesOffset++] << 52) | (values[valuesOffset++] << 16) | (values[valuesOffset] >>> 20); - blocks[blocksOffset++] = (values[valuesOffset++] << 44) | (values[valuesOffset++] << 8) | (values[valuesOffset] >>> 28); - blocks[blocksOffset++] = (values[valuesOffset++] << 36) | values[valuesOffset++]; - } - } - -} diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked37.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked37.java deleted file mode 100644 index 4d94c91d04f..00000000000 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked37.java +++ /dev/null @@ -1,613 +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 BulkOperationPacked37 extends BulkOperation { - @Override - public int blockCount() { - return 37; - } - - @Override - public int valueCount() { - return 64; - } - - @Override - public void decode(long[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) { - throw new UnsupportedOperationException(); - } - - @Override - public void decode(byte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) { - throw new UnsupportedOperationException(); - } - - @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 >>> 27; - final long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block0 & 134217727L) << 10) | (block1 >>> 54); - values[valuesOffset++] = (block1 >>> 17) & 137438953471L; - final long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block1 & 131071L) << 20) | (block2 >>> 44); - values[valuesOffset++] = (block2 >>> 7) & 137438953471L; - final long block3 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block2 & 127L) << 30) | (block3 >>> 34); - final long block4 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block3 & 17179869183L) << 3) | (block4 >>> 61); - values[valuesOffset++] = (block4 >>> 24) & 137438953471L; - final long block5 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block4 & 16777215L) << 13) | (block5 >>> 51); - values[valuesOffset++] = (block5 >>> 14) & 137438953471L; - final long block6 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block5 & 16383L) << 23) | (block6 >>> 41); - values[valuesOffset++] = (block6 >>> 4) & 137438953471L; - final long block7 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block6 & 15L) << 33) | (block7 >>> 31); - final long block8 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block7 & 2147483647L) << 6) | (block8 >>> 58); - values[valuesOffset++] = (block8 >>> 21) & 137438953471L; - final long block9 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block8 & 2097151L) << 16) | (block9 >>> 48); - values[valuesOffset++] = (block9 >>> 11) & 137438953471L; - final long block10 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block9 & 2047L) << 26) | (block10 >>> 38); - values[valuesOffset++] = (block10 >>> 1) & 137438953471L; - final long block11 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block10 & 1L) << 36) | (block11 >>> 28); - final long block12 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block11 & 268435455L) << 9) | (block12 >>> 55); - values[valuesOffset++] = (block12 >>> 18) & 137438953471L; - final long block13 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block12 & 262143L) << 19) | (block13 >>> 45); - values[valuesOffset++] = (block13 >>> 8) & 137438953471L; - final long block14 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block13 & 255L) << 29) | (block14 >>> 35); - final long block15 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block14 & 34359738367L) << 2) | (block15 >>> 62); - values[valuesOffset++] = (block15 >>> 25) & 137438953471L; - final long block16 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block15 & 33554431L) << 12) | (block16 >>> 52); - values[valuesOffset++] = (block16 >>> 15) & 137438953471L; - final long block17 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block16 & 32767L) << 22) | (block17 >>> 42); - values[valuesOffset++] = (block17 >>> 5) & 137438953471L; - final long block18 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block17 & 31L) << 32) | (block18 >>> 32); - final long block19 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block18 & 4294967295L) << 5) | (block19 >>> 59); - values[valuesOffset++] = (block19 >>> 22) & 137438953471L; - final long block20 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block19 & 4194303L) << 15) | (block20 >>> 49); - values[valuesOffset++] = (block20 >>> 12) & 137438953471L; - final long block21 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block20 & 4095L) << 25) | (block21 >>> 39); - values[valuesOffset++] = (block21 >>> 2) & 137438953471L; - final long block22 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block21 & 3L) << 35) | (block22 >>> 29); - final long block23 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block22 & 536870911L) << 8) | (block23 >>> 56); - values[valuesOffset++] = (block23 >>> 19) & 137438953471L; - final long block24 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block23 & 524287L) << 18) | (block24 >>> 46); - values[valuesOffset++] = (block24 >>> 9) & 137438953471L; - final long block25 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block24 & 511L) << 28) | (block25 >>> 36); - final long block26 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block25 & 68719476735L) << 1) | (block26 >>> 63); - values[valuesOffset++] = (block26 >>> 26) & 137438953471L; - final long block27 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block26 & 67108863L) << 11) | (block27 >>> 53); - values[valuesOffset++] = (block27 >>> 16) & 137438953471L; - final long block28 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block27 & 65535L) << 21) | (block28 >>> 43); - values[valuesOffset++] = (block28 >>> 6) & 137438953471L; - final long block29 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block28 & 63L) << 31) | (block29 >>> 33); - final long block30 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block29 & 8589934591L) << 4) | (block30 >>> 60); - values[valuesOffset++] = (block30 >>> 23) & 137438953471L; - final long block31 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block30 & 8388607L) << 14) | (block31 >>> 50); - values[valuesOffset++] = (block31 >>> 13) & 137438953471L; - final long block32 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block31 & 8191L) << 24) | (block32 >>> 40); - values[valuesOffset++] = (block32 >>> 3) & 137438953471L; - final long block33 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block32 & 7L) << 34) | (block33 >>> 30); - final long block34 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block33 & 1073741823L) << 7) | (block34 >>> 57); - values[valuesOffset++] = (block34 >>> 20) & 137438953471L; - final long block35 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block34 & 1048575L) << 17) | (block35 >>> 47); - values[valuesOffset++] = (block35 >>> 10) & 137438953471L; - final long block36 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block35 & 1023L) << 27) | (block36 >>> 37); - values[valuesOffset++] = block36 & 137438953471L; - } - } - - @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; - final long byte3 = blocks[blocksOffset++] & 0xFF; - final long byte4 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte0 << 29) | (byte1 << 21) | (byte2 << 13) | (byte3 << 5) | (byte4 >>> 3); - final long byte5 = blocks[blocksOffset++] & 0xFF; - final long byte6 = blocks[blocksOffset++] & 0xFF; - final long byte7 = blocks[blocksOffset++] & 0xFF; - final long byte8 = blocks[blocksOffset++] & 0xFF; - final long byte9 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte4 & 7) << 34) | (byte5 << 26) | (byte6 << 18) | (byte7 << 10) | (byte8 << 2) | (byte9 >>> 6); - final long byte10 = blocks[blocksOffset++] & 0xFF; - final long byte11 = blocks[blocksOffset++] & 0xFF; - final long byte12 = blocks[blocksOffset++] & 0xFF; - final long byte13 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte9 & 63) << 31) | (byte10 << 23) | (byte11 << 15) | (byte12 << 7) | (byte13 >>> 1); - final long byte14 = blocks[blocksOffset++] & 0xFF; - final long byte15 = blocks[blocksOffset++] & 0xFF; - final long byte16 = blocks[blocksOffset++] & 0xFF; - final long byte17 = blocks[blocksOffset++] & 0xFF; - final long byte18 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte13 & 1) << 36) | (byte14 << 28) | (byte15 << 20) | (byte16 << 12) | (byte17 << 4) | (byte18 >>> 4); - final long byte19 = blocks[blocksOffset++] & 0xFF; - final long byte20 = blocks[blocksOffset++] & 0xFF; - final long byte21 = blocks[blocksOffset++] & 0xFF; - final long byte22 = blocks[blocksOffset++] & 0xFF; - final long byte23 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte18 & 15) << 33) | (byte19 << 25) | (byte20 << 17) | (byte21 << 9) | (byte22 << 1) | (byte23 >>> 7); - final long byte24 = blocks[blocksOffset++] & 0xFF; - final long byte25 = blocks[blocksOffset++] & 0xFF; - final long byte26 = blocks[blocksOffset++] & 0xFF; - final long byte27 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte23 & 127) << 30) | (byte24 << 22) | (byte25 << 14) | (byte26 << 6) | (byte27 >>> 2); - final long byte28 = blocks[blocksOffset++] & 0xFF; - final long byte29 = blocks[blocksOffset++] & 0xFF; - final long byte30 = blocks[blocksOffset++] & 0xFF; - final long byte31 = blocks[blocksOffset++] & 0xFF; - final long byte32 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte27 & 3) << 35) | (byte28 << 27) | (byte29 << 19) | (byte30 << 11) | (byte31 << 3) | (byte32 >>> 5); - final long byte33 = blocks[blocksOffset++] & 0xFF; - final long byte34 = blocks[blocksOffset++] & 0xFF; - final long byte35 = blocks[blocksOffset++] & 0xFF; - final long byte36 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte32 & 31) << 32) | (byte33 << 24) | (byte34 << 16) | (byte35 << 8) | byte36; - final long byte37 = blocks[blocksOffset++] & 0xFF; - final long byte38 = blocks[blocksOffset++] & 0xFF; - final long byte39 = blocks[blocksOffset++] & 0xFF; - final long byte40 = blocks[blocksOffset++] & 0xFF; - final long byte41 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte37 << 29) | (byte38 << 21) | (byte39 << 13) | (byte40 << 5) | (byte41 >>> 3); - final long byte42 = blocks[blocksOffset++] & 0xFF; - final long byte43 = blocks[blocksOffset++] & 0xFF; - final long byte44 = blocks[blocksOffset++] & 0xFF; - final long byte45 = blocks[blocksOffset++] & 0xFF; - final long byte46 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte41 & 7) << 34) | (byte42 << 26) | (byte43 << 18) | (byte44 << 10) | (byte45 << 2) | (byte46 >>> 6); - final long byte47 = blocks[blocksOffset++] & 0xFF; - final long byte48 = blocks[blocksOffset++] & 0xFF; - final long byte49 = blocks[blocksOffset++] & 0xFF; - final long byte50 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte46 & 63) << 31) | (byte47 << 23) | (byte48 << 15) | (byte49 << 7) | (byte50 >>> 1); - final long byte51 = blocks[blocksOffset++] & 0xFF; - final long byte52 = blocks[blocksOffset++] & 0xFF; - final long byte53 = blocks[blocksOffset++] & 0xFF; - final long byte54 = blocks[blocksOffset++] & 0xFF; - final long byte55 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte50 & 1) << 36) | (byte51 << 28) | (byte52 << 20) | (byte53 << 12) | (byte54 << 4) | (byte55 >>> 4); - final long byte56 = blocks[blocksOffset++] & 0xFF; - final long byte57 = blocks[blocksOffset++] & 0xFF; - final long byte58 = blocks[blocksOffset++] & 0xFF; - final long byte59 = blocks[blocksOffset++] & 0xFF; - final long byte60 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte55 & 15) << 33) | (byte56 << 25) | (byte57 << 17) | (byte58 << 9) | (byte59 << 1) | (byte60 >>> 7); - final long byte61 = blocks[blocksOffset++] & 0xFF; - final long byte62 = blocks[blocksOffset++] & 0xFF; - final long byte63 = blocks[blocksOffset++] & 0xFF; - final long byte64 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte60 & 127) << 30) | (byte61 << 22) | (byte62 << 14) | (byte63 << 6) | (byte64 >>> 2); - final long byte65 = blocks[blocksOffset++] & 0xFF; - final long byte66 = blocks[blocksOffset++] & 0xFF; - final long byte67 = blocks[blocksOffset++] & 0xFF; - final long byte68 = blocks[blocksOffset++] & 0xFF; - final long byte69 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte64 & 3) << 35) | (byte65 << 27) | (byte66 << 19) | (byte67 << 11) | (byte68 << 3) | (byte69 >>> 5); - final long byte70 = blocks[blocksOffset++] & 0xFF; - final long byte71 = blocks[blocksOffset++] & 0xFF; - final long byte72 = blocks[blocksOffset++] & 0xFF; - final long byte73 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte69 & 31) << 32) | (byte70 << 24) | (byte71 << 16) | (byte72 << 8) | byte73; - final long byte74 = blocks[blocksOffset++] & 0xFF; - final long byte75 = blocks[blocksOffset++] & 0xFF; - final long byte76 = blocks[blocksOffset++] & 0xFF; - final long byte77 = blocks[blocksOffset++] & 0xFF; - final long byte78 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte74 << 29) | (byte75 << 21) | (byte76 << 13) | (byte77 << 5) | (byte78 >>> 3); - final long byte79 = blocks[blocksOffset++] & 0xFF; - final long byte80 = blocks[blocksOffset++] & 0xFF; - final long byte81 = blocks[blocksOffset++] & 0xFF; - final long byte82 = blocks[blocksOffset++] & 0xFF; - final long byte83 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte78 & 7) << 34) | (byte79 << 26) | (byte80 << 18) | (byte81 << 10) | (byte82 << 2) | (byte83 >>> 6); - final long byte84 = blocks[blocksOffset++] & 0xFF; - final long byte85 = blocks[blocksOffset++] & 0xFF; - final long byte86 = blocks[blocksOffset++] & 0xFF; - final long byte87 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte83 & 63) << 31) | (byte84 << 23) | (byte85 << 15) | (byte86 << 7) | (byte87 >>> 1); - final long byte88 = blocks[blocksOffset++] & 0xFF; - final long byte89 = blocks[blocksOffset++] & 0xFF; - final long byte90 = blocks[blocksOffset++] & 0xFF; - final long byte91 = blocks[blocksOffset++] & 0xFF; - final long byte92 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte87 & 1) << 36) | (byte88 << 28) | (byte89 << 20) | (byte90 << 12) | (byte91 << 4) | (byte92 >>> 4); - final long byte93 = blocks[blocksOffset++] & 0xFF; - final long byte94 = blocks[blocksOffset++] & 0xFF; - final long byte95 = blocks[blocksOffset++] & 0xFF; - final long byte96 = blocks[blocksOffset++] & 0xFF; - final long byte97 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte92 & 15) << 33) | (byte93 << 25) | (byte94 << 17) | (byte95 << 9) | (byte96 << 1) | (byte97 >>> 7); - final long byte98 = blocks[blocksOffset++] & 0xFF; - final long byte99 = blocks[blocksOffset++] & 0xFF; - final long byte100 = blocks[blocksOffset++] & 0xFF; - final long byte101 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte97 & 127) << 30) | (byte98 << 22) | (byte99 << 14) | (byte100 << 6) | (byte101 >>> 2); - final long byte102 = blocks[blocksOffset++] & 0xFF; - final long byte103 = blocks[blocksOffset++] & 0xFF; - final long byte104 = blocks[blocksOffset++] & 0xFF; - final long byte105 = blocks[blocksOffset++] & 0xFF; - final long byte106 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte101 & 3) << 35) | (byte102 << 27) | (byte103 << 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; - final long byte110 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte106 & 31) << 32) | (byte107 << 24) | (byte108 << 16) | (byte109 << 8) | byte110; - final long byte111 = blocks[blocksOffset++] & 0xFF; - final long byte112 = blocks[blocksOffset++] & 0xFF; - final long byte113 = blocks[blocksOffset++] & 0xFF; - final long byte114 = blocks[blocksOffset++] & 0xFF; - final long byte115 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte111 << 29) | (byte112 << 21) | (byte113 << 13) | (byte114 << 5) | (byte115 >>> 3); - final long byte116 = blocks[blocksOffset++] & 0xFF; - final long byte117 = blocks[blocksOffset++] & 0xFF; - final long byte118 = blocks[blocksOffset++] & 0xFF; - final long byte119 = blocks[blocksOffset++] & 0xFF; - final long byte120 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte115 & 7) << 34) | (byte116 << 26) | (byte117 << 18) | (byte118 << 10) | (byte119 << 2) | (byte120 >>> 6); - final long byte121 = blocks[blocksOffset++] & 0xFF; - final long byte122 = blocks[blocksOffset++] & 0xFF; - final long byte123 = blocks[blocksOffset++] & 0xFF; - final long byte124 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte120 & 63) << 31) | (byte121 << 23) | (byte122 << 15) | (byte123 << 7) | (byte124 >>> 1); - final long byte125 = blocks[blocksOffset++] & 0xFF; - final long byte126 = blocks[blocksOffset++] & 0xFF; - final long byte127 = blocks[blocksOffset++] & 0xFF; - final long byte128 = blocks[blocksOffset++] & 0xFF; - final long byte129 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte124 & 1) << 36) | (byte125 << 28) | (byte126 << 20) | (byte127 << 12) | (byte128 << 4) | (byte129 >>> 4); - final long byte130 = blocks[blocksOffset++] & 0xFF; - final long byte131 = blocks[blocksOffset++] & 0xFF; - final long byte132 = blocks[blocksOffset++] & 0xFF; - final long byte133 = blocks[blocksOffset++] & 0xFF; - final long byte134 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte129 & 15) << 33) | (byte130 << 25) | (byte131 << 17) | (byte132 << 9) | (byte133 << 1) | (byte134 >>> 7); - final long byte135 = blocks[blocksOffset++] & 0xFF; - final long byte136 = blocks[blocksOffset++] & 0xFF; - final long byte137 = blocks[blocksOffset++] & 0xFF; - final long byte138 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte134 & 127) << 30) | (byte135 << 22) | (byte136 << 14) | (byte137 << 6) | (byte138 >>> 2); - final long byte139 = blocks[blocksOffset++] & 0xFF; - final long byte140 = blocks[blocksOffset++] & 0xFF; - final long byte141 = blocks[blocksOffset++] & 0xFF; - final long byte142 = blocks[blocksOffset++] & 0xFF; - final long byte143 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte138 & 3) << 35) | (byte139 << 27) | (byte140 << 19) | (byte141 << 11) | (byte142 << 3) | (byte143 >>> 5); - final long byte144 = blocks[blocksOffset++] & 0xFF; - final long byte145 = blocks[blocksOffset++] & 0xFF; - final long byte146 = blocks[blocksOffset++] & 0xFF; - final long byte147 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte143 & 31) << 32) | (byte144 << 24) | (byte145 << 16) | (byte146 << 8) | byte147; - final long byte148 = blocks[blocksOffset++] & 0xFF; - final long byte149 = blocks[blocksOffset++] & 0xFF; - final long byte150 = blocks[blocksOffset++] & 0xFF; - final long byte151 = blocks[blocksOffset++] & 0xFF; - final long byte152 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte148 << 29) | (byte149 << 21) | (byte150 << 13) | (byte151 << 5) | (byte152 >>> 3); - final long byte153 = blocks[blocksOffset++] & 0xFF; - final long byte154 = blocks[blocksOffset++] & 0xFF; - final long byte155 = blocks[blocksOffset++] & 0xFF; - final long byte156 = blocks[blocksOffset++] & 0xFF; - final long byte157 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte152 & 7) << 34) | (byte153 << 26) | (byte154 << 18) | (byte155 << 10) | (byte156 << 2) | (byte157 >>> 6); - final long byte158 = blocks[blocksOffset++] & 0xFF; - final long byte159 = blocks[blocksOffset++] & 0xFF; - final long byte160 = blocks[blocksOffset++] & 0xFF; - final long byte161 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte157 & 63) << 31) | (byte158 << 23) | (byte159 << 15) | (byte160 << 7) | (byte161 >>> 1); - final long byte162 = blocks[blocksOffset++] & 0xFF; - final long byte163 = blocks[blocksOffset++] & 0xFF; - final long byte164 = blocks[blocksOffset++] & 0xFF; - final long byte165 = blocks[blocksOffset++] & 0xFF; - final long byte166 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte161 & 1) << 36) | (byte162 << 28) | (byte163 << 20) | (byte164 << 12) | (byte165 << 4) | (byte166 >>> 4); - final long byte167 = blocks[blocksOffset++] & 0xFF; - final long byte168 = blocks[blocksOffset++] & 0xFF; - final long byte169 = blocks[blocksOffset++] & 0xFF; - final long byte170 = blocks[blocksOffset++] & 0xFF; - final long byte171 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte166 & 15) << 33) | (byte167 << 25) | (byte168 << 17) | (byte169 << 9) | (byte170 << 1) | (byte171 >>> 7); - final long byte172 = blocks[blocksOffset++] & 0xFF; - final long byte173 = blocks[blocksOffset++] & 0xFF; - final long byte174 = blocks[blocksOffset++] & 0xFF; - final long byte175 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte171 & 127) << 30) | (byte172 << 22) | (byte173 << 14) | (byte174 << 6) | (byte175 >>> 2); - final long byte176 = blocks[blocksOffset++] & 0xFF; - final long byte177 = blocks[blocksOffset++] & 0xFF; - final long byte178 = blocks[blocksOffset++] & 0xFF; - final long byte179 = blocks[blocksOffset++] & 0xFF; - final long byte180 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte175 & 3) << 35) | (byte176 << 27) | (byte177 << 19) | (byte178 << 11) | (byte179 << 3) | (byte180 >>> 5); - final long byte181 = blocks[blocksOffset++] & 0xFF; - final long byte182 = blocks[blocksOffset++] & 0xFF; - final long byte183 = blocks[blocksOffset++] & 0xFF; - final long byte184 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte180 & 31) << 32) | (byte181 << 24) | (byte182 << 16) | (byte183 << 8) | byte184; - final long byte185 = blocks[blocksOffset++] & 0xFF; - final long byte186 = blocks[blocksOffset++] & 0xFF; - final long byte187 = blocks[blocksOffset++] & 0xFF; - final long byte188 = blocks[blocksOffset++] & 0xFF; - final long byte189 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte185 << 29) | (byte186 << 21) | (byte187 << 13) | (byte188 << 5) | (byte189 >>> 3); - final long byte190 = blocks[blocksOffset++] & 0xFF; - final long byte191 = blocks[blocksOffset++] & 0xFF; - final long byte192 = blocks[blocksOffset++] & 0xFF; - final long byte193 = blocks[blocksOffset++] & 0xFF; - final long byte194 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte189 & 7) << 34) | (byte190 << 26) | (byte191 << 18) | (byte192 << 10) | (byte193 << 2) | (byte194 >>> 6); - final long byte195 = blocks[blocksOffset++] & 0xFF; - final long byte196 = blocks[blocksOffset++] & 0xFF; - final long byte197 = blocks[blocksOffset++] & 0xFF; - final long byte198 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte194 & 63) << 31) | (byte195 << 23) | (byte196 << 15) | (byte197 << 7) | (byte198 >>> 1); - final long byte199 = blocks[blocksOffset++] & 0xFF; - final long byte200 = blocks[blocksOffset++] & 0xFF; - final long byte201 = blocks[blocksOffset++] & 0xFF; - final long byte202 = blocks[blocksOffset++] & 0xFF; - final long byte203 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte198 & 1) << 36) | (byte199 << 28) | (byte200 << 20) | (byte201 << 12) | (byte202 << 4) | (byte203 >>> 4); - final long byte204 = blocks[blocksOffset++] & 0xFF; - final long byte205 = blocks[blocksOffset++] & 0xFF; - final long byte206 = blocks[blocksOffset++] & 0xFF; - final long byte207 = blocks[blocksOffset++] & 0xFF; - final long byte208 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte203 & 15) << 33) | (byte204 << 25) | (byte205 << 17) | (byte206 << 9) | (byte207 << 1) | (byte208 >>> 7); - final long byte209 = blocks[blocksOffset++] & 0xFF; - final long byte210 = blocks[blocksOffset++] & 0xFF; - final long byte211 = blocks[blocksOffset++] & 0xFF; - final long byte212 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte208 & 127) << 30) | (byte209 << 22) | (byte210 << 14) | (byte211 << 6) | (byte212 >>> 2); - final long byte213 = blocks[blocksOffset++] & 0xFF; - final long byte214 = blocks[blocksOffset++] & 0xFF; - final long byte215 = blocks[blocksOffset++] & 0xFF; - final long byte216 = blocks[blocksOffset++] & 0xFF; - final long byte217 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte212 & 3) << 35) | (byte213 << 27) | (byte214 << 19) | (byte215 << 11) | (byte216 << 3) | (byte217 >>> 5); - final long byte218 = blocks[blocksOffset++] & 0xFF; - final long byte219 = blocks[blocksOffset++] & 0xFF; - final long byte220 = blocks[blocksOffset++] & 0xFF; - final long byte221 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte217 & 31) << 32) | (byte218 << 24) | (byte219 << 16) | (byte220 << 8) | byte221; - final long byte222 = blocks[blocksOffset++] & 0xFF; - final long byte223 = blocks[blocksOffset++] & 0xFF; - final long byte224 = blocks[blocksOffset++] & 0xFF; - final long byte225 = blocks[blocksOffset++] & 0xFF; - final long byte226 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte222 << 29) | (byte223 << 21) | (byte224 << 13) | (byte225 << 5) | (byte226 >>> 3); - final long byte227 = blocks[blocksOffset++] & 0xFF; - final long byte228 = blocks[blocksOffset++] & 0xFF; - final long byte229 = blocks[blocksOffset++] & 0xFF; - final long byte230 = blocks[blocksOffset++] & 0xFF; - final long byte231 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte226 & 7) << 34) | (byte227 << 26) | (byte228 << 18) | (byte229 << 10) | (byte230 << 2) | (byte231 >>> 6); - final long byte232 = blocks[blocksOffset++] & 0xFF; - final long byte233 = blocks[blocksOffset++] & 0xFF; - final long byte234 = blocks[blocksOffset++] & 0xFF; - final long byte235 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte231 & 63) << 31) | (byte232 << 23) | (byte233 << 15) | (byte234 << 7) | (byte235 >>> 1); - final long byte236 = blocks[blocksOffset++] & 0xFF; - final long byte237 = blocks[blocksOffset++] & 0xFF; - final long byte238 = blocks[blocksOffset++] & 0xFF; - final long byte239 = blocks[blocksOffset++] & 0xFF; - final long byte240 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte235 & 1) << 36) | (byte236 << 28) | (byte237 << 20) | (byte238 << 12) | (byte239 << 4) | (byte240 >>> 4); - final long byte241 = blocks[blocksOffset++] & 0xFF; - final long byte242 = blocks[blocksOffset++] & 0xFF; - final long byte243 = blocks[blocksOffset++] & 0xFF; - final long byte244 = blocks[blocksOffset++] & 0xFF; - final long byte245 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte240 & 15) << 33) | (byte241 << 25) | (byte242 << 17) | (byte243 << 9) | (byte244 << 1) | (byte245 >>> 7); - final long byte246 = blocks[blocksOffset++] & 0xFF; - final long byte247 = blocks[blocksOffset++] & 0xFF; - final long byte248 = blocks[blocksOffset++] & 0xFF; - final long byte249 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte245 & 127) << 30) | (byte246 << 22) | (byte247 << 14) | (byte248 << 6) | (byte249 >>> 2); - final long byte250 = blocks[blocksOffset++] & 0xFF; - final long byte251 = blocks[blocksOffset++] & 0xFF; - final long byte252 = blocks[blocksOffset++] & 0xFF; - final long byte253 = blocks[blocksOffset++] & 0xFF; - final long byte254 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte249 & 3) << 35) | (byte250 << 27) | (byte251 << 19) | (byte252 << 11) | (byte253 << 3) | (byte254 >>> 5); - final long byte255 = blocks[blocksOffset++] & 0xFF; - final long byte256 = blocks[blocksOffset++] & 0xFF; - final long byte257 = blocks[blocksOffset++] & 0xFF; - final long byte258 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte254 & 31) << 32) | (byte255 << 24) | (byte256 << 16) | (byte257 << 8) | byte258; - final long byte259 = blocks[blocksOffset++] & 0xFF; - final long byte260 = blocks[blocksOffset++] & 0xFF; - final long byte261 = blocks[blocksOffset++] & 0xFF; - final long byte262 = blocks[blocksOffset++] & 0xFF; - final long byte263 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte259 << 29) | (byte260 << 21) | (byte261 << 13) | (byte262 << 5) | (byte263 >>> 3); - final long byte264 = blocks[blocksOffset++] & 0xFF; - final long byte265 = blocks[blocksOffset++] & 0xFF; - final long byte266 = blocks[blocksOffset++] & 0xFF; - final long byte267 = blocks[blocksOffset++] & 0xFF; - final long byte268 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte263 & 7) << 34) | (byte264 << 26) | (byte265 << 18) | (byte266 << 10) | (byte267 << 2) | (byte268 >>> 6); - final long byte269 = blocks[blocksOffset++] & 0xFF; - final long byte270 = blocks[blocksOffset++] & 0xFF; - final long byte271 = blocks[blocksOffset++] & 0xFF; - final long byte272 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte268 & 63) << 31) | (byte269 << 23) | (byte270 << 15) | (byte271 << 7) | (byte272 >>> 1); - final long byte273 = blocks[blocksOffset++] & 0xFF; - final long byte274 = blocks[blocksOffset++] & 0xFF; - final long byte275 = blocks[blocksOffset++] & 0xFF; - final long byte276 = blocks[blocksOffset++] & 0xFF; - final long byte277 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte272 & 1) << 36) | (byte273 << 28) | (byte274 << 20) | (byte275 << 12) | (byte276 << 4) | (byte277 >>> 4); - final long byte278 = blocks[blocksOffset++] & 0xFF; - final long byte279 = blocks[blocksOffset++] & 0xFF; - final long byte280 = blocks[blocksOffset++] & 0xFF; - final long byte281 = blocks[blocksOffset++] & 0xFF; - final long byte282 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte277 & 15) << 33) | (byte278 << 25) | (byte279 << 17) | (byte280 << 9) | (byte281 << 1) | (byte282 >>> 7); - final long byte283 = blocks[blocksOffset++] & 0xFF; - final long byte284 = blocks[blocksOffset++] & 0xFF; - final long byte285 = blocks[blocksOffset++] & 0xFF; - final long byte286 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte282 & 127) << 30) | (byte283 << 22) | (byte284 << 14) | (byte285 << 6) | (byte286 >>> 2); - final long byte287 = blocks[blocksOffset++] & 0xFF; - final long byte288 = blocks[blocksOffset++] & 0xFF; - final long byte289 = blocks[blocksOffset++] & 0xFF; - final long byte290 = blocks[blocksOffset++] & 0xFF; - final long byte291 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte286 & 3) << 35) | (byte287 << 27) | (byte288 << 19) | (byte289 << 11) | (byte290 << 3) | (byte291 >>> 5); - final long byte292 = blocks[blocksOffset++] & 0xFF; - final long byte293 = blocks[blocksOffset++] & 0xFF; - final long byte294 = blocks[blocksOffset++] & 0xFF; - final long byte295 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte291 & 31) << 32) | (byte292 << 24) | (byte293 << 16) | (byte294 << 8) | byte295; - } - } - - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 27) | ((values[valuesOffset] & 0xffffffffL) >>> 10); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 54) | ((values[valuesOffset++] & 0xffffffffL) << 17) | ((values[valuesOffset] & 0xffffffffL) >>> 20); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 44) | ((values[valuesOffset++] & 0xffffffffL) << 7) | ((values[valuesOffset] & 0xffffffffL) >>> 30); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 34) | ((values[valuesOffset] & 0xffffffffL) >>> 3); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 61) | ((values[valuesOffset++] & 0xffffffffL) << 24) | ((values[valuesOffset] & 0xffffffffL) >>> 13); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 51) | ((values[valuesOffset++] & 0xffffffffL) << 14) | ((values[valuesOffset] & 0xffffffffL) >>> 23); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 41) | ((values[valuesOffset++] & 0xffffffffL) << 4) | ((values[valuesOffset] & 0xffffffffL) >>> 33); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 31) | ((values[valuesOffset] & 0xffffffffL) >>> 6); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 58) | ((values[valuesOffset++] & 0xffffffffL) << 21) | ((values[valuesOffset] & 0xffffffffL) >>> 16); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 48) | ((values[valuesOffset++] & 0xffffffffL) << 11) | ((values[valuesOffset] & 0xffffffffL) >>> 26); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 38) | ((values[valuesOffset++] & 0xffffffffL) << 1) | ((values[valuesOffset] & 0xffffffffL) >>> 36); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 28) | ((values[valuesOffset] & 0xffffffffL) >>> 9); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 55) | ((values[valuesOffset++] & 0xffffffffL) << 18) | ((values[valuesOffset] & 0xffffffffL) >>> 19); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 45) | ((values[valuesOffset++] & 0xffffffffL) << 8) | ((values[valuesOffset] & 0xffffffffL) >>> 29); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 35) | ((values[valuesOffset] & 0xffffffffL) >>> 2); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 62) | ((values[valuesOffset++] & 0xffffffffL) << 25) | ((values[valuesOffset] & 0xffffffffL) >>> 12); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 52) | ((values[valuesOffset++] & 0xffffffffL) << 15) | ((values[valuesOffset] & 0xffffffffL) >>> 22); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 42) | ((values[valuesOffset++] & 0xffffffffL) << 5) | ((values[valuesOffset] & 0xffffffffL) >>> 32); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 32) | ((values[valuesOffset] & 0xffffffffL) >>> 5); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 59) | ((values[valuesOffset++] & 0xffffffffL) << 22) | ((values[valuesOffset] & 0xffffffffL) >>> 15); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 49) | ((values[valuesOffset++] & 0xffffffffL) << 12) | ((values[valuesOffset] & 0xffffffffL) >>> 25); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 39) | ((values[valuesOffset++] & 0xffffffffL) << 2) | ((values[valuesOffset] & 0xffffffffL) >>> 35); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 29) | ((values[valuesOffset] & 0xffffffffL) >>> 8); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 56) | ((values[valuesOffset++] & 0xffffffffL) << 19) | ((values[valuesOffset] & 0xffffffffL) >>> 18); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 46) | ((values[valuesOffset++] & 0xffffffffL) << 9) | ((values[valuesOffset] & 0xffffffffL) >>> 28); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 36) | ((values[valuesOffset] & 0xffffffffL) >>> 1); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 63) | ((values[valuesOffset++] & 0xffffffffL) << 26) | ((values[valuesOffset] & 0xffffffffL) >>> 11); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 53) | ((values[valuesOffset++] & 0xffffffffL) << 16) | ((values[valuesOffset] & 0xffffffffL) >>> 21); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 43) | ((values[valuesOffset++] & 0xffffffffL) << 6) | ((values[valuesOffset] & 0xffffffffL) >>> 31); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 33) | ((values[valuesOffset] & 0xffffffffL) >>> 4); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 60) | ((values[valuesOffset++] & 0xffffffffL) << 23) | ((values[valuesOffset] & 0xffffffffL) >>> 14); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 50) | ((values[valuesOffset++] & 0xffffffffL) << 13) | ((values[valuesOffset] & 0xffffffffL) >>> 24); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 40) | ((values[valuesOffset++] & 0xffffffffL) << 3) | ((values[valuesOffset] & 0xffffffffL) >>> 34); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 30) | ((values[valuesOffset] & 0xffffffffL) >>> 7); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 57) | ((values[valuesOffset++] & 0xffffffffL) << 20) | ((values[valuesOffset] & 0xffffffffL) >>> 17); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 47) | ((values[valuesOffset++] & 0xffffffffL) << 10) | ((values[valuesOffset] & 0xffffffffL) >>> 27); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 37) | (values[valuesOffset++] & 0xffffffffL); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] << 27) | (values[valuesOffset] >>> 10); - blocks[blocksOffset++] = (values[valuesOffset++] << 54) | (values[valuesOffset++] << 17) | (values[valuesOffset] >>> 20); - blocks[blocksOffset++] = (values[valuesOffset++] << 44) | (values[valuesOffset++] << 7) | (values[valuesOffset] >>> 30); - blocks[blocksOffset++] = (values[valuesOffset++] << 34) | (values[valuesOffset] >>> 3); - blocks[blocksOffset++] = (values[valuesOffset++] << 61) | (values[valuesOffset++] << 24) | (values[valuesOffset] >>> 13); - blocks[blocksOffset++] = (values[valuesOffset++] << 51) | (values[valuesOffset++] << 14) | (values[valuesOffset] >>> 23); - blocks[blocksOffset++] = (values[valuesOffset++] << 41) | (values[valuesOffset++] << 4) | (values[valuesOffset] >>> 33); - blocks[blocksOffset++] = (values[valuesOffset++] << 31) | (values[valuesOffset] >>> 6); - blocks[blocksOffset++] = (values[valuesOffset++] << 58) | (values[valuesOffset++] << 21) | (values[valuesOffset] >>> 16); - blocks[blocksOffset++] = (values[valuesOffset++] << 48) | (values[valuesOffset++] << 11) | (values[valuesOffset] >>> 26); - blocks[blocksOffset++] = (values[valuesOffset++] << 38) | (values[valuesOffset++] << 1) | (values[valuesOffset] >>> 36); - blocks[blocksOffset++] = (values[valuesOffset++] << 28) | (values[valuesOffset] >>> 9); - blocks[blocksOffset++] = (values[valuesOffset++] << 55) | (values[valuesOffset++] << 18) | (values[valuesOffset] >>> 19); - blocks[blocksOffset++] = (values[valuesOffset++] << 45) | (values[valuesOffset++] << 8) | (values[valuesOffset] >>> 29); - blocks[blocksOffset++] = (values[valuesOffset++] << 35) | (values[valuesOffset] >>> 2); - blocks[blocksOffset++] = (values[valuesOffset++] << 62) | (values[valuesOffset++] << 25) | (values[valuesOffset] >>> 12); - blocks[blocksOffset++] = (values[valuesOffset++] << 52) | (values[valuesOffset++] << 15) | (values[valuesOffset] >>> 22); - blocks[blocksOffset++] = (values[valuesOffset++] << 42) | (values[valuesOffset++] << 5) | (values[valuesOffset] >>> 32); - blocks[blocksOffset++] = (values[valuesOffset++] << 32) | (values[valuesOffset] >>> 5); - blocks[blocksOffset++] = (values[valuesOffset++] << 59) | (values[valuesOffset++] << 22) | (values[valuesOffset] >>> 15); - blocks[blocksOffset++] = (values[valuesOffset++] << 49) | (values[valuesOffset++] << 12) | (values[valuesOffset] >>> 25); - blocks[blocksOffset++] = (values[valuesOffset++] << 39) | (values[valuesOffset++] << 2) | (values[valuesOffset] >>> 35); - blocks[blocksOffset++] = (values[valuesOffset++] << 29) | (values[valuesOffset] >>> 8); - blocks[blocksOffset++] = (values[valuesOffset++] << 56) | (values[valuesOffset++] << 19) | (values[valuesOffset] >>> 18); - blocks[blocksOffset++] = (values[valuesOffset++] << 46) | (values[valuesOffset++] << 9) | (values[valuesOffset] >>> 28); - blocks[blocksOffset++] = (values[valuesOffset++] << 36) | (values[valuesOffset] >>> 1); - blocks[blocksOffset++] = (values[valuesOffset++] << 63) | (values[valuesOffset++] << 26) | (values[valuesOffset] >>> 11); - blocks[blocksOffset++] = (values[valuesOffset++] << 53) | (values[valuesOffset++] << 16) | (values[valuesOffset] >>> 21); - blocks[blocksOffset++] = (values[valuesOffset++] << 43) | (values[valuesOffset++] << 6) | (values[valuesOffset] >>> 31); - blocks[blocksOffset++] = (values[valuesOffset++] << 33) | (values[valuesOffset] >>> 4); - blocks[blocksOffset++] = (values[valuesOffset++] << 60) | (values[valuesOffset++] << 23) | (values[valuesOffset] >>> 14); - blocks[blocksOffset++] = (values[valuesOffset++] << 50) | (values[valuesOffset++] << 13) | (values[valuesOffset] >>> 24); - blocks[blocksOffset++] = (values[valuesOffset++] << 40) | (values[valuesOffset++] << 3) | (values[valuesOffset] >>> 34); - blocks[blocksOffset++] = (values[valuesOffset++] << 30) | (values[valuesOffset] >>> 7); - blocks[blocksOffset++] = (values[valuesOffset++] << 57) | (values[valuesOffset++] << 20) | (values[valuesOffset] >>> 17); - blocks[blocksOffset++] = (values[valuesOffset++] << 47) | (values[valuesOffset++] << 10) | (values[valuesOffset] >>> 27); - blocks[blocksOffset++] = (values[valuesOffset++] << 37) | values[valuesOffset++]; - } - } - -} diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked38.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked38.java deleted file mode 100644 index 52a127d6c0f..00000000000 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked38.java +++ /dev/null @@ -1,351 +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 BulkOperationPacked38 extends BulkOperation { - @Override - public int blockCount() { - return 19; - } - - @Override - public int valueCount() { - return 32; - } - - @Override - public void decode(long[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) { - throw new UnsupportedOperationException(); - } - - @Override - public void decode(byte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) { - throw new UnsupportedOperationException(); - } - - @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 >>> 26; - final long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block0 & 67108863L) << 12) | (block1 >>> 52); - values[valuesOffset++] = (block1 >>> 14) & 274877906943L; - final long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block1 & 16383L) << 24) | (block2 >>> 40); - values[valuesOffset++] = (block2 >>> 2) & 274877906943L; - final long block3 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block2 & 3L) << 36) | (block3 >>> 28); - final long block4 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block3 & 268435455L) << 10) | (block4 >>> 54); - values[valuesOffset++] = (block4 >>> 16) & 274877906943L; - final long block5 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block4 & 65535L) << 22) | (block5 >>> 42); - values[valuesOffset++] = (block5 >>> 4) & 274877906943L; - final long block6 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block5 & 15L) << 34) | (block6 >>> 30); - final long block7 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block6 & 1073741823L) << 8) | (block7 >>> 56); - values[valuesOffset++] = (block7 >>> 18) & 274877906943L; - final long block8 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block7 & 262143L) << 20) | (block8 >>> 44); - values[valuesOffset++] = (block8 >>> 6) & 274877906943L; - final long block9 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block8 & 63L) << 32) | (block9 >>> 32); - final long block10 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block9 & 4294967295L) << 6) | (block10 >>> 58); - values[valuesOffset++] = (block10 >>> 20) & 274877906943L; - final long block11 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block10 & 1048575L) << 18) | (block11 >>> 46); - values[valuesOffset++] = (block11 >>> 8) & 274877906943L; - final long block12 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block11 & 255L) << 30) | (block12 >>> 34); - final long block13 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block12 & 17179869183L) << 4) | (block13 >>> 60); - values[valuesOffset++] = (block13 >>> 22) & 274877906943L; - final long block14 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block13 & 4194303L) << 16) | (block14 >>> 48); - values[valuesOffset++] = (block14 >>> 10) & 274877906943L; - final long block15 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block14 & 1023L) << 28) | (block15 >>> 36); - final long block16 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block15 & 68719476735L) << 2) | (block16 >>> 62); - values[valuesOffset++] = (block16 >>> 24) & 274877906943L; - final long block17 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block16 & 16777215L) << 14) | (block17 >>> 50); - values[valuesOffset++] = (block17 >>> 12) & 274877906943L; - final long block18 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block17 & 4095L) << 26) | (block18 >>> 38); - values[valuesOffset++] = block18 & 274877906943L; - } - } - - @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; - final long byte3 = blocks[blocksOffset++] & 0xFF; - final long byte4 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte0 << 30) | (byte1 << 22) | (byte2 << 14) | (byte3 << 6) | (byte4 >>> 2); - final long byte5 = blocks[blocksOffset++] & 0xFF; - final long byte6 = blocks[blocksOffset++] & 0xFF; - final long byte7 = blocks[blocksOffset++] & 0xFF; - final long byte8 = blocks[blocksOffset++] & 0xFF; - final long byte9 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte4 & 3) << 36) | (byte5 << 28) | (byte6 << 20) | (byte7 << 12) | (byte8 << 4) | (byte9 >>> 4); - final long byte10 = blocks[blocksOffset++] & 0xFF; - final long byte11 = blocks[blocksOffset++] & 0xFF; - final long byte12 = blocks[blocksOffset++] & 0xFF; - final long byte13 = blocks[blocksOffset++] & 0xFF; - final long byte14 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte9 & 15) << 34) | (byte10 << 26) | (byte11 << 18) | (byte12 << 10) | (byte13 << 2) | (byte14 >>> 6); - final long byte15 = blocks[blocksOffset++] & 0xFF; - final long byte16 = blocks[blocksOffset++] & 0xFF; - final long byte17 = blocks[blocksOffset++] & 0xFF; - final long byte18 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte14 & 63) << 32) | (byte15 << 24) | (byte16 << 16) | (byte17 << 8) | byte18; - final long byte19 = blocks[blocksOffset++] & 0xFF; - final long byte20 = blocks[blocksOffset++] & 0xFF; - final long byte21 = blocks[blocksOffset++] & 0xFF; - final long byte22 = blocks[blocksOffset++] & 0xFF; - final long byte23 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte19 << 30) | (byte20 << 22) | (byte21 << 14) | (byte22 << 6) | (byte23 >>> 2); - final long byte24 = blocks[blocksOffset++] & 0xFF; - final long byte25 = blocks[blocksOffset++] & 0xFF; - final long byte26 = blocks[blocksOffset++] & 0xFF; - final long byte27 = blocks[blocksOffset++] & 0xFF; - final long byte28 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte23 & 3) << 36) | (byte24 << 28) | (byte25 << 20) | (byte26 << 12) | (byte27 << 4) | (byte28 >>> 4); - final long byte29 = blocks[blocksOffset++] & 0xFF; - final long byte30 = blocks[blocksOffset++] & 0xFF; - final long byte31 = blocks[blocksOffset++] & 0xFF; - final long byte32 = blocks[blocksOffset++] & 0xFF; - final long byte33 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte28 & 15) << 34) | (byte29 << 26) | (byte30 << 18) | (byte31 << 10) | (byte32 << 2) | (byte33 >>> 6); - final long byte34 = blocks[blocksOffset++] & 0xFF; - final long byte35 = blocks[blocksOffset++] & 0xFF; - final long byte36 = blocks[blocksOffset++] & 0xFF; - final long byte37 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte33 & 63) << 32) | (byte34 << 24) | (byte35 << 16) | (byte36 << 8) | byte37; - final long byte38 = blocks[blocksOffset++] & 0xFF; - final long byte39 = blocks[blocksOffset++] & 0xFF; - final long byte40 = blocks[blocksOffset++] & 0xFF; - final long byte41 = blocks[blocksOffset++] & 0xFF; - final long byte42 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte38 << 30) | (byte39 << 22) | (byte40 << 14) | (byte41 << 6) | (byte42 >>> 2); - final long byte43 = blocks[blocksOffset++] & 0xFF; - final long byte44 = blocks[blocksOffset++] & 0xFF; - final long byte45 = blocks[blocksOffset++] & 0xFF; - final long byte46 = blocks[blocksOffset++] & 0xFF; - final long byte47 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte42 & 3) << 36) | (byte43 << 28) | (byte44 << 20) | (byte45 << 12) | (byte46 << 4) | (byte47 >>> 4); - final long byte48 = blocks[blocksOffset++] & 0xFF; - final long byte49 = blocks[blocksOffset++] & 0xFF; - final long byte50 = blocks[blocksOffset++] & 0xFF; - final long byte51 = blocks[blocksOffset++] & 0xFF; - final long byte52 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte47 & 15) << 34) | (byte48 << 26) | (byte49 << 18) | (byte50 << 10) | (byte51 << 2) | (byte52 >>> 6); - final long byte53 = blocks[blocksOffset++] & 0xFF; - final long byte54 = blocks[blocksOffset++] & 0xFF; - final long byte55 = blocks[blocksOffset++] & 0xFF; - final long byte56 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte52 & 63) << 32) | (byte53 << 24) | (byte54 << 16) | (byte55 << 8) | byte56; - final long byte57 = blocks[blocksOffset++] & 0xFF; - final long byte58 = blocks[blocksOffset++] & 0xFF; - final long byte59 = blocks[blocksOffset++] & 0xFF; - final long byte60 = blocks[blocksOffset++] & 0xFF; - final long byte61 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte57 << 30) | (byte58 << 22) | (byte59 << 14) | (byte60 << 6) | (byte61 >>> 2); - final long byte62 = blocks[blocksOffset++] & 0xFF; - final long byte63 = blocks[blocksOffset++] & 0xFF; - final long byte64 = blocks[blocksOffset++] & 0xFF; - final long byte65 = blocks[blocksOffset++] & 0xFF; - final long byte66 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte61 & 3) << 36) | (byte62 << 28) | (byte63 << 20) | (byte64 << 12) | (byte65 << 4) | (byte66 >>> 4); - final long byte67 = blocks[blocksOffset++] & 0xFF; - final long byte68 = blocks[blocksOffset++] & 0xFF; - final long byte69 = blocks[blocksOffset++] & 0xFF; - final long byte70 = blocks[blocksOffset++] & 0xFF; - final long byte71 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte66 & 15) << 34) | (byte67 << 26) | (byte68 << 18) | (byte69 << 10) | (byte70 << 2) | (byte71 >>> 6); - final long byte72 = blocks[blocksOffset++] & 0xFF; - final long byte73 = blocks[blocksOffset++] & 0xFF; - final long byte74 = blocks[blocksOffset++] & 0xFF; - final long byte75 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte71 & 63) << 32) | (byte72 << 24) | (byte73 << 16) | (byte74 << 8) | byte75; - final long byte76 = blocks[blocksOffset++] & 0xFF; - final long byte77 = blocks[blocksOffset++] & 0xFF; - final long byte78 = blocks[blocksOffset++] & 0xFF; - final long byte79 = blocks[blocksOffset++] & 0xFF; - final long byte80 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte76 << 30) | (byte77 << 22) | (byte78 << 14) | (byte79 << 6) | (byte80 >>> 2); - final long byte81 = blocks[blocksOffset++] & 0xFF; - final long byte82 = blocks[blocksOffset++] & 0xFF; - final long byte83 = blocks[blocksOffset++] & 0xFF; - final long byte84 = blocks[blocksOffset++] & 0xFF; - final long byte85 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte80 & 3) << 36) | (byte81 << 28) | (byte82 << 20) | (byte83 << 12) | (byte84 << 4) | (byte85 >>> 4); - final long byte86 = blocks[blocksOffset++] & 0xFF; - final long byte87 = blocks[blocksOffset++] & 0xFF; - final long byte88 = blocks[blocksOffset++] & 0xFF; - final long byte89 = blocks[blocksOffset++] & 0xFF; - final long byte90 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte85 & 15) << 34) | (byte86 << 26) | (byte87 << 18) | (byte88 << 10) | (byte89 << 2) | (byte90 >>> 6); - final long byte91 = blocks[blocksOffset++] & 0xFF; - final long byte92 = blocks[blocksOffset++] & 0xFF; - final long byte93 = blocks[blocksOffset++] & 0xFF; - final long byte94 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte90 & 63) << 32) | (byte91 << 24) | (byte92 << 16) | (byte93 << 8) | byte94; - final long byte95 = blocks[blocksOffset++] & 0xFF; - final long byte96 = blocks[blocksOffset++] & 0xFF; - final long byte97 = blocks[blocksOffset++] & 0xFF; - final long byte98 = blocks[blocksOffset++] & 0xFF; - final long byte99 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte95 << 30) | (byte96 << 22) | (byte97 << 14) | (byte98 << 6) | (byte99 >>> 2); - final long byte100 = blocks[blocksOffset++] & 0xFF; - final long byte101 = blocks[blocksOffset++] & 0xFF; - final long byte102 = blocks[blocksOffset++] & 0xFF; - final long byte103 = blocks[blocksOffset++] & 0xFF; - final long byte104 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte99 & 3) << 36) | (byte100 << 28) | (byte101 << 20) | (byte102 << 12) | (byte103 << 4) | (byte104 >>> 4); - final long byte105 = blocks[blocksOffset++] & 0xFF; - final long byte106 = blocks[blocksOffset++] & 0xFF; - final long byte107 = blocks[blocksOffset++] & 0xFF; - final long byte108 = blocks[blocksOffset++] & 0xFF; - final long byte109 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte104 & 15) << 34) | (byte105 << 26) | (byte106 << 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; - final long byte113 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte109 & 63) << 32) | (byte110 << 24) | (byte111 << 16) | (byte112 << 8) | byte113; - final long byte114 = blocks[blocksOffset++] & 0xFF; - final long byte115 = blocks[blocksOffset++] & 0xFF; - final long byte116 = blocks[blocksOffset++] & 0xFF; - final long byte117 = blocks[blocksOffset++] & 0xFF; - final long byte118 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte114 << 30) | (byte115 << 22) | (byte116 << 14) | (byte117 << 6) | (byte118 >>> 2); - final long byte119 = blocks[blocksOffset++] & 0xFF; - final long byte120 = blocks[blocksOffset++] & 0xFF; - final long byte121 = blocks[blocksOffset++] & 0xFF; - final long byte122 = blocks[blocksOffset++] & 0xFF; - final long byte123 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte118 & 3) << 36) | (byte119 << 28) | (byte120 << 20) | (byte121 << 12) | (byte122 << 4) | (byte123 >>> 4); - final long byte124 = blocks[blocksOffset++] & 0xFF; - final long byte125 = blocks[blocksOffset++] & 0xFF; - final long byte126 = blocks[blocksOffset++] & 0xFF; - final long byte127 = blocks[blocksOffset++] & 0xFF; - final long byte128 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte123 & 15) << 34) | (byte124 << 26) | (byte125 << 18) | (byte126 << 10) | (byte127 << 2) | (byte128 >>> 6); - final long byte129 = blocks[blocksOffset++] & 0xFF; - final long byte130 = blocks[blocksOffset++] & 0xFF; - final long byte131 = blocks[blocksOffset++] & 0xFF; - final long byte132 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte128 & 63) << 32) | (byte129 << 24) | (byte130 << 16) | (byte131 << 8) | byte132; - final long byte133 = blocks[blocksOffset++] & 0xFF; - final long byte134 = blocks[blocksOffset++] & 0xFF; - final long byte135 = blocks[blocksOffset++] & 0xFF; - final long byte136 = blocks[blocksOffset++] & 0xFF; - final long byte137 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte133 << 30) | (byte134 << 22) | (byte135 << 14) | (byte136 << 6) | (byte137 >>> 2); - final long byte138 = blocks[blocksOffset++] & 0xFF; - final long byte139 = blocks[blocksOffset++] & 0xFF; - final long byte140 = blocks[blocksOffset++] & 0xFF; - final long byte141 = blocks[blocksOffset++] & 0xFF; - final long byte142 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte137 & 3) << 36) | (byte138 << 28) | (byte139 << 20) | (byte140 << 12) | (byte141 << 4) | (byte142 >>> 4); - final long byte143 = blocks[blocksOffset++] & 0xFF; - final long byte144 = blocks[blocksOffset++] & 0xFF; - final long byte145 = blocks[blocksOffset++] & 0xFF; - final long byte146 = blocks[blocksOffset++] & 0xFF; - final long byte147 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte142 & 15) << 34) | (byte143 << 26) | (byte144 << 18) | (byte145 << 10) | (byte146 << 2) | (byte147 >>> 6); - final long byte148 = blocks[blocksOffset++] & 0xFF; - final long byte149 = blocks[blocksOffset++] & 0xFF; - final long byte150 = blocks[blocksOffset++] & 0xFF; - final long byte151 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte147 & 63) << 32) | (byte148 << 24) | (byte149 << 16) | (byte150 << 8) | byte151; - } - } - - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 26) | ((values[valuesOffset] & 0xffffffffL) >>> 12); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 52) | ((values[valuesOffset++] & 0xffffffffL) << 14) | ((values[valuesOffset] & 0xffffffffL) >>> 24); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 40) | ((values[valuesOffset++] & 0xffffffffL) << 2) | ((values[valuesOffset] & 0xffffffffL) >>> 36); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 28) | ((values[valuesOffset] & 0xffffffffL) >>> 10); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 54) | ((values[valuesOffset++] & 0xffffffffL) << 16) | ((values[valuesOffset] & 0xffffffffL) >>> 22); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 42) | ((values[valuesOffset++] & 0xffffffffL) << 4) | ((values[valuesOffset] & 0xffffffffL) >>> 34); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 30) | ((values[valuesOffset] & 0xffffffffL) >>> 8); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 56) | ((values[valuesOffset++] & 0xffffffffL) << 18) | ((values[valuesOffset] & 0xffffffffL) >>> 20); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 44) | ((values[valuesOffset++] & 0xffffffffL) << 6) | ((values[valuesOffset] & 0xffffffffL) >>> 32); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 32) | ((values[valuesOffset] & 0xffffffffL) >>> 6); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 58) | ((values[valuesOffset++] & 0xffffffffL) << 20) | ((values[valuesOffset] & 0xffffffffL) >>> 18); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 46) | ((values[valuesOffset++] & 0xffffffffL) << 8) | ((values[valuesOffset] & 0xffffffffL) >>> 30); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 34) | ((values[valuesOffset] & 0xffffffffL) >>> 4); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 60) | ((values[valuesOffset++] & 0xffffffffL) << 22) | ((values[valuesOffset] & 0xffffffffL) >>> 16); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 48) | ((values[valuesOffset++] & 0xffffffffL) << 10) | ((values[valuesOffset] & 0xffffffffL) >>> 28); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 36) | ((values[valuesOffset] & 0xffffffffL) >>> 2); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 62) | ((values[valuesOffset++] & 0xffffffffL) << 24) | ((values[valuesOffset] & 0xffffffffL) >>> 14); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 50) | ((values[valuesOffset++] & 0xffffffffL) << 12) | ((values[valuesOffset] & 0xffffffffL) >>> 26); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 38) | (values[valuesOffset++] & 0xffffffffL); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] << 26) | (values[valuesOffset] >>> 12); - blocks[blocksOffset++] = (values[valuesOffset++] << 52) | (values[valuesOffset++] << 14) | (values[valuesOffset] >>> 24); - blocks[blocksOffset++] = (values[valuesOffset++] << 40) | (values[valuesOffset++] << 2) | (values[valuesOffset] >>> 36); - blocks[blocksOffset++] = (values[valuesOffset++] << 28) | (values[valuesOffset] >>> 10); - blocks[blocksOffset++] = (values[valuesOffset++] << 54) | (values[valuesOffset++] << 16) | (values[valuesOffset] >>> 22); - blocks[blocksOffset++] = (values[valuesOffset++] << 42) | (values[valuesOffset++] << 4) | (values[valuesOffset] >>> 34); - blocks[blocksOffset++] = (values[valuesOffset++] << 30) | (values[valuesOffset] >>> 8); - blocks[blocksOffset++] = (values[valuesOffset++] << 56) | (values[valuesOffset++] << 18) | (values[valuesOffset] >>> 20); - blocks[blocksOffset++] = (values[valuesOffset++] << 44) | (values[valuesOffset++] << 6) | (values[valuesOffset] >>> 32); - blocks[blocksOffset++] = (values[valuesOffset++] << 32) | (values[valuesOffset] >>> 6); - blocks[blocksOffset++] = (values[valuesOffset++] << 58) | (values[valuesOffset++] << 20) | (values[valuesOffset] >>> 18); - blocks[blocksOffset++] = (values[valuesOffset++] << 46) | (values[valuesOffset++] << 8) | (values[valuesOffset] >>> 30); - blocks[blocksOffset++] = (values[valuesOffset++] << 34) | (values[valuesOffset] >>> 4); - blocks[blocksOffset++] = (values[valuesOffset++] << 60) | (values[valuesOffset++] << 22) | (values[valuesOffset] >>> 16); - blocks[blocksOffset++] = (values[valuesOffset++] << 48) | (values[valuesOffset++] << 10) | (values[valuesOffset] >>> 28); - blocks[blocksOffset++] = (values[valuesOffset++] << 36) | (values[valuesOffset] >>> 2); - blocks[blocksOffset++] = (values[valuesOffset++] << 62) | (values[valuesOffset++] << 24) | (values[valuesOffset] >>> 14); - blocks[blocksOffset++] = (values[valuesOffset++] << 50) | (values[valuesOffset++] << 12) | (values[valuesOffset] >>> 26); - blocks[blocksOffset++] = (values[valuesOffset++] << 38) | values[valuesOffset++]; - } - } - -} diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked39.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked39.java deleted file mode 100644 index 735d1d6f8bf..00000000000 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked39.java +++ /dev/null @@ -1,635 +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 BulkOperationPacked39 extends BulkOperation { - @Override - public int blockCount() { - return 39; - } - - @Override - public int valueCount() { - return 64; - } - - @Override - public void decode(long[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) { - throw new UnsupportedOperationException(); - } - - @Override - public void decode(byte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) { - throw new UnsupportedOperationException(); - } - - @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 >>> 25; - final long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block0 & 33554431L) << 14) | (block1 >>> 50); - values[valuesOffset++] = (block1 >>> 11) & 549755813887L; - final long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block1 & 2047L) << 28) | (block2 >>> 36); - final long block3 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block2 & 68719476735L) << 3) | (block3 >>> 61); - values[valuesOffset++] = (block3 >>> 22) & 549755813887L; - final long block4 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block3 & 4194303L) << 17) | (block4 >>> 47); - values[valuesOffset++] = (block4 >>> 8) & 549755813887L; - final long block5 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block4 & 255L) << 31) | (block5 >>> 33); - final long block6 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block5 & 8589934591L) << 6) | (block6 >>> 58); - values[valuesOffset++] = (block6 >>> 19) & 549755813887L; - final long block7 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block6 & 524287L) << 20) | (block7 >>> 44); - values[valuesOffset++] = (block7 >>> 5) & 549755813887L; - final long block8 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block7 & 31L) << 34) | (block8 >>> 30); - final long block9 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block8 & 1073741823L) << 9) | (block9 >>> 55); - values[valuesOffset++] = (block9 >>> 16) & 549755813887L; - final long block10 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block9 & 65535L) << 23) | (block10 >>> 41); - values[valuesOffset++] = (block10 >>> 2) & 549755813887L; - final long block11 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block10 & 3L) << 37) | (block11 >>> 27); - final long block12 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block11 & 134217727L) << 12) | (block12 >>> 52); - values[valuesOffset++] = (block12 >>> 13) & 549755813887L; - final long block13 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block12 & 8191L) << 26) | (block13 >>> 38); - final long block14 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block13 & 274877906943L) << 1) | (block14 >>> 63); - values[valuesOffset++] = (block14 >>> 24) & 549755813887L; - final long block15 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block14 & 16777215L) << 15) | (block15 >>> 49); - values[valuesOffset++] = (block15 >>> 10) & 549755813887L; - final long block16 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block15 & 1023L) << 29) | (block16 >>> 35); - final long block17 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block16 & 34359738367L) << 4) | (block17 >>> 60); - values[valuesOffset++] = (block17 >>> 21) & 549755813887L; - final long block18 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block17 & 2097151L) << 18) | (block18 >>> 46); - values[valuesOffset++] = (block18 >>> 7) & 549755813887L; - final long block19 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block18 & 127L) << 32) | (block19 >>> 32); - final long block20 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block19 & 4294967295L) << 7) | (block20 >>> 57); - values[valuesOffset++] = (block20 >>> 18) & 549755813887L; - final long block21 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block20 & 262143L) << 21) | (block21 >>> 43); - values[valuesOffset++] = (block21 >>> 4) & 549755813887L; - final long block22 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block21 & 15L) << 35) | (block22 >>> 29); - final long block23 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block22 & 536870911L) << 10) | (block23 >>> 54); - values[valuesOffset++] = (block23 >>> 15) & 549755813887L; - final long block24 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block23 & 32767L) << 24) | (block24 >>> 40); - values[valuesOffset++] = (block24 >>> 1) & 549755813887L; - final long block25 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block24 & 1L) << 38) | (block25 >>> 26); - final long block26 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block25 & 67108863L) << 13) | (block26 >>> 51); - values[valuesOffset++] = (block26 >>> 12) & 549755813887L; - final long block27 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block26 & 4095L) << 27) | (block27 >>> 37); - final long block28 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block27 & 137438953471L) << 2) | (block28 >>> 62); - values[valuesOffset++] = (block28 >>> 23) & 549755813887L; - final long block29 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block28 & 8388607L) << 16) | (block29 >>> 48); - values[valuesOffset++] = (block29 >>> 9) & 549755813887L; - final long block30 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block29 & 511L) << 30) | (block30 >>> 34); - final long block31 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block30 & 17179869183L) << 5) | (block31 >>> 59); - values[valuesOffset++] = (block31 >>> 20) & 549755813887L; - final long block32 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block31 & 1048575L) << 19) | (block32 >>> 45); - values[valuesOffset++] = (block32 >>> 6) & 549755813887L; - final long block33 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block32 & 63L) << 33) | (block33 >>> 31); - final long block34 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block33 & 2147483647L) << 8) | (block34 >>> 56); - values[valuesOffset++] = (block34 >>> 17) & 549755813887L; - final long block35 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block34 & 131071L) << 22) | (block35 >>> 42); - values[valuesOffset++] = (block35 >>> 3) & 549755813887L; - final long block36 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block35 & 7L) << 36) | (block36 >>> 28); - final long block37 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block36 & 268435455L) << 11) | (block37 >>> 53); - values[valuesOffset++] = (block37 >>> 14) & 549755813887L; - final long block38 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block37 & 16383L) << 25) | (block38 >>> 39); - values[valuesOffset++] = block38 & 549755813887L; - } - } - - @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; - final long byte3 = blocks[blocksOffset++] & 0xFF; - final long byte4 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte0 << 31) | (byte1 << 23) | (byte2 << 15) | (byte3 << 7) | (byte4 >>> 1); - final long byte5 = blocks[blocksOffset++] & 0xFF; - final long byte6 = blocks[blocksOffset++] & 0xFF; - final long byte7 = blocks[blocksOffset++] & 0xFF; - final long byte8 = blocks[blocksOffset++] & 0xFF; - final long byte9 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte4 & 1) << 38) | (byte5 << 30) | (byte6 << 22) | (byte7 << 14) | (byte8 << 6) | (byte9 >>> 2); - final long byte10 = blocks[blocksOffset++] & 0xFF; - final long byte11 = blocks[blocksOffset++] & 0xFF; - final long byte12 = blocks[blocksOffset++] & 0xFF; - final long byte13 = blocks[blocksOffset++] & 0xFF; - final long byte14 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte9 & 3) << 37) | (byte10 << 29) | (byte11 << 21) | (byte12 << 13) | (byte13 << 5) | (byte14 >>> 3); - final long byte15 = blocks[blocksOffset++] & 0xFF; - final long byte16 = blocks[blocksOffset++] & 0xFF; - final long byte17 = blocks[blocksOffset++] & 0xFF; - final long byte18 = blocks[blocksOffset++] & 0xFF; - final long byte19 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte14 & 7) << 36) | (byte15 << 28) | (byte16 << 20) | (byte17 << 12) | (byte18 << 4) | (byte19 >>> 4); - final long byte20 = blocks[blocksOffset++] & 0xFF; - final long byte21 = blocks[blocksOffset++] & 0xFF; - final long byte22 = blocks[blocksOffset++] & 0xFF; - final long byte23 = blocks[blocksOffset++] & 0xFF; - final long byte24 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte19 & 15) << 35) | (byte20 << 27) | (byte21 << 19) | (byte22 << 11) | (byte23 << 3) | (byte24 >>> 5); - final long byte25 = blocks[blocksOffset++] & 0xFF; - final long byte26 = blocks[blocksOffset++] & 0xFF; - final long byte27 = blocks[blocksOffset++] & 0xFF; - final long byte28 = blocks[blocksOffset++] & 0xFF; - final long byte29 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte24 & 31) << 34) | (byte25 << 26) | (byte26 << 18) | (byte27 << 10) | (byte28 << 2) | (byte29 >>> 6); - final long byte30 = blocks[blocksOffset++] & 0xFF; - final long byte31 = blocks[blocksOffset++] & 0xFF; - final long byte32 = blocks[blocksOffset++] & 0xFF; - final long byte33 = blocks[blocksOffset++] & 0xFF; - final long byte34 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte29 & 63) << 33) | (byte30 << 25) | (byte31 << 17) | (byte32 << 9) | (byte33 << 1) | (byte34 >>> 7); - final long byte35 = blocks[blocksOffset++] & 0xFF; - final long byte36 = blocks[blocksOffset++] & 0xFF; - final long byte37 = blocks[blocksOffset++] & 0xFF; - final long byte38 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte34 & 127) << 32) | (byte35 << 24) | (byte36 << 16) | (byte37 << 8) | byte38; - final long byte39 = blocks[blocksOffset++] & 0xFF; - final long byte40 = blocks[blocksOffset++] & 0xFF; - final long byte41 = blocks[blocksOffset++] & 0xFF; - final long byte42 = blocks[blocksOffset++] & 0xFF; - final long byte43 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte39 << 31) | (byte40 << 23) | (byte41 << 15) | (byte42 << 7) | (byte43 >>> 1); - final long byte44 = blocks[blocksOffset++] & 0xFF; - final long byte45 = blocks[blocksOffset++] & 0xFF; - final long byte46 = blocks[blocksOffset++] & 0xFF; - final long byte47 = blocks[blocksOffset++] & 0xFF; - final long byte48 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte43 & 1) << 38) | (byte44 << 30) | (byte45 << 22) | (byte46 << 14) | (byte47 << 6) | (byte48 >>> 2); - final long byte49 = blocks[blocksOffset++] & 0xFF; - final long byte50 = blocks[blocksOffset++] & 0xFF; - final long byte51 = blocks[blocksOffset++] & 0xFF; - final long byte52 = blocks[blocksOffset++] & 0xFF; - final long byte53 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte48 & 3) << 37) | (byte49 << 29) | (byte50 << 21) | (byte51 << 13) | (byte52 << 5) | (byte53 >>> 3); - final long byte54 = blocks[blocksOffset++] & 0xFF; - final long byte55 = blocks[blocksOffset++] & 0xFF; - final long byte56 = blocks[blocksOffset++] & 0xFF; - final long byte57 = blocks[blocksOffset++] & 0xFF; - final long byte58 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte53 & 7) << 36) | (byte54 << 28) | (byte55 << 20) | (byte56 << 12) | (byte57 << 4) | (byte58 >>> 4); - final long byte59 = blocks[blocksOffset++] & 0xFF; - final long byte60 = blocks[blocksOffset++] & 0xFF; - final long byte61 = blocks[blocksOffset++] & 0xFF; - final long byte62 = blocks[blocksOffset++] & 0xFF; - final long byte63 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte58 & 15) << 35) | (byte59 << 27) | (byte60 << 19) | (byte61 << 11) | (byte62 << 3) | (byte63 >>> 5); - final long byte64 = blocks[blocksOffset++] & 0xFF; - final long byte65 = blocks[blocksOffset++] & 0xFF; - final long byte66 = blocks[blocksOffset++] & 0xFF; - final long byte67 = blocks[blocksOffset++] & 0xFF; - final long byte68 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte63 & 31) << 34) | (byte64 << 26) | (byte65 << 18) | (byte66 << 10) | (byte67 << 2) | (byte68 >>> 6); - final long byte69 = blocks[blocksOffset++] & 0xFF; - final long byte70 = blocks[blocksOffset++] & 0xFF; - final long byte71 = blocks[blocksOffset++] & 0xFF; - final long byte72 = blocks[blocksOffset++] & 0xFF; - final long byte73 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte68 & 63) << 33) | (byte69 << 25) | (byte70 << 17) | (byte71 << 9) | (byte72 << 1) | (byte73 >>> 7); - final long byte74 = blocks[blocksOffset++] & 0xFF; - final long byte75 = blocks[blocksOffset++] & 0xFF; - final long byte76 = blocks[blocksOffset++] & 0xFF; - final long byte77 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte73 & 127) << 32) | (byte74 << 24) | (byte75 << 16) | (byte76 << 8) | byte77; - final long byte78 = blocks[blocksOffset++] & 0xFF; - final long byte79 = blocks[blocksOffset++] & 0xFF; - final long byte80 = blocks[blocksOffset++] & 0xFF; - final long byte81 = blocks[blocksOffset++] & 0xFF; - final long byte82 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte78 << 31) | (byte79 << 23) | (byte80 << 15) | (byte81 << 7) | (byte82 >>> 1); - final long byte83 = blocks[blocksOffset++] & 0xFF; - final long byte84 = blocks[blocksOffset++] & 0xFF; - final long byte85 = blocks[blocksOffset++] & 0xFF; - final long byte86 = blocks[blocksOffset++] & 0xFF; - final long byte87 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte82 & 1) << 38) | (byte83 << 30) | (byte84 << 22) | (byte85 << 14) | (byte86 << 6) | (byte87 >>> 2); - final long byte88 = blocks[blocksOffset++] & 0xFF; - final long byte89 = blocks[blocksOffset++] & 0xFF; - final long byte90 = blocks[blocksOffset++] & 0xFF; - final long byte91 = blocks[blocksOffset++] & 0xFF; - final long byte92 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte87 & 3) << 37) | (byte88 << 29) | (byte89 << 21) | (byte90 << 13) | (byte91 << 5) | (byte92 >>> 3); - final long byte93 = blocks[blocksOffset++] & 0xFF; - final long byte94 = blocks[blocksOffset++] & 0xFF; - final long byte95 = blocks[blocksOffset++] & 0xFF; - final long byte96 = blocks[blocksOffset++] & 0xFF; - final long byte97 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte92 & 7) << 36) | (byte93 << 28) | (byte94 << 20) | (byte95 << 12) | (byte96 << 4) | (byte97 >>> 4); - final long byte98 = blocks[blocksOffset++] & 0xFF; - final long byte99 = blocks[blocksOffset++] & 0xFF; - final long byte100 = blocks[blocksOffset++] & 0xFF; - final long byte101 = blocks[blocksOffset++] & 0xFF; - final long byte102 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte97 & 15) << 35) | (byte98 << 27) | (byte99 << 19) | (byte100 << 11) | (byte101 << 3) | (byte102 >>> 5); - final long byte103 = blocks[blocksOffset++] & 0xFF; - final long byte104 = blocks[blocksOffset++] & 0xFF; - final long byte105 = blocks[blocksOffset++] & 0xFF; - final long byte106 = blocks[blocksOffset++] & 0xFF; - final long byte107 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte102 & 31) << 34) | (byte103 << 26) | (byte104 << 18) | (byte105 << 10) | (byte106 << 2) | (byte107 >>> 6); - final long byte108 = blocks[blocksOffset++] & 0xFF; - final long byte109 = blocks[blocksOffset++] & 0xFF; - final long byte110 = blocks[blocksOffset++] & 0xFF; - final long byte111 = blocks[blocksOffset++] & 0xFF; - final long byte112 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte107 & 63) << 33) | (byte108 << 25) | (byte109 << 17) | (byte110 << 9) | (byte111 << 1) | (byte112 >>> 7); - final long byte113 = blocks[blocksOffset++] & 0xFF; - final long byte114 = blocks[blocksOffset++] & 0xFF; - final long byte115 = blocks[blocksOffset++] & 0xFF; - final long byte116 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte112 & 127) << 32) | (byte113 << 24) | (byte114 << 16) | (byte115 << 8) | byte116; - final long byte117 = blocks[blocksOffset++] & 0xFF; - final long byte118 = blocks[blocksOffset++] & 0xFF; - final long byte119 = blocks[blocksOffset++] & 0xFF; - final long byte120 = blocks[blocksOffset++] & 0xFF; - final long byte121 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte117 << 31) | (byte118 << 23) | (byte119 << 15) | (byte120 << 7) | (byte121 >>> 1); - final long byte122 = blocks[blocksOffset++] & 0xFF; - final long byte123 = blocks[blocksOffset++] & 0xFF; - final long byte124 = blocks[blocksOffset++] & 0xFF; - final long byte125 = blocks[blocksOffset++] & 0xFF; - final long byte126 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte121 & 1) << 38) | (byte122 << 30) | (byte123 << 22) | (byte124 << 14) | (byte125 << 6) | (byte126 >>> 2); - final long byte127 = blocks[blocksOffset++] & 0xFF; - final long byte128 = blocks[blocksOffset++] & 0xFF; - final long byte129 = blocks[blocksOffset++] & 0xFF; - final long byte130 = blocks[blocksOffset++] & 0xFF; - final long byte131 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte126 & 3) << 37) | (byte127 << 29) | (byte128 << 21) | (byte129 << 13) | (byte130 << 5) | (byte131 >>> 3); - final long byte132 = blocks[blocksOffset++] & 0xFF; - final long byte133 = blocks[blocksOffset++] & 0xFF; - final long byte134 = blocks[blocksOffset++] & 0xFF; - final long byte135 = blocks[blocksOffset++] & 0xFF; - final long byte136 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte131 & 7) << 36) | (byte132 << 28) | (byte133 << 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; - final long byte140 = blocks[blocksOffset++] & 0xFF; - final long byte141 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte136 & 15) << 35) | (byte137 << 27) | (byte138 << 19) | (byte139 << 11) | (byte140 << 3) | (byte141 >>> 5); - final long byte142 = blocks[blocksOffset++] & 0xFF; - final long byte143 = blocks[blocksOffset++] & 0xFF; - final long byte144 = blocks[blocksOffset++] & 0xFF; - final long byte145 = blocks[blocksOffset++] & 0xFF; - final long byte146 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte141 & 31) << 34) | (byte142 << 26) | (byte143 << 18) | (byte144 << 10) | (byte145 << 2) | (byte146 >>> 6); - final long byte147 = blocks[blocksOffset++] & 0xFF; - final long byte148 = blocks[blocksOffset++] & 0xFF; - final long byte149 = blocks[blocksOffset++] & 0xFF; - final long byte150 = blocks[blocksOffset++] & 0xFF; - final long byte151 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte146 & 63) << 33) | (byte147 << 25) | (byte148 << 17) | (byte149 << 9) | (byte150 << 1) | (byte151 >>> 7); - final long byte152 = blocks[blocksOffset++] & 0xFF; - final long byte153 = blocks[blocksOffset++] & 0xFF; - final long byte154 = blocks[blocksOffset++] & 0xFF; - final long byte155 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte151 & 127) << 32) | (byte152 << 24) | (byte153 << 16) | (byte154 << 8) | byte155; - final long byte156 = blocks[blocksOffset++] & 0xFF; - final long byte157 = blocks[blocksOffset++] & 0xFF; - final long byte158 = blocks[blocksOffset++] & 0xFF; - final long byte159 = blocks[blocksOffset++] & 0xFF; - final long byte160 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte156 << 31) | (byte157 << 23) | (byte158 << 15) | (byte159 << 7) | (byte160 >>> 1); - final long byte161 = blocks[blocksOffset++] & 0xFF; - final long byte162 = blocks[blocksOffset++] & 0xFF; - final long byte163 = blocks[blocksOffset++] & 0xFF; - final long byte164 = blocks[blocksOffset++] & 0xFF; - final long byte165 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte160 & 1) << 38) | (byte161 << 30) | (byte162 << 22) | (byte163 << 14) | (byte164 << 6) | (byte165 >>> 2); - final long byte166 = blocks[blocksOffset++] & 0xFF; - final long byte167 = blocks[blocksOffset++] & 0xFF; - final long byte168 = blocks[blocksOffset++] & 0xFF; - final long byte169 = blocks[blocksOffset++] & 0xFF; - final long byte170 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte165 & 3) << 37) | (byte166 << 29) | (byte167 << 21) | (byte168 << 13) | (byte169 << 5) | (byte170 >>> 3); - final long byte171 = blocks[blocksOffset++] & 0xFF; - final long byte172 = blocks[blocksOffset++] & 0xFF; - final long byte173 = blocks[blocksOffset++] & 0xFF; - final long byte174 = blocks[blocksOffset++] & 0xFF; - final long byte175 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte170 & 7) << 36) | (byte171 << 28) | (byte172 << 20) | (byte173 << 12) | (byte174 << 4) | (byte175 >>> 4); - final long byte176 = blocks[blocksOffset++] & 0xFF; - final long byte177 = blocks[blocksOffset++] & 0xFF; - final long byte178 = blocks[blocksOffset++] & 0xFF; - final long byte179 = blocks[blocksOffset++] & 0xFF; - final long byte180 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte175 & 15) << 35) | (byte176 << 27) | (byte177 << 19) | (byte178 << 11) | (byte179 << 3) | (byte180 >>> 5); - final long byte181 = blocks[blocksOffset++] & 0xFF; - final long byte182 = blocks[blocksOffset++] & 0xFF; - final long byte183 = blocks[blocksOffset++] & 0xFF; - final long byte184 = blocks[blocksOffset++] & 0xFF; - final long byte185 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte180 & 31) << 34) | (byte181 << 26) | (byte182 << 18) | (byte183 << 10) | (byte184 << 2) | (byte185 >>> 6); - final long byte186 = blocks[blocksOffset++] & 0xFF; - final long byte187 = blocks[blocksOffset++] & 0xFF; - final long byte188 = blocks[blocksOffset++] & 0xFF; - final long byte189 = blocks[blocksOffset++] & 0xFF; - final long byte190 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte185 & 63) << 33) | (byte186 << 25) | (byte187 << 17) | (byte188 << 9) | (byte189 << 1) | (byte190 >>> 7); - final long byte191 = blocks[blocksOffset++] & 0xFF; - final long byte192 = blocks[blocksOffset++] & 0xFF; - final long byte193 = blocks[blocksOffset++] & 0xFF; - final long byte194 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte190 & 127) << 32) | (byte191 << 24) | (byte192 << 16) | (byte193 << 8) | byte194; - final long byte195 = blocks[blocksOffset++] & 0xFF; - final long byte196 = blocks[blocksOffset++] & 0xFF; - final long byte197 = blocks[blocksOffset++] & 0xFF; - final long byte198 = blocks[blocksOffset++] & 0xFF; - final long byte199 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte195 << 31) | (byte196 << 23) | (byte197 << 15) | (byte198 << 7) | (byte199 >>> 1); - final long byte200 = blocks[blocksOffset++] & 0xFF; - final long byte201 = blocks[blocksOffset++] & 0xFF; - final long byte202 = blocks[blocksOffset++] & 0xFF; - final long byte203 = blocks[blocksOffset++] & 0xFF; - final long byte204 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte199 & 1) << 38) | (byte200 << 30) | (byte201 << 22) | (byte202 << 14) | (byte203 << 6) | (byte204 >>> 2); - final long byte205 = blocks[blocksOffset++] & 0xFF; - final long byte206 = blocks[blocksOffset++] & 0xFF; - final long byte207 = blocks[blocksOffset++] & 0xFF; - final long byte208 = blocks[blocksOffset++] & 0xFF; - final long byte209 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte204 & 3) << 37) | (byte205 << 29) | (byte206 << 21) | (byte207 << 13) | (byte208 << 5) | (byte209 >>> 3); - final long byte210 = blocks[blocksOffset++] & 0xFF; - final long byte211 = blocks[blocksOffset++] & 0xFF; - final long byte212 = blocks[blocksOffset++] & 0xFF; - final long byte213 = blocks[blocksOffset++] & 0xFF; - final long byte214 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte209 & 7) << 36) | (byte210 << 28) | (byte211 << 20) | (byte212 << 12) | (byte213 << 4) | (byte214 >>> 4); - final long byte215 = blocks[blocksOffset++] & 0xFF; - final long byte216 = blocks[blocksOffset++] & 0xFF; - final long byte217 = blocks[blocksOffset++] & 0xFF; - final long byte218 = blocks[blocksOffset++] & 0xFF; - final long byte219 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte214 & 15) << 35) | (byte215 << 27) | (byte216 << 19) | (byte217 << 11) | (byte218 << 3) | (byte219 >>> 5); - final long byte220 = blocks[blocksOffset++] & 0xFF; - final long byte221 = blocks[blocksOffset++] & 0xFF; - final long byte222 = blocks[blocksOffset++] & 0xFF; - final long byte223 = blocks[blocksOffset++] & 0xFF; - final long byte224 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte219 & 31) << 34) | (byte220 << 26) | (byte221 << 18) | (byte222 << 10) | (byte223 << 2) | (byte224 >>> 6); - final long byte225 = blocks[blocksOffset++] & 0xFF; - final long byte226 = blocks[blocksOffset++] & 0xFF; - final long byte227 = blocks[blocksOffset++] & 0xFF; - final long byte228 = blocks[blocksOffset++] & 0xFF; - final long byte229 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte224 & 63) << 33) | (byte225 << 25) | (byte226 << 17) | (byte227 << 9) | (byte228 << 1) | (byte229 >>> 7); - final long byte230 = blocks[blocksOffset++] & 0xFF; - final long byte231 = blocks[blocksOffset++] & 0xFF; - final long byte232 = blocks[blocksOffset++] & 0xFF; - final long byte233 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte229 & 127) << 32) | (byte230 << 24) | (byte231 << 16) | (byte232 << 8) | byte233; - final long byte234 = blocks[blocksOffset++] & 0xFF; - final long byte235 = blocks[blocksOffset++] & 0xFF; - final long byte236 = blocks[blocksOffset++] & 0xFF; - final long byte237 = blocks[blocksOffset++] & 0xFF; - final long byte238 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte234 << 31) | (byte235 << 23) | (byte236 << 15) | (byte237 << 7) | (byte238 >>> 1); - final long byte239 = blocks[blocksOffset++] & 0xFF; - final long byte240 = blocks[blocksOffset++] & 0xFF; - final long byte241 = blocks[blocksOffset++] & 0xFF; - final long byte242 = blocks[blocksOffset++] & 0xFF; - final long byte243 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte238 & 1) << 38) | (byte239 << 30) | (byte240 << 22) | (byte241 << 14) | (byte242 << 6) | (byte243 >>> 2); - final long byte244 = blocks[blocksOffset++] & 0xFF; - final long byte245 = blocks[blocksOffset++] & 0xFF; - final long byte246 = blocks[blocksOffset++] & 0xFF; - final long byte247 = blocks[blocksOffset++] & 0xFF; - final long byte248 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte243 & 3) << 37) | (byte244 << 29) | (byte245 << 21) | (byte246 << 13) | (byte247 << 5) | (byte248 >>> 3); - final long byte249 = blocks[blocksOffset++] & 0xFF; - final long byte250 = blocks[blocksOffset++] & 0xFF; - final long byte251 = blocks[blocksOffset++] & 0xFF; - final long byte252 = blocks[blocksOffset++] & 0xFF; - final long byte253 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte248 & 7) << 36) | (byte249 << 28) | (byte250 << 20) | (byte251 << 12) | (byte252 << 4) | (byte253 >>> 4); - final long byte254 = blocks[blocksOffset++] & 0xFF; - final long byte255 = blocks[blocksOffset++] & 0xFF; - final long byte256 = blocks[blocksOffset++] & 0xFF; - final long byte257 = blocks[blocksOffset++] & 0xFF; - final long byte258 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte253 & 15) << 35) | (byte254 << 27) | (byte255 << 19) | (byte256 << 11) | (byte257 << 3) | (byte258 >>> 5); - final long byte259 = blocks[blocksOffset++] & 0xFF; - final long byte260 = blocks[blocksOffset++] & 0xFF; - final long byte261 = blocks[blocksOffset++] & 0xFF; - final long byte262 = blocks[blocksOffset++] & 0xFF; - final long byte263 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte258 & 31) << 34) | (byte259 << 26) | (byte260 << 18) | (byte261 << 10) | (byte262 << 2) | (byte263 >>> 6); - final long byte264 = blocks[blocksOffset++] & 0xFF; - final long byte265 = blocks[blocksOffset++] & 0xFF; - final long byte266 = blocks[blocksOffset++] & 0xFF; - final long byte267 = blocks[blocksOffset++] & 0xFF; - final long byte268 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte263 & 63) << 33) | (byte264 << 25) | (byte265 << 17) | (byte266 << 9) | (byte267 << 1) | (byte268 >>> 7); - final long byte269 = blocks[blocksOffset++] & 0xFF; - final long byte270 = blocks[blocksOffset++] & 0xFF; - final long byte271 = blocks[blocksOffset++] & 0xFF; - final long byte272 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte268 & 127) << 32) | (byte269 << 24) | (byte270 << 16) | (byte271 << 8) | byte272; - final long byte273 = blocks[blocksOffset++] & 0xFF; - final long byte274 = blocks[blocksOffset++] & 0xFF; - final long byte275 = blocks[blocksOffset++] & 0xFF; - final long byte276 = blocks[blocksOffset++] & 0xFF; - final long byte277 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte273 << 31) | (byte274 << 23) | (byte275 << 15) | (byte276 << 7) | (byte277 >>> 1); - final long byte278 = blocks[blocksOffset++] & 0xFF; - final long byte279 = blocks[blocksOffset++] & 0xFF; - final long byte280 = blocks[blocksOffset++] & 0xFF; - final long byte281 = blocks[blocksOffset++] & 0xFF; - final long byte282 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte277 & 1) << 38) | (byte278 << 30) | (byte279 << 22) | (byte280 << 14) | (byte281 << 6) | (byte282 >>> 2); - final long byte283 = blocks[blocksOffset++] & 0xFF; - final long byte284 = blocks[blocksOffset++] & 0xFF; - final long byte285 = blocks[blocksOffset++] & 0xFF; - final long byte286 = blocks[blocksOffset++] & 0xFF; - final long byte287 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte282 & 3) << 37) | (byte283 << 29) | (byte284 << 21) | (byte285 << 13) | (byte286 << 5) | (byte287 >>> 3); - final long byte288 = blocks[blocksOffset++] & 0xFF; - final long byte289 = blocks[blocksOffset++] & 0xFF; - final long byte290 = blocks[blocksOffset++] & 0xFF; - final long byte291 = blocks[blocksOffset++] & 0xFF; - final long byte292 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte287 & 7) << 36) | (byte288 << 28) | (byte289 << 20) | (byte290 << 12) | (byte291 << 4) | (byte292 >>> 4); - final long byte293 = blocks[blocksOffset++] & 0xFF; - final long byte294 = blocks[blocksOffset++] & 0xFF; - final long byte295 = blocks[blocksOffset++] & 0xFF; - final long byte296 = blocks[blocksOffset++] & 0xFF; - final long byte297 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte292 & 15) << 35) | (byte293 << 27) | (byte294 << 19) | (byte295 << 11) | (byte296 << 3) | (byte297 >>> 5); - final long byte298 = blocks[blocksOffset++] & 0xFF; - final long byte299 = blocks[blocksOffset++] & 0xFF; - final long byte300 = blocks[blocksOffset++] & 0xFF; - final long byte301 = blocks[blocksOffset++] & 0xFF; - final long byte302 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte297 & 31) << 34) | (byte298 << 26) | (byte299 << 18) | (byte300 << 10) | (byte301 << 2) | (byte302 >>> 6); - final long byte303 = blocks[blocksOffset++] & 0xFF; - final long byte304 = blocks[blocksOffset++] & 0xFF; - final long byte305 = blocks[blocksOffset++] & 0xFF; - final long byte306 = blocks[blocksOffset++] & 0xFF; - final long byte307 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte302 & 63) << 33) | (byte303 << 25) | (byte304 << 17) | (byte305 << 9) | (byte306 << 1) | (byte307 >>> 7); - final long byte308 = blocks[blocksOffset++] & 0xFF; - final long byte309 = blocks[blocksOffset++] & 0xFF; - final long byte310 = blocks[blocksOffset++] & 0xFF; - final long byte311 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte307 & 127) << 32) | (byte308 << 24) | (byte309 << 16) | (byte310 << 8) | byte311; - } - } - - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 25) | ((values[valuesOffset] & 0xffffffffL) >>> 14); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 50) | ((values[valuesOffset++] & 0xffffffffL) << 11) | ((values[valuesOffset] & 0xffffffffL) >>> 28); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 36) | ((values[valuesOffset] & 0xffffffffL) >>> 3); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 61) | ((values[valuesOffset++] & 0xffffffffL) << 22) | ((values[valuesOffset] & 0xffffffffL) >>> 17); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 47) | ((values[valuesOffset++] & 0xffffffffL) << 8) | ((values[valuesOffset] & 0xffffffffL) >>> 31); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 33) | ((values[valuesOffset] & 0xffffffffL) >>> 6); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 58) | ((values[valuesOffset++] & 0xffffffffL) << 19) | ((values[valuesOffset] & 0xffffffffL) >>> 20); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 44) | ((values[valuesOffset++] & 0xffffffffL) << 5) | ((values[valuesOffset] & 0xffffffffL) >>> 34); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 30) | ((values[valuesOffset] & 0xffffffffL) >>> 9); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 55) | ((values[valuesOffset++] & 0xffffffffL) << 16) | ((values[valuesOffset] & 0xffffffffL) >>> 23); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 41) | ((values[valuesOffset++] & 0xffffffffL) << 2) | ((values[valuesOffset] & 0xffffffffL) >>> 37); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 27) | ((values[valuesOffset] & 0xffffffffL) >>> 12); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 52) | ((values[valuesOffset++] & 0xffffffffL) << 13) | ((values[valuesOffset] & 0xffffffffL) >>> 26); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 38) | ((values[valuesOffset] & 0xffffffffL) >>> 1); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 63) | ((values[valuesOffset++] & 0xffffffffL) << 24) | ((values[valuesOffset] & 0xffffffffL) >>> 15); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 49) | ((values[valuesOffset++] & 0xffffffffL) << 10) | ((values[valuesOffset] & 0xffffffffL) >>> 29); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 35) | ((values[valuesOffset] & 0xffffffffL) >>> 4); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 60) | ((values[valuesOffset++] & 0xffffffffL) << 21) | ((values[valuesOffset] & 0xffffffffL) >>> 18); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 46) | ((values[valuesOffset++] & 0xffffffffL) << 7) | ((values[valuesOffset] & 0xffffffffL) >>> 32); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 32) | ((values[valuesOffset] & 0xffffffffL) >>> 7); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 57) | ((values[valuesOffset++] & 0xffffffffL) << 18) | ((values[valuesOffset] & 0xffffffffL) >>> 21); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 43) | ((values[valuesOffset++] & 0xffffffffL) << 4) | ((values[valuesOffset] & 0xffffffffL) >>> 35); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 29) | ((values[valuesOffset] & 0xffffffffL) >>> 10); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 54) | ((values[valuesOffset++] & 0xffffffffL) << 15) | ((values[valuesOffset] & 0xffffffffL) >>> 24); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 40) | ((values[valuesOffset++] & 0xffffffffL) << 1) | ((values[valuesOffset] & 0xffffffffL) >>> 38); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 26) | ((values[valuesOffset] & 0xffffffffL) >>> 13); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 51) | ((values[valuesOffset++] & 0xffffffffL) << 12) | ((values[valuesOffset] & 0xffffffffL) >>> 27); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 37) | ((values[valuesOffset] & 0xffffffffL) >>> 2); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 62) | ((values[valuesOffset++] & 0xffffffffL) << 23) | ((values[valuesOffset] & 0xffffffffL) >>> 16); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 48) | ((values[valuesOffset++] & 0xffffffffL) << 9) | ((values[valuesOffset] & 0xffffffffL) >>> 30); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 34) | ((values[valuesOffset] & 0xffffffffL) >>> 5); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 59) | ((values[valuesOffset++] & 0xffffffffL) << 20) | ((values[valuesOffset] & 0xffffffffL) >>> 19); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 45) | ((values[valuesOffset++] & 0xffffffffL) << 6) | ((values[valuesOffset] & 0xffffffffL) >>> 33); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 31) | ((values[valuesOffset] & 0xffffffffL) >>> 8); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 56) | ((values[valuesOffset++] & 0xffffffffL) << 17) | ((values[valuesOffset] & 0xffffffffL) >>> 22); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 42) | ((values[valuesOffset++] & 0xffffffffL) << 3) | ((values[valuesOffset] & 0xffffffffL) >>> 36); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 28) | ((values[valuesOffset] & 0xffffffffL) >>> 11); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 53) | ((values[valuesOffset++] & 0xffffffffL) << 14) | ((values[valuesOffset] & 0xffffffffL) >>> 25); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 39) | (values[valuesOffset++] & 0xffffffffL); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] << 25) | (values[valuesOffset] >>> 14); - blocks[blocksOffset++] = (values[valuesOffset++] << 50) | (values[valuesOffset++] << 11) | (values[valuesOffset] >>> 28); - blocks[blocksOffset++] = (values[valuesOffset++] << 36) | (values[valuesOffset] >>> 3); - blocks[blocksOffset++] = (values[valuesOffset++] << 61) | (values[valuesOffset++] << 22) | (values[valuesOffset] >>> 17); - blocks[blocksOffset++] = (values[valuesOffset++] << 47) | (values[valuesOffset++] << 8) | (values[valuesOffset] >>> 31); - blocks[blocksOffset++] = (values[valuesOffset++] << 33) | (values[valuesOffset] >>> 6); - blocks[blocksOffset++] = (values[valuesOffset++] << 58) | (values[valuesOffset++] << 19) | (values[valuesOffset] >>> 20); - blocks[blocksOffset++] = (values[valuesOffset++] << 44) | (values[valuesOffset++] << 5) | (values[valuesOffset] >>> 34); - blocks[blocksOffset++] = (values[valuesOffset++] << 30) | (values[valuesOffset] >>> 9); - blocks[blocksOffset++] = (values[valuesOffset++] << 55) | (values[valuesOffset++] << 16) | (values[valuesOffset] >>> 23); - blocks[blocksOffset++] = (values[valuesOffset++] << 41) | (values[valuesOffset++] << 2) | (values[valuesOffset] >>> 37); - blocks[blocksOffset++] = (values[valuesOffset++] << 27) | (values[valuesOffset] >>> 12); - blocks[blocksOffset++] = (values[valuesOffset++] << 52) | (values[valuesOffset++] << 13) | (values[valuesOffset] >>> 26); - blocks[blocksOffset++] = (values[valuesOffset++] << 38) | (values[valuesOffset] >>> 1); - blocks[blocksOffset++] = (values[valuesOffset++] << 63) | (values[valuesOffset++] << 24) | (values[valuesOffset] >>> 15); - blocks[blocksOffset++] = (values[valuesOffset++] << 49) | (values[valuesOffset++] << 10) | (values[valuesOffset] >>> 29); - blocks[blocksOffset++] = (values[valuesOffset++] << 35) | (values[valuesOffset] >>> 4); - blocks[blocksOffset++] = (values[valuesOffset++] << 60) | (values[valuesOffset++] << 21) | (values[valuesOffset] >>> 18); - blocks[blocksOffset++] = (values[valuesOffset++] << 46) | (values[valuesOffset++] << 7) | (values[valuesOffset] >>> 32); - blocks[blocksOffset++] = (values[valuesOffset++] << 32) | (values[valuesOffset] >>> 7); - blocks[blocksOffset++] = (values[valuesOffset++] << 57) | (values[valuesOffset++] << 18) | (values[valuesOffset] >>> 21); - blocks[blocksOffset++] = (values[valuesOffset++] << 43) | (values[valuesOffset++] << 4) | (values[valuesOffset] >>> 35); - blocks[blocksOffset++] = (values[valuesOffset++] << 29) | (values[valuesOffset] >>> 10); - blocks[blocksOffset++] = (values[valuesOffset++] << 54) | (values[valuesOffset++] << 15) | (values[valuesOffset] >>> 24); - blocks[blocksOffset++] = (values[valuesOffset++] << 40) | (values[valuesOffset++] << 1) | (values[valuesOffset] >>> 38); - blocks[blocksOffset++] = (values[valuesOffset++] << 26) | (values[valuesOffset] >>> 13); - blocks[blocksOffset++] = (values[valuesOffset++] << 51) | (values[valuesOffset++] << 12) | (values[valuesOffset] >>> 27); - blocks[blocksOffset++] = (values[valuesOffset++] << 37) | (values[valuesOffset] >>> 2); - blocks[blocksOffset++] = (values[valuesOffset++] << 62) | (values[valuesOffset++] << 23) | (values[valuesOffset] >>> 16); - blocks[blocksOffset++] = (values[valuesOffset++] << 48) | (values[valuesOffset++] << 9) | (values[valuesOffset] >>> 30); - blocks[blocksOffset++] = (values[valuesOffset++] << 34) | (values[valuesOffset] >>> 5); - blocks[blocksOffset++] = (values[valuesOffset++] << 59) | (values[valuesOffset++] << 20) | (values[valuesOffset] >>> 19); - blocks[blocksOffset++] = (values[valuesOffset++] << 45) | (values[valuesOffset++] << 6) | (values[valuesOffset] >>> 33); - blocks[blocksOffset++] = (values[valuesOffset++] << 31) | (values[valuesOffset] >>> 8); - blocks[blocksOffset++] = (values[valuesOffset++] << 56) | (values[valuesOffset++] << 17) | (values[valuesOffset] >>> 22); - blocks[blocksOffset++] = (values[valuesOffset++] << 42) | (values[valuesOffset++] << 3) | (values[valuesOffset] >>> 36); - blocks[blocksOffset++] = (values[valuesOffset++] << 28) | (values[valuesOffset] >>> 11); - blocks[blocksOffset++] = (values[valuesOffset++] << 53) | (values[valuesOffset++] << 14) | (values[valuesOffset] >>> 25); - blocks[blocksOffset++] = (values[valuesOffset++] << 39) | values[valuesOffset++]; - } - } - -} diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked4.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked4.java index 592a90ac5f6..961876c69db 100644 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked4.java +++ b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked4.java @@ -22,15 +22,12 @@ package org.apache.lucene.util.packed; /** * Efficient sequential read/write of packed integers. */ -final class BulkOperationPacked4 extends BulkOperation { - @Override - public int blockCount() { - return 1; - } +final class BulkOperationPacked4 extends BulkOperationPacked { - @Override - public int valueCount() { - return 16; + public BulkOperationPacked4() { + super(4); + assert blockCount() == 1; + assert valueCount() == 16; } @Override @@ -147,22 +144,4 @@ final class BulkOperationPacked4 extends BulkOperation { } } - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 60) | ((values[valuesOffset++] & 0xffffffffL) << 56) | ((values[valuesOffset++] & 0xffffffffL) << 52) | ((values[valuesOffset++] & 0xffffffffL) << 48) | ((values[valuesOffset++] & 0xffffffffL) << 44) | ((values[valuesOffset++] & 0xffffffffL) << 40) | ((values[valuesOffset++] & 0xffffffffL) << 36) | ((values[valuesOffset++] & 0xffffffffL) << 32) | ((values[valuesOffset++] & 0xffffffffL) << 28) | ((values[valuesOffset++] & 0xffffffffL) << 24) | ((values[valuesOffset++] & 0xffffffffL) << 20) | ((values[valuesOffset++] & 0xffffffffL) << 16) | ((values[valuesOffset++] & 0xffffffffL) << 12) | ((values[valuesOffset++] & 0xffffffffL) << 8) | ((values[valuesOffset++] & 0xffffffffL) << 4) | (values[valuesOffset++] & 0xffffffffL); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] << 60) | (values[valuesOffset++] << 56) | (values[valuesOffset++] << 52) | (values[valuesOffset++] << 48) | (values[valuesOffset++] << 44) | (values[valuesOffset++] << 40) | (values[valuesOffset++] << 36) | (values[valuesOffset++] << 32) | (values[valuesOffset++] << 28) | (values[valuesOffset++] << 24) | (values[valuesOffset++] << 20) | (values[valuesOffset++] << 16) | (values[valuesOffset++] << 12) | (values[valuesOffset++] << 8) | (values[valuesOffset++] << 4) | values[valuesOffset++]; - } - } - } diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked40.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked40.java deleted file mode 100644 index 9dc3c3bcd9d..00000000000 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked40.java +++ /dev/null @@ -1,149 +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 BulkOperationPacked40 extends BulkOperation { - @Override - public int blockCount() { - return 5; - } - - @Override - public int valueCount() { - return 8; - } - - @Override - public void decode(long[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) { - throw new UnsupportedOperationException(); - } - - @Override - public void decode(byte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) { - throw new UnsupportedOperationException(); - } - - @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 >>> 24; - final long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block0 & 16777215L) << 16) | (block1 >>> 48); - values[valuesOffset++] = (block1 >>> 8) & 1099511627775L; - final long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block1 & 255L) << 32) | (block2 >>> 32); - final long block3 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block2 & 4294967295L) << 8) | (block3 >>> 56); - values[valuesOffset++] = (block3 >>> 16) & 1099511627775L; - final long block4 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block3 & 65535L) << 24) | (block4 >>> 40); - values[valuesOffset++] = block4 & 1099511627775L; - } - } - - @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; - final long byte3 = blocks[blocksOffset++] & 0xFF; - final long byte4 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte0 << 32) | (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; - final long byte5 = blocks[blocksOffset++] & 0xFF; - final long byte6 = blocks[blocksOffset++] & 0xFF; - final long byte7 = blocks[blocksOffset++] & 0xFF; - final long byte8 = blocks[blocksOffset++] & 0xFF; - final long byte9 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte5 << 32) | (byte6 << 24) | (byte7 << 16) | (byte8 << 8) | byte9; - final long byte10 = blocks[blocksOffset++] & 0xFF; - final long byte11 = blocks[blocksOffset++] & 0xFF; - final long byte12 = blocks[blocksOffset++] & 0xFF; - final long byte13 = blocks[blocksOffset++] & 0xFF; - final long byte14 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte10 << 32) | (byte11 << 24) | (byte12 << 16) | (byte13 << 8) | byte14; - final long byte15 = blocks[blocksOffset++] & 0xFF; - final long byte16 = blocks[blocksOffset++] & 0xFF; - final long byte17 = blocks[blocksOffset++] & 0xFF; - final long byte18 = blocks[blocksOffset++] & 0xFF; - final long byte19 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte15 << 32) | (byte16 << 24) | (byte17 << 16) | (byte18 << 8) | byte19; - final long byte20 = blocks[blocksOffset++] & 0xFF; - final long byte21 = blocks[blocksOffset++] & 0xFF; - final long byte22 = blocks[blocksOffset++] & 0xFF; - final long byte23 = blocks[blocksOffset++] & 0xFF; - final long byte24 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte20 << 32) | (byte21 << 24) | (byte22 << 16) | (byte23 << 8) | byte24; - final long byte25 = blocks[blocksOffset++] & 0xFF; - final long byte26 = blocks[blocksOffset++] & 0xFF; - final long byte27 = blocks[blocksOffset++] & 0xFF; - final long byte28 = blocks[blocksOffset++] & 0xFF; - final long byte29 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte25 << 32) | (byte26 << 24) | (byte27 << 16) | (byte28 << 8) | byte29; - final long byte30 = blocks[blocksOffset++] & 0xFF; - final long byte31 = blocks[blocksOffset++] & 0xFF; - final long byte32 = blocks[blocksOffset++] & 0xFF; - final long byte33 = blocks[blocksOffset++] & 0xFF; - final long byte34 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte30 << 32) | (byte31 << 24) | (byte32 << 16) | (byte33 << 8) | byte34; - final long byte35 = blocks[blocksOffset++] & 0xFF; - final long byte36 = blocks[blocksOffset++] & 0xFF; - final long byte37 = blocks[blocksOffset++] & 0xFF; - final long byte38 = blocks[blocksOffset++] & 0xFF; - final long byte39 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte35 << 32) | (byte36 << 24) | (byte37 << 16) | (byte38 << 8) | byte39; - } - } - - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 24) | ((values[valuesOffset] & 0xffffffffL) >>> 16); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 48) | ((values[valuesOffset++] & 0xffffffffL) << 8) | ((values[valuesOffset] & 0xffffffffL) >>> 32); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 32) | ((values[valuesOffset] & 0xffffffffL) >>> 8); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 56) | ((values[valuesOffset++] & 0xffffffffL) << 16) | ((values[valuesOffset] & 0xffffffffL) >>> 24); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 40) | (values[valuesOffset++] & 0xffffffffL); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] << 24) | (values[valuesOffset] >>> 16); - blocks[blocksOffset++] = (values[valuesOffset++] << 48) | (values[valuesOffset++] << 8) | (values[valuesOffset] >>> 32); - blocks[blocksOffset++] = (values[valuesOffset++] << 32) | (values[valuesOffset] >>> 8); - blocks[blocksOffset++] = (values[valuesOffset++] << 56) | (values[valuesOffset++] << 16) | (values[valuesOffset] >>> 24); - blocks[blocksOffset++] = (values[valuesOffset++] << 40) | values[valuesOffset++]; - } - } - -} diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked41.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked41.java deleted file mode 100644 index a29f2609ba8..00000000000 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked41.java +++ /dev/null @@ -1,657 +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 BulkOperationPacked41 extends BulkOperation { - @Override - public int blockCount() { - return 41; - } - - @Override - public int valueCount() { - return 64; - } - - @Override - public void decode(long[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) { - throw new UnsupportedOperationException(); - } - - @Override - public void decode(byte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) { - throw new UnsupportedOperationException(); - } - - @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 >>> 23; - final long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block0 & 8388607L) << 18) | (block1 >>> 46); - values[valuesOffset++] = (block1 >>> 5) & 2199023255551L; - final long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block1 & 31L) << 36) | (block2 >>> 28); - final long block3 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block2 & 268435455L) << 13) | (block3 >>> 51); - values[valuesOffset++] = (block3 >>> 10) & 2199023255551L; - final long block4 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block3 & 1023L) << 31) | (block4 >>> 33); - final long block5 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block4 & 8589934591L) << 8) | (block5 >>> 56); - values[valuesOffset++] = (block5 >>> 15) & 2199023255551L; - final long block6 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block5 & 32767L) << 26) | (block6 >>> 38); - final long block7 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block6 & 274877906943L) << 3) | (block7 >>> 61); - values[valuesOffset++] = (block7 >>> 20) & 2199023255551L; - final long block8 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block7 & 1048575L) << 21) | (block8 >>> 43); - values[valuesOffset++] = (block8 >>> 2) & 2199023255551L; - final long block9 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block8 & 3L) << 39) | (block9 >>> 25); - final long block10 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block9 & 33554431L) << 16) | (block10 >>> 48); - values[valuesOffset++] = (block10 >>> 7) & 2199023255551L; - final long block11 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block10 & 127L) << 34) | (block11 >>> 30); - final long block12 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block11 & 1073741823L) << 11) | (block12 >>> 53); - values[valuesOffset++] = (block12 >>> 12) & 2199023255551L; - final long block13 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block12 & 4095L) << 29) | (block13 >>> 35); - final long block14 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block13 & 34359738367L) << 6) | (block14 >>> 58); - values[valuesOffset++] = (block14 >>> 17) & 2199023255551L; - final long block15 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block14 & 131071L) << 24) | (block15 >>> 40); - final long block16 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block15 & 1099511627775L) << 1) | (block16 >>> 63); - values[valuesOffset++] = (block16 >>> 22) & 2199023255551L; - final long block17 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block16 & 4194303L) << 19) | (block17 >>> 45); - values[valuesOffset++] = (block17 >>> 4) & 2199023255551L; - final long block18 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block17 & 15L) << 37) | (block18 >>> 27); - final long block19 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block18 & 134217727L) << 14) | (block19 >>> 50); - values[valuesOffset++] = (block19 >>> 9) & 2199023255551L; - final long block20 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block19 & 511L) << 32) | (block20 >>> 32); - final long block21 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block20 & 4294967295L) << 9) | (block21 >>> 55); - values[valuesOffset++] = (block21 >>> 14) & 2199023255551L; - final long block22 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block21 & 16383L) << 27) | (block22 >>> 37); - final long block23 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block22 & 137438953471L) << 4) | (block23 >>> 60); - values[valuesOffset++] = (block23 >>> 19) & 2199023255551L; - final long block24 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block23 & 524287L) << 22) | (block24 >>> 42); - values[valuesOffset++] = (block24 >>> 1) & 2199023255551L; - final long block25 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block24 & 1L) << 40) | (block25 >>> 24); - final long block26 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block25 & 16777215L) << 17) | (block26 >>> 47); - values[valuesOffset++] = (block26 >>> 6) & 2199023255551L; - final long block27 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block26 & 63L) << 35) | (block27 >>> 29); - final long block28 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block27 & 536870911L) << 12) | (block28 >>> 52); - values[valuesOffset++] = (block28 >>> 11) & 2199023255551L; - final long block29 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block28 & 2047L) << 30) | (block29 >>> 34); - final long block30 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block29 & 17179869183L) << 7) | (block30 >>> 57); - values[valuesOffset++] = (block30 >>> 16) & 2199023255551L; - final long block31 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block30 & 65535L) << 25) | (block31 >>> 39); - final long block32 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block31 & 549755813887L) << 2) | (block32 >>> 62); - values[valuesOffset++] = (block32 >>> 21) & 2199023255551L; - final long block33 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block32 & 2097151L) << 20) | (block33 >>> 44); - values[valuesOffset++] = (block33 >>> 3) & 2199023255551L; - final long block34 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block33 & 7L) << 38) | (block34 >>> 26); - final long block35 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block34 & 67108863L) << 15) | (block35 >>> 49); - values[valuesOffset++] = (block35 >>> 8) & 2199023255551L; - final long block36 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block35 & 255L) << 33) | (block36 >>> 31); - final long block37 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block36 & 2147483647L) << 10) | (block37 >>> 54); - values[valuesOffset++] = (block37 >>> 13) & 2199023255551L; - final long block38 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block37 & 8191L) << 28) | (block38 >>> 36); - final long block39 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block38 & 68719476735L) << 5) | (block39 >>> 59); - values[valuesOffset++] = (block39 >>> 18) & 2199023255551L; - final long block40 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block39 & 262143L) << 23) | (block40 >>> 41); - values[valuesOffset++] = block40 & 2199023255551L; - } - } - - @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; - final long byte3 = blocks[blocksOffset++] & 0xFF; - final long byte4 = blocks[blocksOffset++] & 0xFF; - final long byte5 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte0 << 33) | (byte1 << 25) | (byte2 << 17) | (byte3 << 9) | (byte4 << 1) | (byte5 >>> 7); - final long byte6 = blocks[blocksOffset++] & 0xFF; - final long byte7 = blocks[blocksOffset++] & 0xFF; - final long byte8 = blocks[blocksOffset++] & 0xFF; - final long byte9 = blocks[blocksOffset++] & 0xFF; - final long byte10 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte5 & 127) << 34) | (byte6 << 26) | (byte7 << 18) | (byte8 << 10) | (byte9 << 2) | (byte10 >>> 6); - final long byte11 = blocks[blocksOffset++] & 0xFF; - final long byte12 = blocks[blocksOffset++] & 0xFF; - final long byte13 = blocks[blocksOffset++] & 0xFF; - final long byte14 = blocks[blocksOffset++] & 0xFF; - final long byte15 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte10 & 63) << 35) | (byte11 << 27) | (byte12 << 19) | (byte13 << 11) | (byte14 << 3) | (byte15 >>> 5); - final long byte16 = blocks[blocksOffset++] & 0xFF; - final long byte17 = blocks[blocksOffset++] & 0xFF; - final long byte18 = blocks[blocksOffset++] & 0xFF; - final long byte19 = blocks[blocksOffset++] & 0xFF; - final long byte20 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte15 & 31) << 36) | (byte16 << 28) | (byte17 << 20) | (byte18 << 12) | (byte19 << 4) | (byte20 >>> 4); - final long byte21 = blocks[blocksOffset++] & 0xFF; - final long byte22 = blocks[blocksOffset++] & 0xFF; - final long byte23 = blocks[blocksOffset++] & 0xFF; - final long byte24 = blocks[blocksOffset++] & 0xFF; - final long byte25 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte20 & 15) << 37) | (byte21 << 29) | (byte22 << 21) | (byte23 << 13) | (byte24 << 5) | (byte25 >>> 3); - final long byte26 = blocks[blocksOffset++] & 0xFF; - final long byte27 = blocks[blocksOffset++] & 0xFF; - final long byte28 = blocks[blocksOffset++] & 0xFF; - final long byte29 = blocks[blocksOffset++] & 0xFF; - final long byte30 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte25 & 7) << 38) | (byte26 << 30) | (byte27 << 22) | (byte28 << 14) | (byte29 << 6) | (byte30 >>> 2); - final long byte31 = blocks[blocksOffset++] & 0xFF; - final long byte32 = blocks[blocksOffset++] & 0xFF; - final long byte33 = blocks[blocksOffset++] & 0xFF; - final long byte34 = blocks[blocksOffset++] & 0xFF; - final long byte35 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte30 & 3) << 39) | (byte31 << 31) | (byte32 << 23) | (byte33 << 15) | (byte34 << 7) | (byte35 >>> 1); - final long byte36 = blocks[blocksOffset++] & 0xFF; - final long byte37 = blocks[blocksOffset++] & 0xFF; - final long byte38 = blocks[blocksOffset++] & 0xFF; - final long byte39 = blocks[blocksOffset++] & 0xFF; - final long byte40 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte35 & 1) << 40) | (byte36 << 32) | (byte37 << 24) | (byte38 << 16) | (byte39 << 8) | byte40; - final long byte41 = blocks[blocksOffset++] & 0xFF; - final long byte42 = blocks[blocksOffset++] & 0xFF; - final long byte43 = blocks[blocksOffset++] & 0xFF; - final long byte44 = blocks[blocksOffset++] & 0xFF; - final long byte45 = blocks[blocksOffset++] & 0xFF; - final long byte46 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte41 << 33) | (byte42 << 25) | (byte43 << 17) | (byte44 << 9) | (byte45 << 1) | (byte46 >>> 7); - final long byte47 = blocks[blocksOffset++] & 0xFF; - final long byte48 = blocks[blocksOffset++] & 0xFF; - final long byte49 = blocks[blocksOffset++] & 0xFF; - final long byte50 = blocks[blocksOffset++] & 0xFF; - final long byte51 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte46 & 127) << 34) | (byte47 << 26) | (byte48 << 18) | (byte49 << 10) | (byte50 << 2) | (byte51 >>> 6); - final long byte52 = blocks[blocksOffset++] & 0xFF; - final long byte53 = blocks[blocksOffset++] & 0xFF; - final long byte54 = blocks[blocksOffset++] & 0xFF; - final long byte55 = blocks[blocksOffset++] & 0xFF; - final long byte56 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte51 & 63) << 35) | (byte52 << 27) | (byte53 << 19) | (byte54 << 11) | (byte55 << 3) | (byte56 >>> 5); - final long byte57 = blocks[blocksOffset++] & 0xFF; - final long byte58 = blocks[blocksOffset++] & 0xFF; - final long byte59 = blocks[blocksOffset++] & 0xFF; - final long byte60 = blocks[blocksOffset++] & 0xFF; - final long byte61 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte56 & 31) << 36) | (byte57 << 28) | (byte58 << 20) | (byte59 << 12) | (byte60 << 4) | (byte61 >>> 4); - final long byte62 = blocks[blocksOffset++] & 0xFF; - final long byte63 = blocks[blocksOffset++] & 0xFF; - final long byte64 = blocks[blocksOffset++] & 0xFF; - final long byte65 = blocks[blocksOffset++] & 0xFF; - final long byte66 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte61 & 15) << 37) | (byte62 << 29) | (byte63 << 21) | (byte64 << 13) | (byte65 << 5) | (byte66 >>> 3); - final long byte67 = blocks[blocksOffset++] & 0xFF; - final long byte68 = blocks[blocksOffset++] & 0xFF; - final long byte69 = blocks[blocksOffset++] & 0xFF; - final long byte70 = blocks[blocksOffset++] & 0xFF; - final long byte71 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte66 & 7) << 38) | (byte67 << 30) | (byte68 << 22) | (byte69 << 14) | (byte70 << 6) | (byte71 >>> 2); - final long byte72 = blocks[blocksOffset++] & 0xFF; - final long byte73 = blocks[blocksOffset++] & 0xFF; - final long byte74 = blocks[blocksOffset++] & 0xFF; - final long byte75 = blocks[blocksOffset++] & 0xFF; - final long byte76 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte71 & 3) << 39) | (byte72 << 31) | (byte73 << 23) | (byte74 << 15) | (byte75 << 7) | (byte76 >>> 1); - final long byte77 = blocks[blocksOffset++] & 0xFF; - final long byte78 = blocks[blocksOffset++] & 0xFF; - final long byte79 = blocks[blocksOffset++] & 0xFF; - final long byte80 = blocks[blocksOffset++] & 0xFF; - final long byte81 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte76 & 1) << 40) | (byte77 << 32) | (byte78 << 24) | (byte79 << 16) | (byte80 << 8) | byte81; - final long byte82 = blocks[blocksOffset++] & 0xFF; - final long byte83 = blocks[blocksOffset++] & 0xFF; - final long byte84 = blocks[blocksOffset++] & 0xFF; - final long byte85 = blocks[blocksOffset++] & 0xFF; - final long byte86 = blocks[blocksOffset++] & 0xFF; - final long byte87 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte82 << 33) | (byte83 << 25) | (byte84 << 17) | (byte85 << 9) | (byte86 << 1) | (byte87 >>> 7); - final long byte88 = blocks[blocksOffset++] & 0xFF; - final long byte89 = blocks[blocksOffset++] & 0xFF; - final long byte90 = blocks[blocksOffset++] & 0xFF; - final long byte91 = blocks[blocksOffset++] & 0xFF; - final long byte92 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte87 & 127) << 34) | (byte88 << 26) | (byte89 << 18) | (byte90 << 10) | (byte91 << 2) | (byte92 >>> 6); - final long byte93 = blocks[blocksOffset++] & 0xFF; - final long byte94 = blocks[blocksOffset++] & 0xFF; - final long byte95 = blocks[blocksOffset++] & 0xFF; - final long byte96 = blocks[blocksOffset++] & 0xFF; - final long byte97 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte92 & 63) << 35) | (byte93 << 27) | (byte94 << 19) | (byte95 << 11) | (byte96 << 3) | (byte97 >>> 5); - final long byte98 = blocks[blocksOffset++] & 0xFF; - final long byte99 = blocks[blocksOffset++] & 0xFF; - final long byte100 = blocks[blocksOffset++] & 0xFF; - final long byte101 = blocks[blocksOffset++] & 0xFF; - final long byte102 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte97 & 31) << 36) | (byte98 << 28) | (byte99 << 20) | (byte100 << 12) | (byte101 << 4) | (byte102 >>> 4); - final long byte103 = blocks[blocksOffset++] & 0xFF; - final long byte104 = blocks[blocksOffset++] & 0xFF; - final long byte105 = blocks[blocksOffset++] & 0xFF; - final long byte106 = blocks[blocksOffset++] & 0xFF; - final long byte107 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte102 & 15) << 37) | (byte103 << 29) | (byte104 << 21) | (byte105 << 13) | (byte106 << 5) | (byte107 >>> 3); - final long byte108 = blocks[blocksOffset++] & 0xFF; - final long byte109 = blocks[blocksOffset++] & 0xFF; - final long byte110 = blocks[blocksOffset++] & 0xFF; - final long byte111 = blocks[blocksOffset++] & 0xFF; - final long byte112 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte107 & 7) << 38) | (byte108 << 30) | (byte109 << 22) | (byte110 << 14) | (byte111 << 6) | (byte112 >>> 2); - final long byte113 = blocks[blocksOffset++] & 0xFF; - final long byte114 = blocks[blocksOffset++] & 0xFF; - final long byte115 = blocks[blocksOffset++] & 0xFF; - final long byte116 = blocks[blocksOffset++] & 0xFF; - final long byte117 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte112 & 3) << 39) | (byte113 << 31) | (byte114 << 23) | (byte115 << 15) | (byte116 << 7) | (byte117 >>> 1); - final long byte118 = blocks[blocksOffset++] & 0xFF; - final long byte119 = blocks[blocksOffset++] & 0xFF; - final long byte120 = blocks[blocksOffset++] & 0xFF; - final long byte121 = blocks[blocksOffset++] & 0xFF; - final long byte122 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte117 & 1) << 40) | (byte118 << 32) | (byte119 << 24) | (byte120 << 16) | (byte121 << 8) | byte122; - final long byte123 = blocks[blocksOffset++] & 0xFF; - final long byte124 = blocks[blocksOffset++] & 0xFF; - final long byte125 = blocks[blocksOffset++] & 0xFF; - final long byte126 = blocks[blocksOffset++] & 0xFF; - final long byte127 = blocks[blocksOffset++] & 0xFF; - final long byte128 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte123 << 33) | (byte124 << 25) | (byte125 << 17) | (byte126 << 9) | (byte127 << 1) | (byte128 >>> 7); - final long byte129 = blocks[blocksOffset++] & 0xFF; - final long byte130 = blocks[blocksOffset++] & 0xFF; - final long byte131 = blocks[blocksOffset++] & 0xFF; - final long byte132 = blocks[blocksOffset++] & 0xFF; - final long byte133 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte128 & 127) << 34) | (byte129 << 26) | (byte130 << 18) | (byte131 << 10) | (byte132 << 2) | (byte133 >>> 6); - final long byte134 = blocks[blocksOffset++] & 0xFF; - final long byte135 = blocks[blocksOffset++] & 0xFF; - final long byte136 = blocks[blocksOffset++] & 0xFF; - final long byte137 = blocks[blocksOffset++] & 0xFF; - final long byte138 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte133 & 63) << 35) | (byte134 << 27) | (byte135 << 19) | (byte136 << 11) | (byte137 << 3) | (byte138 >>> 5); - final long byte139 = blocks[blocksOffset++] & 0xFF; - final long byte140 = blocks[blocksOffset++] & 0xFF; - final long byte141 = blocks[blocksOffset++] & 0xFF; - final long byte142 = blocks[blocksOffset++] & 0xFF; - final long byte143 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte138 & 31) << 36) | (byte139 << 28) | (byte140 << 20) | (byte141 << 12) | (byte142 << 4) | (byte143 >>> 4); - final long byte144 = blocks[blocksOffset++] & 0xFF; - final long byte145 = blocks[blocksOffset++] & 0xFF; - final long byte146 = blocks[blocksOffset++] & 0xFF; - final long byte147 = blocks[blocksOffset++] & 0xFF; - final long byte148 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte143 & 15) << 37) | (byte144 << 29) | (byte145 << 21) | (byte146 << 13) | (byte147 << 5) | (byte148 >>> 3); - final long byte149 = blocks[blocksOffset++] & 0xFF; - final long byte150 = blocks[blocksOffset++] & 0xFF; - final long byte151 = blocks[blocksOffset++] & 0xFF; - final long byte152 = blocks[blocksOffset++] & 0xFF; - final long byte153 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte148 & 7) << 38) | (byte149 << 30) | (byte150 << 22) | (byte151 << 14) | (byte152 << 6) | (byte153 >>> 2); - final long byte154 = blocks[blocksOffset++] & 0xFF; - final long byte155 = blocks[blocksOffset++] & 0xFF; - final long byte156 = blocks[blocksOffset++] & 0xFF; - final long byte157 = blocks[blocksOffset++] & 0xFF; - final long byte158 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte153 & 3) << 39) | (byte154 << 31) | (byte155 << 23) | (byte156 << 15) | (byte157 << 7) | (byte158 >>> 1); - final long byte159 = blocks[blocksOffset++] & 0xFF; - final long byte160 = blocks[blocksOffset++] & 0xFF; - final long byte161 = blocks[blocksOffset++] & 0xFF; - final long byte162 = blocks[blocksOffset++] & 0xFF; - final long byte163 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte158 & 1) << 40) | (byte159 << 32) | (byte160 << 24) | (byte161 << 16) | (byte162 << 8) | byte163; - final long byte164 = blocks[blocksOffset++] & 0xFF; - final long byte165 = blocks[blocksOffset++] & 0xFF; - final long byte166 = blocks[blocksOffset++] & 0xFF; - final long byte167 = blocks[blocksOffset++] & 0xFF; - final long byte168 = blocks[blocksOffset++] & 0xFF; - final long byte169 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte164 << 33) | (byte165 << 25) | (byte166 << 17) | (byte167 << 9) | (byte168 << 1) | (byte169 >>> 7); - final long byte170 = blocks[blocksOffset++] & 0xFF; - final long byte171 = blocks[blocksOffset++] & 0xFF; - final long byte172 = blocks[blocksOffset++] & 0xFF; - final long byte173 = blocks[blocksOffset++] & 0xFF; - final long byte174 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte169 & 127) << 34) | (byte170 << 26) | (byte171 << 18) | (byte172 << 10) | (byte173 << 2) | (byte174 >>> 6); - final long byte175 = blocks[blocksOffset++] & 0xFF; - final long byte176 = blocks[blocksOffset++] & 0xFF; - final long byte177 = blocks[blocksOffset++] & 0xFF; - final long byte178 = blocks[blocksOffset++] & 0xFF; - final long byte179 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte174 & 63) << 35) | (byte175 << 27) | (byte176 << 19) | (byte177 << 11) | (byte178 << 3) | (byte179 >>> 5); - final long byte180 = blocks[blocksOffset++] & 0xFF; - final long byte181 = blocks[blocksOffset++] & 0xFF; - final long byte182 = blocks[blocksOffset++] & 0xFF; - final long byte183 = blocks[blocksOffset++] & 0xFF; - final long byte184 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte179 & 31) << 36) | (byte180 << 28) | (byte181 << 20) | (byte182 << 12) | (byte183 << 4) | (byte184 >>> 4); - final long byte185 = blocks[blocksOffset++] & 0xFF; - final long byte186 = blocks[blocksOffset++] & 0xFF; - final long byte187 = blocks[blocksOffset++] & 0xFF; - final long byte188 = blocks[blocksOffset++] & 0xFF; - final long byte189 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte184 & 15) << 37) | (byte185 << 29) | (byte186 << 21) | (byte187 << 13) | (byte188 << 5) | (byte189 >>> 3); - final long byte190 = blocks[blocksOffset++] & 0xFF; - final long byte191 = blocks[blocksOffset++] & 0xFF; - final long byte192 = blocks[blocksOffset++] & 0xFF; - final long byte193 = blocks[blocksOffset++] & 0xFF; - final long byte194 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte189 & 7) << 38) | (byte190 << 30) | (byte191 << 22) | (byte192 << 14) | (byte193 << 6) | (byte194 >>> 2); - final long byte195 = blocks[blocksOffset++] & 0xFF; - final long byte196 = blocks[blocksOffset++] & 0xFF; - final long byte197 = blocks[blocksOffset++] & 0xFF; - final long byte198 = blocks[blocksOffset++] & 0xFF; - final long byte199 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte194 & 3) << 39) | (byte195 << 31) | (byte196 << 23) | (byte197 << 15) | (byte198 << 7) | (byte199 >>> 1); - final long byte200 = blocks[blocksOffset++] & 0xFF; - final long byte201 = blocks[blocksOffset++] & 0xFF; - final long byte202 = blocks[blocksOffset++] & 0xFF; - final long byte203 = blocks[blocksOffset++] & 0xFF; - final long byte204 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte199 & 1) << 40) | (byte200 << 32) | (byte201 << 24) | (byte202 << 16) | (byte203 << 8) | byte204; - final long byte205 = blocks[blocksOffset++] & 0xFF; - final long byte206 = blocks[blocksOffset++] & 0xFF; - final long byte207 = blocks[blocksOffset++] & 0xFF; - final long byte208 = blocks[blocksOffset++] & 0xFF; - final long byte209 = blocks[blocksOffset++] & 0xFF; - final long byte210 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte205 << 33) | (byte206 << 25) | (byte207 << 17) | (byte208 << 9) | (byte209 << 1) | (byte210 >>> 7); - final long byte211 = blocks[blocksOffset++] & 0xFF; - final long byte212 = blocks[blocksOffset++] & 0xFF; - final long byte213 = blocks[blocksOffset++] & 0xFF; - final long byte214 = blocks[blocksOffset++] & 0xFF; - final long byte215 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte210 & 127) << 34) | (byte211 << 26) | (byte212 << 18) | (byte213 << 10) | (byte214 << 2) | (byte215 >>> 6); - final long byte216 = blocks[blocksOffset++] & 0xFF; - final long byte217 = blocks[blocksOffset++] & 0xFF; - final long byte218 = blocks[blocksOffset++] & 0xFF; - final long byte219 = blocks[blocksOffset++] & 0xFF; - final long byte220 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte215 & 63) << 35) | (byte216 << 27) | (byte217 << 19) | (byte218 << 11) | (byte219 << 3) | (byte220 >>> 5); - final long byte221 = blocks[blocksOffset++] & 0xFF; - final long byte222 = blocks[blocksOffset++] & 0xFF; - final long byte223 = blocks[blocksOffset++] & 0xFF; - final long byte224 = blocks[blocksOffset++] & 0xFF; - final long byte225 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte220 & 31) << 36) | (byte221 << 28) | (byte222 << 20) | (byte223 << 12) | (byte224 << 4) | (byte225 >>> 4); - final long byte226 = blocks[blocksOffset++] & 0xFF; - final long byte227 = blocks[blocksOffset++] & 0xFF; - final long byte228 = blocks[blocksOffset++] & 0xFF; - final long byte229 = blocks[blocksOffset++] & 0xFF; - final long byte230 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte225 & 15) << 37) | (byte226 << 29) | (byte227 << 21) | (byte228 << 13) | (byte229 << 5) | (byte230 >>> 3); - final long byte231 = blocks[blocksOffset++] & 0xFF; - final long byte232 = blocks[blocksOffset++] & 0xFF; - final long byte233 = blocks[blocksOffset++] & 0xFF; - final long byte234 = blocks[blocksOffset++] & 0xFF; - final long byte235 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte230 & 7) << 38) | (byte231 << 30) | (byte232 << 22) | (byte233 << 14) | (byte234 << 6) | (byte235 >>> 2); - final long byte236 = blocks[blocksOffset++] & 0xFF; - final long byte237 = blocks[blocksOffset++] & 0xFF; - final long byte238 = blocks[blocksOffset++] & 0xFF; - final long byte239 = blocks[blocksOffset++] & 0xFF; - final long byte240 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte235 & 3) << 39) | (byte236 << 31) | (byte237 << 23) | (byte238 << 15) | (byte239 << 7) | (byte240 >>> 1); - final long byte241 = blocks[blocksOffset++] & 0xFF; - final long byte242 = blocks[blocksOffset++] & 0xFF; - final long byte243 = blocks[blocksOffset++] & 0xFF; - final long byte244 = blocks[blocksOffset++] & 0xFF; - final long byte245 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte240 & 1) << 40) | (byte241 << 32) | (byte242 << 24) | (byte243 << 16) | (byte244 << 8) | byte245; - final long byte246 = blocks[blocksOffset++] & 0xFF; - final long byte247 = blocks[blocksOffset++] & 0xFF; - final long byte248 = blocks[blocksOffset++] & 0xFF; - final long byte249 = blocks[blocksOffset++] & 0xFF; - final long byte250 = blocks[blocksOffset++] & 0xFF; - final long byte251 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte246 << 33) | (byte247 << 25) | (byte248 << 17) | (byte249 << 9) | (byte250 << 1) | (byte251 >>> 7); - final long byte252 = blocks[blocksOffset++] & 0xFF; - final long byte253 = blocks[blocksOffset++] & 0xFF; - final long byte254 = blocks[blocksOffset++] & 0xFF; - final long byte255 = blocks[blocksOffset++] & 0xFF; - final long byte256 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte251 & 127) << 34) | (byte252 << 26) | (byte253 << 18) | (byte254 << 10) | (byte255 << 2) | (byte256 >>> 6); - final long byte257 = blocks[blocksOffset++] & 0xFF; - final long byte258 = blocks[blocksOffset++] & 0xFF; - final long byte259 = blocks[blocksOffset++] & 0xFF; - final long byte260 = blocks[blocksOffset++] & 0xFF; - final long byte261 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte256 & 63) << 35) | (byte257 << 27) | (byte258 << 19) | (byte259 << 11) | (byte260 << 3) | (byte261 >>> 5); - final long byte262 = blocks[blocksOffset++] & 0xFF; - final long byte263 = blocks[blocksOffset++] & 0xFF; - final long byte264 = blocks[blocksOffset++] & 0xFF; - final long byte265 = blocks[blocksOffset++] & 0xFF; - final long byte266 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte261 & 31) << 36) | (byte262 << 28) | (byte263 << 20) | (byte264 << 12) | (byte265 << 4) | (byte266 >>> 4); - final long byte267 = blocks[blocksOffset++] & 0xFF; - final long byte268 = blocks[blocksOffset++] & 0xFF; - final long byte269 = blocks[blocksOffset++] & 0xFF; - final long byte270 = blocks[blocksOffset++] & 0xFF; - final long byte271 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte266 & 15) << 37) | (byte267 << 29) | (byte268 << 21) | (byte269 << 13) | (byte270 << 5) | (byte271 >>> 3); - final long byte272 = blocks[blocksOffset++] & 0xFF; - final long byte273 = blocks[blocksOffset++] & 0xFF; - final long byte274 = blocks[blocksOffset++] & 0xFF; - final long byte275 = blocks[blocksOffset++] & 0xFF; - final long byte276 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte271 & 7) << 38) | (byte272 << 30) | (byte273 << 22) | (byte274 << 14) | (byte275 << 6) | (byte276 >>> 2); - final long byte277 = blocks[blocksOffset++] & 0xFF; - final long byte278 = blocks[blocksOffset++] & 0xFF; - final long byte279 = blocks[blocksOffset++] & 0xFF; - final long byte280 = blocks[blocksOffset++] & 0xFF; - final long byte281 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte276 & 3) << 39) | (byte277 << 31) | (byte278 << 23) | (byte279 << 15) | (byte280 << 7) | (byte281 >>> 1); - final long byte282 = blocks[blocksOffset++] & 0xFF; - final long byte283 = blocks[blocksOffset++] & 0xFF; - final long byte284 = blocks[blocksOffset++] & 0xFF; - final long byte285 = blocks[blocksOffset++] & 0xFF; - final long byte286 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte281 & 1) << 40) | (byte282 << 32) | (byte283 << 24) | (byte284 << 16) | (byte285 << 8) | byte286; - final long byte287 = blocks[blocksOffset++] & 0xFF; - final long byte288 = blocks[blocksOffset++] & 0xFF; - final long byte289 = blocks[blocksOffset++] & 0xFF; - final long byte290 = blocks[blocksOffset++] & 0xFF; - final long byte291 = blocks[blocksOffset++] & 0xFF; - final long byte292 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte287 << 33) | (byte288 << 25) | (byte289 << 17) | (byte290 << 9) | (byte291 << 1) | (byte292 >>> 7); - final long byte293 = blocks[blocksOffset++] & 0xFF; - final long byte294 = blocks[blocksOffset++] & 0xFF; - final long byte295 = blocks[blocksOffset++] & 0xFF; - final long byte296 = blocks[blocksOffset++] & 0xFF; - final long byte297 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte292 & 127) << 34) | (byte293 << 26) | (byte294 << 18) | (byte295 << 10) | (byte296 << 2) | (byte297 >>> 6); - final long byte298 = blocks[blocksOffset++] & 0xFF; - final long byte299 = blocks[blocksOffset++] & 0xFF; - final long byte300 = blocks[blocksOffset++] & 0xFF; - final long byte301 = blocks[blocksOffset++] & 0xFF; - final long byte302 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte297 & 63) << 35) | (byte298 << 27) | (byte299 << 19) | (byte300 << 11) | (byte301 << 3) | (byte302 >>> 5); - final long byte303 = blocks[blocksOffset++] & 0xFF; - final long byte304 = blocks[blocksOffset++] & 0xFF; - final long byte305 = blocks[blocksOffset++] & 0xFF; - final long byte306 = blocks[blocksOffset++] & 0xFF; - final long byte307 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte302 & 31) << 36) | (byte303 << 28) | (byte304 << 20) | (byte305 << 12) | (byte306 << 4) | (byte307 >>> 4); - final long byte308 = blocks[blocksOffset++] & 0xFF; - final long byte309 = blocks[blocksOffset++] & 0xFF; - final long byte310 = blocks[blocksOffset++] & 0xFF; - final long byte311 = blocks[blocksOffset++] & 0xFF; - final long byte312 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte307 & 15) << 37) | (byte308 << 29) | (byte309 << 21) | (byte310 << 13) | (byte311 << 5) | (byte312 >>> 3); - final long byte313 = blocks[blocksOffset++] & 0xFF; - final long byte314 = blocks[blocksOffset++] & 0xFF; - final long byte315 = blocks[blocksOffset++] & 0xFF; - final long byte316 = blocks[blocksOffset++] & 0xFF; - final long byte317 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte312 & 7) << 38) | (byte313 << 30) | (byte314 << 22) | (byte315 << 14) | (byte316 << 6) | (byte317 >>> 2); - final long byte318 = blocks[blocksOffset++] & 0xFF; - final long byte319 = blocks[blocksOffset++] & 0xFF; - final long byte320 = blocks[blocksOffset++] & 0xFF; - final long byte321 = blocks[blocksOffset++] & 0xFF; - final long byte322 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte317 & 3) << 39) | (byte318 << 31) | (byte319 << 23) | (byte320 << 15) | (byte321 << 7) | (byte322 >>> 1); - final long byte323 = blocks[blocksOffset++] & 0xFF; - final long byte324 = blocks[blocksOffset++] & 0xFF; - final long byte325 = blocks[blocksOffset++] & 0xFF; - final long byte326 = blocks[blocksOffset++] & 0xFF; - final long byte327 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte322 & 1) << 40) | (byte323 << 32) | (byte324 << 24) | (byte325 << 16) | (byte326 << 8) | byte327; - } - } - - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 23) | ((values[valuesOffset] & 0xffffffffL) >>> 18); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 46) | ((values[valuesOffset++] & 0xffffffffL) << 5) | ((values[valuesOffset] & 0xffffffffL) >>> 36); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 28) | ((values[valuesOffset] & 0xffffffffL) >>> 13); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 51) | ((values[valuesOffset++] & 0xffffffffL) << 10) | ((values[valuesOffset] & 0xffffffffL) >>> 31); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 33) | ((values[valuesOffset] & 0xffffffffL) >>> 8); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 56) | ((values[valuesOffset++] & 0xffffffffL) << 15) | ((values[valuesOffset] & 0xffffffffL) >>> 26); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 38) | ((values[valuesOffset] & 0xffffffffL) >>> 3); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 61) | ((values[valuesOffset++] & 0xffffffffL) << 20) | ((values[valuesOffset] & 0xffffffffL) >>> 21); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 43) | ((values[valuesOffset++] & 0xffffffffL) << 2) | ((values[valuesOffset] & 0xffffffffL) >>> 39); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 25) | ((values[valuesOffset] & 0xffffffffL) >>> 16); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 48) | ((values[valuesOffset++] & 0xffffffffL) << 7) | ((values[valuesOffset] & 0xffffffffL) >>> 34); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 30) | ((values[valuesOffset] & 0xffffffffL) >>> 11); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 53) | ((values[valuesOffset++] & 0xffffffffL) << 12) | ((values[valuesOffset] & 0xffffffffL) >>> 29); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 35) | ((values[valuesOffset] & 0xffffffffL) >>> 6); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 58) | ((values[valuesOffset++] & 0xffffffffL) << 17) | ((values[valuesOffset] & 0xffffffffL) >>> 24); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 40) | ((values[valuesOffset] & 0xffffffffL) >>> 1); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 63) | ((values[valuesOffset++] & 0xffffffffL) << 22) | ((values[valuesOffset] & 0xffffffffL) >>> 19); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 45) | ((values[valuesOffset++] & 0xffffffffL) << 4) | ((values[valuesOffset] & 0xffffffffL) >>> 37); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 27) | ((values[valuesOffset] & 0xffffffffL) >>> 14); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 50) | ((values[valuesOffset++] & 0xffffffffL) << 9) | ((values[valuesOffset] & 0xffffffffL) >>> 32); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 32) | ((values[valuesOffset] & 0xffffffffL) >>> 9); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 55) | ((values[valuesOffset++] & 0xffffffffL) << 14) | ((values[valuesOffset] & 0xffffffffL) >>> 27); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 37) | ((values[valuesOffset] & 0xffffffffL) >>> 4); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 60) | ((values[valuesOffset++] & 0xffffffffL) << 19) | ((values[valuesOffset] & 0xffffffffL) >>> 22); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 42) | ((values[valuesOffset++] & 0xffffffffL) << 1) | ((values[valuesOffset] & 0xffffffffL) >>> 40); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 24) | ((values[valuesOffset] & 0xffffffffL) >>> 17); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 47) | ((values[valuesOffset++] & 0xffffffffL) << 6) | ((values[valuesOffset] & 0xffffffffL) >>> 35); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 29) | ((values[valuesOffset] & 0xffffffffL) >>> 12); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 52) | ((values[valuesOffset++] & 0xffffffffL) << 11) | ((values[valuesOffset] & 0xffffffffL) >>> 30); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 34) | ((values[valuesOffset] & 0xffffffffL) >>> 7); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 57) | ((values[valuesOffset++] & 0xffffffffL) << 16) | ((values[valuesOffset] & 0xffffffffL) >>> 25); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 39) | ((values[valuesOffset] & 0xffffffffL) >>> 2); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 62) | ((values[valuesOffset++] & 0xffffffffL) << 21) | ((values[valuesOffset] & 0xffffffffL) >>> 20); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 44) | ((values[valuesOffset++] & 0xffffffffL) << 3) | ((values[valuesOffset] & 0xffffffffL) >>> 38); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 26) | ((values[valuesOffset] & 0xffffffffL) >>> 15); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 49) | ((values[valuesOffset++] & 0xffffffffL) << 8) | ((values[valuesOffset] & 0xffffffffL) >>> 33); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 31) | ((values[valuesOffset] & 0xffffffffL) >>> 10); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 54) | ((values[valuesOffset++] & 0xffffffffL) << 13) | ((values[valuesOffset] & 0xffffffffL) >>> 28); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 36) | ((values[valuesOffset] & 0xffffffffL) >>> 5); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 59) | ((values[valuesOffset++] & 0xffffffffL) << 18) | ((values[valuesOffset] & 0xffffffffL) >>> 23); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 41) | (values[valuesOffset++] & 0xffffffffL); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] << 23) | (values[valuesOffset] >>> 18); - blocks[blocksOffset++] = (values[valuesOffset++] << 46) | (values[valuesOffset++] << 5) | (values[valuesOffset] >>> 36); - blocks[blocksOffset++] = (values[valuesOffset++] << 28) | (values[valuesOffset] >>> 13); - blocks[blocksOffset++] = (values[valuesOffset++] << 51) | (values[valuesOffset++] << 10) | (values[valuesOffset] >>> 31); - blocks[blocksOffset++] = (values[valuesOffset++] << 33) | (values[valuesOffset] >>> 8); - blocks[blocksOffset++] = (values[valuesOffset++] << 56) | (values[valuesOffset++] << 15) | (values[valuesOffset] >>> 26); - blocks[blocksOffset++] = (values[valuesOffset++] << 38) | (values[valuesOffset] >>> 3); - blocks[blocksOffset++] = (values[valuesOffset++] << 61) | (values[valuesOffset++] << 20) | (values[valuesOffset] >>> 21); - blocks[blocksOffset++] = (values[valuesOffset++] << 43) | (values[valuesOffset++] << 2) | (values[valuesOffset] >>> 39); - blocks[blocksOffset++] = (values[valuesOffset++] << 25) | (values[valuesOffset] >>> 16); - blocks[blocksOffset++] = (values[valuesOffset++] << 48) | (values[valuesOffset++] << 7) | (values[valuesOffset] >>> 34); - blocks[blocksOffset++] = (values[valuesOffset++] << 30) | (values[valuesOffset] >>> 11); - blocks[blocksOffset++] = (values[valuesOffset++] << 53) | (values[valuesOffset++] << 12) | (values[valuesOffset] >>> 29); - blocks[blocksOffset++] = (values[valuesOffset++] << 35) | (values[valuesOffset] >>> 6); - blocks[blocksOffset++] = (values[valuesOffset++] << 58) | (values[valuesOffset++] << 17) | (values[valuesOffset] >>> 24); - blocks[blocksOffset++] = (values[valuesOffset++] << 40) | (values[valuesOffset] >>> 1); - blocks[blocksOffset++] = (values[valuesOffset++] << 63) | (values[valuesOffset++] << 22) | (values[valuesOffset] >>> 19); - blocks[blocksOffset++] = (values[valuesOffset++] << 45) | (values[valuesOffset++] << 4) | (values[valuesOffset] >>> 37); - blocks[blocksOffset++] = (values[valuesOffset++] << 27) | (values[valuesOffset] >>> 14); - blocks[blocksOffset++] = (values[valuesOffset++] << 50) | (values[valuesOffset++] << 9) | (values[valuesOffset] >>> 32); - blocks[blocksOffset++] = (values[valuesOffset++] << 32) | (values[valuesOffset] >>> 9); - blocks[blocksOffset++] = (values[valuesOffset++] << 55) | (values[valuesOffset++] << 14) | (values[valuesOffset] >>> 27); - blocks[blocksOffset++] = (values[valuesOffset++] << 37) | (values[valuesOffset] >>> 4); - blocks[blocksOffset++] = (values[valuesOffset++] << 60) | (values[valuesOffset++] << 19) | (values[valuesOffset] >>> 22); - blocks[blocksOffset++] = (values[valuesOffset++] << 42) | (values[valuesOffset++] << 1) | (values[valuesOffset] >>> 40); - blocks[blocksOffset++] = (values[valuesOffset++] << 24) | (values[valuesOffset] >>> 17); - blocks[blocksOffset++] = (values[valuesOffset++] << 47) | (values[valuesOffset++] << 6) | (values[valuesOffset] >>> 35); - blocks[blocksOffset++] = (values[valuesOffset++] << 29) | (values[valuesOffset] >>> 12); - blocks[blocksOffset++] = (values[valuesOffset++] << 52) | (values[valuesOffset++] << 11) | (values[valuesOffset] >>> 30); - blocks[blocksOffset++] = (values[valuesOffset++] << 34) | (values[valuesOffset] >>> 7); - blocks[blocksOffset++] = (values[valuesOffset++] << 57) | (values[valuesOffset++] << 16) | (values[valuesOffset] >>> 25); - blocks[blocksOffset++] = (values[valuesOffset++] << 39) | (values[valuesOffset] >>> 2); - blocks[blocksOffset++] = (values[valuesOffset++] << 62) | (values[valuesOffset++] << 21) | (values[valuesOffset] >>> 20); - blocks[blocksOffset++] = (values[valuesOffset++] << 44) | (values[valuesOffset++] << 3) | (values[valuesOffset] >>> 38); - blocks[blocksOffset++] = (values[valuesOffset++] << 26) | (values[valuesOffset] >>> 15); - blocks[blocksOffset++] = (values[valuesOffset++] << 49) | (values[valuesOffset++] << 8) | (values[valuesOffset] >>> 33); - blocks[blocksOffset++] = (values[valuesOffset++] << 31) | (values[valuesOffset] >>> 10); - blocks[blocksOffset++] = (values[valuesOffset++] << 54) | (values[valuesOffset++] << 13) | (values[valuesOffset] >>> 28); - blocks[blocksOffset++] = (values[valuesOffset++] << 36) | (values[valuesOffset] >>> 5); - blocks[blocksOffset++] = (values[valuesOffset++] << 59) | (values[valuesOffset++] << 18) | (values[valuesOffset] >>> 23); - blocks[blocksOffset++] = (values[valuesOffset++] << 41) | values[valuesOffset++]; - } - } - -} diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked42.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked42.java deleted file mode 100644 index 65fa472c28e..00000000000 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked42.java +++ /dev/null @@ -1,373 +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 BulkOperationPacked42 extends BulkOperation { - @Override - public int blockCount() { - return 21; - } - - @Override - public int valueCount() { - return 32; - } - - @Override - public void decode(long[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) { - throw new UnsupportedOperationException(); - } - - @Override - public void decode(byte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) { - throw new UnsupportedOperationException(); - } - - @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 >>> 22; - final long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block0 & 4194303L) << 20) | (block1 >>> 44); - values[valuesOffset++] = (block1 >>> 2) & 4398046511103L; - final long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block1 & 3L) << 40) | (block2 >>> 24); - final long block3 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block2 & 16777215L) << 18) | (block3 >>> 46); - values[valuesOffset++] = (block3 >>> 4) & 4398046511103L; - final long block4 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block3 & 15L) << 38) | (block4 >>> 26); - final long block5 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block4 & 67108863L) << 16) | (block5 >>> 48); - values[valuesOffset++] = (block5 >>> 6) & 4398046511103L; - final long block6 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block5 & 63L) << 36) | (block6 >>> 28); - final long block7 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block6 & 268435455L) << 14) | (block7 >>> 50); - values[valuesOffset++] = (block7 >>> 8) & 4398046511103L; - final long block8 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block7 & 255L) << 34) | (block8 >>> 30); - final long block9 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block8 & 1073741823L) << 12) | (block9 >>> 52); - values[valuesOffset++] = (block9 >>> 10) & 4398046511103L; - final long block10 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block9 & 1023L) << 32) | (block10 >>> 32); - final long block11 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block10 & 4294967295L) << 10) | (block11 >>> 54); - values[valuesOffset++] = (block11 >>> 12) & 4398046511103L; - final long block12 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block11 & 4095L) << 30) | (block12 >>> 34); - final long block13 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block12 & 17179869183L) << 8) | (block13 >>> 56); - values[valuesOffset++] = (block13 >>> 14) & 4398046511103L; - final long block14 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block13 & 16383L) << 28) | (block14 >>> 36); - final long block15 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block14 & 68719476735L) << 6) | (block15 >>> 58); - values[valuesOffset++] = (block15 >>> 16) & 4398046511103L; - final long block16 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block15 & 65535L) << 26) | (block16 >>> 38); - final long block17 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block16 & 274877906943L) << 4) | (block17 >>> 60); - values[valuesOffset++] = (block17 >>> 18) & 4398046511103L; - final long block18 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block17 & 262143L) << 24) | (block18 >>> 40); - final long block19 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block18 & 1099511627775L) << 2) | (block19 >>> 62); - values[valuesOffset++] = (block19 >>> 20) & 4398046511103L; - final long block20 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block19 & 1048575L) << 22) | (block20 >>> 42); - values[valuesOffset++] = block20 & 4398046511103L; - } - } - - @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; - final long byte3 = blocks[blocksOffset++] & 0xFF; - final long byte4 = blocks[blocksOffset++] & 0xFF; - final long byte5 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte0 << 34) | (byte1 << 26) | (byte2 << 18) | (byte3 << 10) | (byte4 << 2) | (byte5 >>> 6); - final long byte6 = blocks[blocksOffset++] & 0xFF; - final long byte7 = blocks[blocksOffset++] & 0xFF; - final long byte8 = blocks[blocksOffset++] & 0xFF; - final long byte9 = blocks[blocksOffset++] & 0xFF; - final long byte10 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte5 & 63) << 36) | (byte6 << 28) | (byte7 << 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; - final long byte14 = blocks[blocksOffset++] & 0xFF; - final long byte15 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte10 & 15) << 38) | (byte11 << 30) | (byte12 << 22) | (byte13 << 14) | (byte14 << 6) | (byte15 >>> 2); - final long byte16 = blocks[blocksOffset++] & 0xFF; - final long byte17 = blocks[blocksOffset++] & 0xFF; - final long byte18 = blocks[blocksOffset++] & 0xFF; - final long byte19 = blocks[blocksOffset++] & 0xFF; - final long byte20 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte15 & 3) << 40) | (byte16 << 32) | (byte17 << 24) | (byte18 << 16) | (byte19 << 8) | byte20; - final long byte21 = blocks[blocksOffset++] & 0xFF; - final long byte22 = blocks[blocksOffset++] & 0xFF; - final long byte23 = blocks[blocksOffset++] & 0xFF; - final long byte24 = blocks[blocksOffset++] & 0xFF; - final long byte25 = blocks[blocksOffset++] & 0xFF; - final long byte26 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte21 << 34) | (byte22 << 26) | (byte23 << 18) | (byte24 << 10) | (byte25 << 2) | (byte26 >>> 6); - final long byte27 = blocks[blocksOffset++] & 0xFF; - final long byte28 = blocks[blocksOffset++] & 0xFF; - final long byte29 = blocks[blocksOffset++] & 0xFF; - final long byte30 = blocks[blocksOffset++] & 0xFF; - final long byte31 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte26 & 63) << 36) | (byte27 << 28) | (byte28 << 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; - final long byte35 = blocks[blocksOffset++] & 0xFF; - final long byte36 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte31 & 15) << 38) | (byte32 << 30) | (byte33 << 22) | (byte34 << 14) | (byte35 << 6) | (byte36 >>> 2); - final long byte37 = blocks[blocksOffset++] & 0xFF; - final long byte38 = blocks[blocksOffset++] & 0xFF; - final long byte39 = blocks[blocksOffset++] & 0xFF; - final long byte40 = blocks[blocksOffset++] & 0xFF; - final long byte41 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte36 & 3) << 40) | (byte37 << 32) | (byte38 << 24) | (byte39 << 16) | (byte40 << 8) | byte41; - final long byte42 = blocks[blocksOffset++] & 0xFF; - final long byte43 = blocks[blocksOffset++] & 0xFF; - final long byte44 = blocks[blocksOffset++] & 0xFF; - final long byte45 = blocks[blocksOffset++] & 0xFF; - final long byte46 = blocks[blocksOffset++] & 0xFF; - final long byte47 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte42 << 34) | (byte43 << 26) | (byte44 << 18) | (byte45 << 10) | (byte46 << 2) | (byte47 >>> 6); - final long byte48 = blocks[blocksOffset++] & 0xFF; - final long byte49 = blocks[blocksOffset++] & 0xFF; - final long byte50 = blocks[blocksOffset++] & 0xFF; - final long byte51 = blocks[blocksOffset++] & 0xFF; - final long byte52 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte47 & 63) << 36) | (byte48 << 28) | (byte49 << 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; - final long byte56 = blocks[blocksOffset++] & 0xFF; - final long byte57 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte52 & 15) << 38) | (byte53 << 30) | (byte54 << 22) | (byte55 << 14) | (byte56 << 6) | (byte57 >>> 2); - final long byte58 = blocks[blocksOffset++] & 0xFF; - final long byte59 = blocks[blocksOffset++] & 0xFF; - final long byte60 = blocks[blocksOffset++] & 0xFF; - final long byte61 = blocks[blocksOffset++] & 0xFF; - final long byte62 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte57 & 3) << 40) | (byte58 << 32) | (byte59 << 24) | (byte60 << 16) | (byte61 << 8) | byte62; - final long byte63 = blocks[blocksOffset++] & 0xFF; - final long byte64 = blocks[blocksOffset++] & 0xFF; - final long byte65 = blocks[blocksOffset++] & 0xFF; - final long byte66 = blocks[blocksOffset++] & 0xFF; - final long byte67 = blocks[blocksOffset++] & 0xFF; - final long byte68 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte63 << 34) | (byte64 << 26) | (byte65 << 18) | (byte66 << 10) | (byte67 << 2) | (byte68 >>> 6); - final long byte69 = blocks[blocksOffset++] & 0xFF; - final long byte70 = blocks[blocksOffset++] & 0xFF; - final long byte71 = blocks[blocksOffset++] & 0xFF; - final long byte72 = blocks[blocksOffset++] & 0xFF; - final long byte73 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte68 & 63) << 36) | (byte69 << 28) | (byte70 << 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; - final long byte77 = blocks[blocksOffset++] & 0xFF; - final long byte78 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte73 & 15) << 38) | (byte74 << 30) | (byte75 << 22) | (byte76 << 14) | (byte77 << 6) | (byte78 >>> 2); - final long byte79 = blocks[blocksOffset++] & 0xFF; - final long byte80 = blocks[blocksOffset++] & 0xFF; - final long byte81 = blocks[blocksOffset++] & 0xFF; - final long byte82 = blocks[blocksOffset++] & 0xFF; - final long byte83 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte78 & 3) << 40) | (byte79 << 32) | (byte80 << 24) | (byte81 << 16) | (byte82 << 8) | byte83; - final long byte84 = blocks[blocksOffset++] & 0xFF; - final long byte85 = blocks[blocksOffset++] & 0xFF; - final long byte86 = blocks[blocksOffset++] & 0xFF; - final long byte87 = blocks[blocksOffset++] & 0xFF; - final long byte88 = blocks[blocksOffset++] & 0xFF; - final long byte89 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte84 << 34) | (byte85 << 26) | (byte86 << 18) | (byte87 << 10) | (byte88 << 2) | (byte89 >>> 6); - final long byte90 = blocks[blocksOffset++] & 0xFF; - final long byte91 = blocks[blocksOffset++] & 0xFF; - final long byte92 = blocks[blocksOffset++] & 0xFF; - final long byte93 = blocks[blocksOffset++] & 0xFF; - final long byte94 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte89 & 63) << 36) | (byte90 << 28) | (byte91 << 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; - final long byte98 = blocks[blocksOffset++] & 0xFF; - final long byte99 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte94 & 15) << 38) | (byte95 << 30) | (byte96 << 22) | (byte97 << 14) | (byte98 << 6) | (byte99 >>> 2); - final long byte100 = blocks[blocksOffset++] & 0xFF; - final long byte101 = blocks[blocksOffset++] & 0xFF; - final long byte102 = blocks[blocksOffset++] & 0xFF; - final long byte103 = blocks[blocksOffset++] & 0xFF; - final long byte104 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte99 & 3) << 40) | (byte100 << 32) | (byte101 << 24) | (byte102 << 16) | (byte103 << 8) | byte104; - final long byte105 = blocks[blocksOffset++] & 0xFF; - final long byte106 = blocks[blocksOffset++] & 0xFF; - final long byte107 = blocks[blocksOffset++] & 0xFF; - final long byte108 = blocks[blocksOffset++] & 0xFF; - final long byte109 = blocks[blocksOffset++] & 0xFF; - final long byte110 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte105 << 34) | (byte106 << 26) | (byte107 << 18) | (byte108 << 10) | (byte109 << 2) | (byte110 >>> 6); - final long byte111 = blocks[blocksOffset++] & 0xFF; - final long byte112 = blocks[blocksOffset++] & 0xFF; - final long byte113 = blocks[blocksOffset++] & 0xFF; - final long byte114 = blocks[blocksOffset++] & 0xFF; - final long byte115 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte110 & 63) << 36) | (byte111 << 28) | (byte112 << 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; - final long byte119 = blocks[blocksOffset++] & 0xFF; - final long byte120 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte115 & 15) << 38) | (byte116 << 30) | (byte117 << 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; - final long byte124 = blocks[blocksOffset++] & 0xFF; - final long byte125 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte120 & 3) << 40) | (byte121 << 32) | (byte122 << 24) | (byte123 << 16) | (byte124 << 8) | byte125; - final long byte126 = blocks[blocksOffset++] & 0xFF; - final long byte127 = blocks[blocksOffset++] & 0xFF; - final long byte128 = blocks[blocksOffset++] & 0xFF; - final long byte129 = blocks[blocksOffset++] & 0xFF; - final long byte130 = blocks[blocksOffset++] & 0xFF; - final long byte131 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte126 << 34) | (byte127 << 26) | (byte128 << 18) | (byte129 << 10) | (byte130 << 2) | (byte131 >>> 6); - final long byte132 = blocks[blocksOffset++] & 0xFF; - final long byte133 = blocks[blocksOffset++] & 0xFF; - final long byte134 = blocks[blocksOffset++] & 0xFF; - final long byte135 = blocks[blocksOffset++] & 0xFF; - final long byte136 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte131 & 63) << 36) | (byte132 << 28) | (byte133 << 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; - final long byte140 = blocks[blocksOffset++] & 0xFF; - final long byte141 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte136 & 15) << 38) | (byte137 << 30) | (byte138 << 22) | (byte139 << 14) | (byte140 << 6) | (byte141 >>> 2); - final long byte142 = blocks[blocksOffset++] & 0xFF; - final long byte143 = blocks[blocksOffset++] & 0xFF; - final long byte144 = blocks[blocksOffset++] & 0xFF; - final long byte145 = blocks[blocksOffset++] & 0xFF; - final long byte146 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte141 & 3) << 40) | (byte142 << 32) | (byte143 << 24) | (byte144 << 16) | (byte145 << 8) | byte146; - final long byte147 = blocks[blocksOffset++] & 0xFF; - final long byte148 = blocks[blocksOffset++] & 0xFF; - final long byte149 = blocks[blocksOffset++] & 0xFF; - final long byte150 = blocks[blocksOffset++] & 0xFF; - final long byte151 = blocks[blocksOffset++] & 0xFF; - final long byte152 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte147 << 34) | (byte148 << 26) | (byte149 << 18) | (byte150 << 10) | (byte151 << 2) | (byte152 >>> 6); - final long byte153 = blocks[blocksOffset++] & 0xFF; - final long byte154 = blocks[blocksOffset++] & 0xFF; - final long byte155 = blocks[blocksOffset++] & 0xFF; - final long byte156 = blocks[blocksOffset++] & 0xFF; - final long byte157 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte152 & 63) << 36) | (byte153 << 28) | (byte154 << 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; - final long byte161 = blocks[blocksOffset++] & 0xFF; - final long byte162 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte157 & 15) << 38) | (byte158 << 30) | (byte159 << 22) | (byte160 << 14) | (byte161 << 6) | (byte162 >>> 2); - final long byte163 = blocks[blocksOffset++] & 0xFF; - final long byte164 = blocks[blocksOffset++] & 0xFF; - final long byte165 = blocks[blocksOffset++] & 0xFF; - final long byte166 = blocks[blocksOffset++] & 0xFF; - final long byte167 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte162 & 3) << 40) | (byte163 << 32) | (byte164 << 24) | (byte165 << 16) | (byte166 << 8) | byte167; - } - } - - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 22) | ((values[valuesOffset] & 0xffffffffL) >>> 20); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 44) | ((values[valuesOffset++] & 0xffffffffL) << 2) | ((values[valuesOffset] & 0xffffffffL) >>> 40); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 24) | ((values[valuesOffset] & 0xffffffffL) >>> 18); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 46) | ((values[valuesOffset++] & 0xffffffffL) << 4) | ((values[valuesOffset] & 0xffffffffL) >>> 38); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 26) | ((values[valuesOffset] & 0xffffffffL) >>> 16); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 48) | ((values[valuesOffset++] & 0xffffffffL) << 6) | ((values[valuesOffset] & 0xffffffffL) >>> 36); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 28) | ((values[valuesOffset] & 0xffffffffL) >>> 14); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 50) | ((values[valuesOffset++] & 0xffffffffL) << 8) | ((values[valuesOffset] & 0xffffffffL) >>> 34); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 30) | ((values[valuesOffset] & 0xffffffffL) >>> 12); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 52) | ((values[valuesOffset++] & 0xffffffffL) << 10) | ((values[valuesOffset] & 0xffffffffL) >>> 32); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 32) | ((values[valuesOffset] & 0xffffffffL) >>> 10); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 54) | ((values[valuesOffset++] & 0xffffffffL) << 12) | ((values[valuesOffset] & 0xffffffffL) >>> 30); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 34) | ((values[valuesOffset] & 0xffffffffL) >>> 8); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 56) | ((values[valuesOffset++] & 0xffffffffL) << 14) | ((values[valuesOffset] & 0xffffffffL) >>> 28); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 36) | ((values[valuesOffset] & 0xffffffffL) >>> 6); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 58) | ((values[valuesOffset++] & 0xffffffffL) << 16) | ((values[valuesOffset] & 0xffffffffL) >>> 26); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 38) | ((values[valuesOffset] & 0xffffffffL) >>> 4); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 60) | ((values[valuesOffset++] & 0xffffffffL) << 18) | ((values[valuesOffset] & 0xffffffffL) >>> 24); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 40) | ((values[valuesOffset] & 0xffffffffL) >>> 2); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 62) | ((values[valuesOffset++] & 0xffffffffL) << 20) | ((values[valuesOffset] & 0xffffffffL) >>> 22); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 42) | (values[valuesOffset++] & 0xffffffffL); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] << 22) | (values[valuesOffset] >>> 20); - blocks[blocksOffset++] = (values[valuesOffset++] << 44) | (values[valuesOffset++] << 2) | (values[valuesOffset] >>> 40); - blocks[blocksOffset++] = (values[valuesOffset++] << 24) | (values[valuesOffset] >>> 18); - blocks[blocksOffset++] = (values[valuesOffset++] << 46) | (values[valuesOffset++] << 4) | (values[valuesOffset] >>> 38); - blocks[blocksOffset++] = (values[valuesOffset++] << 26) | (values[valuesOffset] >>> 16); - blocks[blocksOffset++] = (values[valuesOffset++] << 48) | (values[valuesOffset++] << 6) | (values[valuesOffset] >>> 36); - blocks[blocksOffset++] = (values[valuesOffset++] << 28) | (values[valuesOffset] >>> 14); - blocks[blocksOffset++] = (values[valuesOffset++] << 50) | (values[valuesOffset++] << 8) | (values[valuesOffset] >>> 34); - blocks[blocksOffset++] = (values[valuesOffset++] << 30) | (values[valuesOffset] >>> 12); - blocks[blocksOffset++] = (values[valuesOffset++] << 52) | (values[valuesOffset++] << 10) | (values[valuesOffset] >>> 32); - blocks[blocksOffset++] = (values[valuesOffset++] << 32) | (values[valuesOffset] >>> 10); - blocks[blocksOffset++] = (values[valuesOffset++] << 54) | (values[valuesOffset++] << 12) | (values[valuesOffset] >>> 30); - blocks[blocksOffset++] = (values[valuesOffset++] << 34) | (values[valuesOffset] >>> 8); - blocks[blocksOffset++] = (values[valuesOffset++] << 56) | (values[valuesOffset++] << 14) | (values[valuesOffset] >>> 28); - blocks[blocksOffset++] = (values[valuesOffset++] << 36) | (values[valuesOffset] >>> 6); - blocks[blocksOffset++] = (values[valuesOffset++] << 58) | (values[valuesOffset++] << 16) | (values[valuesOffset] >>> 26); - blocks[blocksOffset++] = (values[valuesOffset++] << 38) | (values[valuesOffset] >>> 4); - blocks[blocksOffset++] = (values[valuesOffset++] << 60) | (values[valuesOffset++] << 18) | (values[valuesOffset] >>> 24); - blocks[blocksOffset++] = (values[valuesOffset++] << 40) | (values[valuesOffset] >>> 2); - blocks[blocksOffset++] = (values[valuesOffset++] << 62) | (values[valuesOffset++] << 20) | (values[valuesOffset] >>> 22); - blocks[blocksOffset++] = (values[valuesOffset++] << 42) | values[valuesOffset++]; - } - } - -} diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked43.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked43.java deleted file mode 100644 index cacab4614fb..00000000000 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked43.java +++ /dev/null @@ -1,679 +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 BulkOperationPacked43 extends BulkOperation { - @Override - public int blockCount() { - return 43; - } - - @Override - public int valueCount() { - return 64; - } - - @Override - public void decode(long[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) { - throw new UnsupportedOperationException(); - } - - @Override - public void decode(byte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) { - throw new UnsupportedOperationException(); - } - - @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 >>> 21; - final long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block0 & 2097151L) << 22) | (block1 >>> 42); - final long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block1 & 4398046511103L) << 1) | (block2 >>> 63); - values[valuesOffset++] = (block2 >>> 20) & 8796093022207L; - final long block3 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block2 & 1048575L) << 23) | (block3 >>> 41); - final long block4 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block3 & 2199023255551L) << 2) | (block4 >>> 62); - values[valuesOffset++] = (block4 >>> 19) & 8796093022207L; - final long block5 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block4 & 524287L) << 24) | (block5 >>> 40); - final long block6 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block5 & 1099511627775L) << 3) | (block6 >>> 61); - values[valuesOffset++] = (block6 >>> 18) & 8796093022207L; - final long block7 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block6 & 262143L) << 25) | (block7 >>> 39); - final long block8 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block7 & 549755813887L) << 4) | (block8 >>> 60); - values[valuesOffset++] = (block8 >>> 17) & 8796093022207L; - final long block9 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block8 & 131071L) << 26) | (block9 >>> 38); - final long block10 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block9 & 274877906943L) << 5) | (block10 >>> 59); - values[valuesOffset++] = (block10 >>> 16) & 8796093022207L; - final long block11 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block10 & 65535L) << 27) | (block11 >>> 37); - final long block12 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block11 & 137438953471L) << 6) | (block12 >>> 58); - values[valuesOffset++] = (block12 >>> 15) & 8796093022207L; - final long block13 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block12 & 32767L) << 28) | (block13 >>> 36); - final long block14 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block13 & 68719476735L) << 7) | (block14 >>> 57); - values[valuesOffset++] = (block14 >>> 14) & 8796093022207L; - final long block15 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block14 & 16383L) << 29) | (block15 >>> 35); - final long block16 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block15 & 34359738367L) << 8) | (block16 >>> 56); - values[valuesOffset++] = (block16 >>> 13) & 8796093022207L; - final long block17 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block16 & 8191L) << 30) | (block17 >>> 34); - final long block18 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block17 & 17179869183L) << 9) | (block18 >>> 55); - values[valuesOffset++] = (block18 >>> 12) & 8796093022207L; - final long block19 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block18 & 4095L) << 31) | (block19 >>> 33); - final long block20 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block19 & 8589934591L) << 10) | (block20 >>> 54); - values[valuesOffset++] = (block20 >>> 11) & 8796093022207L; - final long block21 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block20 & 2047L) << 32) | (block21 >>> 32); - final long block22 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block21 & 4294967295L) << 11) | (block22 >>> 53); - values[valuesOffset++] = (block22 >>> 10) & 8796093022207L; - final long block23 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block22 & 1023L) << 33) | (block23 >>> 31); - final long block24 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block23 & 2147483647L) << 12) | (block24 >>> 52); - values[valuesOffset++] = (block24 >>> 9) & 8796093022207L; - final long block25 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block24 & 511L) << 34) | (block25 >>> 30); - final long block26 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block25 & 1073741823L) << 13) | (block26 >>> 51); - values[valuesOffset++] = (block26 >>> 8) & 8796093022207L; - final long block27 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block26 & 255L) << 35) | (block27 >>> 29); - final long block28 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block27 & 536870911L) << 14) | (block28 >>> 50); - values[valuesOffset++] = (block28 >>> 7) & 8796093022207L; - final long block29 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block28 & 127L) << 36) | (block29 >>> 28); - final long block30 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block29 & 268435455L) << 15) | (block30 >>> 49); - values[valuesOffset++] = (block30 >>> 6) & 8796093022207L; - final long block31 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block30 & 63L) << 37) | (block31 >>> 27); - final long block32 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block31 & 134217727L) << 16) | (block32 >>> 48); - values[valuesOffset++] = (block32 >>> 5) & 8796093022207L; - final long block33 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block32 & 31L) << 38) | (block33 >>> 26); - final long block34 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block33 & 67108863L) << 17) | (block34 >>> 47); - values[valuesOffset++] = (block34 >>> 4) & 8796093022207L; - final long block35 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block34 & 15L) << 39) | (block35 >>> 25); - final long block36 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block35 & 33554431L) << 18) | (block36 >>> 46); - values[valuesOffset++] = (block36 >>> 3) & 8796093022207L; - final long block37 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block36 & 7L) << 40) | (block37 >>> 24); - final long block38 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block37 & 16777215L) << 19) | (block38 >>> 45); - values[valuesOffset++] = (block38 >>> 2) & 8796093022207L; - final long block39 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block38 & 3L) << 41) | (block39 >>> 23); - final long block40 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block39 & 8388607L) << 20) | (block40 >>> 44); - values[valuesOffset++] = (block40 >>> 1) & 8796093022207L; - final long block41 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block40 & 1L) << 42) | (block41 >>> 22); - final long block42 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block41 & 4194303L) << 21) | (block42 >>> 43); - values[valuesOffset++] = block42 & 8796093022207L; - } - } - - @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; - final long byte3 = blocks[blocksOffset++] & 0xFF; - final long byte4 = blocks[blocksOffset++] & 0xFF; - final long byte5 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte0 << 35) | (byte1 << 27) | (byte2 << 19) | (byte3 << 11) | (byte4 << 3) | (byte5 >>> 5); - final long byte6 = blocks[blocksOffset++] & 0xFF; - final long byte7 = blocks[blocksOffset++] & 0xFF; - final long byte8 = blocks[blocksOffset++] & 0xFF; - final long byte9 = blocks[blocksOffset++] & 0xFF; - final long byte10 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte5 & 31) << 38) | (byte6 << 30) | (byte7 << 22) | (byte8 << 14) | (byte9 << 6) | (byte10 >>> 2); - final long byte11 = blocks[blocksOffset++] & 0xFF; - final long byte12 = blocks[blocksOffset++] & 0xFF; - final long byte13 = blocks[blocksOffset++] & 0xFF; - final long byte14 = blocks[blocksOffset++] & 0xFF; - final long byte15 = blocks[blocksOffset++] & 0xFF; - final long byte16 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte10 & 3) << 41) | (byte11 << 33) | (byte12 << 25) | (byte13 << 17) | (byte14 << 9) | (byte15 << 1) | (byte16 >>> 7); - final long byte17 = blocks[blocksOffset++] & 0xFF; - final long byte18 = blocks[blocksOffset++] & 0xFF; - final long byte19 = blocks[blocksOffset++] & 0xFF; - final long byte20 = blocks[blocksOffset++] & 0xFF; - final long byte21 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte16 & 127) << 36) | (byte17 << 28) | (byte18 << 20) | (byte19 << 12) | (byte20 << 4) | (byte21 >>> 4); - final long byte22 = blocks[blocksOffset++] & 0xFF; - final long byte23 = blocks[blocksOffset++] & 0xFF; - final long byte24 = blocks[blocksOffset++] & 0xFF; - final long byte25 = blocks[blocksOffset++] & 0xFF; - final long byte26 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte21 & 15) << 39) | (byte22 << 31) | (byte23 << 23) | (byte24 << 15) | (byte25 << 7) | (byte26 >>> 1); - final long byte27 = blocks[blocksOffset++] & 0xFF; - final long byte28 = blocks[blocksOffset++] & 0xFF; - final long byte29 = blocks[blocksOffset++] & 0xFF; - final long byte30 = blocks[blocksOffset++] & 0xFF; - final long byte31 = blocks[blocksOffset++] & 0xFF; - final long byte32 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte26 & 1) << 42) | (byte27 << 34) | (byte28 << 26) | (byte29 << 18) | (byte30 << 10) | (byte31 << 2) | (byte32 >>> 6); - final long byte33 = blocks[blocksOffset++] & 0xFF; - final long byte34 = blocks[blocksOffset++] & 0xFF; - final long byte35 = blocks[blocksOffset++] & 0xFF; - final long byte36 = blocks[blocksOffset++] & 0xFF; - final long byte37 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte32 & 63) << 37) | (byte33 << 29) | (byte34 << 21) | (byte35 << 13) | (byte36 << 5) | (byte37 >>> 3); - final long byte38 = blocks[blocksOffset++] & 0xFF; - final long byte39 = blocks[blocksOffset++] & 0xFF; - final long byte40 = blocks[blocksOffset++] & 0xFF; - final long byte41 = blocks[blocksOffset++] & 0xFF; - final long byte42 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte37 & 7) << 40) | (byte38 << 32) | (byte39 << 24) | (byte40 << 16) | (byte41 << 8) | byte42; - final long byte43 = blocks[blocksOffset++] & 0xFF; - final long byte44 = blocks[blocksOffset++] & 0xFF; - final long byte45 = blocks[blocksOffset++] & 0xFF; - final long byte46 = blocks[blocksOffset++] & 0xFF; - final long byte47 = blocks[blocksOffset++] & 0xFF; - final long byte48 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte43 << 35) | (byte44 << 27) | (byte45 << 19) | (byte46 << 11) | (byte47 << 3) | (byte48 >>> 5); - final long byte49 = blocks[blocksOffset++] & 0xFF; - final long byte50 = blocks[blocksOffset++] & 0xFF; - final long byte51 = blocks[blocksOffset++] & 0xFF; - final long byte52 = blocks[blocksOffset++] & 0xFF; - final long byte53 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte48 & 31) << 38) | (byte49 << 30) | (byte50 << 22) | (byte51 << 14) | (byte52 << 6) | (byte53 >>> 2); - final long byte54 = blocks[blocksOffset++] & 0xFF; - final long byte55 = blocks[blocksOffset++] & 0xFF; - final long byte56 = blocks[blocksOffset++] & 0xFF; - final long byte57 = blocks[blocksOffset++] & 0xFF; - final long byte58 = blocks[blocksOffset++] & 0xFF; - final long byte59 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte53 & 3) << 41) | (byte54 << 33) | (byte55 << 25) | (byte56 << 17) | (byte57 << 9) | (byte58 << 1) | (byte59 >>> 7); - final long byte60 = blocks[blocksOffset++] & 0xFF; - final long byte61 = blocks[blocksOffset++] & 0xFF; - final long byte62 = blocks[blocksOffset++] & 0xFF; - final long byte63 = blocks[blocksOffset++] & 0xFF; - final long byte64 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte59 & 127) << 36) | (byte60 << 28) | (byte61 << 20) | (byte62 << 12) | (byte63 << 4) | (byte64 >>> 4); - final long byte65 = blocks[blocksOffset++] & 0xFF; - final long byte66 = blocks[blocksOffset++] & 0xFF; - final long byte67 = blocks[blocksOffset++] & 0xFF; - final long byte68 = blocks[blocksOffset++] & 0xFF; - final long byte69 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte64 & 15) << 39) | (byte65 << 31) | (byte66 << 23) | (byte67 << 15) | (byte68 << 7) | (byte69 >>> 1); - final long byte70 = blocks[blocksOffset++] & 0xFF; - final long byte71 = blocks[blocksOffset++] & 0xFF; - final long byte72 = blocks[blocksOffset++] & 0xFF; - final long byte73 = blocks[blocksOffset++] & 0xFF; - final long byte74 = blocks[blocksOffset++] & 0xFF; - final long byte75 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte69 & 1) << 42) | (byte70 << 34) | (byte71 << 26) | (byte72 << 18) | (byte73 << 10) | (byte74 << 2) | (byte75 >>> 6); - final long byte76 = blocks[blocksOffset++] & 0xFF; - final long byte77 = blocks[blocksOffset++] & 0xFF; - final long byte78 = blocks[blocksOffset++] & 0xFF; - final long byte79 = blocks[blocksOffset++] & 0xFF; - final long byte80 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte75 & 63) << 37) | (byte76 << 29) | (byte77 << 21) | (byte78 << 13) | (byte79 << 5) | (byte80 >>> 3); - final long byte81 = blocks[blocksOffset++] & 0xFF; - final long byte82 = blocks[blocksOffset++] & 0xFF; - final long byte83 = blocks[blocksOffset++] & 0xFF; - final long byte84 = blocks[blocksOffset++] & 0xFF; - final long byte85 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte80 & 7) << 40) | (byte81 << 32) | (byte82 << 24) | (byte83 << 16) | (byte84 << 8) | byte85; - final long byte86 = blocks[blocksOffset++] & 0xFF; - final long byte87 = blocks[blocksOffset++] & 0xFF; - final long byte88 = blocks[blocksOffset++] & 0xFF; - final long byte89 = blocks[blocksOffset++] & 0xFF; - final long byte90 = blocks[blocksOffset++] & 0xFF; - final long byte91 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte86 << 35) | (byte87 << 27) | (byte88 << 19) | (byte89 << 11) | (byte90 << 3) | (byte91 >>> 5); - final long byte92 = blocks[blocksOffset++] & 0xFF; - final long byte93 = blocks[blocksOffset++] & 0xFF; - final long byte94 = blocks[blocksOffset++] & 0xFF; - final long byte95 = blocks[blocksOffset++] & 0xFF; - final long byte96 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte91 & 31) << 38) | (byte92 << 30) | (byte93 << 22) | (byte94 << 14) | (byte95 << 6) | (byte96 >>> 2); - final long byte97 = blocks[blocksOffset++] & 0xFF; - final long byte98 = blocks[blocksOffset++] & 0xFF; - final long byte99 = blocks[blocksOffset++] & 0xFF; - final long byte100 = blocks[blocksOffset++] & 0xFF; - final long byte101 = blocks[blocksOffset++] & 0xFF; - final long byte102 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte96 & 3) << 41) | (byte97 << 33) | (byte98 << 25) | (byte99 << 17) | (byte100 << 9) | (byte101 << 1) | (byte102 >>> 7); - final long byte103 = blocks[blocksOffset++] & 0xFF; - final long byte104 = blocks[blocksOffset++] & 0xFF; - final long byte105 = blocks[blocksOffset++] & 0xFF; - final long byte106 = blocks[blocksOffset++] & 0xFF; - final long byte107 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte102 & 127) << 36) | (byte103 << 28) | (byte104 << 20) | (byte105 << 12) | (byte106 << 4) | (byte107 >>> 4); - final long byte108 = blocks[blocksOffset++] & 0xFF; - final long byte109 = blocks[blocksOffset++] & 0xFF; - final long byte110 = blocks[blocksOffset++] & 0xFF; - final long byte111 = blocks[blocksOffset++] & 0xFF; - final long byte112 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte107 & 15) << 39) | (byte108 << 31) | (byte109 << 23) | (byte110 << 15) | (byte111 << 7) | (byte112 >>> 1); - final long byte113 = blocks[blocksOffset++] & 0xFF; - final long byte114 = blocks[blocksOffset++] & 0xFF; - final long byte115 = blocks[blocksOffset++] & 0xFF; - final long byte116 = blocks[blocksOffset++] & 0xFF; - final long byte117 = blocks[blocksOffset++] & 0xFF; - final long byte118 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte112 & 1) << 42) | (byte113 << 34) | (byte114 << 26) | (byte115 << 18) | (byte116 << 10) | (byte117 << 2) | (byte118 >>> 6); - final long byte119 = blocks[blocksOffset++] & 0xFF; - final long byte120 = blocks[blocksOffset++] & 0xFF; - final long byte121 = blocks[blocksOffset++] & 0xFF; - final long byte122 = blocks[blocksOffset++] & 0xFF; - final long byte123 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte118 & 63) << 37) | (byte119 << 29) | (byte120 << 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; - final long byte127 = blocks[blocksOffset++] & 0xFF; - final long byte128 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte123 & 7) << 40) | (byte124 << 32) | (byte125 << 24) | (byte126 << 16) | (byte127 << 8) | byte128; - final long byte129 = blocks[blocksOffset++] & 0xFF; - final long byte130 = blocks[blocksOffset++] & 0xFF; - final long byte131 = blocks[blocksOffset++] & 0xFF; - final long byte132 = blocks[blocksOffset++] & 0xFF; - final long byte133 = blocks[blocksOffset++] & 0xFF; - final long byte134 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte129 << 35) | (byte130 << 27) | (byte131 << 19) | (byte132 << 11) | (byte133 << 3) | (byte134 >>> 5); - final long byte135 = blocks[blocksOffset++] & 0xFF; - final long byte136 = blocks[blocksOffset++] & 0xFF; - final long byte137 = blocks[blocksOffset++] & 0xFF; - final long byte138 = blocks[blocksOffset++] & 0xFF; - final long byte139 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte134 & 31) << 38) | (byte135 << 30) | (byte136 << 22) | (byte137 << 14) | (byte138 << 6) | (byte139 >>> 2); - final long byte140 = blocks[blocksOffset++] & 0xFF; - final long byte141 = blocks[blocksOffset++] & 0xFF; - final long byte142 = blocks[blocksOffset++] & 0xFF; - final long byte143 = blocks[blocksOffset++] & 0xFF; - final long byte144 = blocks[blocksOffset++] & 0xFF; - final long byte145 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte139 & 3) << 41) | (byte140 << 33) | (byte141 << 25) | (byte142 << 17) | (byte143 << 9) | (byte144 << 1) | (byte145 >>> 7); - final long byte146 = blocks[blocksOffset++] & 0xFF; - final long byte147 = blocks[blocksOffset++] & 0xFF; - final long byte148 = blocks[blocksOffset++] & 0xFF; - final long byte149 = blocks[blocksOffset++] & 0xFF; - final long byte150 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte145 & 127) << 36) | (byte146 << 28) | (byte147 << 20) | (byte148 << 12) | (byte149 << 4) | (byte150 >>> 4); - final long byte151 = blocks[blocksOffset++] & 0xFF; - final long byte152 = blocks[blocksOffset++] & 0xFF; - final long byte153 = blocks[blocksOffset++] & 0xFF; - final long byte154 = blocks[blocksOffset++] & 0xFF; - final long byte155 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte150 & 15) << 39) | (byte151 << 31) | (byte152 << 23) | (byte153 << 15) | (byte154 << 7) | (byte155 >>> 1); - final long byte156 = blocks[blocksOffset++] & 0xFF; - final long byte157 = blocks[blocksOffset++] & 0xFF; - final long byte158 = blocks[blocksOffset++] & 0xFF; - final long byte159 = blocks[blocksOffset++] & 0xFF; - final long byte160 = blocks[blocksOffset++] & 0xFF; - final long byte161 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte155 & 1) << 42) | (byte156 << 34) | (byte157 << 26) | (byte158 << 18) | (byte159 << 10) | (byte160 << 2) | (byte161 >>> 6); - final long byte162 = blocks[blocksOffset++] & 0xFF; - final long byte163 = blocks[blocksOffset++] & 0xFF; - final long byte164 = blocks[blocksOffset++] & 0xFF; - final long byte165 = blocks[blocksOffset++] & 0xFF; - final long byte166 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte161 & 63) << 37) | (byte162 << 29) | (byte163 << 21) | (byte164 << 13) | (byte165 << 5) | (byte166 >>> 3); - final long byte167 = blocks[blocksOffset++] & 0xFF; - final long byte168 = blocks[blocksOffset++] & 0xFF; - final long byte169 = blocks[blocksOffset++] & 0xFF; - final long byte170 = blocks[blocksOffset++] & 0xFF; - final long byte171 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte166 & 7) << 40) | (byte167 << 32) | (byte168 << 24) | (byte169 << 16) | (byte170 << 8) | byte171; - final long byte172 = blocks[blocksOffset++] & 0xFF; - final long byte173 = blocks[blocksOffset++] & 0xFF; - final long byte174 = blocks[blocksOffset++] & 0xFF; - final long byte175 = blocks[blocksOffset++] & 0xFF; - final long byte176 = blocks[blocksOffset++] & 0xFF; - final long byte177 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte172 << 35) | (byte173 << 27) | (byte174 << 19) | (byte175 << 11) | (byte176 << 3) | (byte177 >>> 5); - final long byte178 = blocks[blocksOffset++] & 0xFF; - final long byte179 = blocks[blocksOffset++] & 0xFF; - final long byte180 = blocks[blocksOffset++] & 0xFF; - final long byte181 = blocks[blocksOffset++] & 0xFF; - final long byte182 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte177 & 31) << 38) | (byte178 << 30) | (byte179 << 22) | (byte180 << 14) | (byte181 << 6) | (byte182 >>> 2); - final long byte183 = blocks[blocksOffset++] & 0xFF; - final long byte184 = blocks[blocksOffset++] & 0xFF; - final long byte185 = blocks[blocksOffset++] & 0xFF; - final long byte186 = blocks[blocksOffset++] & 0xFF; - final long byte187 = blocks[blocksOffset++] & 0xFF; - final long byte188 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte182 & 3) << 41) | (byte183 << 33) | (byte184 << 25) | (byte185 << 17) | (byte186 << 9) | (byte187 << 1) | (byte188 >>> 7); - final long byte189 = blocks[blocksOffset++] & 0xFF; - final long byte190 = blocks[blocksOffset++] & 0xFF; - final long byte191 = blocks[blocksOffset++] & 0xFF; - final long byte192 = blocks[blocksOffset++] & 0xFF; - final long byte193 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte188 & 127) << 36) | (byte189 << 28) | (byte190 << 20) | (byte191 << 12) | (byte192 << 4) | (byte193 >>> 4); - final long byte194 = blocks[blocksOffset++] & 0xFF; - final long byte195 = blocks[blocksOffset++] & 0xFF; - final long byte196 = blocks[blocksOffset++] & 0xFF; - final long byte197 = blocks[blocksOffset++] & 0xFF; - final long byte198 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte193 & 15) << 39) | (byte194 << 31) | (byte195 << 23) | (byte196 << 15) | (byte197 << 7) | (byte198 >>> 1); - final long byte199 = blocks[blocksOffset++] & 0xFF; - final long byte200 = blocks[blocksOffset++] & 0xFF; - final long byte201 = blocks[blocksOffset++] & 0xFF; - final long byte202 = blocks[blocksOffset++] & 0xFF; - final long byte203 = blocks[blocksOffset++] & 0xFF; - final long byte204 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte198 & 1) << 42) | (byte199 << 34) | (byte200 << 26) | (byte201 << 18) | (byte202 << 10) | (byte203 << 2) | (byte204 >>> 6); - final long byte205 = blocks[blocksOffset++] & 0xFF; - final long byte206 = blocks[blocksOffset++] & 0xFF; - final long byte207 = blocks[blocksOffset++] & 0xFF; - final long byte208 = blocks[blocksOffset++] & 0xFF; - final long byte209 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte204 & 63) << 37) | (byte205 << 29) | (byte206 << 21) | (byte207 << 13) | (byte208 << 5) | (byte209 >>> 3); - final long byte210 = blocks[blocksOffset++] & 0xFF; - final long byte211 = blocks[blocksOffset++] & 0xFF; - final long byte212 = blocks[blocksOffset++] & 0xFF; - final long byte213 = blocks[blocksOffset++] & 0xFF; - final long byte214 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte209 & 7) << 40) | (byte210 << 32) | (byte211 << 24) | (byte212 << 16) | (byte213 << 8) | byte214; - final long byte215 = blocks[blocksOffset++] & 0xFF; - final long byte216 = blocks[blocksOffset++] & 0xFF; - final long byte217 = blocks[blocksOffset++] & 0xFF; - final long byte218 = blocks[blocksOffset++] & 0xFF; - final long byte219 = blocks[blocksOffset++] & 0xFF; - final long byte220 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte215 << 35) | (byte216 << 27) | (byte217 << 19) | (byte218 << 11) | (byte219 << 3) | (byte220 >>> 5); - final long byte221 = blocks[blocksOffset++] & 0xFF; - final long byte222 = blocks[blocksOffset++] & 0xFF; - final long byte223 = blocks[blocksOffset++] & 0xFF; - final long byte224 = blocks[blocksOffset++] & 0xFF; - final long byte225 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte220 & 31) << 38) | (byte221 << 30) | (byte222 << 22) | (byte223 << 14) | (byte224 << 6) | (byte225 >>> 2); - final long byte226 = blocks[blocksOffset++] & 0xFF; - final long byte227 = blocks[blocksOffset++] & 0xFF; - final long byte228 = blocks[blocksOffset++] & 0xFF; - final long byte229 = blocks[blocksOffset++] & 0xFF; - final long byte230 = blocks[blocksOffset++] & 0xFF; - final long byte231 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte225 & 3) << 41) | (byte226 << 33) | (byte227 << 25) | (byte228 << 17) | (byte229 << 9) | (byte230 << 1) | (byte231 >>> 7); - final long byte232 = blocks[blocksOffset++] & 0xFF; - final long byte233 = blocks[blocksOffset++] & 0xFF; - final long byte234 = blocks[blocksOffset++] & 0xFF; - final long byte235 = blocks[blocksOffset++] & 0xFF; - final long byte236 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte231 & 127) << 36) | (byte232 << 28) | (byte233 << 20) | (byte234 << 12) | (byte235 << 4) | (byte236 >>> 4); - final long byte237 = blocks[blocksOffset++] & 0xFF; - final long byte238 = blocks[blocksOffset++] & 0xFF; - final long byte239 = blocks[blocksOffset++] & 0xFF; - final long byte240 = blocks[blocksOffset++] & 0xFF; - final long byte241 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte236 & 15) << 39) | (byte237 << 31) | (byte238 << 23) | (byte239 << 15) | (byte240 << 7) | (byte241 >>> 1); - final long byte242 = blocks[blocksOffset++] & 0xFF; - final long byte243 = blocks[blocksOffset++] & 0xFF; - final long byte244 = blocks[blocksOffset++] & 0xFF; - final long byte245 = blocks[blocksOffset++] & 0xFF; - final long byte246 = blocks[blocksOffset++] & 0xFF; - final long byte247 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte241 & 1) << 42) | (byte242 << 34) | (byte243 << 26) | (byte244 << 18) | (byte245 << 10) | (byte246 << 2) | (byte247 >>> 6); - final long byte248 = blocks[blocksOffset++] & 0xFF; - final long byte249 = blocks[blocksOffset++] & 0xFF; - final long byte250 = blocks[blocksOffset++] & 0xFF; - final long byte251 = blocks[blocksOffset++] & 0xFF; - final long byte252 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte247 & 63) << 37) | (byte248 << 29) | (byte249 << 21) | (byte250 << 13) | (byte251 << 5) | (byte252 >>> 3); - final long byte253 = blocks[blocksOffset++] & 0xFF; - final long byte254 = blocks[blocksOffset++] & 0xFF; - final long byte255 = blocks[blocksOffset++] & 0xFF; - final long byte256 = blocks[blocksOffset++] & 0xFF; - final long byte257 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte252 & 7) << 40) | (byte253 << 32) | (byte254 << 24) | (byte255 << 16) | (byte256 << 8) | byte257; - final long byte258 = blocks[blocksOffset++] & 0xFF; - final long byte259 = blocks[blocksOffset++] & 0xFF; - final long byte260 = blocks[blocksOffset++] & 0xFF; - final long byte261 = blocks[blocksOffset++] & 0xFF; - final long byte262 = blocks[blocksOffset++] & 0xFF; - final long byte263 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte258 << 35) | (byte259 << 27) | (byte260 << 19) | (byte261 << 11) | (byte262 << 3) | (byte263 >>> 5); - final long byte264 = blocks[blocksOffset++] & 0xFF; - final long byte265 = blocks[blocksOffset++] & 0xFF; - final long byte266 = blocks[blocksOffset++] & 0xFF; - final long byte267 = blocks[blocksOffset++] & 0xFF; - final long byte268 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte263 & 31) << 38) | (byte264 << 30) | (byte265 << 22) | (byte266 << 14) | (byte267 << 6) | (byte268 >>> 2); - final long byte269 = blocks[blocksOffset++] & 0xFF; - final long byte270 = blocks[blocksOffset++] & 0xFF; - final long byte271 = blocks[blocksOffset++] & 0xFF; - final long byte272 = blocks[blocksOffset++] & 0xFF; - final long byte273 = blocks[blocksOffset++] & 0xFF; - final long byte274 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte268 & 3) << 41) | (byte269 << 33) | (byte270 << 25) | (byte271 << 17) | (byte272 << 9) | (byte273 << 1) | (byte274 >>> 7); - final long byte275 = blocks[blocksOffset++] & 0xFF; - final long byte276 = blocks[blocksOffset++] & 0xFF; - final long byte277 = blocks[blocksOffset++] & 0xFF; - final long byte278 = blocks[blocksOffset++] & 0xFF; - final long byte279 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte274 & 127) << 36) | (byte275 << 28) | (byte276 << 20) | (byte277 << 12) | (byte278 << 4) | (byte279 >>> 4); - final long byte280 = blocks[blocksOffset++] & 0xFF; - final long byte281 = blocks[blocksOffset++] & 0xFF; - final long byte282 = blocks[blocksOffset++] & 0xFF; - final long byte283 = blocks[blocksOffset++] & 0xFF; - final long byte284 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte279 & 15) << 39) | (byte280 << 31) | (byte281 << 23) | (byte282 << 15) | (byte283 << 7) | (byte284 >>> 1); - final long byte285 = blocks[blocksOffset++] & 0xFF; - final long byte286 = blocks[blocksOffset++] & 0xFF; - final long byte287 = blocks[blocksOffset++] & 0xFF; - final long byte288 = blocks[blocksOffset++] & 0xFF; - final long byte289 = blocks[blocksOffset++] & 0xFF; - final long byte290 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte284 & 1) << 42) | (byte285 << 34) | (byte286 << 26) | (byte287 << 18) | (byte288 << 10) | (byte289 << 2) | (byte290 >>> 6); - final long byte291 = blocks[blocksOffset++] & 0xFF; - final long byte292 = blocks[blocksOffset++] & 0xFF; - final long byte293 = blocks[blocksOffset++] & 0xFF; - final long byte294 = blocks[blocksOffset++] & 0xFF; - final long byte295 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte290 & 63) << 37) | (byte291 << 29) | (byte292 << 21) | (byte293 << 13) | (byte294 << 5) | (byte295 >>> 3); - final long byte296 = blocks[blocksOffset++] & 0xFF; - final long byte297 = blocks[blocksOffset++] & 0xFF; - final long byte298 = blocks[blocksOffset++] & 0xFF; - final long byte299 = blocks[blocksOffset++] & 0xFF; - final long byte300 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte295 & 7) << 40) | (byte296 << 32) | (byte297 << 24) | (byte298 << 16) | (byte299 << 8) | byte300; - final long byte301 = blocks[blocksOffset++] & 0xFF; - final long byte302 = blocks[blocksOffset++] & 0xFF; - final long byte303 = blocks[blocksOffset++] & 0xFF; - final long byte304 = blocks[blocksOffset++] & 0xFF; - final long byte305 = blocks[blocksOffset++] & 0xFF; - final long byte306 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte301 << 35) | (byte302 << 27) | (byte303 << 19) | (byte304 << 11) | (byte305 << 3) | (byte306 >>> 5); - final long byte307 = blocks[blocksOffset++] & 0xFF; - final long byte308 = blocks[blocksOffset++] & 0xFF; - final long byte309 = blocks[blocksOffset++] & 0xFF; - final long byte310 = blocks[blocksOffset++] & 0xFF; - final long byte311 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte306 & 31) << 38) | (byte307 << 30) | (byte308 << 22) | (byte309 << 14) | (byte310 << 6) | (byte311 >>> 2); - final long byte312 = blocks[blocksOffset++] & 0xFF; - final long byte313 = blocks[blocksOffset++] & 0xFF; - final long byte314 = blocks[blocksOffset++] & 0xFF; - final long byte315 = blocks[blocksOffset++] & 0xFF; - final long byte316 = blocks[blocksOffset++] & 0xFF; - final long byte317 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte311 & 3) << 41) | (byte312 << 33) | (byte313 << 25) | (byte314 << 17) | (byte315 << 9) | (byte316 << 1) | (byte317 >>> 7); - final long byte318 = blocks[blocksOffset++] & 0xFF; - final long byte319 = blocks[blocksOffset++] & 0xFF; - final long byte320 = blocks[blocksOffset++] & 0xFF; - final long byte321 = blocks[blocksOffset++] & 0xFF; - final long byte322 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte317 & 127) << 36) | (byte318 << 28) | (byte319 << 20) | (byte320 << 12) | (byte321 << 4) | (byte322 >>> 4); - final long byte323 = blocks[blocksOffset++] & 0xFF; - final long byte324 = blocks[blocksOffset++] & 0xFF; - final long byte325 = blocks[blocksOffset++] & 0xFF; - final long byte326 = blocks[blocksOffset++] & 0xFF; - final long byte327 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte322 & 15) << 39) | (byte323 << 31) | (byte324 << 23) | (byte325 << 15) | (byte326 << 7) | (byte327 >>> 1); - final long byte328 = blocks[blocksOffset++] & 0xFF; - final long byte329 = blocks[blocksOffset++] & 0xFF; - final long byte330 = blocks[blocksOffset++] & 0xFF; - final long byte331 = blocks[blocksOffset++] & 0xFF; - final long byte332 = blocks[blocksOffset++] & 0xFF; - final long byte333 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte327 & 1) << 42) | (byte328 << 34) | (byte329 << 26) | (byte330 << 18) | (byte331 << 10) | (byte332 << 2) | (byte333 >>> 6); - final long byte334 = blocks[blocksOffset++] & 0xFF; - final long byte335 = blocks[blocksOffset++] & 0xFF; - final long byte336 = blocks[blocksOffset++] & 0xFF; - final long byte337 = blocks[blocksOffset++] & 0xFF; - final long byte338 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte333 & 63) << 37) | (byte334 << 29) | (byte335 << 21) | (byte336 << 13) | (byte337 << 5) | (byte338 >>> 3); - final long byte339 = blocks[blocksOffset++] & 0xFF; - final long byte340 = blocks[blocksOffset++] & 0xFF; - final long byte341 = blocks[blocksOffset++] & 0xFF; - final long byte342 = blocks[blocksOffset++] & 0xFF; - final long byte343 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte338 & 7) << 40) | (byte339 << 32) | (byte340 << 24) | (byte341 << 16) | (byte342 << 8) | byte343; - } - } - - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 21) | ((values[valuesOffset] & 0xffffffffL) >>> 22); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 42) | ((values[valuesOffset] & 0xffffffffL) >>> 1); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 63) | ((values[valuesOffset++] & 0xffffffffL) << 20) | ((values[valuesOffset] & 0xffffffffL) >>> 23); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 41) | ((values[valuesOffset] & 0xffffffffL) >>> 2); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 62) | ((values[valuesOffset++] & 0xffffffffL) << 19) | ((values[valuesOffset] & 0xffffffffL) >>> 24); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 40) | ((values[valuesOffset] & 0xffffffffL) >>> 3); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 61) | ((values[valuesOffset++] & 0xffffffffL) << 18) | ((values[valuesOffset] & 0xffffffffL) >>> 25); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 39) | ((values[valuesOffset] & 0xffffffffL) >>> 4); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 60) | ((values[valuesOffset++] & 0xffffffffL) << 17) | ((values[valuesOffset] & 0xffffffffL) >>> 26); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 38) | ((values[valuesOffset] & 0xffffffffL) >>> 5); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 59) | ((values[valuesOffset++] & 0xffffffffL) << 16) | ((values[valuesOffset] & 0xffffffffL) >>> 27); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 37) | ((values[valuesOffset] & 0xffffffffL) >>> 6); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 58) | ((values[valuesOffset++] & 0xffffffffL) << 15) | ((values[valuesOffset] & 0xffffffffL) >>> 28); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 36) | ((values[valuesOffset] & 0xffffffffL) >>> 7); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 57) | ((values[valuesOffset++] & 0xffffffffL) << 14) | ((values[valuesOffset] & 0xffffffffL) >>> 29); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 35) | ((values[valuesOffset] & 0xffffffffL) >>> 8); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 56) | ((values[valuesOffset++] & 0xffffffffL) << 13) | ((values[valuesOffset] & 0xffffffffL) >>> 30); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 34) | ((values[valuesOffset] & 0xffffffffL) >>> 9); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 55) | ((values[valuesOffset++] & 0xffffffffL) << 12) | ((values[valuesOffset] & 0xffffffffL) >>> 31); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 33) | ((values[valuesOffset] & 0xffffffffL) >>> 10); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 54) | ((values[valuesOffset++] & 0xffffffffL) << 11) | ((values[valuesOffset] & 0xffffffffL) >>> 32); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 32) | ((values[valuesOffset] & 0xffffffffL) >>> 11); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 53) | ((values[valuesOffset++] & 0xffffffffL) << 10) | ((values[valuesOffset] & 0xffffffffL) >>> 33); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 31) | ((values[valuesOffset] & 0xffffffffL) >>> 12); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 52) | ((values[valuesOffset++] & 0xffffffffL) << 9) | ((values[valuesOffset] & 0xffffffffL) >>> 34); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 30) | ((values[valuesOffset] & 0xffffffffL) >>> 13); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 51) | ((values[valuesOffset++] & 0xffffffffL) << 8) | ((values[valuesOffset] & 0xffffffffL) >>> 35); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 29) | ((values[valuesOffset] & 0xffffffffL) >>> 14); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 50) | ((values[valuesOffset++] & 0xffffffffL) << 7) | ((values[valuesOffset] & 0xffffffffL) >>> 36); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 28) | ((values[valuesOffset] & 0xffffffffL) >>> 15); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 49) | ((values[valuesOffset++] & 0xffffffffL) << 6) | ((values[valuesOffset] & 0xffffffffL) >>> 37); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 27) | ((values[valuesOffset] & 0xffffffffL) >>> 16); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 48) | ((values[valuesOffset++] & 0xffffffffL) << 5) | ((values[valuesOffset] & 0xffffffffL) >>> 38); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 26) | ((values[valuesOffset] & 0xffffffffL) >>> 17); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 47) | ((values[valuesOffset++] & 0xffffffffL) << 4) | ((values[valuesOffset] & 0xffffffffL) >>> 39); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 25) | ((values[valuesOffset] & 0xffffffffL) >>> 18); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 46) | ((values[valuesOffset++] & 0xffffffffL) << 3) | ((values[valuesOffset] & 0xffffffffL) >>> 40); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 24) | ((values[valuesOffset] & 0xffffffffL) >>> 19); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 45) | ((values[valuesOffset++] & 0xffffffffL) << 2) | ((values[valuesOffset] & 0xffffffffL) >>> 41); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 23) | ((values[valuesOffset] & 0xffffffffL) >>> 20); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 44) | ((values[valuesOffset++] & 0xffffffffL) << 1) | ((values[valuesOffset] & 0xffffffffL) >>> 42); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 22) | ((values[valuesOffset] & 0xffffffffL) >>> 21); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 43) | (values[valuesOffset++] & 0xffffffffL); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] << 21) | (values[valuesOffset] >>> 22); - blocks[blocksOffset++] = (values[valuesOffset++] << 42) | (values[valuesOffset] >>> 1); - blocks[blocksOffset++] = (values[valuesOffset++] << 63) | (values[valuesOffset++] << 20) | (values[valuesOffset] >>> 23); - blocks[blocksOffset++] = (values[valuesOffset++] << 41) | (values[valuesOffset] >>> 2); - blocks[blocksOffset++] = (values[valuesOffset++] << 62) | (values[valuesOffset++] << 19) | (values[valuesOffset] >>> 24); - blocks[blocksOffset++] = (values[valuesOffset++] << 40) | (values[valuesOffset] >>> 3); - blocks[blocksOffset++] = (values[valuesOffset++] << 61) | (values[valuesOffset++] << 18) | (values[valuesOffset] >>> 25); - blocks[blocksOffset++] = (values[valuesOffset++] << 39) | (values[valuesOffset] >>> 4); - blocks[blocksOffset++] = (values[valuesOffset++] << 60) | (values[valuesOffset++] << 17) | (values[valuesOffset] >>> 26); - blocks[blocksOffset++] = (values[valuesOffset++] << 38) | (values[valuesOffset] >>> 5); - blocks[blocksOffset++] = (values[valuesOffset++] << 59) | (values[valuesOffset++] << 16) | (values[valuesOffset] >>> 27); - blocks[blocksOffset++] = (values[valuesOffset++] << 37) | (values[valuesOffset] >>> 6); - blocks[blocksOffset++] = (values[valuesOffset++] << 58) | (values[valuesOffset++] << 15) | (values[valuesOffset] >>> 28); - blocks[blocksOffset++] = (values[valuesOffset++] << 36) | (values[valuesOffset] >>> 7); - blocks[blocksOffset++] = (values[valuesOffset++] << 57) | (values[valuesOffset++] << 14) | (values[valuesOffset] >>> 29); - blocks[blocksOffset++] = (values[valuesOffset++] << 35) | (values[valuesOffset] >>> 8); - blocks[blocksOffset++] = (values[valuesOffset++] << 56) | (values[valuesOffset++] << 13) | (values[valuesOffset] >>> 30); - blocks[blocksOffset++] = (values[valuesOffset++] << 34) | (values[valuesOffset] >>> 9); - blocks[blocksOffset++] = (values[valuesOffset++] << 55) | (values[valuesOffset++] << 12) | (values[valuesOffset] >>> 31); - blocks[blocksOffset++] = (values[valuesOffset++] << 33) | (values[valuesOffset] >>> 10); - blocks[blocksOffset++] = (values[valuesOffset++] << 54) | (values[valuesOffset++] << 11) | (values[valuesOffset] >>> 32); - blocks[blocksOffset++] = (values[valuesOffset++] << 32) | (values[valuesOffset] >>> 11); - blocks[blocksOffset++] = (values[valuesOffset++] << 53) | (values[valuesOffset++] << 10) | (values[valuesOffset] >>> 33); - blocks[blocksOffset++] = (values[valuesOffset++] << 31) | (values[valuesOffset] >>> 12); - blocks[blocksOffset++] = (values[valuesOffset++] << 52) | (values[valuesOffset++] << 9) | (values[valuesOffset] >>> 34); - blocks[blocksOffset++] = (values[valuesOffset++] << 30) | (values[valuesOffset] >>> 13); - blocks[blocksOffset++] = (values[valuesOffset++] << 51) | (values[valuesOffset++] << 8) | (values[valuesOffset] >>> 35); - blocks[blocksOffset++] = (values[valuesOffset++] << 29) | (values[valuesOffset] >>> 14); - blocks[blocksOffset++] = (values[valuesOffset++] << 50) | (values[valuesOffset++] << 7) | (values[valuesOffset] >>> 36); - blocks[blocksOffset++] = (values[valuesOffset++] << 28) | (values[valuesOffset] >>> 15); - blocks[blocksOffset++] = (values[valuesOffset++] << 49) | (values[valuesOffset++] << 6) | (values[valuesOffset] >>> 37); - blocks[blocksOffset++] = (values[valuesOffset++] << 27) | (values[valuesOffset] >>> 16); - blocks[blocksOffset++] = (values[valuesOffset++] << 48) | (values[valuesOffset++] << 5) | (values[valuesOffset] >>> 38); - blocks[blocksOffset++] = (values[valuesOffset++] << 26) | (values[valuesOffset] >>> 17); - blocks[blocksOffset++] = (values[valuesOffset++] << 47) | (values[valuesOffset++] << 4) | (values[valuesOffset] >>> 39); - blocks[blocksOffset++] = (values[valuesOffset++] << 25) | (values[valuesOffset] >>> 18); - blocks[blocksOffset++] = (values[valuesOffset++] << 46) | (values[valuesOffset++] << 3) | (values[valuesOffset] >>> 40); - blocks[blocksOffset++] = (values[valuesOffset++] << 24) | (values[valuesOffset] >>> 19); - blocks[blocksOffset++] = (values[valuesOffset++] << 45) | (values[valuesOffset++] << 2) | (values[valuesOffset] >>> 41); - blocks[blocksOffset++] = (values[valuesOffset++] << 23) | (values[valuesOffset] >>> 20); - blocks[blocksOffset++] = (values[valuesOffset++] << 44) | (values[valuesOffset++] << 1) | (values[valuesOffset] >>> 42); - blocks[blocksOffset++] = (values[valuesOffset++] << 22) | (values[valuesOffset] >>> 21); - blocks[blocksOffset++] = (values[valuesOffset++] << 43) | values[valuesOffset++]; - } - } - -} diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked44.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked44.java deleted file mode 100644 index 211577607f9..00000000000 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked44.java +++ /dev/null @@ -1,231 +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 BulkOperationPacked44 extends BulkOperation { - @Override - public int blockCount() { - return 11; - } - - @Override - public int valueCount() { - return 16; - } - - @Override - public void decode(long[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) { - throw new UnsupportedOperationException(); - } - - @Override - public void decode(byte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) { - throw new UnsupportedOperationException(); - } - - @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 >>> 20; - final long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block0 & 1048575L) << 24) | (block1 >>> 40); - final long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block1 & 1099511627775L) << 4) | (block2 >>> 60); - values[valuesOffset++] = (block2 >>> 16) & 17592186044415L; - final long block3 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block2 & 65535L) << 28) | (block3 >>> 36); - final long block4 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block3 & 68719476735L) << 8) | (block4 >>> 56); - values[valuesOffset++] = (block4 >>> 12) & 17592186044415L; - final long block5 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block4 & 4095L) << 32) | (block5 >>> 32); - final long block6 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block5 & 4294967295L) << 12) | (block6 >>> 52); - values[valuesOffset++] = (block6 >>> 8) & 17592186044415L; - final long block7 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block6 & 255L) << 36) | (block7 >>> 28); - final long block8 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block7 & 268435455L) << 16) | (block8 >>> 48); - values[valuesOffset++] = (block8 >>> 4) & 17592186044415L; - final long block9 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block8 & 15L) << 40) | (block9 >>> 24); - final long block10 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block9 & 16777215L) << 20) | (block10 >>> 44); - values[valuesOffset++] = block10 & 17592186044415L; - } - } - - @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; - final long byte3 = blocks[blocksOffset++] & 0xFF; - final long byte4 = blocks[blocksOffset++] & 0xFF; - final long byte5 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte0 << 36) | (byte1 << 28) | (byte2 << 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; - final long byte9 = blocks[blocksOffset++] & 0xFF; - final long byte10 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte5 & 15) << 40) | (byte6 << 32) | (byte7 << 24) | (byte8 << 16) | (byte9 << 8) | byte10; - final long byte11 = blocks[blocksOffset++] & 0xFF; - final long byte12 = blocks[blocksOffset++] & 0xFF; - final long byte13 = blocks[blocksOffset++] & 0xFF; - final long byte14 = blocks[blocksOffset++] & 0xFF; - final long byte15 = blocks[blocksOffset++] & 0xFF; - final long byte16 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte11 << 36) | (byte12 << 28) | (byte13 << 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; - final long byte20 = blocks[blocksOffset++] & 0xFF; - final long byte21 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte16 & 15) << 40) | (byte17 << 32) | (byte18 << 24) | (byte19 << 16) | (byte20 << 8) | byte21; - final long byte22 = blocks[blocksOffset++] & 0xFF; - final long byte23 = blocks[blocksOffset++] & 0xFF; - final long byte24 = blocks[blocksOffset++] & 0xFF; - final long byte25 = blocks[blocksOffset++] & 0xFF; - final long byte26 = blocks[blocksOffset++] & 0xFF; - final long byte27 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte22 << 36) | (byte23 << 28) | (byte24 << 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; - final long byte31 = blocks[blocksOffset++] & 0xFF; - final long byte32 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte27 & 15) << 40) | (byte28 << 32) | (byte29 << 24) | (byte30 << 16) | (byte31 << 8) | byte32; - final long byte33 = blocks[blocksOffset++] & 0xFF; - final long byte34 = blocks[blocksOffset++] & 0xFF; - final long byte35 = blocks[blocksOffset++] & 0xFF; - final long byte36 = blocks[blocksOffset++] & 0xFF; - final long byte37 = blocks[blocksOffset++] & 0xFF; - final long byte38 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte33 << 36) | (byte34 << 28) | (byte35 << 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; - final long byte42 = blocks[blocksOffset++] & 0xFF; - final long byte43 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte38 & 15) << 40) | (byte39 << 32) | (byte40 << 24) | (byte41 << 16) | (byte42 << 8) | byte43; - final long byte44 = blocks[blocksOffset++] & 0xFF; - final long byte45 = blocks[blocksOffset++] & 0xFF; - final long byte46 = blocks[blocksOffset++] & 0xFF; - final long byte47 = blocks[blocksOffset++] & 0xFF; - final long byte48 = blocks[blocksOffset++] & 0xFF; - final long byte49 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte44 << 36) | (byte45 << 28) | (byte46 << 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; - final long byte53 = blocks[blocksOffset++] & 0xFF; - final long byte54 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte49 & 15) << 40) | (byte50 << 32) | (byte51 << 24) | (byte52 << 16) | (byte53 << 8) | byte54; - final long byte55 = blocks[blocksOffset++] & 0xFF; - final long byte56 = blocks[blocksOffset++] & 0xFF; - final long byte57 = blocks[blocksOffset++] & 0xFF; - final long byte58 = blocks[blocksOffset++] & 0xFF; - final long byte59 = blocks[blocksOffset++] & 0xFF; - final long byte60 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte55 << 36) | (byte56 << 28) | (byte57 << 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; - final long byte64 = blocks[blocksOffset++] & 0xFF; - final long byte65 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte60 & 15) << 40) | (byte61 << 32) | (byte62 << 24) | (byte63 << 16) | (byte64 << 8) | byte65; - final long byte66 = blocks[blocksOffset++] & 0xFF; - final long byte67 = blocks[blocksOffset++] & 0xFF; - final long byte68 = blocks[blocksOffset++] & 0xFF; - final long byte69 = blocks[blocksOffset++] & 0xFF; - final long byte70 = blocks[blocksOffset++] & 0xFF; - final long byte71 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte66 << 36) | (byte67 << 28) | (byte68 << 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; - final long byte75 = blocks[blocksOffset++] & 0xFF; - final long byte76 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte71 & 15) << 40) | (byte72 << 32) | (byte73 << 24) | (byte74 << 16) | (byte75 << 8) | byte76; - final long byte77 = blocks[blocksOffset++] & 0xFF; - final long byte78 = blocks[blocksOffset++] & 0xFF; - final long byte79 = blocks[blocksOffset++] & 0xFF; - final long byte80 = blocks[blocksOffset++] & 0xFF; - final long byte81 = blocks[blocksOffset++] & 0xFF; - final long byte82 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte77 << 36) | (byte78 << 28) | (byte79 << 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; - final long byte86 = blocks[blocksOffset++] & 0xFF; - final long byte87 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte82 & 15) << 40) | (byte83 << 32) | (byte84 << 24) | (byte85 << 16) | (byte86 << 8) | byte87; - } - } - - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 20) | ((values[valuesOffset] & 0xffffffffL) >>> 24); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 40) | ((values[valuesOffset] & 0xffffffffL) >>> 4); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 60) | ((values[valuesOffset++] & 0xffffffffL) << 16) | ((values[valuesOffset] & 0xffffffffL) >>> 28); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 36) | ((values[valuesOffset] & 0xffffffffL) >>> 8); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 56) | ((values[valuesOffset++] & 0xffffffffL) << 12) | ((values[valuesOffset] & 0xffffffffL) >>> 32); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 32) | ((values[valuesOffset] & 0xffffffffL) >>> 12); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 52) | ((values[valuesOffset++] & 0xffffffffL) << 8) | ((values[valuesOffset] & 0xffffffffL) >>> 36); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 28) | ((values[valuesOffset] & 0xffffffffL) >>> 16); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 48) | ((values[valuesOffset++] & 0xffffffffL) << 4) | ((values[valuesOffset] & 0xffffffffL) >>> 40); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 24) | ((values[valuesOffset] & 0xffffffffL) >>> 20); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 44) | (values[valuesOffset++] & 0xffffffffL); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] << 20) | (values[valuesOffset] >>> 24); - blocks[blocksOffset++] = (values[valuesOffset++] << 40) | (values[valuesOffset] >>> 4); - blocks[blocksOffset++] = (values[valuesOffset++] << 60) | (values[valuesOffset++] << 16) | (values[valuesOffset] >>> 28); - blocks[blocksOffset++] = (values[valuesOffset++] << 36) | (values[valuesOffset] >>> 8); - blocks[blocksOffset++] = (values[valuesOffset++] << 56) | (values[valuesOffset++] << 12) | (values[valuesOffset] >>> 32); - blocks[blocksOffset++] = (values[valuesOffset++] << 32) | (values[valuesOffset] >>> 12); - blocks[blocksOffset++] = (values[valuesOffset++] << 52) | (values[valuesOffset++] << 8) | (values[valuesOffset] >>> 36); - blocks[blocksOffset++] = (values[valuesOffset++] << 28) | (values[valuesOffset] >>> 16); - blocks[blocksOffset++] = (values[valuesOffset++] << 48) | (values[valuesOffset++] << 4) | (values[valuesOffset] >>> 40); - blocks[blocksOffset++] = (values[valuesOffset++] << 24) | (values[valuesOffset] >>> 20); - blocks[blocksOffset++] = (values[valuesOffset++] << 44) | values[valuesOffset++]; - } - } - -} diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked45.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked45.java deleted file mode 100644 index 32de95e8c11..00000000000 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked45.java +++ /dev/null @@ -1,701 +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 BulkOperationPacked45 extends BulkOperation { - @Override - public int blockCount() { - return 45; - } - - @Override - public int valueCount() { - return 64; - } - - @Override - public void decode(long[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) { - throw new UnsupportedOperationException(); - } - - @Override - public void decode(byte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) { - throw new UnsupportedOperationException(); - } - - @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 >>> 19; - final long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block0 & 524287L) << 26) | (block1 >>> 38); - final long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block1 & 274877906943L) << 7) | (block2 >>> 57); - values[valuesOffset++] = (block2 >>> 12) & 35184372088831L; - final long block3 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block2 & 4095L) << 33) | (block3 >>> 31); - final long block4 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block3 & 2147483647L) << 14) | (block4 >>> 50); - values[valuesOffset++] = (block4 >>> 5) & 35184372088831L; - final long block5 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block4 & 31L) << 40) | (block5 >>> 24); - final long block6 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block5 & 16777215L) << 21) | (block6 >>> 43); - final long block7 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block6 & 8796093022207L) << 2) | (block7 >>> 62); - values[valuesOffset++] = (block7 >>> 17) & 35184372088831L; - final long block8 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block7 & 131071L) << 28) | (block8 >>> 36); - final long block9 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block8 & 68719476735L) << 9) | (block9 >>> 55); - values[valuesOffset++] = (block9 >>> 10) & 35184372088831L; - final long block10 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block9 & 1023L) << 35) | (block10 >>> 29); - final long block11 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block10 & 536870911L) << 16) | (block11 >>> 48); - values[valuesOffset++] = (block11 >>> 3) & 35184372088831L; - final long block12 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block11 & 7L) << 42) | (block12 >>> 22); - final long block13 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block12 & 4194303L) << 23) | (block13 >>> 41); - final long block14 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block13 & 2199023255551L) << 4) | (block14 >>> 60); - values[valuesOffset++] = (block14 >>> 15) & 35184372088831L; - final long block15 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block14 & 32767L) << 30) | (block15 >>> 34); - final long block16 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block15 & 17179869183L) << 11) | (block16 >>> 53); - values[valuesOffset++] = (block16 >>> 8) & 35184372088831L; - final long block17 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block16 & 255L) << 37) | (block17 >>> 27); - final long block18 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block17 & 134217727L) << 18) | (block18 >>> 46); - values[valuesOffset++] = (block18 >>> 1) & 35184372088831L; - final long block19 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block18 & 1L) << 44) | (block19 >>> 20); - final long block20 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block19 & 1048575L) << 25) | (block20 >>> 39); - final long block21 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block20 & 549755813887L) << 6) | (block21 >>> 58); - values[valuesOffset++] = (block21 >>> 13) & 35184372088831L; - final long block22 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block21 & 8191L) << 32) | (block22 >>> 32); - final long block23 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block22 & 4294967295L) << 13) | (block23 >>> 51); - values[valuesOffset++] = (block23 >>> 6) & 35184372088831L; - final long block24 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block23 & 63L) << 39) | (block24 >>> 25); - final long block25 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block24 & 33554431L) << 20) | (block25 >>> 44); - final long block26 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block25 & 17592186044415L) << 1) | (block26 >>> 63); - values[valuesOffset++] = (block26 >>> 18) & 35184372088831L; - final long block27 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block26 & 262143L) << 27) | (block27 >>> 37); - final long block28 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block27 & 137438953471L) << 8) | (block28 >>> 56); - values[valuesOffset++] = (block28 >>> 11) & 35184372088831L; - final long block29 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block28 & 2047L) << 34) | (block29 >>> 30); - final long block30 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block29 & 1073741823L) << 15) | (block30 >>> 49); - values[valuesOffset++] = (block30 >>> 4) & 35184372088831L; - final long block31 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block30 & 15L) << 41) | (block31 >>> 23); - final long block32 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block31 & 8388607L) << 22) | (block32 >>> 42); - final long block33 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block32 & 4398046511103L) << 3) | (block33 >>> 61); - values[valuesOffset++] = (block33 >>> 16) & 35184372088831L; - final long block34 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block33 & 65535L) << 29) | (block34 >>> 35); - final long block35 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block34 & 34359738367L) << 10) | (block35 >>> 54); - values[valuesOffset++] = (block35 >>> 9) & 35184372088831L; - final long block36 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block35 & 511L) << 36) | (block36 >>> 28); - final long block37 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block36 & 268435455L) << 17) | (block37 >>> 47); - values[valuesOffset++] = (block37 >>> 2) & 35184372088831L; - final long block38 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block37 & 3L) << 43) | (block38 >>> 21); - final long block39 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block38 & 2097151L) << 24) | (block39 >>> 40); - final long block40 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block39 & 1099511627775L) << 5) | (block40 >>> 59); - values[valuesOffset++] = (block40 >>> 14) & 35184372088831L; - final long block41 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block40 & 16383L) << 31) | (block41 >>> 33); - final long block42 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block41 & 8589934591L) << 12) | (block42 >>> 52); - values[valuesOffset++] = (block42 >>> 7) & 35184372088831L; - final long block43 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block42 & 127L) << 38) | (block43 >>> 26); - final long block44 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block43 & 67108863L) << 19) | (block44 >>> 45); - values[valuesOffset++] = block44 & 35184372088831L; - } - } - - @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; - final long byte3 = blocks[blocksOffset++] & 0xFF; - final long byte4 = blocks[blocksOffset++] & 0xFF; - final long byte5 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte0 << 37) | (byte1 << 29) | (byte2 << 21) | (byte3 << 13) | (byte4 << 5) | (byte5 >>> 3); - final long byte6 = blocks[blocksOffset++] & 0xFF; - final long byte7 = blocks[blocksOffset++] & 0xFF; - final long byte8 = blocks[blocksOffset++] & 0xFF; - final long byte9 = blocks[blocksOffset++] & 0xFF; - final long byte10 = blocks[blocksOffset++] & 0xFF; - final long byte11 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte5 & 7) << 42) | (byte6 << 34) | (byte7 << 26) | (byte8 << 18) | (byte9 << 10) | (byte10 << 2) | (byte11 >>> 6); - final long byte12 = blocks[blocksOffset++] & 0xFF; - final long byte13 = blocks[blocksOffset++] & 0xFF; - final long byte14 = blocks[blocksOffset++] & 0xFF; - final long byte15 = blocks[blocksOffset++] & 0xFF; - final long byte16 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte11 & 63) << 39) | (byte12 << 31) | (byte13 << 23) | (byte14 << 15) | (byte15 << 7) | (byte16 >>> 1); - final long byte17 = blocks[blocksOffset++] & 0xFF; - final long byte18 = blocks[blocksOffset++] & 0xFF; - final long byte19 = blocks[blocksOffset++] & 0xFF; - final long byte20 = blocks[blocksOffset++] & 0xFF; - final long byte21 = blocks[blocksOffset++] & 0xFF; - final long byte22 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte16 & 1) << 44) | (byte17 << 36) | (byte18 << 28) | (byte19 << 20) | (byte20 << 12) | (byte21 << 4) | (byte22 >>> 4); - final long byte23 = blocks[blocksOffset++] & 0xFF; - final long byte24 = blocks[blocksOffset++] & 0xFF; - final long byte25 = blocks[blocksOffset++] & 0xFF; - final long byte26 = blocks[blocksOffset++] & 0xFF; - final long byte27 = blocks[blocksOffset++] & 0xFF; - final long byte28 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte22 & 15) << 41) | (byte23 << 33) | (byte24 << 25) | (byte25 << 17) | (byte26 << 9) | (byte27 << 1) | (byte28 >>> 7); - final long byte29 = blocks[blocksOffset++] & 0xFF; - final long byte30 = blocks[blocksOffset++] & 0xFF; - final long byte31 = blocks[blocksOffset++] & 0xFF; - final long byte32 = blocks[blocksOffset++] & 0xFF; - final long byte33 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte28 & 127) << 38) | (byte29 << 30) | (byte30 << 22) | (byte31 << 14) | (byte32 << 6) | (byte33 >>> 2); - final long byte34 = blocks[blocksOffset++] & 0xFF; - final long byte35 = blocks[blocksOffset++] & 0xFF; - final long byte36 = blocks[blocksOffset++] & 0xFF; - final long byte37 = blocks[blocksOffset++] & 0xFF; - final long byte38 = blocks[blocksOffset++] & 0xFF; - final long byte39 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte33 & 3) << 43) | (byte34 << 35) | (byte35 << 27) | (byte36 << 19) | (byte37 << 11) | (byte38 << 3) | (byte39 >>> 5); - final long byte40 = blocks[blocksOffset++] & 0xFF; - final long byte41 = blocks[blocksOffset++] & 0xFF; - final long byte42 = blocks[blocksOffset++] & 0xFF; - final long byte43 = blocks[blocksOffset++] & 0xFF; - final long byte44 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte39 & 31) << 40) | (byte40 << 32) | (byte41 << 24) | (byte42 << 16) | (byte43 << 8) | byte44; - final long byte45 = blocks[blocksOffset++] & 0xFF; - final long byte46 = blocks[blocksOffset++] & 0xFF; - final long byte47 = blocks[blocksOffset++] & 0xFF; - final long byte48 = blocks[blocksOffset++] & 0xFF; - final long byte49 = blocks[blocksOffset++] & 0xFF; - final long byte50 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte45 << 37) | (byte46 << 29) | (byte47 << 21) | (byte48 << 13) | (byte49 << 5) | (byte50 >>> 3); - final long byte51 = blocks[blocksOffset++] & 0xFF; - final long byte52 = blocks[blocksOffset++] & 0xFF; - final long byte53 = blocks[blocksOffset++] & 0xFF; - final long byte54 = blocks[blocksOffset++] & 0xFF; - final long byte55 = blocks[blocksOffset++] & 0xFF; - final long byte56 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte50 & 7) << 42) | (byte51 << 34) | (byte52 << 26) | (byte53 << 18) | (byte54 << 10) | (byte55 << 2) | (byte56 >>> 6); - final long byte57 = blocks[blocksOffset++] & 0xFF; - final long byte58 = blocks[blocksOffset++] & 0xFF; - final long byte59 = blocks[blocksOffset++] & 0xFF; - final long byte60 = blocks[blocksOffset++] & 0xFF; - final long byte61 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte56 & 63) << 39) | (byte57 << 31) | (byte58 << 23) | (byte59 << 15) | (byte60 << 7) | (byte61 >>> 1); - final long byte62 = blocks[blocksOffset++] & 0xFF; - final long byte63 = blocks[blocksOffset++] & 0xFF; - final long byte64 = blocks[blocksOffset++] & 0xFF; - final long byte65 = blocks[blocksOffset++] & 0xFF; - final long byte66 = blocks[blocksOffset++] & 0xFF; - final long byte67 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte61 & 1) << 44) | (byte62 << 36) | (byte63 << 28) | (byte64 << 20) | (byte65 << 12) | (byte66 << 4) | (byte67 >>> 4); - final long byte68 = blocks[blocksOffset++] & 0xFF; - final long byte69 = blocks[blocksOffset++] & 0xFF; - final long byte70 = blocks[blocksOffset++] & 0xFF; - final long byte71 = blocks[blocksOffset++] & 0xFF; - final long byte72 = blocks[blocksOffset++] & 0xFF; - final long byte73 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte67 & 15) << 41) | (byte68 << 33) | (byte69 << 25) | (byte70 << 17) | (byte71 << 9) | (byte72 << 1) | (byte73 >>> 7); - final long byte74 = blocks[blocksOffset++] & 0xFF; - final long byte75 = blocks[blocksOffset++] & 0xFF; - final long byte76 = blocks[blocksOffset++] & 0xFF; - final long byte77 = blocks[blocksOffset++] & 0xFF; - final long byte78 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte73 & 127) << 38) | (byte74 << 30) | (byte75 << 22) | (byte76 << 14) | (byte77 << 6) | (byte78 >>> 2); - final long byte79 = blocks[blocksOffset++] & 0xFF; - final long byte80 = blocks[blocksOffset++] & 0xFF; - final long byte81 = blocks[blocksOffset++] & 0xFF; - final long byte82 = blocks[blocksOffset++] & 0xFF; - final long byte83 = blocks[blocksOffset++] & 0xFF; - final long byte84 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte78 & 3) << 43) | (byte79 << 35) | (byte80 << 27) | (byte81 << 19) | (byte82 << 11) | (byte83 << 3) | (byte84 >>> 5); - final long byte85 = blocks[blocksOffset++] & 0xFF; - final long byte86 = blocks[blocksOffset++] & 0xFF; - final long byte87 = blocks[blocksOffset++] & 0xFF; - final long byte88 = blocks[blocksOffset++] & 0xFF; - final long byte89 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte84 & 31) << 40) | (byte85 << 32) | (byte86 << 24) | (byte87 << 16) | (byte88 << 8) | byte89; - final long byte90 = blocks[blocksOffset++] & 0xFF; - final long byte91 = blocks[blocksOffset++] & 0xFF; - final long byte92 = blocks[blocksOffset++] & 0xFF; - final long byte93 = blocks[blocksOffset++] & 0xFF; - final long byte94 = blocks[blocksOffset++] & 0xFF; - final long byte95 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte90 << 37) | (byte91 << 29) | (byte92 << 21) | (byte93 << 13) | (byte94 << 5) | (byte95 >>> 3); - final long byte96 = blocks[blocksOffset++] & 0xFF; - final long byte97 = blocks[blocksOffset++] & 0xFF; - final long byte98 = blocks[blocksOffset++] & 0xFF; - final long byte99 = blocks[blocksOffset++] & 0xFF; - final long byte100 = blocks[blocksOffset++] & 0xFF; - final long byte101 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte95 & 7) << 42) | (byte96 << 34) | (byte97 << 26) | (byte98 << 18) | (byte99 << 10) | (byte100 << 2) | (byte101 >>> 6); - final long byte102 = blocks[blocksOffset++] & 0xFF; - final long byte103 = blocks[blocksOffset++] & 0xFF; - final long byte104 = blocks[blocksOffset++] & 0xFF; - final long byte105 = blocks[blocksOffset++] & 0xFF; - final long byte106 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte101 & 63) << 39) | (byte102 << 31) | (byte103 << 23) | (byte104 << 15) | (byte105 << 7) | (byte106 >>> 1); - final long byte107 = blocks[blocksOffset++] & 0xFF; - final long byte108 = blocks[blocksOffset++] & 0xFF; - final long byte109 = blocks[blocksOffset++] & 0xFF; - final long byte110 = blocks[blocksOffset++] & 0xFF; - final long byte111 = blocks[blocksOffset++] & 0xFF; - final long byte112 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte106 & 1) << 44) | (byte107 << 36) | (byte108 << 28) | (byte109 << 20) | (byte110 << 12) | (byte111 << 4) | (byte112 >>> 4); - final long byte113 = blocks[blocksOffset++] & 0xFF; - final long byte114 = blocks[blocksOffset++] & 0xFF; - final long byte115 = blocks[blocksOffset++] & 0xFF; - final long byte116 = blocks[blocksOffset++] & 0xFF; - final long byte117 = blocks[blocksOffset++] & 0xFF; - final long byte118 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte112 & 15) << 41) | (byte113 << 33) | (byte114 << 25) | (byte115 << 17) | (byte116 << 9) | (byte117 << 1) | (byte118 >>> 7); - final long byte119 = blocks[blocksOffset++] & 0xFF; - final long byte120 = blocks[blocksOffset++] & 0xFF; - final long byte121 = blocks[blocksOffset++] & 0xFF; - final long byte122 = blocks[blocksOffset++] & 0xFF; - final long byte123 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte118 & 127) << 38) | (byte119 << 30) | (byte120 << 22) | (byte121 << 14) | (byte122 << 6) | (byte123 >>> 2); - final long byte124 = blocks[blocksOffset++] & 0xFF; - final long byte125 = blocks[blocksOffset++] & 0xFF; - final long byte126 = blocks[blocksOffset++] & 0xFF; - final long byte127 = blocks[blocksOffset++] & 0xFF; - final long byte128 = blocks[blocksOffset++] & 0xFF; - final long byte129 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte123 & 3) << 43) | (byte124 << 35) | (byte125 << 27) | (byte126 << 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; - final long byte133 = blocks[blocksOffset++] & 0xFF; - final long byte134 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte129 & 31) << 40) | (byte130 << 32) | (byte131 << 24) | (byte132 << 16) | (byte133 << 8) | byte134; - final long byte135 = blocks[blocksOffset++] & 0xFF; - final long byte136 = blocks[blocksOffset++] & 0xFF; - final long byte137 = blocks[blocksOffset++] & 0xFF; - final long byte138 = blocks[blocksOffset++] & 0xFF; - final long byte139 = blocks[blocksOffset++] & 0xFF; - final long byte140 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte135 << 37) | (byte136 << 29) | (byte137 << 21) | (byte138 << 13) | (byte139 << 5) | (byte140 >>> 3); - final long byte141 = blocks[blocksOffset++] & 0xFF; - final long byte142 = blocks[blocksOffset++] & 0xFF; - final long byte143 = blocks[blocksOffset++] & 0xFF; - final long byte144 = blocks[blocksOffset++] & 0xFF; - final long byte145 = blocks[blocksOffset++] & 0xFF; - final long byte146 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte140 & 7) << 42) | (byte141 << 34) | (byte142 << 26) | (byte143 << 18) | (byte144 << 10) | (byte145 << 2) | (byte146 >>> 6); - final long byte147 = blocks[blocksOffset++] & 0xFF; - final long byte148 = blocks[blocksOffset++] & 0xFF; - final long byte149 = blocks[blocksOffset++] & 0xFF; - final long byte150 = blocks[blocksOffset++] & 0xFF; - final long byte151 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte146 & 63) << 39) | (byte147 << 31) | (byte148 << 23) | (byte149 << 15) | (byte150 << 7) | (byte151 >>> 1); - final long byte152 = blocks[blocksOffset++] & 0xFF; - final long byte153 = blocks[blocksOffset++] & 0xFF; - final long byte154 = blocks[blocksOffset++] & 0xFF; - final long byte155 = blocks[blocksOffset++] & 0xFF; - final long byte156 = blocks[blocksOffset++] & 0xFF; - final long byte157 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte151 & 1) << 44) | (byte152 << 36) | (byte153 << 28) | (byte154 << 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; - final long byte161 = blocks[blocksOffset++] & 0xFF; - final long byte162 = blocks[blocksOffset++] & 0xFF; - final long byte163 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte157 & 15) << 41) | (byte158 << 33) | (byte159 << 25) | (byte160 << 17) | (byte161 << 9) | (byte162 << 1) | (byte163 >>> 7); - final long byte164 = blocks[blocksOffset++] & 0xFF; - final long byte165 = blocks[blocksOffset++] & 0xFF; - final long byte166 = blocks[blocksOffset++] & 0xFF; - final long byte167 = blocks[blocksOffset++] & 0xFF; - final long byte168 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte163 & 127) << 38) | (byte164 << 30) | (byte165 << 22) | (byte166 << 14) | (byte167 << 6) | (byte168 >>> 2); - final long byte169 = blocks[blocksOffset++] & 0xFF; - final long byte170 = blocks[blocksOffset++] & 0xFF; - final long byte171 = blocks[blocksOffset++] & 0xFF; - final long byte172 = blocks[blocksOffset++] & 0xFF; - final long byte173 = blocks[blocksOffset++] & 0xFF; - final long byte174 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte168 & 3) << 43) | (byte169 << 35) | (byte170 << 27) | (byte171 << 19) | (byte172 << 11) | (byte173 << 3) | (byte174 >>> 5); - final long byte175 = blocks[blocksOffset++] & 0xFF; - final long byte176 = blocks[blocksOffset++] & 0xFF; - final long byte177 = blocks[blocksOffset++] & 0xFF; - final long byte178 = blocks[blocksOffset++] & 0xFF; - final long byte179 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte174 & 31) << 40) | (byte175 << 32) | (byte176 << 24) | (byte177 << 16) | (byte178 << 8) | byte179; - final long byte180 = blocks[blocksOffset++] & 0xFF; - final long byte181 = blocks[blocksOffset++] & 0xFF; - final long byte182 = blocks[blocksOffset++] & 0xFF; - final long byte183 = blocks[blocksOffset++] & 0xFF; - final long byte184 = blocks[blocksOffset++] & 0xFF; - final long byte185 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte180 << 37) | (byte181 << 29) | (byte182 << 21) | (byte183 << 13) | (byte184 << 5) | (byte185 >>> 3); - final long byte186 = blocks[blocksOffset++] & 0xFF; - final long byte187 = blocks[blocksOffset++] & 0xFF; - final long byte188 = blocks[blocksOffset++] & 0xFF; - final long byte189 = blocks[blocksOffset++] & 0xFF; - final long byte190 = blocks[blocksOffset++] & 0xFF; - final long byte191 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte185 & 7) << 42) | (byte186 << 34) | (byte187 << 26) | (byte188 << 18) | (byte189 << 10) | (byte190 << 2) | (byte191 >>> 6); - final long byte192 = blocks[blocksOffset++] & 0xFF; - final long byte193 = blocks[blocksOffset++] & 0xFF; - final long byte194 = blocks[blocksOffset++] & 0xFF; - final long byte195 = blocks[blocksOffset++] & 0xFF; - final long byte196 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte191 & 63) << 39) | (byte192 << 31) | (byte193 << 23) | (byte194 << 15) | (byte195 << 7) | (byte196 >>> 1); - final long byte197 = blocks[blocksOffset++] & 0xFF; - final long byte198 = blocks[blocksOffset++] & 0xFF; - final long byte199 = blocks[blocksOffset++] & 0xFF; - final long byte200 = blocks[blocksOffset++] & 0xFF; - final long byte201 = blocks[blocksOffset++] & 0xFF; - final long byte202 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte196 & 1) << 44) | (byte197 << 36) | (byte198 << 28) | (byte199 << 20) | (byte200 << 12) | (byte201 << 4) | (byte202 >>> 4); - final long byte203 = blocks[blocksOffset++] & 0xFF; - final long byte204 = blocks[blocksOffset++] & 0xFF; - final long byte205 = blocks[blocksOffset++] & 0xFF; - final long byte206 = blocks[blocksOffset++] & 0xFF; - final long byte207 = blocks[blocksOffset++] & 0xFF; - final long byte208 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte202 & 15) << 41) | (byte203 << 33) | (byte204 << 25) | (byte205 << 17) | (byte206 << 9) | (byte207 << 1) | (byte208 >>> 7); - final long byte209 = blocks[blocksOffset++] & 0xFF; - final long byte210 = blocks[blocksOffset++] & 0xFF; - final long byte211 = blocks[blocksOffset++] & 0xFF; - final long byte212 = blocks[blocksOffset++] & 0xFF; - final long byte213 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte208 & 127) << 38) | (byte209 << 30) | (byte210 << 22) | (byte211 << 14) | (byte212 << 6) | (byte213 >>> 2); - final long byte214 = blocks[blocksOffset++] & 0xFF; - final long byte215 = blocks[blocksOffset++] & 0xFF; - final long byte216 = blocks[blocksOffset++] & 0xFF; - final long byte217 = blocks[blocksOffset++] & 0xFF; - final long byte218 = blocks[blocksOffset++] & 0xFF; - final long byte219 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte213 & 3) << 43) | (byte214 << 35) | (byte215 << 27) | (byte216 << 19) | (byte217 << 11) | (byte218 << 3) | (byte219 >>> 5); - final long byte220 = blocks[blocksOffset++] & 0xFF; - final long byte221 = blocks[blocksOffset++] & 0xFF; - final long byte222 = blocks[blocksOffset++] & 0xFF; - final long byte223 = blocks[blocksOffset++] & 0xFF; - final long byte224 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte219 & 31) << 40) | (byte220 << 32) | (byte221 << 24) | (byte222 << 16) | (byte223 << 8) | byte224; - final long byte225 = blocks[blocksOffset++] & 0xFF; - final long byte226 = blocks[blocksOffset++] & 0xFF; - final long byte227 = blocks[blocksOffset++] & 0xFF; - final long byte228 = blocks[blocksOffset++] & 0xFF; - final long byte229 = blocks[blocksOffset++] & 0xFF; - final long byte230 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte225 << 37) | (byte226 << 29) | (byte227 << 21) | (byte228 << 13) | (byte229 << 5) | (byte230 >>> 3); - final long byte231 = blocks[blocksOffset++] & 0xFF; - final long byte232 = blocks[blocksOffset++] & 0xFF; - final long byte233 = blocks[blocksOffset++] & 0xFF; - final long byte234 = blocks[blocksOffset++] & 0xFF; - final long byte235 = blocks[blocksOffset++] & 0xFF; - final long byte236 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte230 & 7) << 42) | (byte231 << 34) | (byte232 << 26) | (byte233 << 18) | (byte234 << 10) | (byte235 << 2) | (byte236 >>> 6); - final long byte237 = blocks[blocksOffset++] & 0xFF; - final long byte238 = blocks[blocksOffset++] & 0xFF; - final long byte239 = blocks[blocksOffset++] & 0xFF; - final long byte240 = blocks[blocksOffset++] & 0xFF; - final long byte241 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte236 & 63) << 39) | (byte237 << 31) | (byte238 << 23) | (byte239 << 15) | (byte240 << 7) | (byte241 >>> 1); - final long byte242 = blocks[blocksOffset++] & 0xFF; - final long byte243 = blocks[blocksOffset++] & 0xFF; - final long byte244 = blocks[blocksOffset++] & 0xFF; - final long byte245 = blocks[blocksOffset++] & 0xFF; - final long byte246 = blocks[blocksOffset++] & 0xFF; - final long byte247 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte241 & 1) << 44) | (byte242 << 36) | (byte243 << 28) | (byte244 << 20) | (byte245 << 12) | (byte246 << 4) | (byte247 >>> 4); - final long byte248 = blocks[blocksOffset++] & 0xFF; - final long byte249 = blocks[blocksOffset++] & 0xFF; - final long byte250 = blocks[blocksOffset++] & 0xFF; - final long byte251 = blocks[blocksOffset++] & 0xFF; - final long byte252 = blocks[blocksOffset++] & 0xFF; - final long byte253 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte247 & 15) << 41) | (byte248 << 33) | (byte249 << 25) | (byte250 << 17) | (byte251 << 9) | (byte252 << 1) | (byte253 >>> 7); - final long byte254 = blocks[blocksOffset++] & 0xFF; - final long byte255 = blocks[blocksOffset++] & 0xFF; - final long byte256 = blocks[blocksOffset++] & 0xFF; - final long byte257 = blocks[blocksOffset++] & 0xFF; - final long byte258 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte253 & 127) << 38) | (byte254 << 30) | (byte255 << 22) | (byte256 << 14) | (byte257 << 6) | (byte258 >>> 2); - final long byte259 = blocks[blocksOffset++] & 0xFF; - final long byte260 = blocks[blocksOffset++] & 0xFF; - final long byte261 = blocks[blocksOffset++] & 0xFF; - final long byte262 = blocks[blocksOffset++] & 0xFF; - final long byte263 = blocks[blocksOffset++] & 0xFF; - final long byte264 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte258 & 3) << 43) | (byte259 << 35) | (byte260 << 27) | (byte261 << 19) | (byte262 << 11) | (byte263 << 3) | (byte264 >>> 5); - final long byte265 = blocks[blocksOffset++] & 0xFF; - final long byte266 = blocks[blocksOffset++] & 0xFF; - final long byte267 = blocks[blocksOffset++] & 0xFF; - final long byte268 = blocks[blocksOffset++] & 0xFF; - final long byte269 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte264 & 31) << 40) | (byte265 << 32) | (byte266 << 24) | (byte267 << 16) | (byte268 << 8) | byte269; - final long byte270 = blocks[blocksOffset++] & 0xFF; - final long byte271 = blocks[blocksOffset++] & 0xFF; - final long byte272 = blocks[blocksOffset++] & 0xFF; - final long byte273 = blocks[blocksOffset++] & 0xFF; - final long byte274 = blocks[blocksOffset++] & 0xFF; - final long byte275 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte270 << 37) | (byte271 << 29) | (byte272 << 21) | (byte273 << 13) | (byte274 << 5) | (byte275 >>> 3); - final long byte276 = blocks[blocksOffset++] & 0xFF; - final long byte277 = blocks[blocksOffset++] & 0xFF; - final long byte278 = blocks[blocksOffset++] & 0xFF; - final long byte279 = blocks[blocksOffset++] & 0xFF; - final long byte280 = blocks[blocksOffset++] & 0xFF; - final long byte281 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte275 & 7) << 42) | (byte276 << 34) | (byte277 << 26) | (byte278 << 18) | (byte279 << 10) | (byte280 << 2) | (byte281 >>> 6); - final long byte282 = blocks[blocksOffset++] & 0xFF; - final long byte283 = blocks[blocksOffset++] & 0xFF; - final long byte284 = blocks[blocksOffset++] & 0xFF; - final long byte285 = blocks[blocksOffset++] & 0xFF; - final long byte286 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte281 & 63) << 39) | (byte282 << 31) | (byte283 << 23) | (byte284 << 15) | (byte285 << 7) | (byte286 >>> 1); - final long byte287 = blocks[blocksOffset++] & 0xFF; - final long byte288 = blocks[blocksOffset++] & 0xFF; - final long byte289 = blocks[blocksOffset++] & 0xFF; - final long byte290 = blocks[blocksOffset++] & 0xFF; - final long byte291 = blocks[blocksOffset++] & 0xFF; - final long byte292 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte286 & 1) << 44) | (byte287 << 36) | (byte288 << 28) | (byte289 << 20) | (byte290 << 12) | (byte291 << 4) | (byte292 >>> 4); - final long byte293 = blocks[blocksOffset++] & 0xFF; - final long byte294 = blocks[blocksOffset++] & 0xFF; - final long byte295 = blocks[blocksOffset++] & 0xFF; - final long byte296 = blocks[blocksOffset++] & 0xFF; - final long byte297 = blocks[blocksOffset++] & 0xFF; - final long byte298 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte292 & 15) << 41) | (byte293 << 33) | (byte294 << 25) | (byte295 << 17) | (byte296 << 9) | (byte297 << 1) | (byte298 >>> 7); - final long byte299 = blocks[blocksOffset++] & 0xFF; - final long byte300 = blocks[blocksOffset++] & 0xFF; - final long byte301 = blocks[blocksOffset++] & 0xFF; - final long byte302 = blocks[blocksOffset++] & 0xFF; - final long byte303 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte298 & 127) << 38) | (byte299 << 30) | (byte300 << 22) | (byte301 << 14) | (byte302 << 6) | (byte303 >>> 2); - final long byte304 = blocks[blocksOffset++] & 0xFF; - final long byte305 = blocks[blocksOffset++] & 0xFF; - final long byte306 = blocks[blocksOffset++] & 0xFF; - final long byte307 = blocks[blocksOffset++] & 0xFF; - final long byte308 = blocks[blocksOffset++] & 0xFF; - final long byte309 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte303 & 3) << 43) | (byte304 << 35) | (byte305 << 27) | (byte306 << 19) | (byte307 << 11) | (byte308 << 3) | (byte309 >>> 5); - final long byte310 = blocks[blocksOffset++] & 0xFF; - final long byte311 = blocks[blocksOffset++] & 0xFF; - final long byte312 = blocks[blocksOffset++] & 0xFF; - final long byte313 = blocks[blocksOffset++] & 0xFF; - final long byte314 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte309 & 31) << 40) | (byte310 << 32) | (byte311 << 24) | (byte312 << 16) | (byte313 << 8) | byte314; - final long byte315 = blocks[blocksOffset++] & 0xFF; - final long byte316 = blocks[blocksOffset++] & 0xFF; - final long byte317 = blocks[blocksOffset++] & 0xFF; - final long byte318 = blocks[blocksOffset++] & 0xFF; - final long byte319 = blocks[blocksOffset++] & 0xFF; - final long byte320 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte315 << 37) | (byte316 << 29) | (byte317 << 21) | (byte318 << 13) | (byte319 << 5) | (byte320 >>> 3); - final long byte321 = blocks[blocksOffset++] & 0xFF; - final long byte322 = blocks[blocksOffset++] & 0xFF; - final long byte323 = blocks[blocksOffset++] & 0xFF; - final long byte324 = blocks[blocksOffset++] & 0xFF; - final long byte325 = blocks[blocksOffset++] & 0xFF; - final long byte326 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte320 & 7) << 42) | (byte321 << 34) | (byte322 << 26) | (byte323 << 18) | (byte324 << 10) | (byte325 << 2) | (byte326 >>> 6); - final long byte327 = blocks[blocksOffset++] & 0xFF; - final long byte328 = blocks[blocksOffset++] & 0xFF; - final long byte329 = blocks[blocksOffset++] & 0xFF; - final long byte330 = blocks[blocksOffset++] & 0xFF; - final long byte331 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte326 & 63) << 39) | (byte327 << 31) | (byte328 << 23) | (byte329 << 15) | (byte330 << 7) | (byte331 >>> 1); - final long byte332 = blocks[blocksOffset++] & 0xFF; - final long byte333 = blocks[blocksOffset++] & 0xFF; - final long byte334 = blocks[blocksOffset++] & 0xFF; - final long byte335 = blocks[blocksOffset++] & 0xFF; - final long byte336 = blocks[blocksOffset++] & 0xFF; - final long byte337 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte331 & 1) << 44) | (byte332 << 36) | (byte333 << 28) | (byte334 << 20) | (byte335 << 12) | (byte336 << 4) | (byte337 >>> 4); - final long byte338 = blocks[blocksOffset++] & 0xFF; - final long byte339 = blocks[blocksOffset++] & 0xFF; - final long byte340 = blocks[blocksOffset++] & 0xFF; - final long byte341 = blocks[blocksOffset++] & 0xFF; - final long byte342 = blocks[blocksOffset++] & 0xFF; - final long byte343 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte337 & 15) << 41) | (byte338 << 33) | (byte339 << 25) | (byte340 << 17) | (byte341 << 9) | (byte342 << 1) | (byte343 >>> 7); - final long byte344 = blocks[blocksOffset++] & 0xFF; - final long byte345 = blocks[blocksOffset++] & 0xFF; - final long byte346 = blocks[blocksOffset++] & 0xFF; - final long byte347 = blocks[blocksOffset++] & 0xFF; - final long byte348 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte343 & 127) << 38) | (byte344 << 30) | (byte345 << 22) | (byte346 << 14) | (byte347 << 6) | (byte348 >>> 2); - final long byte349 = blocks[blocksOffset++] & 0xFF; - final long byte350 = blocks[blocksOffset++] & 0xFF; - final long byte351 = blocks[blocksOffset++] & 0xFF; - final long byte352 = blocks[blocksOffset++] & 0xFF; - final long byte353 = blocks[blocksOffset++] & 0xFF; - final long byte354 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte348 & 3) << 43) | (byte349 << 35) | (byte350 << 27) | (byte351 << 19) | (byte352 << 11) | (byte353 << 3) | (byte354 >>> 5); - final long byte355 = blocks[blocksOffset++] & 0xFF; - final long byte356 = blocks[blocksOffset++] & 0xFF; - final long byte357 = blocks[blocksOffset++] & 0xFF; - final long byte358 = blocks[blocksOffset++] & 0xFF; - final long byte359 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte354 & 31) << 40) | (byte355 << 32) | (byte356 << 24) | (byte357 << 16) | (byte358 << 8) | byte359; - } - } - - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 19) | ((values[valuesOffset] & 0xffffffffL) >>> 26); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 38) | ((values[valuesOffset] & 0xffffffffL) >>> 7); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 57) | ((values[valuesOffset++] & 0xffffffffL) << 12) | ((values[valuesOffset] & 0xffffffffL) >>> 33); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 31) | ((values[valuesOffset] & 0xffffffffL) >>> 14); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 50) | ((values[valuesOffset++] & 0xffffffffL) << 5) | ((values[valuesOffset] & 0xffffffffL) >>> 40); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 24) | ((values[valuesOffset] & 0xffffffffL) >>> 21); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 43) | ((values[valuesOffset] & 0xffffffffL) >>> 2); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 62) | ((values[valuesOffset++] & 0xffffffffL) << 17) | ((values[valuesOffset] & 0xffffffffL) >>> 28); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 36) | ((values[valuesOffset] & 0xffffffffL) >>> 9); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 55) | ((values[valuesOffset++] & 0xffffffffL) << 10) | ((values[valuesOffset] & 0xffffffffL) >>> 35); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 29) | ((values[valuesOffset] & 0xffffffffL) >>> 16); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 48) | ((values[valuesOffset++] & 0xffffffffL) << 3) | ((values[valuesOffset] & 0xffffffffL) >>> 42); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 22) | ((values[valuesOffset] & 0xffffffffL) >>> 23); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 41) | ((values[valuesOffset] & 0xffffffffL) >>> 4); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 60) | ((values[valuesOffset++] & 0xffffffffL) << 15) | ((values[valuesOffset] & 0xffffffffL) >>> 30); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 34) | ((values[valuesOffset] & 0xffffffffL) >>> 11); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 53) | ((values[valuesOffset++] & 0xffffffffL) << 8) | ((values[valuesOffset] & 0xffffffffL) >>> 37); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 27) | ((values[valuesOffset] & 0xffffffffL) >>> 18); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 46) | ((values[valuesOffset++] & 0xffffffffL) << 1) | ((values[valuesOffset] & 0xffffffffL) >>> 44); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 20) | ((values[valuesOffset] & 0xffffffffL) >>> 25); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 39) | ((values[valuesOffset] & 0xffffffffL) >>> 6); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 58) | ((values[valuesOffset++] & 0xffffffffL) << 13) | ((values[valuesOffset] & 0xffffffffL) >>> 32); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 32) | ((values[valuesOffset] & 0xffffffffL) >>> 13); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 51) | ((values[valuesOffset++] & 0xffffffffL) << 6) | ((values[valuesOffset] & 0xffffffffL) >>> 39); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 25) | ((values[valuesOffset] & 0xffffffffL) >>> 20); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 44) | ((values[valuesOffset] & 0xffffffffL) >>> 1); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 63) | ((values[valuesOffset++] & 0xffffffffL) << 18) | ((values[valuesOffset] & 0xffffffffL) >>> 27); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 37) | ((values[valuesOffset] & 0xffffffffL) >>> 8); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 56) | ((values[valuesOffset++] & 0xffffffffL) << 11) | ((values[valuesOffset] & 0xffffffffL) >>> 34); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 30) | ((values[valuesOffset] & 0xffffffffL) >>> 15); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 49) | ((values[valuesOffset++] & 0xffffffffL) << 4) | ((values[valuesOffset] & 0xffffffffL) >>> 41); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 23) | ((values[valuesOffset] & 0xffffffffL) >>> 22); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 42) | ((values[valuesOffset] & 0xffffffffL) >>> 3); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 61) | ((values[valuesOffset++] & 0xffffffffL) << 16) | ((values[valuesOffset] & 0xffffffffL) >>> 29); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 35) | ((values[valuesOffset] & 0xffffffffL) >>> 10); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 54) | ((values[valuesOffset++] & 0xffffffffL) << 9) | ((values[valuesOffset] & 0xffffffffL) >>> 36); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 28) | ((values[valuesOffset] & 0xffffffffL) >>> 17); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 47) | ((values[valuesOffset++] & 0xffffffffL) << 2) | ((values[valuesOffset] & 0xffffffffL) >>> 43); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 21) | ((values[valuesOffset] & 0xffffffffL) >>> 24); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 40) | ((values[valuesOffset] & 0xffffffffL) >>> 5); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 59) | ((values[valuesOffset++] & 0xffffffffL) << 14) | ((values[valuesOffset] & 0xffffffffL) >>> 31); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 33) | ((values[valuesOffset] & 0xffffffffL) >>> 12); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 52) | ((values[valuesOffset++] & 0xffffffffL) << 7) | ((values[valuesOffset] & 0xffffffffL) >>> 38); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 26) | ((values[valuesOffset] & 0xffffffffL) >>> 19); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 45) | (values[valuesOffset++] & 0xffffffffL); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] << 19) | (values[valuesOffset] >>> 26); - blocks[blocksOffset++] = (values[valuesOffset++] << 38) | (values[valuesOffset] >>> 7); - blocks[blocksOffset++] = (values[valuesOffset++] << 57) | (values[valuesOffset++] << 12) | (values[valuesOffset] >>> 33); - blocks[blocksOffset++] = (values[valuesOffset++] << 31) | (values[valuesOffset] >>> 14); - blocks[blocksOffset++] = (values[valuesOffset++] << 50) | (values[valuesOffset++] << 5) | (values[valuesOffset] >>> 40); - blocks[blocksOffset++] = (values[valuesOffset++] << 24) | (values[valuesOffset] >>> 21); - blocks[blocksOffset++] = (values[valuesOffset++] << 43) | (values[valuesOffset] >>> 2); - blocks[blocksOffset++] = (values[valuesOffset++] << 62) | (values[valuesOffset++] << 17) | (values[valuesOffset] >>> 28); - blocks[blocksOffset++] = (values[valuesOffset++] << 36) | (values[valuesOffset] >>> 9); - blocks[blocksOffset++] = (values[valuesOffset++] << 55) | (values[valuesOffset++] << 10) | (values[valuesOffset] >>> 35); - blocks[blocksOffset++] = (values[valuesOffset++] << 29) | (values[valuesOffset] >>> 16); - blocks[blocksOffset++] = (values[valuesOffset++] << 48) | (values[valuesOffset++] << 3) | (values[valuesOffset] >>> 42); - blocks[blocksOffset++] = (values[valuesOffset++] << 22) | (values[valuesOffset] >>> 23); - blocks[blocksOffset++] = (values[valuesOffset++] << 41) | (values[valuesOffset] >>> 4); - blocks[blocksOffset++] = (values[valuesOffset++] << 60) | (values[valuesOffset++] << 15) | (values[valuesOffset] >>> 30); - blocks[blocksOffset++] = (values[valuesOffset++] << 34) | (values[valuesOffset] >>> 11); - blocks[blocksOffset++] = (values[valuesOffset++] << 53) | (values[valuesOffset++] << 8) | (values[valuesOffset] >>> 37); - blocks[blocksOffset++] = (values[valuesOffset++] << 27) | (values[valuesOffset] >>> 18); - blocks[blocksOffset++] = (values[valuesOffset++] << 46) | (values[valuesOffset++] << 1) | (values[valuesOffset] >>> 44); - blocks[blocksOffset++] = (values[valuesOffset++] << 20) | (values[valuesOffset] >>> 25); - blocks[blocksOffset++] = (values[valuesOffset++] << 39) | (values[valuesOffset] >>> 6); - blocks[blocksOffset++] = (values[valuesOffset++] << 58) | (values[valuesOffset++] << 13) | (values[valuesOffset] >>> 32); - blocks[blocksOffset++] = (values[valuesOffset++] << 32) | (values[valuesOffset] >>> 13); - blocks[blocksOffset++] = (values[valuesOffset++] << 51) | (values[valuesOffset++] << 6) | (values[valuesOffset] >>> 39); - blocks[blocksOffset++] = (values[valuesOffset++] << 25) | (values[valuesOffset] >>> 20); - blocks[blocksOffset++] = (values[valuesOffset++] << 44) | (values[valuesOffset] >>> 1); - blocks[blocksOffset++] = (values[valuesOffset++] << 63) | (values[valuesOffset++] << 18) | (values[valuesOffset] >>> 27); - blocks[blocksOffset++] = (values[valuesOffset++] << 37) | (values[valuesOffset] >>> 8); - blocks[blocksOffset++] = (values[valuesOffset++] << 56) | (values[valuesOffset++] << 11) | (values[valuesOffset] >>> 34); - blocks[blocksOffset++] = (values[valuesOffset++] << 30) | (values[valuesOffset] >>> 15); - blocks[blocksOffset++] = (values[valuesOffset++] << 49) | (values[valuesOffset++] << 4) | (values[valuesOffset] >>> 41); - blocks[blocksOffset++] = (values[valuesOffset++] << 23) | (values[valuesOffset] >>> 22); - blocks[blocksOffset++] = (values[valuesOffset++] << 42) | (values[valuesOffset] >>> 3); - blocks[blocksOffset++] = (values[valuesOffset++] << 61) | (values[valuesOffset++] << 16) | (values[valuesOffset] >>> 29); - blocks[blocksOffset++] = (values[valuesOffset++] << 35) | (values[valuesOffset] >>> 10); - blocks[blocksOffset++] = (values[valuesOffset++] << 54) | (values[valuesOffset++] << 9) | (values[valuesOffset] >>> 36); - blocks[blocksOffset++] = (values[valuesOffset++] << 28) | (values[valuesOffset] >>> 17); - blocks[blocksOffset++] = (values[valuesOffset++] << 47) | (values[valuesOffset++] << 2) | (values[valuesOffset] >>> 43); - blocks[blocksOffset++] = (values[valuesOffset++] << 21) | (values[valuesOffset] >>> 24); - blocks[blocksOffset++] = (values[valuesOffset++] << 40) | (values[valuesOffset] >>> 5); - blocks[blocksOffset++] = (values[valuesOffset++] << 59) | (values[valuesOffset++] << 14) | (values[valuesOffset] >>> 31); - blocks[blocksOffset++] = (values[valuesOffset++] << 33) | (values[valuesOffset] >>> 12); - blocks[blocksOffset++] = (values[valuesOffset++] << 52) | (values[valuesOffset++] << 7) | (values[valuesOffset] >>> 38); - blocks[blocksOffset++] = (values[valuesOffset++] << 26) | (values[valuesOffset] >>> 19); - blocks[blocksOffset++] = (values[valuesOffset++] << 45) | values[valuesOffset++]; - } - } - -} diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked46.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked46.java deleted file mode 100644 index 2f73c4e4a3a..00000000000 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked46.java +++ /dev/null @@ -1,395 +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 BulkOperationPacked46 extends BulkOperation { - @Override - public int blockCount() { - return 23; - } - - @Override - public int valueCount() { - return 32; - } - - @Override - public void decode(long[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) { - throw new UnsupportedOperationException(); - } - - @Override - public void decode(byte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) { - throw new UnsupportedOperationException(); - } - - @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 >>> 18; - final long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block0 & 262143L) << 28) | (block1 >>> 36); - final long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block1 & 68719476735L) << 10) | (block2 >>> 54); - values[valuesOffset++] = (block2 >>> 8) & 70368744177663L; - final long block3 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block2 & 255L) << 38) | (block3 >>> 26); - final long block4 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block3 & 67108863L) << 20) | (block4 >>> 44); - final long block5 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block4 & 17592186044415L) << 2) | (block5 >>> 62); - values[valuesOffset++] = (block5 >>> 16) & 70368744177663L; - final long block6 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block5 & 65535L) << 30) | (block6 >>> 34); - final long block7 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block6 & 17179869183L) << 12) | (block7 >>> 52); - values[valuesOffset++] = (block7 >>> 6) & 70368744177663L; - final long block8 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block7 & 63L) << 40) | (block8 >>> 24); - final long block9 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block8 & 16777215L) << 22) | (block9 >>> 42); - final long block10 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block9 & 4398046511103L) << 4) | (block10 >>> 60); - values[valuesOffset++] = (block10 >>> 14) & 70368744177663L; - final long block11 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block10 & 16383L) << 32) | (block11 >>> 32); - final long block12 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block11 & 4294967295L) << 14) | (block12 >>> 50); - values[valuesOffset++] = (block12 >>> 4) & 70368744177663L; - final long block13 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block12 & 15L) << 42) | (block13 >>> 22); - final long block14 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block13 & 4194303L) << 24) | (block14 >>> 40); - final long block15 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block14 & 1099511627775L) << 6) | (block15 >>> 58); - values[valuesOffset++] = (block15 >>> 12) & 70368744177663L; - final long block16 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block15 & 4095L) << 34) | (block16 >>> 30); - final long block17 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block16 & 1073741823L) << 16) | (block17 >>> 48); - values[valuesOffset++] = (block17 >>> 2) & 70368744177663L; - final long block18 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block17 & 3L) << 44) | (block18 >>> 20); - final long block19 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block18 & 1048575L) << 26) | (block19 >>> 38); - final long block20 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block19 & 274877906943L) << 8) | (block20 >>> 56); - values[valuesOffset++] = (block20 >>> 10) & 70368744177663L; - final long block21 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block20 & 1023L) << 36) | (block21 >>> 28); - final long block22 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block21 & 268435455L) << 18) | (block22 >>> 46); - values[valuesOffset++] = block22 & 70368744177663L; - } - } - - @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; - final long byte3 = blocks[blocksOffset++] & 0xFF; - final long byte4 = blocks[blocksOffset++] & 0xFF; - final long byte5 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte0 << 38) | (byte1 << 30) | (byte2 << 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; - final long byte9 = blocks[blocksOffset++] & 0xFF; - final long byte10 = blocks[blocksOffset++] & 0xFF; - final long byte11 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte5 & 3) << 44) | (byte6 << 36) | (byte7 << 28) | (byte8 << 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; - final long byte15 = blocks[blocksOffset++] & 0xFF; - final long byte16 = blocks[blocksOffset++] & 0xFF; - final long byte17 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte11 & 15) << 42) | (byte12 << 34) | (byte13 << 26) | (byte14 << 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; - final long byte21 = blocks[blocksOffset++] & 0xFF; - final long byte22 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte17 & 63) << 40) | (byte18 << 32) | (byte19 << 24) | (byte20 << 16) | (byte21 << 8) | byte22; - final long byte23 = blocks[blocksOffset++] & 0xFF; - final long byte24 = blocks[blocksOffset++] & 0xFF; - final long byte25 = blocks[blocksOffset++] & 0xFF; - final long byte26 = blocks[blocksOffset++] & 0xFF; - final long byte27 = blocks[blocksOffset++] & 0xFF; - final long byte28 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte23 << 38) | (byte24 << 30) | (byte25 << 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; - final long byte32 = blocks[blocksOffset++] & 0xFF; - final long byte33 = blocks[blocksOffset++] & 0xFF; - final long byte34 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte28 & 3) << 44) | (byte29 << 36) | (byte30 << 28) | (byte31 << 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; - final long byte38 = blocks[blocksOffset++] & 0xFF; - final long byte39 = blocks[blocksOffset++] & 0xFF; - final long byte40 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte34 & 15) << 42) | (byte35 << 34) | (byte36 << 26) | (byte37 << 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; - final long byte44 = blocks[blocksOffset++] & 0xFF; - final long byte45 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte40 & 63) << 40) | (byte41 << 32) | (byte42 << 24) | (byte43 << 16) | (byte44 << 8) | byte45; - final long byte46 = blocks[blocksOffset++] & 0xFF; - final long byte47 = blocks[blocksOffset++] & 0xFF; - final long byte48 = blocks[blocksOffset++] & 0xFF; - final long byte49 = blocks[blocksOffset++] & 0xFF; - final long byte50 = blocks[blocksOffset++] & 0xFF; - final long byte51 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte46 << 38) | (byte47 << 30) | (byte48 << 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; - final long byte55 = blocks[blocksOffset++] & 0xFF; - final long byte56 = blocks[blocksOffset++] & 0xFF; - final long byte57 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte51 & 3) << 44) | (byte52 << 36) | (byte53 << 28) | (byte54 << 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; - final long byte61 = blocks[blocksOffset++] & 0xFF; - final long byte62 = blocks[blocksOffset++] & 0xFF; - final long byte63 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte57 & 15) << 42) | (byte58 << 34) | (byte59 << 26) | (byte60 << 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; - final long byte67 = blocks[blocksOffset++] & 0xFF; - final long byte68 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte63 & 63) << 40) | (byte64 << 32) | (byte65 << 24) | (byte66 << 16) | (byte67 << 8) | byte68; - final long byte69 = blocks[blocksOffset++] & 0xFF; - final long byte70 = blocks[blocksOffset++] & 0xFF; - final long byte71 = blocks[blocksOffset++] & 0xFF; - final long byte72 = blocks[blocksOffset++] & 0xFF; - final long byte73 = blocks[blocksOffset++] & 0xFF; - final long byte74 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte69 << 38) | (byte70 << 30) | (byte71 << 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; - final long byte78 = blocks[blocksOffset++] & 0xFF; - final long byte79 = blocks[blocksOffset++] & 0xFF; - final long byte80 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte74 & 3) << 44) | (byte75 << 36) | (byte76 << 28) | (byte77 << 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; - final long byte84 = blocks[blocksOffset++] & 0xFF; - final long byte85 = blocks[blocksOffset++] & 0xFF; - final long byte86 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte80 & 15) << 42) | (byte81 << 34) | (byte82 << 26) | (byte83 << 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; - final long byte90 = blocks[blocksOffset++] & 0xFF; - final long byte91 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte86 & 63) << 40) | (byte87 << 32) | (byte88 << 24) | (byte89 << 16) | (byte90 << 8) | byte91; - final long byte92 = blocks[blocksOffset++] & 0xFF; - final long byte93 = blocks[blocksOffset++] & 0xFF; - final long byte94 = blocks[blocksOffset++] & 0xFF; - final long byte95 = blocks[blocksOffset++] & 0xFF; - final long byte96 = blocks[blocksOffset++] & 0xFF; - final long byte97 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte92 << 38) | (byte93 << 30) | (byte94 << 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; - final long byte101 = blocks[blocksOffset++] & 0xFF; - final long byte102 = blocks[blocksOffset++] & 0xFF; - final long byte103 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte97 & 3) << 44) | (byte98 << 36) | (byte99 << 28) | (byte100 << 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; - final long byte107 = blocks[blocksOffset++] & 0xFF; - final long byte108 = blocks[blocksOffset++] & 0xFF; - final long byte109 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte103 & 15) << 42) | (byte104 << 34) | (byte105 << 26) | (byte106 << 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; - final long byte113 = blocks[blocksOffset++] & 0xFF; - final long byte114 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte109 & 63) << 40) | (byte110 << 32) | (byte111 << 24) | (byte112 << 16) | (byte113 << 8) | byte114; - final long byte115 = blocks[blocksOffset++] & 0xFF; - final long byte116 = blocks[blocksOffset++] & 0xFF; - final long byte117 = blocks[blocksOffset++] & 0xFF; - final long byte118 = blocks[blocksOffset++] & 0xFF; - final long byte119 = blocks[blocksOffset++] & 0xFF; - final long byte120 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte115 << 38) | (byte116 << 30) | (byte117 << 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; - final long byte124 = blocks[blocksOffset++] & 0xFF; - final long byte125 = blocks[blocksOffset++] & 0xFF; - final long byte126 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte120 & 3) << 44) | (byte121 << 36) | (byte122 << 28) | (byte123 << 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; - final long byte130 = blocks[blocksOffset++] & 0xFF; - final long byte131 = blocks[blocksOffset++] & 0xFF; - final long byte132 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte126 & 15) << 42) | (byte127 << 34) | (byte128 << 26) | (byte129 << 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; - final long byte136 = blocks[blocksOffset++] & 0xFF; - final long byte137 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte132 & 63) << 40) | (byte133 << 32) | (byte134 << 24) | (byte135 << 16) | (byte136 << 8) | byte137; - final long byte138 = blocks[blocksOffset++] & 0xFF; - final long byte139 = blocks[blocksOffset++] & 0xFF; - final long byte140 = blocks[blocksOffset++] & 0xFF; - final long byte141 = blocks[blocksOffset++] & 0xFF; - final long byte142 = blocks[blocksOffset++] & 0xFF; - final long byte143 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte138 << 38) | (byte139 << 30) | (byte140 << 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; - final long byte147 = blocks[blocksOffset++] & 0xFF; - final long byte148 = blocks[blocksOffset++] & 0xFF; - final long byte149 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte143 & 3) << 44) | (byte144 << 36) | (byte145 << 28) | (byte146 << 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; - final long byte153 = blocks[blocksOffset++] & 0xFF; - final long byte154 = blocks[blocksOffset++] & 0xFF; - final long byte155 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte149 & 15) << 42) | (byte150 << 34) | (byte151 << 26) | (byte152 << 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; - final long byte159 = blocks[blocksOffset++] & 0xFF; - final long byte160 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte155 & 63) << 40) | (byte156 << 32) | (byte157 << 24) | (byte158 << 16) | (byte159 << 8) | byte160; - final long byte161 = blocks[blocksOffset++] & 0xFF; - final long byte162 = blocks[blocksOffset++] & 0xFF; - final long byte163 = blocks[blocksOffset++] & 0xFF; - final long byte164 = blocks[blocksOffset++] & 0xFF; - final long byte165 = blocks[blocksOffset++] & 0xFF; - final long byte166 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte161 << 38) | (byte162 << 30) | (byte163 << 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; - final long byte170 = blocks[blocksOffset++] & 0xFF; - final long byte171 = blocks[blocksOffset++] & 0xFF; - final long byte172 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte166 & 3) << 44) | (byte167 << 36) | (byte168 << 28) | (byte169 << 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; - final long byte176 = blocks[blocksOffset++] & 0xFF; - final long byte177 = blocks[blocksOffset++] & 0xFF; - final long byte178 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte172 & 15) << 42) | (byte173 << 34) | (byte174 << 26) | (byte175 << 18) | (byte176 << 10) | (byte177 << 2) | (byte178 >>> 6); - final long byte179 = blocks[blocksOffset++] & 0xFF; - final long byte180 = blocks[blocksOffset++] & 0xFF; - final long byte181 = blocks[blocksOffset++] & 0xFF; - final long byte182 = blocks[blocksOffset++] & 0xFF; - final long byte183 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte178 & 63) << 40) | (byte179 << 32) | (byte180 << 24) | (byte181 << 16) | (byte182 << 8) | byte183; - } - } - - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 18) | ((values[valuesOffset] & 0xffffffffL) >>> 28); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 36) | ((values[valuesOffset] & 0xffffffffL) >>> 10); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 54) | ((values[valuesOffset++] & 0xffffffffL) << 8) | ((values[valuesOffset] & 0xffffffffL) >>> 38); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 26) | ((values[valuesOffset] & 0xffffffffL) >>> 20); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 44) | ((values[valuesOffset] & 0xffffffffL) >>> 2); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 62) | ((values[valuesOffset++] & 0xffffffffL) << 16) | ((values[valuesOffset] & 0xffffffffL) >>> 30); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 34) | ((values[valuesOffset] & 0xffffffffL) >>> 12); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 52) | ((values[valuesOffset++] & 0xffffffffL) << 6) | ((values[valuesOffset] & 0xffffffffL) >>> 40); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 24) | ((values[valuesOffset] & 0xffffffffL) >>> 22); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 42) | ((values[valuesOffset] & 0xffffffffL) >>> 4); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 60) | ((values[valuesOffset++] & 0xffffffffL) << 14) | ((values[valuesOffset] & 0xffffffffL) >>> 32); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 32) | ((values[valuesOffset] & 0xffffffffL) >>> 14); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 50) | ((values[valuesOffset++] & 0xffffffffL) << 4) | ((values[valuesOffset] & 0xffffffffL) >>> 42); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 22) | ((values[valuesOffset] & 0xffffffffL) >>> 24); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 40) | ((values[valuesOffset] & 0xffffffffL) >>> 6); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 58) | ((values[valuesOffset++] & 0xffffffffL) << 12) | ((values[valuesOffset] & 0xffffffffL) >>> 34); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 30) | ((values[valuesOffset] & 0xffffffffL) >>> 16); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 48) | ((values[valuesOffset++] & 0xffffffffL) << 2) | ((values[valuesOffset] & 0xffffffffL) >>> 44); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 20) | ((values[valuesOffset] & 0xffffffffL) >>> 26); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 38) | ((values[valuesOffset] & 0xffffffffL) >>> 8); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 56) | ((values[valuesOffset++] & 0xffffffffL) << 10) | ((values[valuesOffset] & 0xffffffffL) >>> 36); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 28) | ((values[valuesOffset] & 0xffffffffL) >>> 18); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 46) | (values[valuesOffset++] & 0xffffffffL); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] << 18) | (values[valuesOffset] >>> 28); - blocks[blocksOffset++] = (values[valuesOffset++] << 36) | (values[valuesOffset] >>> 10); - blocks[blocksOffset++] = (values[valuesOffset++] << 54) | (values[valuesOffset++] << 8) | (values[valuesOffset] >>> 38); - blocks[blocksOffset++] = (values[valuesOffset++] << 26) | (values[valuesOffset] >>> 20); - blocks[blocksOffset++] = (values[valuesOffset++] << 44) | (values[valuesOffset] >>> 2); - blocks[blocksOffset++] = (values[valuesOffset++] << 62) | (values[valuesOffset++] << 16) | (values[valuesOffset] >>> 30); - blocks[blocksOffset++] = (values[valuesOffset++] << 34) | (values[valuesOffset] >>> 12); - blocks[blocksOffset++] = (values[valuesOffset++] << 52) | (values[valuesOffset++] << 6) | (values[valuesOffset] >>> 40); - blocks[blocksOffset++] = (values[valuesOffset++] << 24) | (values[valuesOffset] >>> 22); - blocks[blocksOffset++] = (values[valuesOffset++] << 42) | (values[valuesOffset] >>> 4); - blocks[blocksOffset++] = (values[valuesOffset++] << 60) | (values[valuesOffset++] << 14) | (values[valuesOffset] >>> 32); - blocks[blocksOffset++] = (values[valuesOffset++] << 32) | (values[valuesOffset] >>> 14); - blocks[blocksOffset++] = (values[valuesOffset++] << 50) | (values[valuesOffset++] << 4) | (values[valuesOffset] >>> 42); - blocks[blocksOffset++] = (values[valuesOffset++] << 22) | (values[valuesOffset] >>> 24); - blocks[blocksOffset++] = (values[valuesOffset++] << 40) | (values[valuesOffset] >>> 6); - blocks[blocksOffset++] = (values[valuesOffset++] << 58) | (values[valuesOffset++] << 12) | (values[valuesOffset] >>> 34); - blocks[blocksOffset++] = (values[valuesOffset++] << 30) | (values[valuesOffset] >>> 16); - blocks[blocksOffset++] = (values[valuesOffset++] << 48) | (values[valuesOffset++] << 2) | (values[valuesOffset] >>> 44); - blocks[blocksOffset++] = (values[valuesOffset++] << 20) | (values[valuesOffset] >>> 26); - blocks[blocksOffset++] = (values[valuesOffset++] << 38) | (values[valuesOffset] >>> 8); - blocks[blocksOffset++] = (values[valuesOffset++] << 56) | (values[valuesOffset++] << 10) | (values[valuesOffset] >>> 36); - blocks[blocksOffset++] = (values[valuesOffset++] << 28) | (values[valuesOffset] >>> 18); - blocks[blocksOffset++] = (values[valuesOffset++] << 46) | values[valuesOffset++]; - } - } - -} diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked47.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked47.java deleted file mode 100644 index ec8003977df..00000000000 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked47.java +++ /dev/null @@ -1,723 +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 BulkOperationPacked47 extends BulkOperation { - @Override - public int blockCount() { - return 47; - } - - @Override - public int valueCount() { - return 64; - } - - @Override - public void decode(long[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) { - throw new UnsupportedOperationException(); - } - - @Override - public void decode(byte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) { - throw new UnsupportedOperationException(); - } - - @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 >>> 17; - final long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block0 & 131071L) << 30) | (block1 >>> 34); - final long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block1 & 17179869183L) << 13) | (block2 >>> 51); - values[valuesOffset++] = (block2 >>> 4) & 140737488355327L; - final long block3 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block2 & 15L) << 43) | (block3 >>> 21); - final long block4 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block3 & 2097151L) << 26) | (block4 >>> 38); - final long block5 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block4 & 274877906943L) << 9) | (block5 >>> 55); - values[valuesOffset++] = (block5 >>> 8) & 140737488355327L; - final long block6 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block5 & 255L) << 39) | (block6 >>> 25); - final long block7 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block6 & 33554431L) << 22) | (block7 >>> 42); - final long block8 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block7 & 4398046511103L) << 5) | (block8 >>> 59); - values[valuesOffset++] = (block8 >>> 12) & 140737488355327L; - final long block9 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block8 & 4095L) << 35) | (block9 >>> 29); - final long block10 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block9 & 536870911L) << 18) | (block10 >>> 46); - final long block11 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block10 & 70368744177663L) << 1) | (block11 >>> 63); - values[valuesOffset++] = (block11 >>> 16) & 140737488355327L; - final long block12 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block11 & 65535L) << 31) | (block12 >>> 33); - final long block13 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block12 & 8589934591L) << 14) | (block13 >>> 50); - values[valuesOffset++] = (block13 >>> 3) & 140737488355327L; - final long block14 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block13 & 7L) << 44) | (block14 >>> 20); - final long block15 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block14 & 1048575L) << 27) | (block15 >>> 37); - final long block16 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block15 & 137438953471L) << 10) | (block16 >>> 54); - values[valuesOffset++] = (block16 >>> 7) & 140737488355327L; - final long block17 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block16 & 127L) << 40) | (block17 >>> 24); - final long block18 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block17 & 16777215L) << 23) | (block18 >>> 41); - final long block19 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block18 & 2199023255551L) << 6) | (block19 >>> 58); - values[valuesOffset++] = (block19 >>> 11) & 140737488355327L; - final long block20 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block19 & 2047L) << 36) | (block20 >>> 28); - final long block21 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block20 & 268435455L) << 19) | (block21 >>> 45); - final long block22 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block21 & 35184372088831L) << 2) | (block22 >>> 62); - values[valuesOffset++] = (block22 >>> 15) & 140737488355327L; - final long block23 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block22 & 32767L) << 32) | (block23 >>> 32); - final long block24 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block23 & 4294967295L) << 15) | (block24 >>> 49); - values[valuesOffset++] = (block24 >>> 2) & 140737488355327L; - final long block25 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block24 & 3L) << 45) | (block25 >>> 19); - final long block26 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block25 & 524287L) << 28) | (block26 >>> 36); - final long block27 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block26 & 68719476735L) << 11) | (block27 >>> 53); - values[valuesOffset++] = (block27 >>> 6) & 140737488355327L; - final long block28 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block27 & 63L) << 41) | (block28 >>> 23); - final long block29 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block28 & 8388607L) << 24) | (block29 >>> 40); - final long block30 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block29 & 1099511627775L) << 7) | (block30 >>> 57); - values[valuesOffset++] = (block30 >>> 10) & 140737488355327L; - final long block31 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block30 & 1023L) << 37) | (block31 >>> 27); - final long block32 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block31 & 134217727L) << 20) | (block32 >>> 44); - final long block33 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block32 & 17592186044415L) << 3) | (block33 >>> 61); - values[valuesOffset++] = (block33 >>> 14) & 140737488355327L; - final long block34 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block33 & 16383L) << 33) | (block34 >>> 31); - final long block35 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block34 & 2147483647L) << 16) | (block35 >>> 48); - values[valuesOffset++] = (block35 >>> 1) & 140737488355327L; - final long block36 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block35 & 1L) << 46) | (block36 >>> 18); - final long block37 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block36 & 262143L) << 29) | (block37 >>> 35); - final long block38 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block37 & 34359738367L) << 12) | (block38 >>> 52); - values[valuesOffset++] = (block38 >>> 5) & 140737488355327L; - final long block39 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block38 & 31L) << 42) | (block39 >>> 22); - final long block40 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block39 & 4194303L) << 25) | (block40 >>> 39); - final long block41 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block40 & 549755813887L) << 8) | (block41 >>> 56); - values[valuesOffset++] = (block41 >>> 9) & 140737488355327L; - final long block42 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block41 & 511L) << 38) | (block42 >>> 26); - final long block43 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block42 & 67108863L) << 21) | (block43 >>> 43); - final long block44 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block43 & 8796093022207L) << 4) | (block44 >>> 60); - values[valuesOffset++] = (block44 >>> 13) & 140737488355327L; - final long block45 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block44 & 8191L) << 34) | (block45 >>> 30); - final long block46 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block45 & 1073741823L) << 17) | (block46 >>> 47); - values[valuesOffset++] = block46 & 140737488355327L; - } - } - - @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; - final long byte3 = blocks[blocksOffset++] & 0xFF; - final long byte4 = blocks[blocksOffset++] & 0xFF; - final long byte5 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte0 << 39) | (byte1 << 31) | (byte2 << 23) | (byte3 << 15) | (byte4 << 7) | (byte5 >>> 1); - final long byte6 = blocks[blocksOffset++] & 0xFF; - final long byte7 = blocks[blocksOffset++] & 0xFF; - final long byte8 = blocks[blocksOffset++] & 0xFF; - final long byte9 = blocks[blocksOffset++] & 0xFF; - final long byte10 = blocks[blocksOffset++] & 0xFF; - final long byte11 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte5 & 1) << 46) | (byte6 << 38) | (byte7 << 30) | (byte8 << 22) | (byte9 << 14) | (byte10 << 6) | (byte11 >>> 2); - final long byte12 = blocks[blocksOffset++] & 0xFF; - final long byte13 = blocks[blocksOffset++] & 0xFF; - final long byte14 = blocks[blocksOffset++] & 0xFF; - final long byte15 = blocks[blocksOffset++] & 0xFF; - final long byte16 = blocks[blocksOffset++] & 0xFF; - final long byte17 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte11 & 3) << 45) | (byte12 << 37) | (byte13 << 29) | (byte14 << 21) | (byte15 << 13) | (byte16 << 5) | (byte17 >>> 3); - final long byte18 = blocks[blocksOffset++] & 0xFF; - final long byte19 = blocks[blocksOffset++] & 0xFF; - final long byte20 = blocks[blocksOffset++] & 0xFF; - final long byte21 = blocks[blocksOffset++] & 0xFF; - final long byte22 = blocks[blocksOffset++] & 0xFF; - final long byte23 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte17 & 7) << 44) | (byte18 << 36) | (byte19 << 28) | (byte20 << 20) | (byte21 << 12) | (byte22 << 4) | (byte23 >>> 4); - final long byte24 = blocks[blocksOffset++] & 0xFF; - final long byte25 = blocks[blocksOffset++] & 0xFF; - final long byte26 = blocks[blocksOffset++] & 0xFF; - final long byte27 = blocks[blocksOffset++] & 0xFF; - final long byte28 = blocks[blocksOffset++] & 0xFF; - final long byte29 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte23 & 15) << 43) | (byte24 << 35) | (byte25 << 27) | (byte26 << 19) | (byte27 << 11) | (byte28 << 3) | (byte29 >>> 5); - final long byte30 = blocks[blocksOffset++] & 0xFF; - final long byte31 = blocks[blocksOffset++] & 0xFF; - final long byte32 = blocks[blocksOffset++] & 0xFF; - final long byte33 = blocks[blocksOffset++] & 0xFF; - final long byte34 = blocks[blocksOffset++] & 0xFF; - final long byte35 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte29 & 31) << 42) | (byte30 << 34) | (byte31 << 26) | (byte32 << 18) | (byte33 << 10) | (byte34 << 2) | (byte35 >>> 6); - final long byte36 = blocks[blocksOffset++] & 0xFF; - final long byte37 = blocks[blocksOffset++] & 0xFF; - final long byte38 = blocks[blocksOffset++] & 0xFF; - final long byte39 = blocks[blocksOffset++] & 0xFF; - final long byte40 = blocks[blocksOffset++] & 0xFF; - final long byte41 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte35 & 63) << 41) | (byte36 << 33) | (byte37 << 25) | (byte38 << 17) | (byte39 << 9) | (byte40 << 1) | (byte41 >>> 7); - final long byte42 = blocks[blocksOffset++] & 0xFF; - final long byte43 = blocks[blocksOffset++] & 0xFF; - final long byte44 = blocks[blocksOffset++] & 0xFF; - final long byte45 = blocks[blocksOffset++] & 0xFF; - final long byte46 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte41 & 127) << 40) | (byte42 << 32) | (byte43 << 24) | (byte44 << 16) | (byte45 << 8) | byte46; - final long byte47 = blocks[blocksOffset++] & 0xFF; - final long byte48 = blocks[blocksOffset++] & 0xFF; - final long byte49 = blocks[blocksOffset++] & 0xFF; - final long byte50 = blocks[blocksOffset++] & 0xFF; - final long byte51 = blocks[blocksOffset++] & 0xFF; - final long byte52 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte47 << 39) | (byte48 << 31) | (byte49 << 23) | (byte50 << 15) | (byte51 << 7) | (byte52 >>> 1); - final long byte53 = blocks[blocksOffset++] & 0xFF; - final long byte54 = blocks[blocksOffset++] & 0xFF; - final long byte55 = blocks[blocksOffset++] & 0xFF; - final long byte56 = blocks[blocksOffset++] & 0xFF; - final long byte57 = blocks[blocksOffset++] & 0xFF; - final long byte58 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte52 & 1) << 46) | (byte53 << 38) | (byte54 << 30) | (byte55 << 22) | (byte56 << 14) | (byte57 << 6) | (byte58 >>> 2); - final long byte59 = blocks[blocksOffset++] & 0xFF; - final long byte60 = blocks[blocksOffset++] & 0xFF; - final long byte61 = blocks[blocksOffset++] & 0xFF; - final long byte62 = blocks[blocksOffset++] & 0xFF; - final long byte63 = blocks[blocksOffset++] & 0xFF; - final long byte64 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte58 & 3) << 45) | (byte59 << 37) | (byte60 << 29) | (byte61 << 21) | (byte62 << 13) | (byte63 << 5) | (byte64 >>> 3); - final long byte65 = blocks[blocksOffset++] & 0xFF; - final long byte66 = blocks[blocksOffset++] & 0xFF; - final long byte67 = blocks[blocksOffset++] & 0xFF; - final long byte68 = blocks[blocksOffset++] & 0xFF; - final long byte69 = blocks[blocksOffset++] & 0xFF; - final long byte70 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte64 & 7) << 44) | (byte65 << 36) | (byte66 << 28) | (byte67 << 20) | (byte68 << 12) | (byte69 << 4) | (byte70 >>> 4); - final long byte71 = blocks[blocksOffset++] & 0xFF; - final long byte72 = blocks[blocksOffset++] & 0xFF; - final long byte73 = blocks[blocksOffset++] & 0xFF; - final long byte74 = blocks[blocksOffset++] & 0xFF; - final long byte75 = blocks[blocksOffset++] & 0xFF; - final long byte76 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte70 & 15) << 43) | (byte71 << 35) | (byte72 << 27) | (byte73 << 19) | (byte74 << 11) | (byte75 << 3) | (byte76 >>> 5); - final long byte77 = blocks[blocksOffset++] & 0xFF; - final long byte78 = blocks[blocksOffset++] & 0xFF; - final long byte79 = blocks[blocksOffset++] & 0xFF; - final long byte80 = blocks[blocksOffset++] & 0xFF; - final long byte81 = blocks[blocksOffset++] & 0xFF; - final long byte82 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte76 & 31) << 42) | (byte77 << 34) | (byte78 << 26) | (byte79 << 18) | (byte80 << 10) | (byte81 << 2) | (byte82 >>> 6); - final long byte83 = blocks[blocksOffset++] & 0xFF; - final long byte84 = blocks[blocksOffset++] & 0xFF; - final long byte85 = blocks[blocksOffset++] & 0xFF; - final long byte86 = blocks[blocksOffset++] & 0xFF; - final long byte87 = blocks[blocksOffset++] & 0xFF; - final long byte88 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte82 & 63) << 41) | (byte83 << 33) | (byte84 << 25) | (byte85 << 17) | (byte86 << 9) | (byte87 << 1) | (byte88 >>> 7); - final long byte89 = blocks[blocksOffset++] & 0xFF; - final long byte90 = blocks[blocksOffset++] & 0xFF; - final long byte91 = blocks[blocksOffset++] & 0xFF; - final long byte92 = blocks[blocksOffset++] & 0xFF; - final long byte93 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte88 & 127) << 40) | (byte89 << 32) | (byte90 << 24) | (byte91 << 16) | (byte92 << 8) | byte93; - final long byte94 = blocks[blocksOffset++] & 0xFF; - final long byte95 = blocks[blocksOffset++] & 0xFF; - final long byte96 = blocks[blocksOffset++] & 0xFF; - final long byte97 = blocks[blocksOffset++] & 0xFF; - final long byte98 = blocks[blocksOffset++] & 0xFF; - final long byte99 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte94 << 39) | (byte95 << 31) | (byte96 << 23) | (byte97 << 15) | (byte98 << 7) | (byte99 >>> 1); - final long byte100 = blocks[blocksOffset++] & 0xFF; - final long byte101 = blocks[blocksOffset++] & 0xFF; - final long byte102 = blocks[blocksOffset++] & 0xFF; - final long byte103 = blocks[blocksOffset++] & 0xFF; - final long byte104 = blocks[blocksOffset++] & 0xFF; - final long byte105 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte99 & 1) << 46) | (byte100 << 38) | (byte101 << 30) | (byte102 << 22) | (byte103 << 14) | (byte104 << 6) | (byte105 >>> 2); - final long byte106 = blocks[blocksOffset++] & 0xFF; - final long byte107 = blocks[blocksOffset++] & 0xFF; - final long byte108 = blocks[blocksOffset++] & 0xFF; - final long byte109 = blocks[blocksOffset++] & 0xFF; - final long byte110 = blocks[blocksOffset++] & 0xFF; - final long byte111 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte105 & 3) << 45) | (byte106 << 37) | (byte107 << 29) | (byte108 << 21) | (byte109 << 13) | (byte110 << 5) | (byte111 >>> 3); - final long byte112 = blocks[blocksOffset++] & 0xFF; - final long byte113 = blocks[blocksOffset++] & 0xFF; - final long byte114 = blocks[blocksOffset++] & 0xFF; - final long byte115 = blocks[blocksOffset++] & 0xFF; - final long byte116 = blocks[blocksOffset++] & 0xFF; - final long byte117 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte111 & 7) << 44) | (byte112 << 36) | (byte113 << 28) | (byte114 << 20) | (byte115 << 12) | (byte116 << 4) | (byte117 >>> 4); - final long byte118 = blocks[blocksOffset++] & 0xFF; - final long byte119 = blocks[blocksOffset++] & 0xFF; - final long byte120 = blocks[blocksOffset++] & 0xFF; - final long byte121 = blocks[blocksOffset++] & 0xFF; - final long byte122 = blocks[blocksOffset++] & 0xFF; - final long byte123 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte117 & 15) << 43) | (byte118 << 35) | (byte119 << 27) | (byte120 << 19) | (byte121 << 11) | (byte122 << 3) | (byte123 >>> 5); - final long byte124 = blocks[blocksOffset++] & 0xFF; - final long byte125 = blocks[blocksOffset++] & 0xFF; - final long byte126 = blocks[blocksOffset++] & 0xFF; - final long byte127 = blocks[blocksOffset++] & 0xFF; - final long byte128 = blocks[blocksOffset++] & 0xFF; - final long byte129 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte123 & 31) << 42) | (byte124 << 34) | (byte125 << 26) | (byte126 << 18) | (byte127 << 10) | (byte128 << 2) | (byte129 >>> 6); - final long byte130 = blocks[blocksOffset++] & 0xFF; - final long byte131 = blocks[blocksOffset++] & 0xFF; - final long byte132 = blocks[blocksOffset++] & 0xFF; - final long byte133 = blocks[blocksOffset++] & 0xFF; - final long byte134 = blocks[blocksOffset++] & 0xFF; - final long byte135 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte129 & 63) << 41) | (byte130 << 33) | (byte131 << 25) | (byte132 << 17) | (byte133 << 9) | (byte134 << 1) | (byte135 >>> 7); - final long byte136 = blocks[blocksOffset++] & 0xFF; - final long byte137 = blocks[blocksOffset++] & 0xFF; - final long byte138 = blocks[blocksOffset++] & 0xFF; - final long byte139 = blocks[blocksOffset++] & 0xFF; - final long byte140 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte135 & 127) << 40) | (byte136 << 32) | (byte137 << 24) | (byte138 << 16) | (byte139 << 8) | byte140; - final long byte141 = blocks[blocksOffset++] & 0xFF; - final long byte142 = blocks[blocksOffset++] & 0xFF; - final long byte143 = blocks[blocksOffset++] & 0xFF; - final long byte144 = blocks[blocksOffset++] & 0xFF; - final long byte145 = blocks[blocksOffset++] & 0xFF; - final long byte146 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte141 << 39) | (byte142 << 31) | (byte143 << 23) | (byte144 << 15) | (byte145 << 7) | (byte146 >>> 1); - final long byte147 = blocks[blocksOffset++] & 0xFF; - final long byte148 = blocks[blocksOffset++] & 0xFF; - final long byte149 = blocks[blocksOffset++] & 0xFF; - final long byte150 = blocks[blocksOffset++] & 0xFF; - final long byte151 = blocks[blocksOffset++] & 0xFF; - final long byte152 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte146 & 1) << 46) | (byte147 << 38) | (byte148 << 30) | (byte149 << 22) | (byte150 << 14) | (byte151 << 6) | (byte152 >>> 2); - final long byte153 = blocks[blocksOffset++] & 0xFF; - final long byte154 = blocks[blocksOffset++] & 0xFF; - final long byte155 = blocks[blocksOffset++] & 0xFF; - final long byte156 = blocks[blocksOffset++] & 0xFF; - final long byte157 = blocks[blocksOffset++] & 0xFF; - final long byte158 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte152 & 3) << 45) | (byte153 << 37) | (byte154 << 29) | (byte155 << 21) | (byte156 << 13) | (byte157 << 5) | (byte158 >>> 3); - final long byte159 = blocks[blocksOffset++] & 0xFF; - final long byte160 = blocks[blocksOffset++] & 0xFF; - final long byte161 = blocks[blocksOffset++] & 0xFF; - final long byte162 = blocks[blocksOffset++] & 0xFF; - final long byte163 = blocks[blocksOffset++] & 0xFF; - final long byte164 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte158 & 7) << 44) | (byte159 << 36) | (byte160 << 28) | (byte161 << 20) | (byte162 << 12) | (byte163 << 4) | (byte164 >>> 4); - final long byte165 = blocks[blocksOffset++] & 0xFF; - final long byte166 = blocks[blocksOffset++] & 0xFF; - final long byte167 = blocks[blocksOffset++] & 0xFF; - final long byte168 = blocks[blocksOffset++] & 0xFF; - final long byte169 = blocks[blocksOffset++] & 0xFF; - final long byte170 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte164 & 15) << 43) | (byte165 << 35) | (byte166 << 27) | (byte167 << 19) | (byte168 << 11) | (byte169 << 3) | (byte170 >>> 5); - final long byte171 = blocks[blocksOffset++] & 0xFF; - final long byte172 = blocks[blocksOffset++] & 0xFF; - final long byte173 = blocks[blocksOffset++] & 0xFF; - final long byte174 = blocks[blocksOffset++] & 0xFF; - final long byte175 = blocks[blocksOffset++] & 0xFF; - final long byte176 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte170 & 31) << 42) | (byte171 << 34) | (byte172 << 26) | (byte173 << 18) | (byte174 << 10) | (byte175 << 2) | (byte176 >>> 6); - final long byte177 = blocks[blocksOffset++] & 0xFF; - final long byte178 = blocks[blocksOffset++] & 0xFF; - final long byte179 = blocks[blocksOffset++] & 0xFF; - final long byte180 = blocks[blocksOffset++] & 0xFF; - final long byte181 = blocks[blocksOffset++] & 0xFF; - final long byte182 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte176 & 63) << 41) | (byte177 << 33) | (byte178 << 25) | (byte179 << 17) | (byte180 << 9) | (byte181 << 1) | (byte182 >>> 7); - final long byte183 = blocks[blocksOffset++] & 0xFF; - final long byte184 = blocks[blocksOffset++] & 0xFF; - final long byte185 = blocks[blocksOffset++] & 0xFF; - final long byte186 = blocks[blocksOffset++] & 0xFF; - final long byte187 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte182 & 127) << 40) | (byte183 << 32) | (byte184 << 24) | (byte185 << 16) | (byte186 << 8) | byte187; - final long byte188 = blocks[blocksOffset++] & 0xFF; - final long byte189 = blocks[blocksOffset++] & 0xFF; - final long byte190 = blocks[blocksOffset++] & 0xFF; - final long byte191 = blocks[blocksOffset++] & 0xFF; - final long byte192 = blocks[blocksOffset++] & 0xFF; - final long byte193 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte188 << 39) | (byte189 << 31) | (byte190 << 23) | (byte191 << 15) | (byte192 << 7) | (byte193 >>> 1); - final long byte194 = blocks[blocksOffset++] & 0xFF; - final long byte195 = blocks[blocksOffset++] & 0xFF; - final long byte196 = blocks[blocksOffset++] & 0xFF; - final long byte197 = blocks[blocksOffset++] & 0xFF; - final long byte198 = blocks[blocksOffset++] & 0xFF; - final long byte199 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte193 & 1) << 46) | (byte194 << 38) | (byte195 << 30) | (byte196 << 22) | (byte197 << 14) | (byte198 << 6) | (byte199 >>> 2); - final long byte200 = blocks[blocksOffset++] & 0xFF; - final long byte201 = blocks[blocksOffset++] & 0xFF; - final long byte202 = blocks[blocksOffset++] & 0xFF; - final long byte203 = blocks[blocksOffset++] & 0xFF; - final long byte204 = blocks[blocksOffset++] & 0xFF; - final long byte205 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte199 & 3) << 45) | (byte200 << 37) | (byte201 << 29) | (byte202 << 21) | (byte203 << 13) | (byte204 << 5) | (byte205 >>> 3); - final long byte206 = blocks[blocksOffset++] & 0xFF; - final long byte207 = blocks[blocksOffset++] & 0xFF; - final long byte208 = blocks[blocksOffset++] & 0xFF; - final long byte209 = blocks[blocksOffset++] & 0xFF; - final long byte210 = blocks[blocksOffset++] & 0xFF; - final long byte211 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte205 & 7) << 44) | (byte206 << 36) | (byte207 << 28) | (byte208 << 20) | (byte209 << 12) | (byte210 << 4) | (byte211 >>> 4); - final long byte212 = blocks[blocksOffset++] & 0xFF; - final long byte213 = blocks[blocksOffset++] & 0xFF; - final long byte214 = blocks[blocksOffset++] & 0xFF; - final long byte215 = blocks[blocksOffset++] & 0xFF; - final long byte216 = blocks[blocksOffset++] & 0xFF; - final long byte217 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte211 & 15) << 43) | (byte212 << 35) | (byte213 << 27) | (byte214 << 19) | (byte215 << 11) | (byte216 << 3) | (byte217 >>> 5); - final long byte218 = blocks[blocksOffset++] & 0xFF; - final long byte219 = blocks[blocksOffset++] & 0xFF; - final long byte220 = blocks[blocksOffset++] & 0xFF; - final long byte221 = blocks[blocksOffset++] & 0xFF; - final long byte222 = blocks[blocksOffset++] & 0xFF; - final long byte223 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte217 & 31) << 42) | (byte218 << 34) | (byte219 << 26) | (byte220 << 18) | (byte221 << 10) | (byte222 << 2) | (byte223 >>> 6); - final long byte224 = blocks[blocksOffset++] & 0xFF; - final long byte225 = blocks[blocksOffset++] & 0xFF; - final long byte226 = blocks[blocksOffset++] & 0xFF; - final long byte227 = blocks[blocksOffset++] & 0xFF; - final long byte228 = blocks[blocksOffset++] & 0xFF; - final long byte229 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte223 & 63) << 41) | (byte224 << 33) | (byte225 << 25) | (byte226 << 17) | (byte227 << 9) | (byte228 << 1) | (byte229 >>> 7); - final long byte230 = blocks[blocksOffset++] & 0xFF; - final long byte231 = blocks[blocksOffset++] & 0xFF; - final long byte232 = blocks[blocksOffset++] & 0xFF; - final long byte233 = blocks[blocksOffset++] & 0xFF; - final long byte234 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte229 & 127) << 40) | (byte230 << 32) | (byte231 << 24) | (byte232 << 16) | (byte233 << 8) | byte234; - final long byte235 = blocks[blocksOffset++] & 0xFF; - final long byte236 = blocks[blocksOffset++] & 0xFF; - final long byte237 = blocks[blocksOffset++] & 0xFF; - final long byte238 = blocks[blocksOffset++] & 0xFF; - final long byte239 = blocks[blocksOffset++] & 0xFF; - final long byte240 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte235 << 39) | (byte236 << 31) | (byte237 << 23) | (byte238 << 15) | (byte239 << 7) | (byte240 >>> 1); - final long byte241 = blocks[blocksOffset++] & 0xFF; - final long byte242 = blocks[blocksOffset++] & 0xFF; - final long byte243 = blocks[blocksOffset++] & 0xFF; - final long byte244 = blocks[blocksOffset++] & 0xFF; - final long byte245 = blocks[blocksOffset++] & 0xFF; - final long byte246 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte240 & 1) << 46) | (byte241 << 38) | (byte242 << 30) | (byte243 << 22) | (byte244 << 14) | (byte245 << 6) | (byte246 >>> 2); - final long byte247 = blocks[blocksOffset++] & 0xFF; - final long byte248 = blocks[blocksOffset++] & 0xFF; - final long byte249 = blocks[blocksOffset++] & 0xFF; - final long byte250 = blocks[blocksOffset++] & 0xFF; - final long byte251 = blocks[blocksOffset++] & 0xFF; - final long byte252 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte246 & 3) << 45) | (byte247 << 37) | (byte248 << 29) | (byte249 << 21) | (byte250 << 13) | (byte251 << 5) | (byte252 >>> 3); - final long byte253 = blocks[blocksOffset++] & 0xFF; - final long byte254 = blocks[blocksOffset++] & 0xFF; - final long byte255 = blocks[blocksOffset++] & 0xFF; - final long byte256 = blocks[blocksOffset++] & 0xFF; - final long byte257 = blocks[blocksOffset++] & 0xFF; - final long byte258 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte252 & 7) << 44) | (byte253 << 36) | (byte254 << 28) | (byte255 << 20) | (byte256 << 12) | (byte257 << 4) | (byte258 >>> 4); - final long byte259 = blocks[blocksOffset++] & 0xFF; - final long byte260 = blocks[blocksOffset++] & 0xFF; - final long byte261 = blocks[blocksOffset++] & 0xFF; - final long byte262 = blocks[blocksOffset++] & 0xFF; - final long byte263 = blocks[blocksOffset++] & 0xFF; - final long byte264 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte258 & 15) << 43) | (byte259 << 35) | (byte260 << 27) | (byte261 << 19) | (byte262 << 11) | (byte263 << 3) | (byte264 >>> 5); - final long byte265 = blocks[blocksOffset++] & 0xFF; - final long byte266 = blocks[blocksOffset++] & 0xFF; - final long byte267 = blocks[blocksOffset++] & 0xFF; - final long byte268 = blocks[blocksOffset++] & 0xFF; - final long byte269 = blocks[blocksOffset++] & 0xFF; - final long byte270 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte264 & 31) << 42) | (byte265 << 34) | (byte266 << 26) | (byte267 << 18) | (byte268 << 10) | (byte269 << 2) | (byte270 >>> 6); - final long byte271 = blocks[blocksOffset++] & 0xFF; - final long byte272 = blocks[blocksOffset++] & 0xFF; - final long byte273 = blocks[blocksOffset++] & 0xFF; - final long byte274 = blocks[blocksOffset++] & 0xFF; - final long byte275 = blocks[blocksOffset++] & 0xFF; - final long byte276 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte270 & 63) << 41) | (byte271 << 33) | (byte272 << 25) | (byte273 << 17) | (byte274 << 9) | (byte275 << 1) | (byte276 >>> 7); - final long byte277 = blocks[blocksOffset++] & 0xFF; - final long byte278 = blocks[blocksOffset++] & 0xFF; - final long byte279 = blocks[blocksOffset++] & 0xFF; - final long byte280 = blocks[blocksOffset++] & 0xFF; - final long byte281 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte276 & 127) << 40) | (byte277 << 32) | (byte278 << 24) | (byte279 << 16) | (byte280 << 8) | byte281; - final long byte282 = blocks[blocksOffset++] & 0xFF; - final long byte283 = blocks[blocksOffset++] & 0xFF; - final long byte284 = blocks[blocksOffset++] & 0xFF; - final long byte285 = blocks[blocksOffset++] & 0xFF; - final long byte286 = blocks[blocksOffset++] & 0xFF; - final long byte287 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte282 << 39) | (byte283 << 31) | (byte284 << 23) | (byte285 << 15) | (byte286 << 7) | (byte287 >>> 1); - final long byte288 = blocks[blocksOffset++] & 0xFF; - final long byte289 = blocks[blocksOffset++] & 0xFF; - final long byte290 = blocks[blocksOffset++] & 0xFF; - final long byte291 = blocks[blocksOffset++] & 0xFF; - final long byte292 = blocks[blocksOffset++] & 0xFF; - final long byte293 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte287 & 1) << 46) | (byte288 << 38) | (byte289 << 30) | (byte290 << 22) | (byte291 << 14) | (byte292 << 6) | (byte293 >>> 2); - final long byte294 = blocks[blocksOffset++] & 0xFF; - final long byte295 = blocks[blocksOffset++] & 0xFF; - final long byte296 = blocks[blocksOffset++] & 0xFF; - final long byte297 = blocks[blocksOffset++] & 0xFF; - final long byte298 = blocks[blocksOffset++] & 0xFF; - final long byte299 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte293 & 3) << 45) | (byte294 << 37) | (byte295 << 29) | (byte296 << 21) | (byte297 << 13) | (byte298 << 5) | (byte299 >>> 3); - final long byte300 = blocks[blocksOffset++] & 0xFF; - final long byte301 = blocks[blocksOffset++] & 0xFF; - final long byte302 = blocks[blocksOffset++] & 0xFF; - final long byte303 = blocks[blocksOffset++] & 0xFF; - final long byte304 = blocks[blocksOffset++] & 0xFF; - final long byte305 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte299 & 7) << 44) | (byte300 << 36) | (byte301 << 28) | (byte302 << 20) | (byte303 << 12) | (byte304 << 4) | (byte305 >>> 4); - final long byte306 = blocks[blocksOffset++] & 0xFF; - final long byte307 = blocks[blocksOffset++] & 0xFF; - final long byte308 = blocks[blocksOffset++] & 0xFF; - final long byte309 = blocks[blocksOffset++] & 0xFF; - final long byte310 = blocks[blocksOffset++] & 0xFF; - final long byte311 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte305 & 15) << 43) | (byte306 << 35) | (byte307 << 27) | (byte308 << 19) | (byte309 << 11) | (byte310 << 3) | (byte311 >>> 5); - final long byte312 = blocks[blocksOffset++] & 0xFF; - final long byte313 = blocks[blocksOffset++] & 0xFF; - final long byte314 = blocks[blocksOffset++] & 0xFF; - final long byte315 = blocks[blocksOffset++] & 0xFF; - final long byte316 = blocks[blocksOffset++] & 0xFF; - final long byte317 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte311 & 31) << 42) | (byte312 << 34) | (byte313 << 26) | (byte314 << 18) | (byte315 << 10) | (byte316 << 2) | (byte317 >>> 6); - final long byte318 = blocks[blocksOffset++] & 0xFF; - final long byte319 = blocks[blocksOffset++] & 0xFF; - final long byte320 = blocks[blocksOffset++] & 0xFF; - final long byte321 = blocks[blocksOffset++] & 0xFF; - final long byte322 = blocks[blocksOffset++] & 0xFF; - final long byte323 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte317 & 63) << 41) | (byte318 << 33) | (byte319 << 25) | (byte320 << 17) | (byte321 << 9) | (byte322 << 1) | (byte323 >>> 7); - final long byte324 = blocks[blocksOffset++] & 0xFF; - final long byte325 = blocks[blocksOffset++] & 0xFF; - final long byte326 = blocks[blocksOffset++] & 0xFF; - final long byte327 = blocks[blocksOffset++] & 0xFF; - final long byte328 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte323 & 127) << 40) | (byte324 << 32) | (byte325 << 24) | (byte326 << 16) | (byte327 << 8) | byte328; - final long byte329 = blocks[blocksOffset++] & 0xFF; - final long byte330 = blocks[blocksOffset++] & 0xFF; - final long byte331 = blocks[blocksOffset++] & 0xFF; - final long byte332 = blocks[blocksOffset++] & 0xFF; - final long byte333 = blocks[blocksOffset++] & 0xFF; - final long byte334 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte329 << 39) | (byte330 << 31) | (byte331 << 23) | (byte332 << 15) | (byte333 << 7) | (byte334 >>> 1); - final long byte335 = blocks[blocksOffset++] & 0xFF; - final long byte336 = blocks[blocksOffset++] & 0xFF; - final long byte337 = blocks[blocksOffset++] & 0xFF; - final long byte338 = blocks[blocksOffset++] & 0xFF; - final long byte339 = blocks[blocksOffset++] & 0xFF; - final long byte340 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte334 & 1) << 46) | (byte335 << 38) | (byte336 << 30) | (byte337 << 22) | (byte338 << 14) | (byte339 << 6) | (byte340 >>> 2); - final long byte341 = blocks[blocksOffset++] & 0xFF; - final long byte342 = blocks[blocksOffset++] & 0xFF; - final long byte343 = blocks[blocksOffset++] & 0xFF; - final long byte344 = blocks[blocksOffset++] & 0xFF; - final long byte345 = blocks[blocksOffset++] & 0xFF; - final long byte346 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte340 & 3) << 45) | (byte341 << 37) | (byte342 << 29) | (byte343 << 21) | (byte344 << 13) | (byte345 << 5) | (byte346 >>> 3); - final long byte347 = blocks[blocksOffset++] & 0xFF; - final long byte348 = blocks[blocksOffset++] & 0xFF; - final long byte349 = blocks[blocksOffset++] & 0xFF; - final long byte350 = blocks[blocksOffset++] & 0xFF; - final long byte351 = blocks[blocksOffset++] & 0xFF; - final long byte352 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte346 & 7) << 44) | (byte347 << 36) | (byte348 << 28) | (byte349 << 20) | (byte350 << 12) | (byte351 << 4) | (byte352 >>> 4); - final long byte353 = blocks[blocksOffset++] & 0xFF; - final long byte354 = blocks[blocksOffset++] & 0xFF; - final long byte355 = blocks[blocksOffset++] & 0xFF; - final long byte356 = blocks[blocksOffset++] & 0xFF; - final long byte357 = blocks[blocksOffset++] & 0xFF; - final long byte358 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte352 & 15) << 43) | (byte353 << 35) | (byte354 << 27) | (byte355 << 19) | (byte356 << 11) | (byte357 << 3) | (byte358 >>> 5); - final long byte359 = blocks[blocksOffset++] & 0xFF; - final long byte360 = blocks[blocksOffset++] & 0xFF; - final long byte361 = blocks[blocksOffset++] & 0xFF; - final long byte362 = blocks[blocksOffset++] & 0xFF; - final long byte363 = blocks[blocksOffset++] & 0xFF; - final long byte364 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte358 & 31) << 42) | (byte359 << 34) | (byte360 << 26) | (byte361 << 18) | (byte362 << 10) | (byte363 << 2) | (byte364 >>> 6); - final long byte365 = blocks[blocksOffset++] & 0xFF; - final long byte366 = blocks[blocksOffset++] & 0xFF; - final long byte367 = blocks[blocksOffset++] & 0xFF; - final long byte368 = blocks[blocksOffset++] & 0xFF; - final long byte369 = blocks[blocksOffset++] & 0xFF; - final long byte370 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte364 & 63) << 41) | (byte365 << 33) | (byte366 << 25) | (byte367 << 17) | (byte368 << 9) | (byte369 << 1) | (byte370 >>> 7); - final long byte371 = blocks[blocksOffset++] & 0xFF; - final long byte372 = blocks[blocksOffset++] & 0xFF; - final long byte373 = blocks[blocksOffset++] & 0xFF; - final long byte374 = blocks[blocksOffset++] & 0xFF; - final long byte375 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte370 & 127) << 40) | (byte371 << 32) | (byte372 << 24) | (byte373 << 16) | (byte374 << 8) | byte375; - } - } - - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 17) | ((values[valuesOffset] & 0xffffffffL) >>> 30); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 34) | ((values[valuesOffset] & 0xffffffffL) >>> 13); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 51) | ((values[valuesOffset++] & 0xffffffffL) << 4) | ((values[valuesOffset] & 0xffffffffL) >>> 43); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 21) | ((values[valuesOffset] & 0xffffffffL) >>> 26); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 38) | ((values[valuesOffset] & 0xffffffffL) >>> 9); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 55) | ((values[valuesOffset++] & 0xffffffffL) << 8) | ((values[valuesOffset] & 0xffffffffL) >>> 39); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 25) | ((values[valuesOffset] & 0xffffffffL) >>> 22); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 42) | ((values[valuesOffset] & 0xffffffffL) >>> 5); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 59) | ((values[valuesOffset++] & 0xffffffffL) << 12) | ((values[valuesOffset] & 0xffffffffL) >>> 35); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 29) | ((values[valuesOffset] & 0xffffffffL) >>> 18); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 46) | ((values[valuesOffset] & 0xffffffffL) >>> 1); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 63) | ((values[valuesOffset++] & 0xffffffffL) << 16) | ((values[valuesOffset] & 0xffffffffL) >>> 31); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 33) | ((values[valuesOffset] & 0xffffffffL) >>> 14); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 50) | ((values[valuesOffset++] & 0xffffffffL) << 3) | ((values[valuesOffset] & 0xffffffffL) >>> 44); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 20) | ((values[valuesOffset] & 0xffffffffL) >>> 27); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 37) | ((values[valuesOffset] & 0xffffffffL) >>> 10); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 54) | ((values[valuesOffset++] & 0xffffffffL) << 7) | ((values[valuesOffset] & 0xffffffffL) >>> 40); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 24) | ((values[valuesOffset] & 0xffffffffL) >>> 23); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 41) | ((values[valuesOffset] & 0xffffffffL) >>> 6); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 58) | ((values[valuesOffset++] & 0xffffffffL) << 11) | ((values[valuesOffset] & 0xffffffffL) >>> 36); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 28) | ((values[valuesOffset] & 0xffffffffL) >>> 19); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 45) | ((values[valuesOffset] & 0xffffffffL) >>> 2); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 62) | ((values[valuesOffset++] & 0xffffffffL) << 15) | ((values[valuesOffset] & 0xffffffffL) >>> 32); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 32) | ((values[valuesOffset] & 0xffffffffL) >>> 15); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 49) | ((values[valuesOffset++] & 0xffffffffL) << 2) | ((values[valuesOffset] & 0xffffffffL) >>> 45); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 19) | ((values[valuesOffset] & 0xffffffffL) >>> 28); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 36) | ((values[valuesOffset] & 0xffffffffL) >>> 11); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 53) | ((values[valuesOffset++] & 0xffffffffL) << 6) | ((values[valuesOffset] & 0xffffffffL) >>> 41); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 23) | ((values[valuesOffset] & 0xffffffffL) >>> 24); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 40) | ((values[valuesOffset] & 0xffffffffL) >>> 7); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 57) | ((values[valuesOffset++] & 0xffffffffL) << 10) | ((values[valuesOffset] & 0xffffffffL) >>> 37); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 27) | ((values[valuesOffset] & 0xffffffffL) >>> 20); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 44) | ((values[valuesOffset] & 0xffffffffL) >>> 3); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 61) | ((values[valuesOffset++] & 0xffffffffL) << 14) | ((values[valuesOffset] & 0xffffffffL) >>> 33); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 31) | ((values[valuesOffset] & 0xffffffffL) >>> 16); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 48) | ((values[valuesOffset++] & 0xffffffffL) << 1) | ((values[valuesOffset] & 0xffffffffL) >>> 46); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 18) | ((values[valuesOffset] & 0xffffffffL) >>> 29); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 35) | ((values[valuesOffset] & 0xffffffffL) >>> 12); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 52) | ((values[valuesOffset++] & 0xffffffffL) << 5) | ((values[valuesOffset] & 0xffffffffL) >>> 42); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 22) | ((values[valuesOffset] & 0xffffffffL) >>> 25); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 39) | ((values[valuesOffset] & 0xffffffffL) >>> 8); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 56) | ((values[valuesOffset++] & 0xffffffffL) << 9) | ((values[valuesOffset] & 0xffffffffL) >>> 38); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 26) | ((values[valuesOffset] & 0xffffffffL) >>> 21); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 43) | ((values[valuesOffset] & 0xffffffffL) >>> 4); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 60) | ((values[valuesOffset++] & 0xffffffffL) << 13) | ((values[valuesOffset] & 0xffffffffL) >>> 34); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 30) | ((values[valuesOffset] & 0xffffffffL) >>> 17); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 47) | (values[valuesOffset++] & 0xffffffffL); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] << 17) | (values[valuesOffset] >>> 30); - blocks[blocksOffset++] = (values[valuesOffset++] << 34) | (values[valuesOffset] >>> 13); - blocks[blocksOffset++] = (values[valuesOffset++] << 51) | (values[valuesOffset++] << 4) | (values[valuesOffset] >>> 43); - blocks[blocksOffset++] = (values[valuesOffset++] << 21) | (values[valuesOffset] >>> 26); - blocks[blocksOffset++] = (values[valuesOffset++] << 38) | (values[valuesOffset] >>> 9); - blocks[blocksOffset++] = (values[valuesOffset++] << 55) | (values[valuesOffset++] << 8) | (values[valuesOffset] >>> 39); - blocks[blocksOffset++] = (values[valuesOffset++] << 25) | (values[valuesOffset] >>> 22); - blocks[blocksOffset++] = (values[valuesOffset++] << 42) | (values[valuesOffset] >>> 5); - blocks[blocksOffset++] = (values[valuesOffset++] << 59) | (values[valuesOffset++] << 12) | (values[valuesOffset] >>> 35); - blocks[blocksOffset++] = (values[valuesOffset++] << 29) | (values[valuesOffset] >>> 18); - blocks[blocksOffset++] = (values[valuesOffset++] << 46) | (values[valuesOffset] >>> 1); - blocks[blocksOffset++] = (values[valuesOffset++] << 63) | (values[valuesOffset++] << 16) | (values[valuesOffset] >>> 31); - blocks[blocksOffset++] = (values[valuesOffset++] << 33) | (values[valuesOffset] >>> 14); - blocks[blocksOffset++] = (values[valuesOffset++] << 50) | (values[valuesOffset++] << 3) | (values[valuesOffset] >>> 44); - blocks[blocksOffset++] = (values[valuesOffset++] << 20) | (values[valuesOffset] >>> 27); - blocks[blocksOffset++] = (values[valuesOffset++] << 37) | (values[valuesOffset] >>> 10); - blocks[blocksOffset++] = (values[valuesOffset++] << 54) | (values[valuesOffset++] << 7) | (values[valuesOffset] >>> 40); - blocks[blocksOffset++] = (values[valuesOffset++] << 24) | (values[valuesOffset] >>> 23); - blocks[blocksOffset++] = (values[valuesOffset++] << 41) | (values[valuesOffset] >>> 6); - blocks[blocksOffset++] = (values[valuesOffset++] << 58) | (values[valuesOffset++] << 11) | (values[valuesOffset] >>> 36); - blocks[blocksOffset++] = (values[valuesOffset++] << 28) | (values[valuesOffset] >>> 19); - blocks[blocksOffset++] = (values[valuesOffset++] << 45) | (values[valuesOffset] >>> 2); - blocks[blocksOffset++] = (values[valuesOffset++] << 62) | (values[valuesOffset++] << 15) | (values[valuesOffset] >>> 32); - blocks[blocksOffset++] = (values[valuesOffset++] << 32) | (values[valuesOffset] >>> 15); - blocks[blocksOffset++] = (values[valuesOffset++] << 49) | (values[valuesOffset++] << 2) | (values[valuesOffset] >>> 45); - blocks[blocksOffset++] = (values[valuesOffset++] << 19) | (values[valuesOffset] >>> 28); - blocks[blocksOffset++] = (values[valuesOffset++] << 36) | (values[valuesOffset] >>> 11); - blocks[blocksOffset++] = (values[valuesOffset++] << 53) | (values[valuesOffset++] << 6) | (values[valuesOffset] >>> 41); - blocks[blocksOffset++] = (values[valuesOffset++] << 23) | (values[valuesOffset] >>> 24); - blocks[blocksOffset++] = (values[valuesOffset++] << 40) | (values[valuesOffset] >>> 7); - blocks[blocksOffset++] = (values[valuesOffset++] << 57) | (values[valuesOffset++] << 10) | (values[valuesOffset] >>> 37); - blocks[blocksOffset++] = (values[valuesOffset++] << 27) | (values[valuesOffset] >>> 20); - blocks[blocksOffset++] = (values[valuesOffset++] << 44) | (values[valuesOffset] >>> 3); - blocks[blocksOffset++] = (values[valuesOffset++] << 61) | (values[valuesOffset++] << 14) | (values[valuesOffset] >>> 33); - blocks[blocksOffset++] = (values[valuesOffset++] << 31) | (values[valuesOffset] >>> 16); - blocks[blocksOffset++] = (values[valuesOffset++] << 48) | (values[valuesOffset++] << 1) | (values[valuesOffset] >>> 46); - blocks[blocksOffset++] = (values[valuesOffset++] << 18) | (values[valuesOffset] >>> 29); - blocks[blocksOffset++] = (values[valuesOffset++] << 35) | (values[valuesOffset] >>> 12); - blocks[blocksOffset++] = (values[valuesOffset++] << 52) | (values[valuesOffset++] << 5) | (values[valuesOffset] >>> 42); - blocks[blocksOffset++] = (values[valuesOffset++] << 22) | (values[valuesOffset] >>> 25); - blocks[blocksOffset++] = (values[valuesOffset++] << 39) | (values[valuesOffset] >>> 8); - blocks[blocksOffset++] = (values[valuesOffset++] << 56) | (values[valuesOffset++] << 9) | (values[valuesOffset] >>> 38); - blocks[blocksOffset++] = (values[valuesOffset++] << 26) | (values[valuesOffset] >>> 21); - blocks[blocksOffset++] = (values[valuesOffset++] << 43) | (values[valuesOffset] >>> 4); - blocks[blocksOffset++] = (values[valuesOffset++] << 60) | (values[valuesOffset++] << 13) | (values[valuesOffset] >>> 34); - blocks[blocksOffset++] = (values[valuesOffset++] << 30) | (values[valuesOffset] >>> 17); - blocks[blocksOffset++] = (values[valuesOffset++] << 47) | values[valuesOffset++]; - } - } - -} diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked48.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked48.java deleted file mode 100644 index fe2cbc2c001..00000000000 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked48.java +++ /dev/null @@ -1,119 +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 BulkOperationPacked48 extends BulkOperation { - @Override - public int blockCount() { - return 3; - } - - @Override - public int valueCount() { - return 4; - } - - @Override - public void decode(long[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) { - throw new UnsupportedOperationException(); - } - - @Override - public void decode(byte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) { - throw new UnsupportedOperationException(); - } - - @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 >>> 16; - final long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block0 & 65535L) << 32) | (block1 >>> 32); - final long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block1 & 4294967295L) << 16) | (block2 >>> 48); - values[valuesOffset++] = block2 & 281474976710655L; - } - } - - @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; - final long byte3 = blocks[blocksOffset++] & 0xFF; - final long byte4 = blocks[blocksOffset++] & 0xFF; - final long byte5 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte0 << 40) | (byte1 << 32) | (byte2 << 24) | (byte3 << 16) | (byte4 << 8) | byte5; - final long byte6 = blocks[blocksOffset++] & 0xFF; - final long byte7 = blocks[blocksOffset++] & 0xFF; - final long byte8 = blocks[blocksOffset++] & 0xFF; - final long byte9 = blocks[blocksOffset++] & 0xFF; - final long byte10 = blocks[blocksOffset++] & 0xFF; - final long byte11 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte6 << 40) | (byte7 << 32) | (byte8 << 24) | (byte9 << 16) | (byte10 << 8) | byte11; - final long byte12 = blocks[blocksOffset++] & 0xFF; - final long byte13 = blocks[blocksOffset++] & 0xFF; - final long byte14 = blocks[blocksOffset++] & 0xFF; - final long byte15 = blocks[blocksOffset++] & 0xFF; - final long byte16 = blocks[blocksOffset++] & 0xFF; - final long byte17 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte12 << 40) | (byte13 << 32) | (byte14 << 24) | (byte15 << 16) | (byte16 << 8) | byte17; - final long byte18 = blocks[blocksOffset++] & 0xFF; - final long byte19 = blocks[blocksOffset++] & 0xFF; - final long byte20 = blocks[blocksOffset++] & 0xFF; - final long byte21 = blocks[blocksOffset++] & 0xFF; - final long byte22 = blocks[blocksOffset++] & 0xFF; - final long byte23 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte18 << 40) | (byte19 << 32) | (byte20 << 24) | (byte21 << 16) | (byte22 << 8) | byte23; - } - } - - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 16) | ((values[valuesOffset] & 0xffffffffL) >>> 32); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 32) | ((values[valuesOffset] & 0xffffffffL) >>> 16); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 48) | (values[valuesOffset++] & 0xffffffffL); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] << 16) | (values[valuesOffset] >>> 32); - blocks[blocksOffset++] = (values[valuesOffset++] << 32) | (values[valuesOffset] >>> 16); - blocks[blocksOffset++] = (values[valuesOffset++] << 48) | values[valuesOffset++]; - } - } - -} diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked49.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked49.java deleted file mode 100644 index 8469c3c8f3b..00000000000 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked49.java +++ /dev/null @@ -1,745 +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 BulkOperationPacked49 extends BulkOperation { - @Override - public int blockCount() { - return 49; - } - - @Override - public int valueCount() { - return 64; - } - - @Override - public void decode(long[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) { - throw new UnsupportedOperationException(); - } - - @Override - public void decode(byte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) { - throw new UnsupportedOperationException(); - } - - @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 >>> 15; - final long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block0 & 32767L) << 34) | (block1 >>> 30); - final long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block1 & 1073741823L) << 19) | (block2 >>> 45); - final long block3 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block2 & 35184372088831L) << 4) | (block3 >>> 60); - values[valuesOffset++] = (block3 >>> 11) & 562949953421311L; - final long block4 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block3 & 2047L) << 38) | (block4 >>> 26); - final long block5 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block4 & 67108863L) << 23) | (block5 >>> 41); - final long block6 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block5 & 2199023255551L) << 8) | (block6 >>> 56); - values[valuesOffset++] = (block6 >>> 7) & 562949953421311L; - final long block7 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block6 & 127L) << 42) | (block7 >>> 22); - final long block8 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block7 & 4194303L) << 27) | (block8 >>> 37); - final long block9 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block8 & 137438953471L) << 12) | (block9 >>> 52); - values[valuesOffset++] = (block9 >>> 3) & 562949953421311L; - final long block10 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block9 & 7L) << 46) | (block10 >>> 18); - final long block11 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block10 & 262143L) << 31) | (block11 >>> 33); - final long block12 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block11 & 8589934591L) << 16) | (block12 >>> 48); - final long block13 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block12 & 281474976710655L) << 1) | (block13 >>> 63); - values[valuesOffset++] = (block13 >>> 14) & 562949953421311L; - final long block14 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block13 & 16383L) << 35) | (block14 >>> 29); - final long block15 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block14 & 536870911L) << 20) | (block15 >>> 44); - final long block16 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block15 & 17592186044415L) << 5) | (block16 >>> 59); - values[valuesOffset++] = (block16 >>> 10) & 562949953421311L; - final long block17 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block16 & 1023L) << 39) | (block17 >>> 25); - final long block18 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block17 & 33554431L) << 24) | (block18 >>> 40); - final long block19 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block18 & 1099511627775L) << 9) | (block19 >>> 55); - values[valuesOffset++] = (block19 >>> 6) & 562949953421311L; - final long block20 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block19 & 63L) << 43) | (block20 >>> 21); - final long block21 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block20 & 2097151L) << 28) | (block21 >>> 36); - final long block22 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block21 & 68719476735L) << 13) | (block22 >>> 51); - values[valuesOffset++] = (block22 >>> 2) & 562949953421311L; - final long block23 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block22 & 3L) << 47) | (block23 >>> 17); - final long block24 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block23 & 131071L) << 32) | (block24 >>> 32); - final long block25 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block24 & 4294967295L) << 17) | (block25 >>> 47); - final long block26 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block25 & 140737488355327L) << 2) | (block26 >>> 62); - values[valuesOffset++] = (block26 >>> 13) & 562949953421311L; - final long block27 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block26 & 8191L) << 36) | (block27 >>> 28); - final long block28 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block27 & 268435455L) << 21) | (block28 >>> 43); - final long block29 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block28 & 8796093022207L) << 6) | (block29 >>> 58); - values[valuesOffset++] = (block29 >>> 9) & 562949953421311L; - final long block30 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block29 & 511L) << 40) | (block30 >>> 24); - final long block31 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block30 & 16777215L) << 25) | (block31 >>> 39); - final long block32 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block31 & 549755813887L) << 10) | (block32 >>> 54); - values[valuesOffset++] = (block32 >>> 5) & 562949953421311L; - final long block33 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block32 & 31L) << 44) | (block33 >>> 20); - final long block34 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block33 & 1048575L) << 29) | (block34 >>> 35); - final long block35 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block34 & 34359738367L) << 14) | (block35 >>> 50); - values[valuesOffset++] = (block35 >>> 1) & 562949953421311L; - final long block36 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block35 & 1L) << 48) | (block36 >>> 16); - final long block37 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block36 & 65535L) << 33) | (block37 >>> 31); - final long block38 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block37 & 2147483647L) << 18) | (block38 >>> 46); - final long block39 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block38 & 70368744177663L) << 3) | (block39 >>> 61); - values[valuesOffset++] = (block39 >>> 12) & 562949953421311L; - final long block40 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block39 & 4095L) << 37) | (block40 >>> 27); - final long block41 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block40 & 134217727L) << 22) | (block41 >>> 42); - final long block42 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block41 & 4398046511103L) << 7) | (block42 >>> 57); - values[valuesOffset++] = (block42 >>> 8) & 562949953421311L; - final long block43 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block42 & 255L) << 41) | (block43 >>> 23); - final long block44 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block43 & 8388607L) << 26) | (block44 >>> 38); - final long block45 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block44 & 274877906943L) << 11) | (block45 >>> 53); - values[valuesOffset++] = (block45 >>> 4) & 562949953421311L; - final long block46 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block45 & 15L) << 45) | (block46 >>> 19); - final long block47 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block46 & 524287L) << 30) | (block47 >>> 34); - final long block48 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block47 & 17179869183L) << 15) | (block48 >>> 49); - values[valuesOffset++] = block48 & 562949953421311L; - } - } - - @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; - final long byte3 = blocks[blocksOffset++] & 0xFF; - final long byte4 = blocks[blocksOffset++] & 0xFF; - final long byte5 = blocks[blocksOffset++] & 0xFF; - final long byte6 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte0 << 41) | (byte1 << 33) | (byte2 << 25) | (byte3 << 17) | (byte4 << 9) | (byte5 << 1) | (byte6 >>> 7); - final long byte7 = blocks[blocksOffset++] & 0xFF; - final long byte8 = blocks[blocksOffset++] & 0xFF; - final long byte9 = blocks[blocksOffset++] & 0xFF; - final long byte10 = blocks[blocksOffset++] & 0xFF; - final long byte11 = blocks[blocksOffset++] & 0xFF; - final long byte12 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte6 & 127) << 42) | (byte7 << 34) | (byte8 << 26) | (byte9 << 18) | (byte10 << 10) | (byte11 << 2) | (byte12 >>> 6); - final long byte13 = blocks[blocksOffset++] & 0xFF; - final long byte14 = blocks[blocksOffset++] & 0xFF; - final long byte15 = blocks[blocksOffset++] & 0xFF; - final long byte16 = blocks[blocksOffset++] & 0xFF; - final long byte17 = blocks[blocksOffset++] & 0xFF; - final long byte18 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte12 & 63) << 43) | (byte13 << 35) | (byte14 << 27) | (byte15 << 19) | (byte16 << 11) | (byte17 << 3) | (byte18 >>> 5); - final long byte19 = blocks[blocksOffset++] & 0xFF; - final long byte20 = blocks[blocksOffset++] & 0xFF; - final long byte21 = blocks[blocksOffset++] & 0xFF; - final long byte22 = blocks[blocksOffset++] & 0xFF; - final long byte23 = blocks[blocksOffset++] & 0xFF; - final long byte24 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte18 & 31) << 44) | (byte19 << 36) | (byte20 << 28) | (byte21 << 20) | (byte22 << 12) | (byte23 << 4) | (byte24 >>> 4); - final long byte25 = blocks[blocksOffset++] & 0xFF; - final long byte26 = blocks[blocksOffset++] & 0xFF; - final long byte27 = blocks[blocksOffset++] & 0xFF; - final long byte28 = blocks[blocksOffset++] & 0xFF; - final long byte29 = blocks[blocksOffset++] & 0xFF; - final long byte30 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte24 & 15) << 45) | (byte25 << 37) | (byte26 << 29) | (byte27 << 21) | (byte28 << 13) | (byte29 << 5) | (byte30 >>> 3); - final long byte31 = blocks[blocksOffset++] & 0xFF; - final long byte32 = blocks[blocksOffset++] & 0xFF; - final long byte33 = blocks[blocksOffset++] & 0xFF; - final long byte34 = blocks[blocksOffset++] & 0xFF; - final long byte35 = blocks[blocksOffset++] & 0xFF; - final long byte36 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte30 & 7) << 46) | (byte31 << 38) | (byte32 << 30) | (byte33 << 22) | (byte34 << 14) | (byte35 << 6) | (byte36 >>> 2); - final long byte37 = blocks[blocksOffset++] & 0xFF; - final long byte38 = blocks[blocksOffset++] & 0xFF; - final long byte39 = blocks[blocksOffset++] & 0xFF; - final long byte40 = blocks[blocksOffset++] & 0xFF; - final long byte41 = blocks[blocksOffset++] & 0xFF; - final long byte42 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte36 & 3) << 47) | (byte37 << 39) | (byte38 << 31) | (byte39 << 23) | (byte40 << 15) | (byte41 << 7) | (byte42 >>> 1); - final long byte43 = blocks[blocksOffset++] & 0xFF; - final long byte44 = blocks[blocksOffset++] & 0xFF; - final long byte45 = blocks[blocksOffset++] & 0xFF; - final long byte46 = blocks[blocksOffset++] & 0xFF; - final long byte47 = blocks[blocksOffset++] & 0xFF; - final long byte48 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte42 & 1) << 48) | (byte43 << 40) | (byte44 << 32) | (byte45 << 24) | (byte46 << 16) | (byte47 << 8) | byte48; - final long byte49 = blocks[blocksOffset++] & 0xFF; - final long byte50 = blocks[blocksOffset++] & 0xFF; - final long byte51 = blocks[blocksOffset++] & 0xFF; - final long byte52 = blocks[blocksOffset++] & 0xFF; - final long byte53 = blocks[blocksOffset++] & 0xFF; - final long byte54 = blocks[blocksOffset++] & 0xFF; - final long byte55 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte49 << 41) | (byte50 << 33) | (byte51 << 25) | (byte52 << 17) | (byte53 << 9) | (byte54 << 1) | (byte55 >>> 7); - final long byte56 = blocks[blocksOffset++] & 0xFF; - final long byte57 = blocks[blocksOffset++] & 0xFF; - final long byte58 = blocks[blocksOffset++] & 0xFF; - final long byte59 = blocks[blocksOffset++] & 0xFF; - final long byte60 = blocks[blocksOffset++] & 0xFF; - final long byte61 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte55 & 127) << 42) | (byte56 << 34) | (byte57 << 26) | (byte58 << 18) | (byte59 << 10) | (byte60 << 2) | (byte61 >>> 6); - final long byte62 = blocks[blocksOffset++] & 0xFF; - final long byte63 = blocks[blocksOffset++] & 0xFF; - final long byte64 = blocks[blocksOffset++] & 0xFF; - final long byte65 = blocks[blocksOffset++] & 0xFF; - final long byte66 = blocks[blocksOffset++] & 0xFF; - final long byte67 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte61 & 63) << 43) | (byte62 << 35) | (byte63 << 27) | (byte64 << 19) | (byte65 << 11) | (byte66 << 3) | (byte67 >>> 5); - final long byte68 = blocks[blocksOffset++] & 0xFF; - final long byte69 = blocks[blocksOffset++] & 0xFF; - final long byte70 = blocks[blocksOffset++] & 0xFF; - final long byte71 = blocks[blocksOffset++] & 0xFF; - final long byte72 = blocks[blocksOffset++] & 0xFF; - final long byte73 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte67 & 31) << 44) | (byte68 << 36) | (byte69 << 28) | (byte70 << 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; - final long byte77 = blocks[blocksOffset++] & 0xFF; - final long byte78 = blocks[blocksOffset++] & 0xFF; - final long byte79 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte73 & 15) << 45) | (byte74 << 37) | (byte75 << 29) | (byte76 << 21) | (byte77 << 13) | (byte78 << 5) | (byte79 >>> 3); - final long byte80 = blocks[blocksOffset++] & 0xFF; - final long byte81 = blocks[blocksOffset++] & 0xFF; - final long byte82 = blocks[blocksOffset++] & 0xFF; - final long byte83 = blocks[blocksOffset++] & 0xFF; - final long byte84 = blocks[blocksOffset++] & 0xFF; - final long byte85 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte79 & 7) << 46) | (byte80 << 38) | (byte81 << 30) | (byte82 << 22) | (byte83 << 14) | (byte84 << 6) | (byte85 >>> 2); - final long byte86 = blocks[blocksOffset++] & 0xFF; - final long byte87 = blocks[blocksOffset++] & 0xFF; - final long byte88 = blocks[blocksOffset++] & 0xFF; - final long byte89 = blocks[blocksOffset++] & 0xFF; - final long byte90 = blocks[blocksOffset++] & 0xFF; - final long byte91 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte85 & 3) << 47) | (byte86 << 39) | (byte87 << 31) | (byte88 << 23) | (byte89 << 15) | (byte90 << 7) | (byte91 >>> 1); - final long byte92 = blocks[blocksOffset++] & 0xFF; - final long byte93 = blocks[blocksOffset++] & 0xFF; - final long byte94 = blocks[blocksOffset++] & 0xFF; - final long byte95 = blocks[blocksOffset++] & 0xFF; - final long byte96 = blocks[blocksOffset++] & 0xFF; - final long byte97 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte91 & 1) << 48) | (byte92 << 40) | (byte93 << 32) | (byte94 << 24) | (byte95 << 16) | (byte96 << 8) | byte97; - final long byte98 = blocks[blocksOffset++] & 0xFF; - final long byte99 = blocks[blocksOffset++] & 0xFF; - final long byte100 = blocks[blocksOffset++] & 0xFF; - final long byte101 = blocks[blocksOffset++] & 0xFF; - final long byte102 = blocks[blocksOffset++] & 0xFF; - final long byte103 = blocks[blocksOffset++] & 0xFF; - final long byte104 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte98 << 41) | (byte99 << 33) | (byte100 << 25) | (byte101 << 17) | (byte102 << 9) | (byte103 << 1) | (byte104 >>> 7); - final long byte105 = blocks[blocksOffset++] & 0xFF; - final long byte106 = blocks[blocksOffset++] & 0xFF; - final long byte107 = blocks[blocksOffset++] & 0xFF; - final long byte108 = blocks[blocksOffset++] & 0xFF; - final long byte109 = blocks[blocksOffset++] & 0xFF; - final long byte110 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte104 & 127) << 42) | (byte105 << 34) | (byte106 << 26) | (byte107 << 18) | (byte108 << 10) | (byte109 << 2) | (byte110 >>> 6); - final long byte111 = blocks[blocksOffset++] & 0xFF; - final long byte112 = blocks[blocksOffset++] & 0xFF; - final long byte113 = blocks[blocksOffset++] & 0xFF; - final long byte114 = blocks[blocksOffset++] & 0xFF; - final long byte115 = blocks[blocksOffset++] & 0xFF; - final long byte116 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte110 & 63) << 43) | (byte111 << 35) | (byte112 << 27) | (byte113 << 19) | (byte114 << 11) | (byte115 << 3) | (byte116 >>> 5); - final long byte117 = blocks[blocksOffset++] & 0xFF; - final long byte118 = blocks[blocksOffset++] & 0xFF; - final long byte119 = blocks[blocksOffset++] & 0xFF; - final long byte120 = blocks[blocksOffset++] & 0xFF; - final long byte121 = blocks[blocksOffset++] & 0xFF; - final long byte122 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte116 & 31) << 44) | (byte117 << 36) | (byte118 << 28) | (byte119 << 20) | (byte120 << 12) | (byte121 << 4) | (byte122 >>> 4); - final long byte123 = blocks[blocksOffset++] & 0xFF; - final long byte124 = blocks[blocksOffset++] & 0xFF; - final long byte125 = blocks[blocksOffset++] & 0xFF; - final long byte126 = blocks[blocksOffset++] & 0xFF; - final long byte127 = blocks[blocksOffset++] & 0xFF; - final long byte128 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte122 & 15) << 45) | (byte123 << 37) | (byte124 << 29) | (byte125 << 21) | (byte126 << 13) | (byte127 << 5) | (byte128 >>> 3); - final long byte129 = blocks[blocksOffset++] & 0xFF; - final long byte130 = blocks[blocksOffset++] & 0xFF; - final long byte131 = blocks[blocksOffset++] & 0xFF; - final long byte132 = blocks[blocksOffset++] & 0xFF; - final long byte133 = blocks[blocksOffset++] & 0xFF; - final long byte134 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte128 & 7) << 46) | (byte129 << 38) | (byte130 << 30) | (byte131 << 22) | (byte132 << 14) | (byte133 << 6) | (byte134 >>> 2); - final long byte135 = blocks[blocksOffset++] & 0xFF; - final long byte136 = blocks[blocksOffset++] & 0xFF; - final long byte137 = blocks[blocksOffset++] & 0xFF; - final long byte138 = blocks[blocksOffset++] & 0xFF; - final long byte139 = blocks[blocksOffset++] & 0xFF; - final long byte140 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte134 & 3) << 47) | (byte135 << 39) | (byte136 << 31) | (byte137 << 23) | (byte138 << 15) | (byte139 << 7) | (byte140 >>> 1); - final long byte141 = blocks[blocksOffset++] & 0xFF; - final long byte142 = blocks[blocksOffset++] & 0xFF; - final long byte143 = blocks[blocksOffset++] & 0xFF; - final long byte144 = blocks[blocksOffset++] & 0xFF; - final long byte145 = blocks[blocksOffset++] & 0xFF; - final long byte146 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte140 & 1) << 48) | (byte141 << 40) | (byte142 << 32) | (byte143 << 24) | (byte144 << 16) | (byte145 << 8) | byte146; - final long byte147 = blocks[blocksOffset++] & 0xFF; - final long byte148 = blocks[blocksOffset++] & 0xFF; - final long byte149 = blocks[blocksOffset++] & 0xFF; - final long byte150 = blocks[blocksOffset++] & 0xFF; - final long byte151 = blocks[blocksOffset++] & 0xFF; - final long byte152 = blocks[blocksOffset++] & 0xFF; - final long byte153 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte147 << 41) | (byte148 << 33) | (byte149 << 25) | (byte150 << 17) | (byte151 << 9) | (byte152 << 1) | (byte153 >>> 7); - final long byte154 = blocks[blocksOffset++] & 0xFF; - final long byte155 = blocks[blocksOffset++] & 0xFF; - final long byte156 = blocks[blocksOffset++] & 0xFF; - final long byte157 = blocks[blocksOffset++] & 0xFF; - final long byte158 = blocks[blocksOffset++] & 0xFF; - final long byte159 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte153 & 127) << 42) | (byte154 << 34) | (byte155 << 26) | (byte156 << 18) | (byte157 << 10) | (byte158 << 2) | (byte159 >>> 6); - final long byte160 = blocks[blocksOffset++] & 0xFF; - final long byte161 = blocks[blocksOffset++] & 0xFF; - final long byte162 = blocks[blocksOffset++] & 0xFF; - final long byte163 = blocks[blocksOffset++] & 0xFF; - final long byte164 = blocks[blocksOffset++] & 0xFF; - final long byte165 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte159 & 63) << 43) | (byte160 << 35) | (byte161 << 27) | (byte162 << 19) | (byte163 << 11) | (byte164 << 3) | (byte165 >>> 5); - final long byte166 = blocks[blocksOffset++] & 0xFF; - final long byte167 = blocks[blocksOffset++] & 0xFF; - final long byte168 = blocks[blocksOffset++] & 0xFF; - final long byte169 = blocks[blocksOffset++] & 0xFF; - final long byte170 = blocks[blocksOffset++] & 0xFF; - final long byte171 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte165 & 31) << 44) | (byte166 << 36) | (byte167 << 28) | (byte168 << 20) | (byte169 << 12) | (byte170 << 4) | (byte171 >>> 4); - final long byte172 = blocks[blocksOffset++] & 0xFF; - final long byte173 = blocks[blocksOffset++] & 0xFF; - final long byte174 = blocks[blocksOffset++] & 0xFF; - final long byte175 = blocks[blocksOffset++] & 0xFF; - final long byte176 = blocks[blocksOffset++] & 0xFF; - final long byte177 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte171 & 15) << 45) | (byte172 << 37) | (byte173 << 29) | (byte174 << 21) | (byte175 << 13) | (byte176 << 5) | (byte177 >>> 3); - final long byte178 = blocks[blocksOffset++] & 0xFF; - final long byte179 = blocks[blocksOffset++] & 0xFF; - final long byte180 = blocks[blocksOffset++] & 0xFF; - final long byte181 = blocks[blocksOffset++] & 0xFF; - final long byte182 = blocks[blocksOffset++] & 0xFF; - final long byte183 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte177 & 7) << 46) | (byte178 << 38) | (byte179 << 30) | (byte180 << 22) | (byte181 << 14) | (byte182 << 6) | (byte183 >>> 2); - final long byte184 = blocks[blocksOffset++] & 0xFF; - final long byte185 = blocks[blocksOffset++] & 0xFF; - final long byte186 = blocks[blocksOffset++] & 0xFF; - final long byte187 = blocks[blocksOffset++] & 0xFF; - final long byte188 = blocks[blocksOffset++] & 0xFF; - final long byte189 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte183 & 3) << 47) | (byte184 << 39) | (byte185 << 31) | (byte186 << 23) | (byte187 << 15) | (byte188 << 7) | (byte189 >>> 1); - final long byte190 = blocks[blocksOffset++] & 0xFF; - final long byte191 = blocks[blocksOffset++] & 0xFF; - final long byte192 = blocks[blocksOffset++] & 0xFF; - final long byte193 = blocks[blocksOffset++] & 0xFF; - final long byte194 = blocks[blocksOffset++] & 0xFF; - final long byte195 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte189 & 1) << 48) | (byte190 << 40) | (byte191 << 32) | (byte192 << 24) | (byte193 << 16) | (byte194 << 8) | byte195; - final long byte196 = blocks[blocksOffset++] & 0xFF; - final long byte197 = blocks[blocksOffset++] & 0xFF; - final long byte198 = blocks[blocksOffset++] & 0xFF; - final long byte199 = blocks[blocksOffset++] & 0xFF; - final long byte200 = blocks[blocksOffset++] & 0xFF; - final long byte201 = blocks[blocksOffset++] & 0xFF; - final long byte202 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte196 << 41) | (byte197 << 33) | (byte198 << 25) | (byte199 << 17) | (byte200 << 9) | (byte201 << 1) | (byte202 >>> 7); - final long byte203 = blocks[blocksOffset++] & 0xFF; - final long byte204 = blocks[blocksOffset++] & 0xFF; - final long byte205 = blocks[blocksOffset++] & 0xFF; - final long byte206 = blocks[blocksOffset++] & 0xFF; - final long byte207 = blocks[blocksOffset++] & 0xFF; - final long byte208 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte202 & 127) << 42) | (byte203 << 34) | (byte204 << 26) | (byte205 << 18) | (byte206 << 10) | (byte207 << 2) | (byte208 >>> 6); - final long byte209 = blocks[blocksOffset++] & 0xFF; - final long byte210 = blocks[blocksOffset++] & 0xFF; - final long byte211 = blocks[blocksOffset++] & 0xFF; - final long byte212 = blocks[blocksOffset++] & 0xFF; - final long byte213 = blocks[blocksOffset++] & 0xFF; - final long byte214 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte208 & 63) << 43) | (byte209 << 35) | (byte210 << 27) | (byte211 << 19) | (byte212 << 11) | (byte213 << 3) | (byte214 >>> 5); - final long byte215 = blocks[blocksOffset++] & 0xFF; - final long byte216 = blocks[blocksOffset++] & 0xFF; - final long byte217 = blocks[blocksOffset++] & 0xFF; - final long byte218 = blocks[blocksOffset++] & 0xFF; - final long byte219 = blocks[blocksOffset++] & 0xFF; - final long byte220 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte214 & 31) << 44) | (byte215 << 36) | (byte216 << 28) | (byte217 << 20) | (byte218 << 12) | (byte219 << 4) | (byte220 >>> 4); - final long byte221 = blocks[blocksOffset++] & 0xFF; - final long byte222 = blocks[blocksOffset++] & 0xFF; - final long byte223 = blocks[blocksOffset++] & 0xFF; - final long byte224 = blocks[blocksOffset++] & 0xFF; - final long byte225 = blocks[blocksOffset++] & 0xFF; - final long byte226 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte220 & 15) << 45) | (byte221 << 37) | (byte222 << 29) | (byte223 << 21) | (byte224 << 13) | (byte225 << 5) | (byte226 >>> 3); - final long byte227 = blocks[blocksOffset++] & 0xFF; - final long byte228 = blocks[blocksOffset++] & 0xFF; - final long byte229 = blocks[blocksOffset++] & 0xFF; - final long byte230 = blocks[blocksOffset++] & 0xFF; - final long byte231 = blocks[blocksOffset++] & 0xFF; - final long byte232 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte226 & 7) << 46) | (byte227 << 38) | (byte228 << 30) | (byte229 << 22) | (byte230 << 14) | (byte231 << 6) | (byte232 >>> 2); - final long byte233 = blocks[blocksOffset++] & 0xFF; - final long byte234 = blocks[blocksOffset++] & 0xFF; - final long byte235 = blocks[blocksOffset++] & 0xFF; - final long byte236 = blocks[blocksOffset++] & 0xFF; - final long byte237 = blocks[blocksOffset++] & 0xFF; - final long byte238 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte232 & 3) << 47) | (byte233 << 39) | (byte234 << 31) | (byte235 << 23) | (byte236 << 15) | (byte237 << 7) | (byte238 >>> 1); - final long byte239 = blocks[blocksOffset++] & 0xFF; - final long byte240 = blocks[blocksOffset++] & 0xFF; - final long byte241 = blocks[blocksOffset++] & 0xFF; - final long byte242 = blocks[blocksOffset++] & 0xFF; - final long byte243 = blocks[blocksOffset++] & 0xFF; - final long byte244 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte238 & 1) << 48) | (byte239 << 40) | (byte240 << 32) | (byte241 << 24) | (byte242 << 16) | (byte243 << 8) | byte244; - final long byte245 = blocks[blocksOffset++] & 0xFF; - final long byte246 = blocks[blocksOffset++] & 0xFF; - final long byte247 = blocks[blocksOffset++] & 0xFF; - final long byte248 = blocks[blocksOffset++] & 0xFF; - final long byte249 = blocks[blocksOffset++] & 0xFF; - final long byte250 = blocks[blocksOffset++] & 0xFF; - final long byte251 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte245 << 41) | (byte246 << 33) | (byte247 << 25) | (byte248 << 17) | (byte249 << 9) | (byte250 << 1) | (byte251 >>> 7); - final long byte252 = blocks[blocksOffset++] & 0xFF; - final long byte253 = blocks[blocksOffset++] & 0xFF; - final long byte254 = blocks[blocksOffset++] & 0xFF; - final long byte255 = blocks[blocksOffset++] & 0xFF; - final long byte256 = blocks[blocksOffset++] & 0xFF; - final long byte257 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte251 & 127) << 42) | (byte252 << 34) | (byte253 << 26) | (byte254 << 18) | (byte255 << 10) | (byte256 << 2) | (byte257 >>> 6); - final long byte258 = blocks[blocksOffset++] & 0xFF; - final long byte259 = blocks[blocksOffset++] & 0xFF; - final long byte260 = blocks[blocksOffset++] & 0xFF; - final long byte261 = blocks[blocksOffset++] & 0xFF; - final long byte262 = blocks[blocksOffset++] & 0xFF; - final long byte263 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte257 & 63) << 43) | (byte258 << 35) | (byte259 << 27) | (byte260 << 19) | (byte261 << 11) | (byte262 << 3) | (byte263 >>> 5); - final long byte264 = blocks[blocksOffset++] & 0xFF; - final long byte265 = blocks[blocksOffset++] & 0xFF; - final long byte266 = blocks[blocksOffset++] & 0xFF; - final long byte267 = blocks[blocksOffset++] & 0xFF; - final long byte268 = blocks[blocksOffset++] & 0xFF; - final long byte269 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte263 & 31) << 44) | (byte264 << 36) | (byte265 << 28) | (byte266 << 20) | (byte267 << 12) | (byte268 << 4) | (byte269 >>> 4); - final long byte270 = blocks[blocksOffset++] & 0xFF; - final long byte271 = blocks[blocksOffset++] & 0xFF; - final long byte272 = blocks[blocksOffset++] & 0xFF; - final long byte273 = blocks[blocksOffset++] & 0xFF; - final long byte274 = blocks[blocksOffset++] & 0xFF; - final long byte275 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte269 & 15) << 45) | (byte270 << 37) | (byte271 << 29) | (byte272 << 21) | (byte273 << 13) | (byte274 << 5) | (byte275 >>> 3); - final long byte276 = blocks[blocksOffset++] & 0xFF; - final long byte277 = blocks[blocksOffset++] & 0xFF; - final long byte278 = blocks[blocksOffset++] & 0xFF; - final long byte279 = blocks[blocksOffset++] & 0xFF; - final long byte280 = blocks[blocksOffset++] & 0xFF; - final long byte281 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte275 & 7) << 46) | (byte276 << 38) | (byte277 << 30) | (byte278 << 22) | (byte279 << 14) | (byte280 << 6) | (byte281 >>> 2); - final long byte282 = blocks[blocksOffset++] & 0xFF; - final long byte283 = blocks[blocksOffset++] & 0xFF; - final long byte284 = blocks[blocksOffset++] & 0xFF; - final long byte285 = blocks[blocksOffset++] & 0xFF; - final long byte286 = blocks[blocksOffset++] & 0xFF; - final long byte287 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte281 & 3) << 47) | (byte282 << 39) | (byte283 << 31) | (byte284 << 23) | (byte285 << 15) | (byte286 << 7) | (byte287 >>> 1); - final long byte288 = blocks[blocksOffset++] & 0xFF; - final long byte289 = blocks[blocksOffset++] & 0xFF; - final long byte290 = blocks[blocksOffset++] & 0xFF; - final long byte291 = blocks[blocksOffset++] & 0xFF; - final long byte292 = blocks[blocksOffset++] & 0xFF; - final long byte293 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte287 & 1) << 48) | (byte288 << 40) | (byte289 << 32) | (byte290 << 24) | (byte291 << 16) | (byte292 << 8) | byte293; - final long byte294 = blocks[blocksOffset++] & 0xFF; - final long byte295 = blocks[blocksOffset++] & 0xFF; - final long byte296 = blocks[blocksOffset++] & 0xFF; - final long byte297 = blocks[blocksOffset++] & 0xFF; - final long byte298 = blocks[blocksOffset++] & 0xFF; - final long byte299 = blocks[blocksOffset++] & 0xFF; - final long byte300 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte294 << 41) | (byte295 << 33) | (byte296 << 25) | (byte297 << 17) | (byte298 << 9) | (byte299 << 1) | (byte300 >>> 7); - final long byte301 = blocks[blocksOffset++] & 0xFF; - final long byte302 = blocks[blocksOffset++] & 0xFF; - final long byte303 = blocks[blocksOffset++] & 0xFF; - final long byte304 = blocks[blocksOffset++] & 0xFF; - final long byte305 = blocks[blocksOffset++] & 0xFF; - final long byte306 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte300 & 127) << 42) | (byte301 << 34) | (byte302 << 26) | (byte303 << 18) | (byte304 << 10) | (byte305 << 2) | (byte306 >>> 6); - final long byte307 = blocks[blocksOffset++] & 0xFF; - final long byte308 = blocks[blocksOffset++] & 0xFF; - final long byte309 = blocks[blocksOffset++] & 0xFF; - final long byte310 = blocks[blocksOffset++] & 0xFF; - final long byte311 = blocks[blocksOffset++] & 0xFF; - final long byte312 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte306 & 63) << 43) | (byte307 << 35) | (byte308 << 27) | (byte309 << 19) | (byte310 << 11) | (byte311 << 3) | (byte312 >>> 5); - final long byte313 = blocks[blocksOffset++] & 0xFF; - final long byte314 = blocks[blocksOffset++] & 0xFF; - final long byte315 = blocks[blocksOffset++] & 0xFF; - final long byte316 = blocks[blocksOffset++] & 0xFF; - final long byte317 = blocks[blocksOffset++] & 0xFF; - final long byte318 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte312 & 31) << 44) | (byte313 << 36) | (byte314 << 28) | (byte315 << 20) | (byte316 << 12) | (byte317 << 4) | (byte318 >>> 4); - final long byte319 = blocks[blocksOffset++] & 0xFF; - final long byte320 = blocks[blocksOffset++] & 0xFF; - final long byte321 = blocks[blocksOffset++] & 0xFF; - final long byte322 = blocks[blocksOffset++] & 0xFF; - final long byte323 = blocks[blocksOffset++] & 0xFF; - final long byte324 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte318 & 15) << 45) | (byte319 << 37) | (byte320 << 29) | (byte321 << 21) | (byte322 << 13) | (byte323 << 5) | (byte324 >>> 3); - final long byte325 = blocks[blocksOffset++] & 0xFF; - final long byte326 = blocks[blocksOffset++] & 0xFF; - final long byte327 = blocks[blocksOffset++] & 0xFF; - final long byte328 = blocks[blocksOffset++] & 0xFF; - final long byte329 = blocks[blocksOffset++] & 0xFF; - final long byte330 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte324 & 7) << 46) | (byte325 << 38) | (byte326 << 30) | (byte327 << 22) | (byte328 << 14) | (byte329 << 6) | (byte330 >>> 2); - final long byte331 = blocks[blocksOffset++] & 0xFF; - final long byte332 = blocks[blocksOffset++] & 0xFF; - final long byte333 = blocks[blocksOffset++] & 0xFF; - final long byte334 = blocks[blocksOffset++] & 0xFF; - final long byte335 = blocks[blocksOffset++] & 0xFF; - final long byte336 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte330 & 3) << 47) | (byte331 << 39) | (byte332 << 31) | (byte333 << 23) | (byte334 << 15) | (byte335 << 7) | (byte336 >>> 1); - final long byte337 = blocks[blocksOffset++] & 0xFF; - final long byte338 = blocks[blocksOffset++] & 0xFF; - final long byte339 = blocks[blocksOffset++] & 0xFF; - final long byte340 = blocks[blocksOffset++] & 0xFF; - final long byte341 = blocks[blocksOffset++] & 0xFF; - final long byte342 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte336 & 1) << 48) | (byte337 << 40) | (byte338 << 32) | (byte339 << 24) | (byte340 << 16) | (byte341 << 8) | byte342; - final long byte343 = blocks[blocksOffset++] & 0xFF; - final long byte344 = blocks[blocksOffset++] & 0xFF; - final long byte345 = blocks[blocksOffset++] & 0xFF; - final long byte346 = blocks[blocksOffset++] & 0xFF; - final long byte347 = blocks[blocksOffset++] & 0xFF; - final long byte348 = blocks[blocksOffset++] & 0xFF; - final long byte349 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte343 << 41) | (byte344 << 33) | (byte345 << 25) | (byte346 << 17) | (byte347 << 9) | (byte348 << 1) | (byte349 >>> 7); - final long byte350 = blocks[blocksOffset++] & 0xFF; - final long byte351 = blocks[blocksOffset++] & 0xFF; - final long byte352 = blocks[blocksOffset++] & 0xFF; - final long byte353 = blocks[blocksOffset++] & 0xFF; - final long byte354 = blocks[blocksOffset++] & 0xFF; - final long byte355 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte349 & 127) << 42) | (byte350 << 34) | (byte351 << 26) | (byte352 << 18) | (byte353 << 10) | (byte354 << 2) | (byte355 >>> 6); - final long byte356 = blocks[blocksOffset++] & 0xFF; - final long byte357 = blocks[blocksOffset++] & 0xFF; - final long byte358 = blocks[blocksOffset++] & 0xFF; - final long byte359 = blocks[blocksOffset++] & 0xFF; - final long byte360 = blocks[blocksOffset++] & 0xFF; - final long byte361 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte355 & 63) << 43) | (byte356 << 35) | (byte357 << 27) | (byte358 << 19) | (byte359 << 11) | (byte360 << 3) | (byte361 >>> 5); - final long byte362 = blocks[blocksOffset++] & 0xFF; - final long byte363 = blocks[blocksOffset++] & 0xFF; - final long byte364 = blocks[blocksOffset++] & 0xFF; - final long byte365 = blocks[blocksOffset++] & 0xFF; - final long byte366 = blocks[blocksOffset++] & 0xFF; - final long byte367 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte361 & 31) << 44) | (byte362 << 36) | (byte363 << 28) | (byte364 << 20) | (byte365 << 12) | (byte366 << 4) | (byte367 >>> 4); - final long byte368 = blocks[blocksOffset++] & 0xFF; - final long byte369 = blocks[blocksOffset++] & 0xFF; - final long byte370 = blocks[blocksOffset++] & 0xFF; - final long byte371 = blocks[blocksOffset++] & 0xFF; - final long byte372 = blocks[blocksOffset++] & 0xFF; - final long byte373 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte367 & 15) << 45) | (byte368 << 37) | (byte369 << 29) | (byte370 << 21) | (byte371 << 13) | (byte372 << 5) | (byte373 >>> 3); - final long byte374 = blocks[blocksOffset++] & 0xFF; - final long byte375 = blocks[blocksOffset++] & 0xFF; - final long byte376 = blocks[blocksOffset++] & 0xFF; - final long byte377 = blocks[blocksOffset++] & 0xFF; - final long byte378 = blocks[blocksOffset++] & 0xFF; - final long byte379 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte373 & 7) << 46) | (byte374 << 38) | (byte375 << 30) | (byte376 << 22) | (byte377 << 14) | (byte378 << 6) | (byte379 >>> 2); - final long byte380 = blocks[blocksOffset++] & 0xFF; - final long byte381 = blocks[blocksOffset++] & 0xFF; - final long byte382 = blocks[blocksOffset++] & 0xFF; - final long byte383 = blocks[blocksOffset++] & 0xFF; - final long byte384 = blocks[blocksOffset++] & 0xFF; - final long byte385 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte379 & 3) << 47) | (byte380 << 39) | (byte381 << 31) | (byte382 << 23) | (byte383 << 15) | (byte384 << 7) | (byte385 >>> 1); - final long byte386 = blocks[blocksOffset++] & 0xFF; - final long byte387 = blocks[blocksOffset++] & 0xFF; - final long byte388 = blocks[blocksOffset++] & 0xFF; - final long byte389 = blocks[blocksOffset++] & 0xFF; - final long byte390 = blocks[blocksOffset++] & 0xFF; - final long byte391 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte385 & 1) << 48) | (byte386 << 40) | (byte387 << 32) | (byte388 << 24) | (byte389 << 16) | (byte390 << 8) | byte391; - } - } - - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 15) | ((values[valuesOffset] & 0xffffffffL) >>> 34); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 30) | ((values[valuesOffset] & 0xffffffffL) >>> 19); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 45) | ((values[valuesOffset] & 0xffffffffL) >>> 4); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 60) | ((values[valuesOffset++] & 0xffffffffL) << 11) | ((values[valuesOffset] & 0xffffffffL) >>> 38); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 26) | ((values[valuesOffset] & 0xffffffffL) >>> 23); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 41) | ((values[valuesOffset] & 0xffffffffL) >>> 8); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 56) | ((values[valuesOffset++] & 0xffffffffL) << 7) | ((values[valuesOffset] & 0xffffffffL) >>> 42); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 22) | ((values[valuesOffset] & 0xffffffffL) >>> 27); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 37) | ((values[valuesOffset] & 0xffffffffL) >>> 12); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 52) | ((values[valuesOffset++] & 0xffffffffL) << 3) | ((values[valuesOffset] & 0xffffffffL) >>> 46); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 18) | ((values[valuesOffset] & 0xffffffffL) >>> 31); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 33) | ((values[valuesOffset] & 0xffffffffL) >>> 16); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 48) | ((values[valuesOffset] & 0xffffffffL) >>> 1); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 63) | ((values[valuesOffset++] & 0xffffffffL) << 14) | ((values[valuesOffset] & 0xffffffffL) >>> 35); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 29) | ((values[valuesOffset] & 0xffffffffL) >>> 20); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 44) | ((values[valuesOffset] & 0xffffffffL) >>> 5); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 59) | ((values[valuesOffset++] & 0xffffffffL) << 10) | ((values[valuesOffset] & 0xffffffffL) >>> 39); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 25) | ((values[valuesOffset] & 0xffffffffL) >>> 24); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 40) | ((values[valuesOffset] & 0xffffffffL) >>> 9); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 55) | ((values[valuesOffset++] & 0xffffffffL) << 6) | ((values[valuesOffset] & 0xffffffffL) >>> 43); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 21) | ((values[valuesOffset] & 0xffffffffL) >>> 28); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 36) | ((values[valuesOffset] & 0xffffffffL) >>> 13); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 51) | ((values[valuesOffset++] & 0xffffffffL) << 2) | ((values[valuesOffset] & 0xffffffffL) >>> 47); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 17) | ((values[valuesOffset] & 0xffffffffL) >>> 32); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 32) | ((values[valuesOffset] & 0xffffffffL) >>> 17); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 47) | ((values[valuesOffset] & 0xffffffffL) >>> 2); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 62) | ((values[valuesOffset++] & 0xffffffffL) << 13) | ((values[valuesOffset] & 0xffffffffL) >>> 36); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 28) | ((values[valuesOffset] & 0xffffffffL) >>> 21); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 43) | ((values[valuesOffset] & 0xffffffffL) >>> 6); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 58) | ((values[valuesOffset++] & 0xffffffffL) << 9) | ((values[valuesOffset] & 0xffffffffL) >>> 40); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 24) | ((values[valuesOffset] & 0xffffffffL) >>> 25); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 39) | ((values[valuesOffset] & 0xffffffffL) >>> 10); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 54) | ((values[valuesOffset++] & 0xffffffffL) << 5) | ((values[valuesOffset] & 0xffffffffL) >>> 44); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 20) | ((values[valuesOffset] & 0xffffffffL) >>> 29); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 35) | ((values[valuesOffset] & 0xffffffffL) >>> 14); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 50) | ((values[valuesOffset++] & 0xffffffffL) << 1) | ((values[valuesOffset] & 0xffffffffL) >>> 48); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 16) | ((values[valuesOffset] & 0xffffffffL) >>> 33); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 31) | ((values[valuesOffset] & 0xffffffffL) >>> 18); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 46) | ((values[valuesOffset] & 0xffffffffL) >>> 3); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 61) | ((values[valuesOffset++] & 0xffffffffL) << 12) | ((values[valuesOffset] & 0xffffffffL) >>> 37); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 27) | ((values[valuesOffset] & 0xffffffffL) >>> 22); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 42) | ((values[valuesOffset] & 0xffffffffL) >>> 7); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 57) | ((values[valuesOffset++] & 0xffffffffL) << 8) | ((values[valuesOffset] & 0xffffffffL) >>> 41); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 23) | ((values[valuesOffset] & 0xffffffffL) >>> 26); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 38) | ((values[valuesOffset] & 0xffffffffL) >>> 11); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 53) | ((values[valuesOffset++] & 0xffffffffL) << 4) | ((values[valuesOffset] & 0xffffffffL) >>> 45); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 19) | ((values[valuesOffset] & 0xffffffffL) >>> 30); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 34) | ((values[valuesOffset] & 0xffffffffL) >>> 15); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 49) | (values[valuesOffset++] & 0xffffffffL); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] << 15) | (values[valuesOffset] >>> 34); - blocks[blocksOffset++] = (values[valuesOffset++] << 30) | (values[valuesOffset] >>> 19); - blocks[blocksOffset++] = (values[valuesOffset++] << 45) | (values[valuesOffset] >>> 4); - blocks[blocksOffset++] = (values[valuesOffset++] << 60) | (values[valuesOffset++] << 11) | (values[valuesOffset] >>> 38); - blocks[blocksOffset++] = (values[valuesOffset++] << 26) | (values[valuesOffset] >>> 23); - blocks[blocksOffset++] = (values[valuesOffset++] << 41) | (values[valuesOffset] >>> 8); - blocks[blocksOffset++] = (values[valuesOffset++] << 56) | (values[valuesOffset++] << 7) | (values[valuesOffset] >>> 42); - blocks[blocksOffset++] = (values[valuesOffset++] << 22) | (values[valuesOffset] >>> 27); - blocks[blocksOffset++] = (values[valuesOffset++] << 37) | (values[valuesOffset] >>> 12); - blocks[blocksOffset++] = (values[valuesOffset++] << 52) | (values[valuesOffset++] << 3) | (values[valuesOffset] >>> 46); - blocks[blocksOffset++] = (values[valuesOffset++] << 18) | (values[valuesOffset] >>> 31); - blocks[blocksOffset++] = (values[valuesOffset++] << 33) | (values[valuesOffset] >>> 16); - blocks[blocksOffset++] = (values[valuesOffset++] << 48) | (values[valuesOffset] >>> 1); - blocks[blocksOffset++] = (values[valuesOffset++] << 63) | (values[valuesOffset++] << 14) | (values[valuesOffset] >>> 35); - blocks[blocksOffset++] = (values[valuesOffset++] << 29) | (values[valuesOffset] >>> 20); - blocks[blocksOffset++] = (values[valuesOffset++] << 44) | (values[valuesOffset] >>> 5); - blocks[blocksOffset++] = (values[valuesOffset++] << 59) | (values[valuesOffset++] << 10) | (values[valuesOffset] >>> 39); - blocks[blocksOffset++] = (values[valuesOffset++] << 25) | (values[valuesOffset] >>> 24); - blocks[blocksOffset++] = (values[valuesOffset++] << 40) | (values[valuesOffset] >>> 9); - blocks[blocksOffset++] = (values[valuesOffset++] << 55) | (values[valuesOffset++] << 6) | (values[valuesOffset] >>> 43); - blocks[blocksOffset++] = (values[valuesOffset++] << 21) | (values[valuesOffset] >>> 28); - blocks[blocksOffset++] = (values[valuesOffset++] << 36) | (values[valuesOffset] >>> 13); - blocks[blocksOffset++] = (values[valuesOffset++] << 51) | (values[valuesOffset++] << 2) | (values[valuesOffset] >>> 47); - blocks[blocksOffset++] = (values[valuesOffset++] << 17) | (values[valuesOffset] >>> 32); - blocks[blocksOffset++] = (values[valuesOffset++] << 32) | (values[valuesOffset] >>> 17); - blocks[blocksOffset++] = (values[valuesOffset++] << 47) | (values[valuesOffset] >>> 2); - blocks[blocksOffset++] = (values[valuesOffset++] << 62) | (values[valuesOffset++] << 13) | (values[valuesOffset] >>> 36); - blocks[blocksOffset++] = (values[valuesOffset++] << 28) | (values[valuesOffset] >>> 21); - blocks[blocksOffset++] = (values[valuesOffset++] << 43) | (values[valuesOffset] >>> 6); - blocks[blocksOffset++] = (values[valuesOffset++] << 58) | (values[valuesOffset++] << 9) | (values[valuesOffset] >>> 40); - blocks[blocksOffset++] = (values[valuesOffset++] << 24) | (values[valuesOffset] >>> 25); - blocks[blocksOffset++] = (values[valuesOffset++] << 39) | (values[valuesOffset] >>> 10); - blocks[blocksOffset++] = (values[valuesOffset++] << 54) | (values[valuesOffset++] << 5) | (values[valuesOffset] >>> 44); - blocks[blocksOffset++] = (values[valuesOffset++] << 20) | (values[valuesOffset] >>> 29); - blocks[blocksOffset++] = (values[valuesOffset++] << 35) | (values[valuesOffset] >>> 14); - blocks[blocksOffset++] = (values[valuesOffset++] << 50) | (values[valuesOffset++] << 1) | (values[valuesOffset] >>> 48); - blocks[blocksOffset++] = (values[valuesOffset++] << 16) | (values[valuesOffset] >>> 33); - blocks[blocksOffset++] = (values[valuesOffset++] << 31) | (values[valuesOffset] >>> 18); - blocks[blocksOffset++] = (values[valuesOffset++] << 46) | (values[valuesOffset] >>> 3); - blocks[blocksOffset++] = (values[valuesOffset++] << 61) | (values[valuesOffset++] << 12) | (values[valuesOffset] >>> 37); - blocks[blocksOffset++] = (values[valuesOffset++] << 27) | (values[valuesOffset] >>> 22); - blocks[blocksOffset++] = (values[valuesOffset++] << 42) | (values[valuesOffset] >>> 7); - blocks[blocksOffset++] = (values[valuesOffset++] << 57) | (values[valuesOffset++] << 8) | (values[valuesOffset] >>> 41); - blocks[blocksOffset++] = (values[valuesOffset++] << 23) | (values[valuesOffset] >>> 26); - blocks[blocksOffset++] = (values[valuesOffset++] << 38) | (values[valuesOffset] >>> 11); - blocks[blocksOffset++] = (values[valuesOffset++] << 53) | (values[valuesOffset++] << 4) | (values[valuesOffset] >>> 45); - blocks[blocksOffset++] = (values[valuesOffset++] << 19) | (values[valuesOffset] >>> 30); - blocks[blocksOffset++] = (values[valuesOffset++] << 34) | (values[valuesOffset] >>> 15); - blocks[blocksOffset++] = (values[valuesOffset++] << 49) | values[valuesOffset++]; - } - } - -} diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked5.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked5.java index dfa195b35c8..292bb9c7225 100644 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked5.java +++ b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked5.java @@ -22,15 +22,12 @@ package org.apache.lucene.util.packed; /** * Efficient sequential read/write of packed integers. */ -final class BulkOperationPacked5 extends BulkOperation { - @Override - public int blockCount() { - return 5; - } +final class BulkOperationPacked5 extends BulkOperationPacked { - @Override - public int valueCount() { - return 64; + public BulkOperationPacked5() { + super(5); + assert blockCount() == 5; + assert valueCount() == 64; } @Override @@ -411,30 +408,4 @@ final class BulkOperationPacked5 extends BulkOperation { } } - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 59) | ((values[valuesOffset++] & 0xffffffffL) << 54) | ((values[valuesOffset++] & 0xffffffffL) << 49) | ((values[valuesOffset++] & 0xffffffffL) << 44) | ((values[valuesOffset++] & 0xffffffffL) << 39) | ((values[valuesOffset++] & 0xffffffffL) << 34) | ((values[valuesOffset++] & 0xffffffffL) << 29) | ((values[valuesOffset++] & 0xffffffffL) << 24) | ((values[valuesOffset++] & 0xffffffffL) << 19) | ((values[valuesOffset++] & 0xffffffffL) << 14) | ((values[valuesOffset++] & 0xffffffffL) << 9) | ((values[valuesOffset++] & 0xffffffffL) << 4) | ((values[valuesOffset] & 0xffffffffL) >>> 1); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 63) | ((values[valuesOffset++] & 0xffffffffL) << 58) | ((values[valuesOffset++] & 0xffffffffL) << 53) | ((values[valuesOffset++] & 0xffffffffL) << 48) | ((values[valuesOffset++] & 0xffffffffL) << 43) | ((values[valuesOffset++] & 0xffffffffL) << 38) | ((values[valuesOffset++] & 0xffffffffL) << 33) | ((values[valuesOffset++] & 0xffffffffL) << 28) | ((values[valuesOffset++] & 0xffffffffL) << 23) | ((values[valuesOffset++] & 0xffffffffL) << 18) | ((values[valuesOffset++] & 0xffffffffL) << 13) | ((values[valuesOffset++] & 0xffffffffL) << 8) | ((values[valuesOffset++] & 0xffffffffL) << 3) | ((values[valuesOffset] & 0xffffffffL) >>> 2); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 62) | ((values[valuesOffset++] & 0xffffffffL) << 57) | ((values[valuesOffset++] & 0xffffffffL) << 52) | ((values[valuesOffset++] & 0xffffffffL) << 47) | ((values[valuesOffset++] & 0xffffffffL) << 42) | ((values[valuesOffset++] & 0xffffffffL) << 37) | ((values[valuesOffset++] & 0xffffffffL) << 32) | ((values[valuesOffset++] & 0xffffffffL) << 27) | ((values[valuesOffset++] & 0xffffffffL) << 22) | ((values[valuesOffset++] & 0xffffffffL) << 17) | ((values[valuesOffset++] & 0xffffffffL) << 12) | ((values[valuesOffset++] & 0xffffffffL) << 7) | ((values[valuesOffset++] & 0xffffffffL) << 2) | ((values[valuesOffset] & 0xffffffffL) >>> 3); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 61) | ((values[valuesOffset++] & 0xffffffffL) << 56) | ((values[valuesOffset++] & 0xffffffffL) << 51) | ((values[valuesOffset++] & 0xffffffffL) << 46) | ((values[valuesOffset++] & 0xffffffffL) << 41) | ((values[valuesOffset++] & 0xffffffffL) << 36) | ((values[valuesOffset++] & 0xffffffffL) << 31) | ((values[valuesOffset++] & 0xffffffffL) << 26) | ((values[valuesOffset++] & 0xffffffffL) << 21) | ((values[valuesOffset++] & 0xffffffffL) << 16) | ((values[valuesOffset++] & 0xffffffffL) << 11) | ((values[valuesOffset++] & 0xffffffffL) << 6) | ((values[valuesOffset++] & 0xffffffffL) << 1) | ((values[valuesOffset] & 0xffffffffL) >>> 4); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 60) | ((values[valuesOffset++] & 0xffffffffL) << 55) | ((values[valuesOffset++] & 0xffffffffL) << 50) | ((values[valuesOffset++] & 0xffffffffL) << 45) | ((values[valuesOffset++] & 0xffffffffL) << 40) | ((values[valuesOffset++] & 0xffffffffL) << 35) | ((values[valuesOffset++] & 0xffffffffL) << 30) | ((values[valuesOffset++] & 0xffffffffL) << 25) | ((values[valuesOffset++] & 0xffffffffL) << 20) | ((values[valuesOffset++] & 0xffffffffL) << 15) | ((values[valuesOffset++] & 0xffffffffL) << 10) | ((values[valuesOffset++] & 0xffffffffL) << 5) | (values[valuesOffset++] & 0xffffffffL); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] << 59) | (values[valuesOffset++] << 54) | (values[valuesOffset++] << 49) | (values[valuesOffset++] << 44) | (values[valuesOffset++] << 39) | (values[valuesOffset++] << 34) | (values[valuesOffset++] << 29) | (values[valuesOffset++] << 24) | (values[valuesOffset++] << 19) | (values[valuesOffset++] << 14) | (values[valuesOffset++] << 9) | (values[valuesOffset++] << 4) | (values[valuesOffset] >>> 1); - blocks[blocksOffset++] = (values[valuesOffset++] << 63) | (values[valuesOffset++] << 58) | (values[valuesOffset++] << 53) | (values[valuesOffset++] << 48) | (values[valuesOffset++] << 43) | (values[valuesOffset++] << 38) | (values[valuesOffset++] << 33) | (values[valuesOffset++] << 28) | (values[valuesOffset++] << 23) | (values[valuesOffset++] << 18) | (values[valuesOffset++] << 13) | (values[valuesOffset++] << 8) | (values[valuesOffset++] << 3) | (values[valuesOffset] >>> 2); - blocks[blocksOffset++] = (values[valuesOffset++] << 62) | (values[valuesOffset++] << 57) | (values[valuesOffset++] << 52) | (values[valuesOffset++] << 47) | (values[valuesOffset++] << 42) | (values[valuesOffset++] << 37) | (values[valuesOffset++] << 32) | (values[valuesOffset++] << 27) | (values[valuesOffset++] << 22) | (values[valuesOffset++] << 17) | (values[valuesOffset++] << 12) | (values[valuesOffset++] << 7) | (values[valuesOffset++] << 2) | (values[valuesOffset] >>> 3); - blocks[blocksOffset++] = (values[valuesOffset++] << 61) | (values[valuesOffset++] << 56) | (values[valuesOffset++] << 51) | (values[valuesOffset++] << 46) | (values[valuesOffset++] << 41) | (values[valuesOffset++] << 36) | (values[valuesOffset++] << 31) | (values[valuesOffset++] << 26) | (values[valuesOffset++] << 21) | (values[valuesOffset++] << 16) | (values[valuesOffset++] << 11) | (values[valuesOffset++] << 6) | (values[valuesOffset++] << 1) | (values[valuesOffset] >>> 4); - blocks[blocksOffset++] = (values[valuesOffset++] << 60) | (values[valuesOffset++] << 55) | (values[valuesOffset++] << 50) | (values[valuesOffset++] << 45) | (values[valuesOffset++] << 40) | (values[valuesOffset++] << 35) | (values[valuesOffset++] << 30) | (values[valuesOffset++] << 25) | (values[valuesOffset++] << 20) | (values[valuesOffset++] << 15) | (values[valuesOffset++] << 10) | (values[valuesOffset++] << 5) | values[valuesOffset++]; - } - } - } diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked50.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked50.java deleted file mode 100644 index 680ef40e1ce..00000000000 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked50.java +++ /dev/null @@ -1,417 +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 BulkOperationPacked50 extends BulkOperation { - @Override - public int blockCount() { - return 25; - } - - @Override - public int valueCount() { - return 32; - } - - @Override - public void decode(long[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) { - throw new UnsupportedOperationException(); - } - - @Override - public void decode(byte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) { - throw new UnsupportedOperationException(); - } - - @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 >>> 14; - final long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block0 & 16383L) << 36) | (block1 >>> 28); - final long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block1 & 268435455L) << 22) | (block2 >>> 42); - final long block3 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block2 & 4398046511103L) << 8) | (block3 >>> 56); - values[valuesOffset++] = (block3 >>> 6) & 1125899906842623L; - final long block4 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block3 & 63L) << 44) | (block4 >>> 20); - final long block5 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block4 & 1048575L) << 30) | (block5 >>> 34); - final long block6 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block5 & 17179869183L) << 16) | (block6 >>> 48); - final long block7 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block6 & 281474976710655L) << 2) | (block7 >>> 62); - values[valuesOffset++] = (block7 >>> 12) & 1125899906842623L; - final long block8 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block7 & 4095L) << 38) | (block8 >>> 26); - final long block9 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block8 & 67108863L) << 24) | (block9 >>> 40); - final long block10 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block9 & 1099511627775L) << 10) | (block10 >>> 54); - values[valuesOffset++] = (block10 >>> 4) & 1125899906842623L; - final long block11 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block10 & 15L) << 46) | (block11 >>> 18); - final long block12 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block11 & 262143L) << 32) | (block12 >>> 32); - final long block13 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block12 & 4294967295L) << 18) | (block13 >>> 46); - final long block14 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block13 & 70368744177663L) << 4) | (block14 >>> 60); - values[valuesOffset++] = (block14 >>> 10) & 1125899906842623L; - final long block15 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block14 & 1023L) << 40) | (block15 >>> 24); - final long block16 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block15 & 16777215L) << 26) | (block16 >>> 38); - final long block17 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block16 & 274877906943L) << 12) | (block17 >>> 52); - values[valuesOffset++] = (block17 >>> 2) & 1125899906842623L; - final long block18 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block17 & 3L) << 48) | (block18 >>> 16); - final long block19 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block18 & 65535L) << 34) | (block19 >>> 30); - final long block20 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block19 & 1073741823L) << 20) | (block20 >>> 44); - final long block21 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block20 & 17592186044415L) << 6) | (block21 >>> 58); - values[valuesOffset++] = (block21 >>> 8) & 1125899906842623L; - final long block22 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block21 & 255L) << 42) | (block22 >>> 22); - final long block23 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block22 & 4194303L) << 28) | (block23 >>> 36); - final long block24 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block23 & 68719476735L) << 14) | (block24 >>> 50); - values[valuesOffset++] = block24 & 1125899906842623L; - } - } - - @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; - final long byte3 = blocks[blocksOffset++] & 0xFF; - final long byte4 = blocks[blocksOffset++] & 0xFF; - final long byte5 = blocks[blocksOffset++] & 0xFF; - final long byte6 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte0 << 42) | (byte1 << 34) | (byte2 << 26) | (byte3 << 18) | (byte4 << 10) | (byte5 << 2) | (byte6 >>> 6); - final long byte7 = blocks[blocksOffset++] & 0xFF; - final long byte8 = blocks[blocksOffset++] & 0xFF; - final long byte9 = blocks[blocksOffset++] & 0xFF; - final long byte10 = blocks[blocksOffset++] & 0xFF; - final long byte11 = blocks[blocksOffset++] & 0xFF; - final long byte12 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte6 & 63) << 44) | (byte7 << 36) | (byte8 << 28) | (byte9 << 20) | (byte10 << 12) | (byte11 << 4) | (byte12 >>> 4); - final long byte13 = blocks[blocksOffset++] & 0xFF; - final long byte14 = blocks[blocksOffset++] & 0xFF; - final long byte15 = blocks[blocksOffset++] & 0xFF; - final long byte16 = blocks[blocksOffset++] & 0xFF; - final long byte17 = blocks[blocksOffset++] & 0xFF; - final long byte18 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte12 & 15) << 46) | (byte13 << 38) | (byte14 << 30) | (byte15 << 22) | (byte16 << 14) | (byte17 << 6) | (byte18 >>> 2); - final long byte19 = blocks[blocksOffset++] & 0xFF; - final long byte20 = blocks[blocksOffset++] & 0xFF; - final long byte21 = blocks[blocksOffset++] & 0xFF; - final long byte22 = blocks[blocksOffset++] & 0xFF; - final long byte23 = blocks[blocksOffset++] & 0xFF; - final long byte24 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte18 & 3) << 48) | (byte19 << 40) | (byte20 << 32) | (byte21 << 24) | (byte22 << 16) | (byte23 << 8) | byte24; - final long byte25 = blocks[blocksOffset++] & 0xFF; - final long byte26 = blocks[blocksOffset++] & 0xFF; - final long byte27 = blocks[blocksOffset++] & 0xFF; - final long byte28 = blocks[blocksOffset++] & 0xFF; - final long byte29 = blocks[blocksOffset++] & 0xFF; - final long byte30 = blocks[blocksOffset++] & 0xFF; - final long byte31 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte25 << 42) | (byte26 << 34) | (byte27 << 26) | (byte28 << 18) | (byte29 << 10) | (byte30 << 2) | (byte31 >>> 6); - final long byte32 = blocks[blocksOffset++] & 0xFF; - final long byte33 = blocks[blocksOffset++] & 0xFF; - final long byte34 = blocks[blocksOffset++] & 0xFF; - final long byte35 = blocks[blocksOffset++] & 0xFF; - final long byte36 = blocks[blocksOffset++] & 0xFF; - final long byte37 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte31 & 63) << 44) | (byte32 << 36) | (byte33 << 28) | (byte34 << 20) | (byte35 << 12) | (byte36 << 4) | (byte37 >>> 4); - final long byte38 = blocks[blocksOffset++] & 0xFF; - final long byte39 = blocks[blocksOffset++] & 0xFF; - final long byte40 = blocks[blocksOffset++] & 0xFF; - final long byte41 = blocks[blocksOffset++] & 0xFF; - final long byte42 = blocks[blocksOffset++] & 0xFF; - final long byte43 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte37 & 15) << 46) | (byte38 << 38) | (byte39 << 30) | (byte40 << 22) | (byte41 << 14) | (byte42 << 6) | (byte43 >>> 2); - final long byte44 = blocks[blocksOffset++] & 0xFF; - final long byte45 = blocks[blocksOffset++] & 0xFF; - final long byte46 = blocks[blocksOffset++] & 0xFF; - final long byte47 = blocks[blocksOffset++] & 0xFF; - final long byte48 = blocks[blocksOffset++] & 0xFF; - final long byte49 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte43 & 3) << 48) | (byte44 << 40) | (byte45 << 32) | (byte46 << 24) | (byte47 << 16) | (byte48 << 8) | byte49; - final long byte50 = blocks[blocksOffset++] & 0xFF; - final long byte51 = blocks[blocksOffset++] & 0xFF; - final long byte52 = blocks[blocksOffset++] & 0xFF; - final long byte53 = blocks[blocksOffset++] & 0xFF; - final long byte54 = blocks[blocksOffset++] & 0xFF; - final long byte55 = blocks[blocksOffset++] & 0xFF; - final long byte56 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte50 << 42) | (byte51 << 34) | (byte52 << 26) | (byte53 << 18) | (byte54 << 10) | (byte55 << 2) | (byte56 >>> 6); - final long byte57 = blocks[blocksOffset++] & 0xFF; - final long byte58 = blocks[blocksOffset++] & 0xFF; - final long byte59 = blocks[blocksOffset++] & 0xFF; - final long byte60 = blocks[blocksOffset++] & 0xFF; - final long byte61 = blocks[blocksOffset++] & 0xFF; - final long byte62 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte56 & 63) << 44) | (byte57 << 36) | (byte58 << 28) | (byte59 << 20) | (byte60 << 12) | (byte61 << 4) | (byte62 >>> 4); - final long byte63 = blocks[blocksOffset++] & 0xFF; - final long byte64 = blocks[blocksOffset++] & 0xFF; - final long byte65 = blocks[blocksOffset++] & 0xFF; - final long byte66 = blocks[blocksOffset++] & 0xFF; - final long byte67 = blocks[blocksOffset++] & 0xFF; - final long byte68 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte62 & 15) << 46) | (byte63 << 38) | (byte64 << 30) | (byte65 << 22) | (byte66 << 14) | (byte67 << 6) | (byte68 >>> 2); - final long byte69 = blocks[blocksOffset++] & 0xFF; - final long byte70 = blocks[blocksOffset++] & 0xFF; - final long byte71 = blocks[blocksOffset++] & 0xFF; - final long byte72 = blocks[blocksOffset++] & 0xFF; - final long byte73 = blocks[blocksOffset++] & 0xFF; - final long byte74 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte68 & 3) << 48) | (byte69 << 40) | (byte70 << 32) | (byte71 << 24) | (byte72 << 16) | (byte73 << 8) | byte74; - final long byte75 = blocks[blocksOffset++] & 0xFF; - final long byte76 = blocks[blocksOffset++] & 0xFF; - final long byte77 = blocks[blocksOffset++] & 0xFF; - final long byte78 = blocks[blocksOffset++] & 0xFF; - final long byte79 = blocks[blocksOffset++] & 0xFF; - final long byte80 = blocks[blocksOffset++] & 0xFF; - final long byte81 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte75 << 42) | (byte76 << 34) | (byte77 << 26) | (byte78 << 18) | (byte79 << 10) | (byte80 << 2) | (byte81 >>> 6); - final long byte82 = blocks[blocksOffset++] & 0xFF; - final long byte83 = blocks[blocksOffset++] & 0xFF; - final long byte84 = blocks[blocksOffset++] & 0xFF; - final long byte85 = blocks[blocksOffset++] & 0xFF; - final long byte86 = blocks[blocksOffset++] & 0xFF; - final long byte87 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte81 & 63) << 44) | (byte82 << 36) | (byte83 << 28) | (byte84 << 20) | (byte85 << 12) | (byte86 << 4) | (byte87 >>> 4); - final long byte88 = blocks[blocksOffset++] & 0xFF; - final long byte89 = blocks[blocksOffset++] & 0xFF; - final long byte90 = blocks[blocksOffset++] & 0xFF; - final long byte91 = blocks[blocksOffset++] & 0xFF; - final long byte92 = blocks[blocksOffset++] & 0xFF; - final long byte93 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte87 & 15) << 46) | (byte88 << 38) | (byte89 << 30) | (byte90 << 22) | (byte91 << 14) | (byte92 << 6) | (byte93 >>> 2); - final long byte94 = blocks[blocksOffset++] & 0xFF; - final long byte95 = blocks[blocksOffset++] & 0xFF; - final long byte96 = blocks[blocksOffset++] & 0xFF; - final long byte97 = blocks[blocksOffset++] & 0xFF; - final long byte98 = blocks[blocksOffset++] & 0xFF; - final long byte99 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte93 & 3) << 48) | (byte94 << 40) | (byte95 << 32) | (byte96 << 24) | (byte97 << 16) | (byte98 << 8) | byte99; - final long byte100 = blocks[blocksOffset++] & 0xFF; - final long byte101 = blocks[blocksOffset++] & 0xFF; - final long byte102 = blocks[blocksOffset++] & 0xFF; - final long byte103 = blocks[blocksOffset++] & 0xFF; - final long byte104 = blocks[blocksOffset++] & 0xFF; - final long byte105 = blocks[blocksOffset++] & 0xFF; - final long byte106 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte100 << 42) | (byte101 << 34) | (byte102 << 26) | (byte103 << 18) | (byte104 << 10) | (byte105 << 2) | (byte106 >>> 6); - final long byte107 = blocks[blocksOffset++] & 0xFF; - final long byte108 = blocks[blocksOffset++] & 0xFF; - final long byte109 = blocks[blocksOffset++] & 0xFF; - final long byte110 = blocks[blocksOffset++] & 0xFF; - final long byte111 = blocks[blocksOffset++] & 0xFF; - final long byte112 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte106 & 63) << 44) | (byte107 << 36) | (byte108 << 28) | (byte109 << 20) | (byte110 << 12) | (byte111 << 4) | (byte112 >>> 4); - final long byte113 = blocks[blocksOffset++] & 0xFF; - final long byte114 = blocks[blocksOffset++] & 0xFF; - final long byte115 = blocks[blocksOffset++] & 0xFF; - final long byte116 = blocks[blocksOffset++] & 0xFF; - final long byte117 = blocks[blocksOffset++] & 0xFF; - final long byte118 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte112 & 15) << 46) | (byte113 << 38) | (byte114 << 30) | (byte115 << 22) | (byte116 << 14) | (byte117 << 6) | (byte118 >>> 2); - final long byte119 = blocks[blocksOffset++] & 0xFF; - final long byte120 = blocks[blocksOffset++] & 0xFF; - final long byte121 = blocks[blocksOffset++] & 0xFF; - final long byte122 = blocks[blocksOffset++] & 0xFF; - final long byte123 = blocks[blocksOffset++] & 0xFF; - final long byte124 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte118 & 3) << 48) | (byte119 << 40) | (byte120 << 32) | (byte121 << 24) | (byte122 << 16) | (byte123 << 8) | byte124; - final long byte125 = blocks[blocksOffset++] & 0xFF; - final long byte126 = blocks[blocksOffset++] & 0xFF; - final long byte127 = blocks[blocksOffset++] & 0xFF; - final long byte128 = blocks[blocksOffset++] & 0xFF; - final long byte129 = blocks[blocksOffset++] & 0xFF; - final long byte130 = blocks[blocksOffset++] & 0xFF; - final long byte131 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte125 << 42) | (byte126 << 34) | (byte127 << 26) | (byte128 << 18) | (byte129 << 10) | (byte130 << 2) | (byte131 >>> 6); - final long byte132 = blocks[blocksOffset++] & 0xFF; - final long byte133 = blocks[blocksOffset++] & 0xFF; - final long byte134 = blocks[blocksOffset++] & 0xFF; - final long byte135 = blocks[blocksOffset++] & 0xFF; - final long byte136 = blocks[blocksOffset++] & 0xFF; - final long byte137 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte131 & 63) << 44) | (byte132 << 36) | (byte133 << 28) | (byte134 << 20) | (byte135 << 12) | (byte136 << 4) | (byte137 >>> 4); - final long byte138 = blocks[blocksOffset++] & 0xFF; - final long byte139 = blocks[blocksOffset++] & 0xFF; - final long byte140 = blocks[blocksOffset++] & 0xFF; - final long byte141 = blocks[blocksOffset++] & 0xFF; - final long byte142 = blocks[blocksOffset++] & 0xFF; - final long byte143 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte137 & 15) << 46) | (byte138 << 38) | (byte139 << 30) | (byte140 << 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; - final long byte147 = blocks[blocksOffset++] & 0xFF; - final long byte148 = blocks[blocksOffset++] & 0xFF; - final long byte149 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte143 & 3) << 48) | (byte144 << 40) | (byte145 << 32) | (byte146 << 24) | (byte147 << 16) | (byte148 << 8) | byte149; - final long byte150 = blocks[blocksOffset++] & 0xFF; - final long byte151 = blocks[blocksOffset++] & 0xFF; - final long byte152 = blocks[blocksOffset++] & 0xFF; - final long byte153 = blocks[blocksOffset++] & 0xFF; - final long byte154 = blocks[blocksOffset++] & 0xFF; - final long byte155 = blocks[blocksOffset++] & 0xFF; - final long byte156 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte150 << 42) | (byte151 << 34) | (byte152 << 26) | (byte153 << 18) | (byte154 << 10) | (byte155 << 2) | (byte156 >>> 6); - final long byte157 = blocks[blocksOffset++] & 0xFF; - final long byte158 = blocks[blocksOffset++] & 0xFF; - final long byte159 = blocks[blocksOffset++] & 0xFF; - final long byte160 = blocks[blocksOffset++] & 0xFF; - final long byte161 = blocks[blocksOffset++] & 0xFF; - final long byte162 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte156 & 63) << 44) | (byte157 << 36) | (byte158 << 28) | (byte159 << 20) | (byte160 << 12) | (byte161 << 4) | (byte162 >>> 4); - final long byte163 = blocks[blocksOffset++] & 0xFF; - final long byte164 = blocks[blocksOffset++] & 0xFF; - final long byte165 = blocks[blocksOffset++] & 0xFF; - final long byte166 = blocks[blocksOffset++] & 0xFF; - final long byte167 = blocks[blocksOffset++] & 0xFF; - final long byte168 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte162 & 15) << 46) | (byte163 << 38) | (byte164 << 30) | (byte165 << 22) | (byte166 << 14) | (byte167 << 6) | (byte168 >>> 2); - final long byte169 = blocks[blocksOffset++] & 0xFF; - final long byte170 = blocks[blocksOffset++] & 0xFF; - final long byte171 = blocks[blocksOffset++] & 0xFF; - final long byte172 = blocks[blocksOffset++] & 0xFF; - final long byte173 = blocks[blocksOffset++] & 0xFF; - final long byte174 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte168 & 3) << 48) | (byte169 << 40) | (byte170 << 32) | (byte171 << 24) | (byte172 << 16) | (byte173 << 8) | byte174; - final long byte175 = blocks[blocksOffset++] & 0xFF; - final long byte176 = blocks[blocksOffset++] & 0xFF; - final long byte177 = blocks[blocksOffset++] & 0xFF; - final long byte178 = blocks[blocksOffset++] & 0xFF; - final long byte179 = blocks[blocksOffset++] & 0xFF; - final long byte180 = blocks[blocksOffset++] & 0xFF; - final long byte181 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte175 << 42) | (byte176 << 34) | (byte177 << 26) | (byte178 << 18) | (byte179 << 10) | (byte180 << 2) | (byte181 >>> 6); - final long byte182 = blocks[blocksOffset++] & 0xFF; - final long byte183 = blocks[blocksOffset++] & 0xFF; - final long byte184 = blocks[blocksOffset++] & 0xFF; - final long byte185 = blocks[blocksOffset++] & 0xFF; - final long byte186 = blocks[blocksOffset++] & 0xFF; - final long byte187 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte181 & 63) << 44) | (byte182 << 36) | (byte183 << 28) | (byte184 << 20) | (byte185 << 12) | (byte186 << 4) | (byte187 >>> 4); - final long byte188 = blocks[blocksOffset++] & 0xFF; - final long byte189 = blocks[blocksOffset++] & 0xFF; - final long byte190 = blocks[blocksOffset++] & 0xFF; - final long byte191 = blocks[blocksOffset++] & 0xFF; - final long byte192 = blocks[blocksOffset++] & 0xFF; - final long byte193 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte187 & 15) << 46) | (byte188 << 38) | (byte189 << 30) | (byte190 << 22) | (byte191 << 14) | (byte192 << 6) | (byte193 >>> 2); - final long byte194 = blocks[blocksOffset++] & 0xFF; - final long byte195 = blocks[blocksOffset++] & 0xFF; - final long byte196 = blocks[blocksOffset++] & 0xFF; - final long byte197 = blocks[blocksOffset++] & 0xFF; - final long byte198 = blocks[blocksOffset++] & 0xFF; - final long byte199 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte193 & 3) << 48) | (byte194 << 40) | (byte195 << 32) | (byte196 << 24) | (byte197 << 16) | (byte198 << 8) | byte199; - } - } - - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 14) | ((values[valuesOffset] & 0xffffffffL) >>> 36); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 28) | ((values[valuesOffset] & 0xffffffffL) >>> 22); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 42) | ((values[valuesOffset] & 0xffffffffL) >>> 8); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 56) | ((values[valuesOffset++] & 0xffffffffL) << 6) | ((values[valuesOffset] & 0xffffffffL) >>> 44); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 20) | ((values[valuesOffset] & 0xffffffffL) >>> 30); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 34) | ((values[valuesOffset] & 0xffffffffL) >>> 16); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 48) | ((values[valuesOffset] & 0xffffffffL) >>> 2); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 62) | ((values[valuesOffset++] & 0xffffffffL) << 12) | ((values[valuesOffset] & 0xffffffffL) >>> 38); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 26) | ((values[valuesOffset] & 0xffffffffL) >>> 24); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 40) | ((values[valuesOffset] & 0xffffffffL) >>> 10); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 54) | ((values[valuesOffset++] & 0xffffffffL) << 4) | ((values[valuesOffset] & 0xffffffffL) >>> 46); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 18) | ((values[valuesOffset] & 0xffffffffL) >>> 32); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 32) | ((values[valuesOffset] & 0xffffffffL) >>> 18); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 46) | ((values[valuesOffset] & 0xffffffffL) >>> 4); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 60) | ((values[valuesOffset++] & 0xffffffffL) << 10) | ((values[valuesOffset] & 0xffffffffL) >>> 40); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 24) | ((values[valuesOffset] & 0xffffffffL) >>> 26); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 38) | ((values[valuesOffset] & 0xffffffffL) >>> 12); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 52) | ((values[valuesOffset++] & 0xffffffffL) << 2) | ((values[valuesOffset] & 0xffffffffL) >>> 48); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 16) | ((values[valuesOffset] & 0xffffffffL) >>> 34); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 30) | ((values[valuesOffset] & 0xffffffffL) >>> 20); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 44) | ((values[valuesOffset] & 0xffffffffL) >>> 6); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 58) | ((values[valuesOffset++] & 0xffffffffL) << 8) | ((values[valuesOffset] & 0xffffffffL) >>> 42); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 22) | ((values[valuesOffset] & 0xffffffffL) >>> 28); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 36) | ((values[valuesOffset] & 0xffffffffL) >>> 14); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 50) | (values[valuesOffset++] & 0xffffffffL); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] << 14) | (values[valuesOffset] >>> 36); - blocks[blocksOffset++] = (values[valuesOffset++] << 28) | (values[valuesOffset] >>> 22); - blocks[blocksOffset++] = (values[valuesOffset++] << 42) | (values[valuesOffset] >>> 8); - blocks[blocksOffset++] = (values[valuesOffset++] << 56) | (values[valuesOffset++] << 6) | (values[valuesOffset] >>> 44); - blocks[blocksOffset++] = (values[valuesOffset++] << 20) | (values[valuesOffset] >>> 30); - blocks[blocksOffset++] = (values[valuesOffset++] << 34) | (values[valuesOffset] >>> 16); - blocks[blocksOffset++] = (values[valuesOffset++] << 48) | (values[valuesOffset] >>> 2); - blocks[blocksOffset++] = (values[valuesOffset++] << 62) | (values[valuesOffset++] << 12) | (values[valuesOffset] >>> 38); - blocks[blocksOffset++] = (values[valuesOffset++] << 26) | (values[valuesOffset] >>> 24); - blocks[blocksOffset++] = (values[valuesOffset++] << 40) | (values[valuesOffset] >>> 10); - blocks[blocksOffset++] = (values[valuesOffset++] << 54) | (values[valuesOffset++] << 4) | (values[valuesOffset] >>> 46); - blocks[blocksOffset++] = (values[valuesOffset++] << 18) | (values[valuesOffset] >>> 32); - blocks[blocksOffset++] = (values[valuesOffset++] << 32) | (values[valuesOffset] >>> 18); - blocks[blocksOffset++] = (values[valuesOffset++] << 46) | (values[valuesOffset] >>> 4); - blocks[blocksOffset++] = (values[valuesOffset++] << 60) | (values[valuesOffset++] << 10) | (values[valuesOffset] >>> 40); - blocks[blocksOffset++] = (values[valuesOffset++] << 24) | (values[valuesOffset] >>> 26); - blocks[blocksOffset++] = (values[valuesOffset++] << 38) | (values[valuesOffset] >>> 12); - blocks[blocksOffset++] = (values[valuesOffset++] << 52) | (values[valuesOffset++] << 2) | (values[valuesOffset] >>> 48); - blocks[blocksOffset++] = (values[valuesOffset++] << 16) | (values[valuesOffset] >>> 34); - blocks[blocksOffset++] = (values[valuesOffset++] << 30) | (values[valuesOffset] >>> 20); - blocks[blocksOffset++] = (values[valuesOffset++] << 44) | (values[valuesOffset] >>> 6); - blocks[blocksOffset++] = (values[valuesOffset++] << 58) | (values[valuesOffset++] << 8) | (values[valuesOffset] >>> 42); - blocks[blocksOffset++] = (values[valuesOffset++] << 22) | (values[valuesOffset] >>> 28); - blocks[blocksOffset++] = (values[valuesOffset++] << 36) | (values[valuesOffset] >>> 14); - blocks[blocksOffset++] = (values[valuesOffset++] << 50) | values[valuesOffset++]; - } - } - -} diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked51.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked51.java deleted file mode 100644 index f8a7ed8b061..00000000000 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked51.java +++ /dev/null @@ -1,767 +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 BulkOperationPacked51 extends BulkOperation { - @Override - public int blockCount() { - return 51; - } - - @Override - public int valueCount() { - return 64; - } - - @Override - public void decode(long[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) { - throw new UnsupportedOperationException(); - } - - @Override - public void decode(byte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) { - throw new UnsupportedOperationException(); - } - - @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 >>> 13; - final long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block0 & 8191L) << 38) | (block1 >>> 26); - final long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block1 & 67108863L) << 25) | (block2 >>> 39); - final long block3 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block2 & 549755813887L) << 12) | (block3 >>> 52); - values[valuesOffset++] = (block3 >>> 1) & 2251799813685247L; - final long block4 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block3 & 1L) << 50) | (block4 >>> 14); - final long block5 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block4 & 16383L) << 37) | (block5 >>> 27); - final long block6 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block5 & 134217727L) << 24) | (block6 >>> 40); - final long block7 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block6 & 1099511627775L) << 11) | (block7 >>> 53); - values[valuesOffset++] = (block7 >>> 2) & 2251799813685247L; - final long block8 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block7 & 3L) << 49) | (block8 >>> 15); - final long block9 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block8 & 32767L) << 36) | (block9 >>> 28); - final long block10 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block9 & 268435455L) << 23) | (block10 >>> 41); - final long block11 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block10 & 2199023255551L) << 10) | (block11 >>> 54); - values[valuesOffset++] = (block11 >>> 3) & 2251799813685247L; - final long block12 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block11 & 7L) << 48) | (block12 >>> 16); - final long block13 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block12 & 65535L) << 35) | (block13 >>> 29); - final long block14 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block13 & 536870911L) << 22) | (block14 >>> 42); - final long block15 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block14 & 4398046511103L) << 9) | (block15 >>> 55); - values[valuesOffset++] = (block15 >>> 4) & 2251799813685247L; - final long block16 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block15 & 15L) << 47) | (block16 >>> 17); - final long block17 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block16 & 131071L) << 34) | (block17 >>> 30); - final long block18 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block17 & 1073741823L) << 21) | (block18 >>> 43); - final long block19 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block18 & 8796093022207L) << 8) | (block19 >>> 56); - values[valuesOffset++] = (block19 >>> 5) & 2251799813685247L; - final long block20 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block19 & 31L) << 46) | (block20 >>> 18); - final long block21 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block20 & 262143L) << 33) | (block21 >>> 31); - final long block22 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block21 & 2147483647L) << 20) | (block22 >>> 44); - final long block23 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block22 & 17592186044415L) << 7) | (block23 >>> 57); - values[valuesOffset++] = (block23 >>> 6) & 2251799813685247L; - final long block24 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block23 & 63L) << 45) | (block24 >>> 19); - final long block25 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block24 & 524287L) << 32) | (block25 >>> 32); - final long block26 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block25 & 4294967295L) << 19) | (block26 >>> 45); - final long block27 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block26 & 35184372088831L) << 6) | (block27 >>> 58); - values[valuesOffset++] = (block27 >>> 7) & 2251799813685247L; - final long block28 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block27 & 127L) << 44) | (block28 >>> 20); - final long block29 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block28 & 1048575L) << 31) | (block29 >>> 33); - final long block30 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block29 & 8589934591L) << 18) | (block30 >>> 46); - final long block31 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block30 & 70368744177663L) << 5) | (block31 >>> 59); - values[valuesOffset++] = (block31 >>> 8) & 2251799813685247L; - final long block32 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block31 & 255L) << 43) | (block32 >>> 21); - final long block33 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block32 & 2097151L) << 30) | (block33 >>> 34); - final long block34 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block33 & 17179869183L) << 17) | (block34 >>> 47); - final long block35 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block34 & 140737488355327L) << 4) | (block35 >>> 60); - values[valuesOffset++] = (block35 >>> 9) & 2251799813685247L; - final long block36 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block35 & 511L) << 42) | (block36 >>> 22); - final long block37 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block36 & 4194303L) << 29) | (block37 >>> 35); - final long block38 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block37 & 34359738367L) << 16) | (block38 >>> 48); - final long block39 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block38 & 281474976710655L) << 3) | (block39 >>> 61); - values[valuesOffset++] = (block39 >>> 10) & 2251799813685247L; - final long block40 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block39 & 1023L) << 41) | (block40 >>> 23); - final long block41 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block40 & 8388607L) << 28) | (block41 >>> 36); - final long block42 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block41 & 68719476735L) << 15) | (block42 >>> 49); - final long block43 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block42 & 562949953421311L) << 2) | (block43 >>> 62); - values[valuesOffset++] = (block43 >>> 11) & 2251799813685247L; - final long block44 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block43 & 2047L) << 40) | (block44 >>> 24); - final long block45 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block44 & 16777215L) << 27) | (block45 >>> 37); - final long block46 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block45 & 137438953471L) << 14) | (block46 >>> 50); - final long block47 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block46 & 1125899906842623L) << 1) | (block47 >>> 63); - values[valuesOffset++] = (block47 >>> 12) & 2251799813685247L; - final long block48 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block47 & 4095L) << 39) | (block48 >>> 25); - final long block49 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block48 & 33554431L) << 26) | (block49 >>> 38); - final long block50 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block49 & 274877906943L) << 13) | (block50 >>> 51); - values[valuesOffset++] = block50 & 2251799813685247L; - } - } - - @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; - final long byte3 = blocks[blocksOffset++] & 0xFF; - final long byte4 = blocks[blocksOffset++] & 0xFF; - final long byte5 = blocks[blocksOffset++] & 0xFF; - final long byte6 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte0 << 43) | (byte1 << 35) | (byte2 << 27) | (byte3 << 19) | (byte4 << 11) | (byte5 << 3) | (byte6 >>> 5); - final long byte7 = blocks[blocksOffset++] & 0xFF; - final long byte8 = blocks[blocksOffset++] & 0xFF; - final long byte9 = blocks[blocksOffset++] & 0xFF; - final long byte10 = blocks[blocksOffset++] & 0xFF; - final long byte11 = blocks[blocksOffset++] & 0xFF; - final long byte12 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte6 & 31) << 46) | (byte7 << 38) | (byte8 << 30) | (byte9 << 22) | (byte10 << 14) | (byte11 << 6) | (byte12 >>> 2); - final long byte13 = blocks[blocksOffset++] & 0xFF; - final long byte14 = blocks[blocksOffset++] & 0xFF; - final long byte15 = blocks[blocksOffset++] & 0xFF; - final long byte16 = blocks[blocksOffset++] & 0xFF; - final long byte17 = blocks[blocksOffset++] & 0xFF; - final long byte18 = blocks[blocksOffset++] & 0xFF; - final long byte19 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte12 & 3) << 49) | (byte13 << 41) | (byte14 << 33) | (byte15 << 25) | (byte16 << 17) | (byte17 << 9) | (byte18 << 1) | (byte19 >>> 7); - final long byte20 = blocks[blocksOffset++] & 0xFF; - final long byte21 = blocks[blocksOffset++] & 0xFF; - final long byte22 = blocks[blocksOffset++] & 0xFF; - final long byte23 = blocks[blocksOffset++] & 0xFF; - final long byte24 = blocks[blocksOffset++] & 0xFF; - final long byte25 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte19 & 127) << 44) | (byte20 << 36) | (byte21 << 28) | (byte22 << 20) | (byte23 << 12) | (byte24 << 4) | (byte25 >>> 4); - final long byte26 = blocks[blocksOffset++] & 0xFF; - final long byte27 = blocks[blocksOffset++] & 0xFF; - final long byte28 = blocks[blocksOffset++] & 0xFF; - final long byte29 = blocks[blocksOffset++] & 0xFF; - final long byte30 = blocks[blocksOffset++] & 0xFF; - final long byte31 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte25 & 15) << 47) | (byte26 << 39) | (byte27 << 31) | (byte28 << 23) | (byte29 << 15) | (byte30 << 7) | (byte31 >>> 1); - final long byte32 = blocks[blocksOffset++] & 0xFF; - final long byte33 = blocks[blocksOffset++] & 0xFF; - final long byte34 = blocks[blocksOffset++] & 0xFF; - final long byte35 = blocks[blocksOffset++] & 0xFF; - final long byte36 = blocks[blocksOffset++] & 0xFF; - final long byte37 = blocks[blocksOffset++] & 0xFF; - final long byte38 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte31 & 1) << 50) | (byte32 << 42) | (byte33 << 34) | (byte34 << 26) | (byte35 << 18) | (byte36 << 10) | (byte37 << 2) | (byte38 >>> 6); - final long byte39 = blocks[blocksOffset++] & 0xFF; - final long byte40 = blocks[blocksOffset++] & 0xFF; - final long byte41 = blocks[blocksOffset++] & 0xFF; - final long byte42 = blocks[blocksOffset++] & 0xFF; - final long byte43 = blocks[blocksOffset++] & 0xFF; - final long byte44 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte38 & 63) << 45) | (byte39 << 37) | (byte40 << 29) | (byte41 << 21) | (byte42 << 13) | (byte43 << 5) | (byte44 >>> 3); - final long byte45 = blocks[blocksOffset++] & 0xFF; - final long byte46 = blocks[blocksOffset++] & 0xFF; - final long byte47 = blocks[blocksOffset++] & 0xFF; - final long byte48 = blocks[blocksOffset++] & 0xFF; - final long byte49 = blocks[blocksOffset++] & 0xFF; - final long byte50 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte44 & 7) << 48) | (byte45 << 40) | (byte46 << 32) | (byte47 << 24) | (byte48 << 16) | (byte49 << 8) | byte50; - final long byte51 = blocks[blocksOffset++] & 0xFF; - final long byte52 = blocks[blocksOffset++] & 0xFF; - final long byte53 = blocks[blocksOffset++] & 0xFF; - final long byte54 = blocks[blocksOffset++] & 0xFF; - final long byte55 = blocks[blocksOffset++] & 0xFF; - final long byte56 = blocks[blocksOffset++] & 0xFF; - final long byte57 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte51 << 43) | (byte52 << 35) | (byte53 << 27) | (byte54 << 19) | (byte55 << 11) | (byte56 << 3) | (byte57 >>> 5); - final long byte58 = blocks[blocksOffset++] & 0xFF; - final long byte59 = blocks[blocksOffset++] & 0xFF; - final long byte60 = blocks[blocksOffset++] & 0xFF; - final long byte61 = blocks[blocksOffset++] & 0xFF; - final long byte62 = blocks[blocksOffset++] & 0xFF; - final long byte63 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte57 & 31) << 46) | (byte58 << 38) | (byte59 << 30) | (byte60 << 22) | (byte61 << 14) | (byte62 << 6) | (byte63 >>> 2); - final long byte64 = blocks[blocksOffset++] & 0xFF; - final long byte65 = blocks[blocksOffset++] & 0xFF; - final long byte66 = blocks[blocksOffset++] & 0xFF; - final long byte67 = blocks[blocksOffset++] & 0xFF; - final long byte68 = blocks[blocksOffset++] & 0xFF; - final long byte69 = blocks[blocksOffset++] & 0xFF; - final long byte70 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte63 & 3) << 49) | (byte64 << 41) | (byte65 << 33) | (byte66 << 25) | (byte67 << 17) | (byte68 << 9) | (byte69 << 1) | (byte70 >>> 7); - final long byte71 = blocks[blocksOffset++] & 0xFF; - final long byte72 = blocks[blocksOffset++] & 0xFF; - final long byte73 = blocks[blocksOffset++] & 0xFF; - final long byte74 = blocks[blocksOffset++] & 0xFF; - final long byte75 = blocks[blocksOffset++] & 0xFF; - final long byte76 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte70 & 127) << 44) | (byte71 << 36) | (byte72 << 28) | (byte73 << 20) | (byte74 << 12) | (byte75 << 4) | (byte76 >>> 4); - final long byte77 = blocks[blocksOffset++] & 0xFF; - final long byte78 = blocks[blocksOffset++] & 0xFF; - final long byte79 = blocks[blocksOffset++] & 0xFF; - final long byte80 = blocks[blocksOffset++] & 0xFF; - final long byte81 = blocks[blocksOffset++] & 0xFF; - final long byte82 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte76 & 15) << 47) | (byte77 << 39) | (byte78 << 31) | (byte79 << 23) | (byte80 << 15) | (byte81 << 7) | (byte82 >>> 1); - final long byte83 = blocks[blocksOffset++] & 0xFF; - final long byte84 = blocks[blocksOffset++] & 0xFF; - final long byte85 = blocks[blocksOffset++] & 0xFF; - final long byte86 = blocks[blocksOffset++] & 0xFF; - final long byte87 = blocks[blocksOffset++] & 0xFF; - final long byte88 = blocks[blocksOffset++] & 0xFF; - final long byte89 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte82 & 1) << 50) | (byte83 << 42) | (byte84 << 34) | (byte85 << 26) | (byte86 << 18) | (byte87 << 10) | (byte88 << 2) | (byte89 >>> 6); - final long byte90 = blocks[blocksOffset++] & 0xFF; - final long byte91 = blocks[blocksOffset++] & 0xFF; - final long byte92 = blocks[blocksOffset++] & 0xFF; - final long byte93 = blocks[blocksOffset++] & 0xFF; - final long byte94 = blocks[blocksOffset++] & 0xFF; - final long byte95 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte89 & 63) << 45) | (byte90 << 37) | (byte91 << 29) | (byte92 << 21) | (byte93 << 13) | (byte94 << 5) | (byte95 >>> 3); - final long byte96 = blocks[blocksOffset++] & 0xFF; - final long byte97 = blocks[blocksOffset++] & 0xFF; - final long byte98 = blocks[blocksOffset++] & 0xFF; - final long byte99 = blocks[blocksOffset++] & 0xFF; - final long byte100 = blocks[blocksOffset++] & 0xFF; - final long byte101 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte95 & 7) << 48) | (byte96 << 40) | (byte97 << 32) | (byte98 << 24) | (byte99 << 16) | (byte100 << 8) | byte101; - final long byte102 = blocks[blocksOffset++] & 0xFF; - final long byte103 = blocks[blocksOffset++] & 0xFF; - final long byte104 = blocks[blocksOffset++] & 0xFF; - final long byte105 = blocks[blocksOffset++] & 0xFF; - final long byte106 = blocks[blocksOffset++] & 0xFF; - final long byte107 = blocks[blocksOffset++] & 0xFF; - final long byte108 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte102 << 43) | (byte103 << 35) | (byte104 << 27) | (byte105 << 19) | (byte106 << 11) | (byte107 << 3) | (byte108 >>> 5); - final long byte109 = blocks[blocksOffset++] & 0xFF; - final long byte110 = blocks[blocksOffset++] & 0xFF; - final long byte111 = blocks[blocksOffset++] & 0xFF; - final long byte112 = blocks[blocksOffset++] & 0xFF; - final long byte113 = blocks[blocksOffset++] & 0xFF; - final long byte114 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte108 & 31) << 46) | (byte109 << 38) | (byte110 << 30) | (byte111 << 22) | (byte112 << 14) | (byte113 << 6) | (byte114 >>> 2); - final long byte115 = blocks[blocksOffset++] & 0xFF; - final long byte116 = blocks[blocksOffset++] & 0xFF; - final long byte117 = blocks[blocksOffset++] & 0xFF; - final long byte118 = blocks[blocksOffset++] & 0xFF; - final long byte119 = blocks[blocksOffset++] & 0xFF; - final long byte120 = blocks[blocksOffset++] & 0xFF; - final long byte121 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte114 & 3) << 49) | (byte115 << 41) | (byte116 << 33) | (byte117 << 25) | (byte118 << 17) | (byte119 << 9) | (byte120 << 1) | (byte121 >>> 7); - final long byte122 = blocks[blocksOffset++] & 0xFF; - final long byte123 = blocks[blocksOffset++] & 0xFF; - final long byte124 = blocks[blocksOffset++] & 0xFF; - final long byte125 = blocks[blocksOffset++] & 0xFF; - final long byte126 = blocks[blocksOffset++] & 0xFF; - final long byte127 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte121 & 127) << 44) | (byte122 << 36) | (byte123 << 28) | (byte124 << 20) | (byte125 << 12) | (byte126 << 4) | (byte127 >>> 4); - final long byte128 = blocks[blocksOffset++] & 0xFF; - final long byte129 = blocks[blocksOffset++] & 0xFF; - final long byte130 = blocks[blocksOffset++] & 0xFF; - final long byte131 = blocks[blocksOffset++] & 0xFF; - final long byte132 = blocks[blocksOffset++] & 0xFF; - final long byte133 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte127 & 15) << 47) | (byte128 << 39) | (byte129 << 31) | (byte130 << 23) | (byte131 << 15) | (byte132 << 7) | (byte133 >>> 1); - final long byte134 = blocks[blocksOffset++] & 0xFF; - final long byte135 = blocks[blocksOffset++] & 0xFF; - final long byte136 = blocks[blocksOffset++] & 0xFF; - final long byte137 = blocks[blocksOffset++] & 0xFF; - final long byte138 = blocks[blocksOffset++] & 0xFF; - final long byte139 = blocks[blocksOffset++] & 0xFF; - final long byte140 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte133 & 1) << 50) | (byte134 << 42) | (byte135 << 34) | (byte136 << 26) | (byte137 << 18) | (byte138 << 10) | (byte139 << 2) | (byte140 >>> 6); - final long byte141 = blocks[blocksOffset++] & 0xFF; - final long byte142 = blocks[blocksOffset++] & 0xFF; - final long byte143 = blocks[blocksOffset++] & 0xFF; - final long byte144 = blocks[blocksOffset++] & 0xFF; - final long byte145 = blocks[blocksOffset++] & 0xFF; - final long byte146 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte140 & 63) << 45) | (byte141 << 37) | (byte142 << 29) | (byte143 << 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; - final long byte150 = blocks[blocksOffset++] & 0xFF; - final long byte151 = blocks[blocksOffset++] & 0xFF; - final long byte152 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte146 & 7) << 48) | (byte147 << 40) | (byte148 << 32) | (byte149 << 24) | (byte150 << 16) | (byte151 << 8) | byte152; - final long byte153 = blocks[blocksOffset++] & 0xFF; - final long byte154 = blocks[blocksOffset++] & 0xFF; - final long byte155 = blocks[blocksOffset++] & 0xFF; - final long byte156 = blocks[blocksOffset++] & 0xFF; - final long byte157 = blocks[blocksOffset++] & 0xFF; - final long byte158 = blocks[blocksOffset++] & 0xFF; - final long byte159 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte153 << 43) | (byte154 << 35) | (byte155 << 27) | (byte156 << 19) | (byte157 << 11) | (byte158 << 3) | (byte159 >>> 5); - final long byte160 = blocks[blocksOffset++] & 0xFF; - final long byte161 = blocks[blocksOffset++] & 0xFF; - final long byte162 = blocks[blocksOffset++] & 0xFF; - final long byte163 = blocks[blocksOffset++] & 0xFF; - final long byte164 = blocks[blocksOffset++] & 0xFF; - final long byte165 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte159 & 31) << 46) | (byte160 << 38) | (byte161 << 30) | (byte162 << 22) | (byte163 << 14) | (byte164 << 6) | (byte165 >>> 2); - final long byte166 = blocks[blocksOffset++] & 0xFF; - final long byte167 = blocks[blocksOffset++] & 0xFF; - final long byte168 = blocks[blocksOffset++] & 0xFF; - final long byte169 = blocks[blocksOffset++] & 0xFF; - final long byte170 = blocks[blocksOffset++] & 0xFF; - final long byte171 = blocks[blocksOffset++] & 0xFF; - final long byte172 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte165 & 3) << 49) | (byte166 << 41) | (byte167 << 33) | (byte168 << 25) | (byte169 << 17) | (byte170 << 9) | (byte171 << 1) | (byte172 >>> 7); - final long byte173 = blocks[blocksOffset++] & 0xFF; - final long byte174 = blocks[blocksOffset++] & 0xFF; - final long byte175 = blocks[blocksOffset++] & 0xFF; - final long byte176 = blocks[blocksOffset++] & 0xFF; - final long byte177 = blocks[blocksOffset++] & 0xFF; - final long byte178 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte172 & 127) << 44) | (byte173 << 36) | (byte174 << 28) | (byte175 << 20) | (byte176 << 12) | (byte177 << 4) | (byte178 >>> 4); - final long byte179 = blocks[blocksOffset++] & 0xFF; - final long byte180 = blocks[blocksOffset++] & 0xFF; - final long byte181 = blocks[blocksOffset++] & 0xFF; - final long byte182 = blocks[blocksOffset++] & 0xFF; - final long byte183 = blocks[blocksOffset++] & 0xFF; - final long byte184 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte178 & 15) << 47) | (byte179 << 39) | (byte180 << 31) | (byte181 << 23) | (byte182 << 15) | (byte183 << 7) | (byte184 >>> 1); - final long byte185 = blocks[blocksOffset++] & 0xFF; - final long byte186 = blocks[blocksOffset++] & 0xFF; - final long byte187 = blocks[blocksOffset++] & 0xFF; - final long byte188 = blocks[blocksOffset++] & 0xFF; - final long byte189 = blocks[blocksOffset++] & 0xFF; - final long byte190 = blocks[blocksOffset++] & 0xFF; - final long byte191 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte184 & 1) << 50) | (byte185 << 42) | (byte186 << 34) | (byte187 << 26) | (byte188 << 18) | (byte189 << 10) | (byte190 << 2) | (byte191 >>> 6); - final long byte192 = blocks[blocksOffset++] & 0xFF; - final long byte193 = blocks[blocksOffset++] & 0xFF; - final long byte194 = blocks[blocksOffset++] & 0xFF; - final long byte195 = blocks[blocksOffset++] & 0xFF; - final long byte196 = blocks[blocksOffset++] & 0xFF; - final long byte197 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte191 & 63) << 45) | (byte192 << 37) | (byte193 << 29) | (byte194 << 21) | (byte195 << 13) | (byte196 << 5) | (byte197 >>> 3); - final long byte198 = blocks[blocksOffset++] & 0xFF; - final long byte199 = blocks[blocksOffset++] & 0xFF; - final long byte200 = blocks[blocksOffset++] & 0xFF; - final long byte201 = blocks[blocksOffset++] & 0xFF; - final long byte202 = blocks[blocksOffset++] & 0xFF; - final long byte203 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte197 & 7) << 48) | (byte198 << 40) | (byte199 << 32) | (byte200 << 24) | (byte201 << 16) | (byte202 << 8) | byte203; - final long byte204 = blocks[blocksOffset++] & 0xFF; - final long byte205 = blocks[blocksOffset++] & 0xFF; - final long byte206 = blocks[blocksOffset++] & 0xFF; - final long byte207 = blocks[blocksOffset++] & 0xFF; - final long byte208 = blocks[blocksOffset++] & 0xFF; - final long byte209 = blocks[blocksOffset++] & 0xFF; - final long byte210 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte204 << 43) | (byte205 << 35) | (byte206 << 27) | (byte207 << 19) | (byte208 << 11) | (byte209 << 3) | (byte210 >>> 5); - final long byte211 = blocks[blocksOffset++] & 0xFF; - final long byte212 = blocks[blocksOffset++] & 0xFF; - final long byte213 = blocks[blocksOffset++] & 0xFF; - final long byte214 = blocks[blocksOffset++] & 0xFF; - final long byte215 = blocks[blocksOffset++] & 0xFF; - final long byte216 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte210 & 31) << 46) | (byte211 << 38) | (byte212 << 30) | (byte213 << 22) | (byte214 << 14) | (byte215 << 6) | (byte216 >>> 2); - final long byte217 = blocks[blocksOffset++] & 0xFF; - final long byte218 = blocks[blocksOffset++] & 0xFF; - final long byte219 = blocks[blocksOffset++] & 0xFF; - final long byte220 = blocks[blocksOffset++] & 0xFF; - final long byte221 = blocks[blocksOffset++] & 0xFF; - final long byte222 = blocks[blocksOffset++] & 0xFF; - final long byte223 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte216 & 3) << 49) | (byte217 << 41) | (byte218 << 33) | (byte219 << 25) | (byte220 << 17) | (byte221 << 9) | (byte222 << 1) | (byte223 >>> 7); - final long byte224 = blocks[blocksOffset++] & 0xFF; - final long byte225 = blocks[blocksOffset++] & 0xFF; - final long byte226 = blocks[blocksOffset++] & 0xFF; - final long byte227 = blocks[blocksOffset++] & 0xFF; - final long byte228 = blocks[blocksOffset++] & 0xFF; - final long byte229 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte223 & 127) << 44) | (byte224 << 36) | (byte225 << 28) | (byte226 << 20) | (byte227 << 12) | (byte228 << 4) | (byte229 >>> 4); - final long byte230 = blocks[blocksOffset++] & 0xFF; - final long byte231 = blocks[blocksOffset++] & 0xFF; - final long byte232 = blocks[blocksOffset++] & 0xFF; - final long byte233 = blocks[blocksOffset++] & 0xFF; - final long byte234 = blocks[blocksOffset++] & 0xFF; - final long byte235 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte229 & 15) << 47) | (byte230 << 39) | (byte231 << 31) | (byte232 << 23) | (byte233 << 15) | (byte234 << 7) | (byte235 >>> 1); - final long byte236 = blocks[blocksOffset++] & 0xFF; - final long byte237 = blocks[blocksOffset++] & 0xFF; - final long byte238 = blocks[blocksOffset++] & 0xFF; - final long byte239 = blocks[blocksOffset++] & 0xFF; - final long byte240 = blocks[blocksOffset++] & 0xFF; - final long byte241 = blocks[blocksOffset++] & 0xFF; - final long byte242 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte235 & 1) << 50) | (byte236 << 42) | (byte237 << 34) | (byte238 << 26) | (byte239 << 18) | (byte240 << 10) | (byte241 << 2) | (byte242 >>> 6); - final long byte243 = blocks[blocksOffset++] & 0xFF; - final long byte244 = blocks[blocksOffset++] & 0xFF; - final long byte245 = blocks[blocksOffset++] & 0xFF; - final long byte246 = blocks[blocksOffset++] & 0xFF; - final long byte247 = blocks[blocksOffset++] & 0xFF; - final long byte248 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte242 & 63) << 45) | (byte243 << 37) | (byte244 << 29) | (byte245 << 21) | (byte246 << 13) | (byte247 << 5) | (byte248 >>> 3); - final long byte249 = blocks[blocksOffset++] & 0xFF; - final long byte250 = blocks[blocksOffset++] & 0xFF; - final long byte251 = blocks[blocksOffset++] & 0xFF; - final long byte252 = blocks[blocksOffset++] & 0xFF; - final long byte253 = blocks[blocksOffset++] & 0xFF; - final long byte254 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte248 & 7) << 48) | (byte249 << 40) | (byte250 << 32) | (byte251 << 24) | (byte252 << 16) | (byte253 << 8) | byte254; - final long byte255 = blocks[blocksOffset++] & 0xFF; - final long byte256 = blocks[blocksOffset++] & 0xFF; - final long byte257 = blocks[blocksOffset++] & 0xFF; - final long byte258 = blocks[blocksOffset++] & 0xFF; - final long byte259 = blocks[blocksOffset++] & 0xFF; - final long byte260 = blocks[blocksOffset++] & 0xFF; - final long byte261 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte255 << 43) | (byte256 << 35) | (byte257 << 27) | (byte258 << 19) | (byte259 << 11) | (byte260 << 3) | (byte261 >>> 5); - final long byte262 = blocks[blocksOffset++] & 0xFF; - final long byte263 = blocks[blocksOffset++] & 0xFF; - final long byte264 = blocks[blocksOffset++] & 0xFF; - final long byte265 = blocks[blocksOffset++] & 0xFF; - final long byte266 = blocks[blocksOffset++] & 0xFF; - final long byte267 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte261 & 31) << 46) | (byte262 << 38) | (byte263 << 30) | (byte264 << 22) | (byte265 << 14) | (byte266 << 6) | (byte267 >>> 2); - final long byte268 = blocks[blocksOffset++] & 0xFF; - final long byte269 = blocks[blocksOffset++] & 0xFF; - final long byte270 = blocks[blocksOffset++] & 0xFF; - final long byte271 = blocks[blocksOffset++] & 0xFF; - final long byte272 = blocks[blocksOffset++] & 0xFF; - final long byte273 = blocks[blocksOffset++] & 0xFF; - final long byte274 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte267 & 3) << 49) | (byte268 << 41) | (byte269 << 33) | (byte270 << 25) | (byte271 << 17) | (byte272 << 9) | (byte273 << 1) | (byte274 >>> 7); - final long byte275 = blocks[blocksOffset++] & 0xFF; - final long byte276 = blocks[blocksOffset++] & 0xFF; - final long byte277 = blocks[blocksOffset++] & 0xFF; - final long byte278 = blocks[blocksOffset++] & 0xFF; - final long byte279 = blocks[blocksOffset++] & 0xFF; - final long byte280 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte274 & 127) << 44) | (byte275 << 36) | (byte276 << 28) | (byte277 << 20) | (byte278 << 12) | (byte279 << 4) | (byte280 >>> 4); - final long byte281 = blocks[blocksOffset++] & 0xFF; - final long byte282 = blocks[blocksOffset++] & 0xFF; - final long byte283 = blocks[blocksOffset++] & 0xFF; - final long byte284 = blocks[blocksOffset++] & 0xFF; - final long byte285 = blocks[blocksOffset++] & 0xFF; - final long byte286 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte280 & 15) << 47) | (byte281 << 39) | (byte282 << 31) | (byte283 << 23) | (byte284 << 15) | (byte285 << 7) | (byte286 >>> 1); - final long byte287 = blocks[blocksOffset++] & 0xFF; - final long byte288 = blocks[blocksOffset++] & 0xFF; - final long byte289 = blocks[blocksOffset++] & 0xFF; - final long byte290 = blocks[blocksOffset++] & 0xFF; - final long byte291 = blocks[blocksOffset++] & 0xFF; - final long byte292 = blocks[blocksOffset++] & 0xFF; - final long byte293 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte286 & 1) << 50) | (byte287 << 42) | (byte288 << 34) | (byte289 << 26) | (byte290 << 18) | (byte291 << 10) | (byte292 << 2) | (byte293 >>> 6); - final long byte294 = blocks[blocksOffset++] & 0xFF; - final long byte295 = blocks[blocksOffset++] & 0xFF; - final long byte296 = blocks[blocksOffset++] & 0xFF; - final long byte297 = blocks[blocksOffset++] & 0xFF; - final long byte298 = blocks[blocksOffset++] & 0xFF; - final long byte299 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte293 & 63) << 45) | (byte294 << 37) | (byte295 << 29) | (byte296 << 21) | (byte297 << 13) | (byte298 << 5) | (byte299 >>> 3); - final long byte300 = blocks[blocksOffset++] & 0xFF; - final long byte301 = blocks[blocksOffset++] & 0xFF; - final long byte302 = blocks[blocksOffset++] & 0xFF; - final long byte303 = blocks[blocksOffset++] & 0xFF; - final long byte304 = blocks[blocksOffset++] & 0xFF; - final long byte305 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte299 & 7) << 48) | (byte300 << 40) | (byte301 << 32) | (byte302 << 24) | (byte303 << 16) | (byte304 << 8) | byte305; - final long byte306 = blocks[blocksOffset++] & 0xFF; - final long byte307 = blocks[blocksOffset++] & 0xFF; - final long byte308 = blocks[blocksOffset++] & 0xFF; - final long byte309 = blocks[blocksOffset++] & 0xFF; - final long byte310 = blocks[blocksOffset++] & 0xFF; - final long byte311 = blocks[blocksOffset++] & 0xFF; - final long byte312 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte306 << 43) | (byte307 << 35) | (byte308 << 27) | (byte309 << 19) | (byte310 << 11) | (byte311 << 3) | (byte312 >>> 5); - final long byte313 = blocks[blocksOffset++] & 0xFF; - final long byte314 = blocks[blocksOffset++] & 0xFF; - final long byte315 = blocks[blocksOffset++] & 0xFF; - final long byte316 = blocks[blocksOffset++] & 0xFF; - final long byte317 = blocks[blocksOffset++] & 0xFF; - final long byte318 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte312 & 31) << 46) | (byte313 << 38) | (byte314 << 30) | (byte315 << 22) | (byte316 << 14) | (byte317 << 6) | (byte318 >>> 2); - final long byte319 = blocks[blocksOffset++] & 0xFF; - final long byte320 = blocks[blocksOffset++] & 0xFF; - final long byte321 = blocks[blocksOffset++] & 0xFF; - final long byte322 = blocks[blocksOffset++] & 0xFF; - final long byte323 = blocks[blocksOffset++] & 0xFF; - final long byte324 = blocks[blocksOffset++] & 0xFF; - final long byte325 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte318 & 3) << 49) | (byte319 << 41) | (byte320 << 33) | (byte321 << 25) | (byte322 << 17) | (byte323 << 9) | (byte324 << 1) | (byte325 >>> 7); - final long byte326 = blocks[blocksOffset++] & 0xFF; - final long byte327 = blocks[blocksOffset++] & 0xFF; - final long byte328 = blocks[blocksOffset++] & 0xFF; - final long byte329 = blocks[blocksOffset++] & 0xFF; - final long byte330 = blocks[blocksOffset++] & 0xFF; - final long byte331 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte325 & 127) << 44) | (byte326 << 36) | (byte327 << 28) | (byte328 << 20) | (byte329 << 12) | (byte330 << 4) | (byte331 >>> 4); - final long byte332 = blocks[blocksOffset++] & 0xFF; - final long byte333 = blocks[blocksOffset++] & 0xFF; - final long byte334 = blocks[blocksOffset++] & 0xFF; - final long byte335 = blocks[blocksOffset++] & 0xFF; - final long byte336 = blocks[blocksOffset++] & 0xFF; - final long byte337 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte331 & 15) << 47) | (byte332 << 39) | (byte333 << 31) | (byte334 << 23) | (byte335 << 15) | (byte336 << 7) | (byte337 >>> 1); - final long byte338 = blocks[blocksOffset++] & 0xFF; - final long byte339 = blocks[blocksOffset++] & 0xFF; - final long byte340 = blocks[blocksOffset++] & 0xFF; - final long byte341 = blocks[blocksOffset++] & 0xFF; - final long byte342 = blocks[blocksOffset++] & 0xFF; - final long byte343 = blocks[blocksOffset++] & 0xFF; - final long byte344 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte337 & 1) << 50) | (byte338 << 42) | (byte339 << 34) | (byte340 << 26) | (byte341 << 18) | (byte342 << 10) | (byte343 << 2) | (byte344 >>> 6); - final long byte345 = blocks[blocksOffset++] & 0xFF; - final long byte346 = blocks[blocksOffset++] & 0xFF; - final long byte347 = blocks[blocksOffset++] & 0xFF; - final long byte348 = blocks[blocksOffset++] & 0xFF; - final long byte349 = blocks[blocksOffset++] & 0xFF; - final long byte350 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte344 & 63) << 45) | (byte345 << 37) | (byte346 << 29) | (byte347 << 21) | (byte348 << 13) | (byte349 << 5) | (byte350 >>> 3); - final long byte351 = blocks[blocksOffset++] & 0xFF; - final long byte352 = blocks[blocksOffset++] & 0xFF; - final long byte353 = blocks[blocksOffset++] & 0xFF; - final long byte354 = blocks[blocksOffset++] & 0xFF; - final long byte355 = blocks[blocksOffset++] & 0xFF; - final long byte356 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte350 & 7) << 48) | (byte351 << 40) | (byte352 << 32) | (byte353 << 24) | (byte354 << 16) | (byte355 << 8) | byte356; - final long byte357 = blocks[blocksOffset++] & 0xFF; - final long byte358 = blocks[blocksOffset++] & 0xFF; - final long byte359 = blocks[blocksOffset++] & 0xFF; - final long byte360 = blocks[blocksOffset++] & 0xFF; - final long byte361 = blocks[blocksOffset++] & 0xFF; - final long byte362 = blocks[blocksOffset++] & 0xFF; - final long byte363 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte357 << 43) | (byte358 << 35) | (byte359 << 27) | (byte360 << 19) | (byte361 << 11) | (byte362 << 3) | (byte363 >>> 5); - final long byte364 = blocks[blocksOffset++] & 0xFF; - final long byte365 = blocks[blocksOffset++] & 0xFF; - final long byte366 = blocks[blocksOffset++] & 0xFF; - final long byte367 = blocks[blocksOffset++] & 0xFF; - final long byte368 = blocks[blocksOffset++] & 0xFF; - final long byte369 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte363 & 31) << 46) | (byte364 << 38) | (byte365 << 30) | (byte366 << 22) | (byte367 << 14) | (byte368 << 6) | (byte369 >>> 2); - final long byte370 = blocks[blocksOffset++] & 0xFF; - final long byte371 = blocks[blocksOffset++] & 0xFF; - final long byte372 = blocks[blocksOffset++] & 0xFF; - final long byte373 = blocks[blocksOffset++] & 0xFF; - final long byte374 = blocks[blocksOffset++] & 0xFF; - final long byte375 = blocks[blocksOffset++] & 0xFF; - final long byte376 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte369 & 3) << 49) | (byte370 << 41) | (byte371 << 33) | (byte372 << 25) | (byte373 << 17) | (byte374 << 9) | (byte375 << 1) | (byte376 >>> 7); - final long byte377 = blocks[blocksOffset++] & 0xFF; - final long byte378 = blocks[blocksOffset++] & 0xFF; - final long byte379 = blocks[blocksOffset++] & 0xFF; - final long byte380 = blocks[blocksOffset++] & 0xFF; - final long byte381 = blocks[blocksOffset++] & 0xFF; - final long byte382 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte376 & 127) << 44) | (byte377 << 36) | (byte378 << 28) | (byte379 << 20) | (byte380 << 12) | (byte381 << 4) | (byte382 >>> 4); - final long byte383 = blocks[blocksOffset++] & 0xFF; - final long byte384 = blocks[blocksOffset++] & 0xFF; - final long byte385 = blocks[blocksOffset++] & 0xFF; - final long byte386 = blocks[blocksOffset++] & 0xFF; - final long byte387 = blocks[blocksOffset++] & 0xFF; - final long byte388 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte382 & 15) << 47) | (byte383 << 39) | (byte384 << 31) | (byte385 << 23) | (byte386 << 15) | (byte387 << 7) | (byte388 >>> 1); - final long byte389 = blocks[blocksOffset++] & 0xFF; - final long byte390 = blocks[blocksOffset++] & 0xFF; - final long byte391 = blocks[blocksOffset++] & 0xFF; - final long byte392 = blocks[blocksOffset++] & 0xFF; - final long byte393 = blocks[blocksOffset++] & 0xFF; - final long byte394 = blocks[blocksOffset++] & 0xFF; - final long byte395 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte388 & 1) << 50) | (byte389 << 42) | (byte390 << 34) | (byte391 << 26) | (byte392 << 18) | (byte393 << 10) | (byte394 << 2) | (byte395 >>> 6); - final long byte396 = blocks[blocksOffset++] & 0xFF; - final long byte397 = blocks[blocksOffset++] & 0xFF; - final long byte398 = blocks[blocksOffset++] & 0xFF; - final long byte399 = blocks[blocksOffset++] & 0xFF; - final long byte400 = blocks[blocksOffset++] & 0xFF; - final long byte401 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte395 & 63) << 45) | (byte396 << 37) | (byte397 << 29) | (byte398 << 21) | (byte399 << 13) | (byte400 << 5) | (byte401 >>> 3); - final long byte402 = blocks[blocksOffset++] & 0xFF; - final long byte403 = blocks[blocksOffset++] & 0xFF; - final long byte404 = blocks[blocksOffset++] & 0xFF; - final long byte405 = blocks[blocksOffset++] & 0xFF; - final long byte406 = blocks[blocksOffset++] & 0xFF; - final long byte407 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte401 & 7) << 48) | (byte402 << 40) | (byte403 << 32) | (byte404 << 24) | (byte405 << 16) | (byte406 << 8) | byte407; - } - } - - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 13) | ((values[valuesOffset] & 0xffffffffL) >>> 38); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 26) | ((values[valuesOffset] & 0xffffffffL) >>> 25); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 39) | ((values[valuesOffset] & 0xffffffffL) >>> 12); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 52) | ((values[valuesOffset++] & 0xffffffffL) << 1) | ((values[valuesOffset] & 0xffffffffL) >>> 50); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 14) | ((values[valuesOffset] & 0xffffffffL) >>> 37); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 27) | ((values[valuesOffset] & 0xffffffffL) >>> 24); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 40) | ((values[valuesOffset] & 0xffffffffL) >>> 11); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 53) | ((values[valuesOffset++] & 0xffffffffL) << 2) | ((values[valuesOffset] & 0xffffffffL) >>> 49); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 15) | ((values[valuesOffset] & 0xffffffffL) >>> 36); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 28) | ((values[valuesOffset] & 0xffffffffL) >>> 23); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 41) | ((values[valuesOffset] & 0xffffffffL) >>> 10); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 54) | ((values[valuesOffset++] & 0xffffffffL) << 3) | ((values[valuesOffset] & 0xffffffffL) >>> 48); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 16) | ((values[valuesOffset] & 0xffffffffL) >>> 35); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 29) | ((values[valuesOffset] & 0xffffffffL) >>> 22); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 42) | ((values[valuesOffset] & 0xffffffffL) >>> 9); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 55) | ((values[valuesOffset++] & 0xffffffffL) << 4) | ((values[valuesOffset] & 0xffffffffL) >>> 47); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 17) | ((values[valuesOffset] & 0xffffffffL) >>> 34); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 30) | ((values[valuesOffset] & 0xffffffffL) >>> 21); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 43) | ((values[valuesOffset] & 0xffffffffL) >>> 8); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 56) | ((values[valuesOffset++] & 0xffffffffL) << 5) | ((values[valuesOffset] & 0xffffffffL) >>> 46); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 18) | ((values[valuesOffset] & 0xffffffffL) >>> 33); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 31) | ((values[valuesOffset] & 0xffffffffL) >>> 20); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 44) | ((values[valuesOffset] & 0xffffffffL) >>> 7); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 57) | ((values[valuesOffset++] & 0xffffffffL) << 6) | ((values[valuesOffset] & 0xffffffffL) >>> 45); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 19) | ((values[valuesOffset] & 0xffffffffL) >>> 32); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 32) | ((values[valuesOffset] & 0xffffffffL) >>> 19); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 45) | ((values[valuesOffset] & 0xffffffffL) >>> 6); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 58) | ((values[valuesOffset++] & 0xffffffffL) << 7) | ((values[valuesOffset] & 0xffffffffL) >>> 44); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 20) | ((values[valuesOffset] & 0xffffffffL) >>> 31); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 33) | ((values[valuesOffset] & 0xffffffffL) >>> 18); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 46) | ((values[valuesOffset] & 0xffffffffL) >>> 5); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 59) | ((values[valuesOffset++] & 0xffffffffL) << 8) | ((values[valuesOffset] & 0xffffffffL) >>> 43); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 21) | ((values[valuesOffset] & 0xffffffffL) >>> 30); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 34) | ((values[valuesOffset] & 0xffffffffL) >>> 17); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 47) | ((values[valuesOffset] & 0xffffffffL) >>> 4); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 60) | ((values[valuesOffset++] & 0xffffffffL) << 9) | ((values[valuesOffset] & 0xffffffffL) >>> 42); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 22) | ((values[valuesOffset] & 0xffffffffL) >>> 29); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 35) | ((values[valuesOffset] & 0xffffffffL) >>> 16); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 48) | ((values[valuesOffset] & 0xffffffffL) >>> 3); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 61) | ((values[valuesOffset++] & 0xffffffffL) << 10) | ((values[valuesOffset] & 0xffffffffL) >>> 41); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 23) | ((values[valuesOffset] & 0xffffffffL) >>> 28); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 36) | ((values[valuesOffset] & 0xffffffffL) >>> 15); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 49) | ((values[valuesOffset] & 0xffffffffL) >>> 2); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 62) | ((values[valuesOffset++] & 0xffffffffL) << 11) | ((values[valuesOffset] & 0xffffffffL) >>> 40); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 24) | ((values[valuesOffset] & 0xffffffffL) >>> 27); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 37) | ((values[valuesOffset] & 0xffffffffL) >>> 14); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 50) | ((values[valuesOffset] & 0xffffffffL) >>> 1); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 63) | ((values[valuesOffset++] & 0xffffffffL) << 12) | ((values[valuesOffset] & 0xffffffffL) >>> 39); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 25) | ((values[valuesOffset] & 0xffffffffL) >>> 26); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 38) | ((values[valuesOffset] & 0xffffffffL) >>> 13); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 51) | (values[valuesOffset++] & 0xffffffffL); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] << 13) | (values[valuesOffset] >>> 38); - blocks[blocksOffset++] = (values[valuesOffset++] << 26) | (values[valuesOffset] >>> 25); - blocks[blocksOffset++] = (values[valuesOffset++] << 39) | (values[valuesOffset] >>> 12); - blocks[blocksOffset++] = (values[valuesOffset++] << 52) | (values[valuesOffset++] << 1) | (values[valuesOffset] >>> 50); - blocks[blocksOffset++] = (values[valuesOffset++] << 14) | (values[valuesOffset] >>> 37); - blocks[blocksOffset++] = (values[valuesOffset++] << 27) | (values[valuesOffset] >>> 24); - blocks[blocksOffset++] = (values[valuesOffset++] << 40) | (values[valuesOffset] >>> 11); - blocks[blocksOffset++] = (values[valuesOffset++] << 53) | (values[valuesOffset++] << 2) | (values[valuesOffset] >>> 49); - blocks[blocksOffset++] = (values[valuesOffset++] << 15) | (values[valuesOffset] >>> 36); - blocks[blocksOffset++] = (values[valuesOffset++] << 28) | (values[valuesOffset] >>> 23); - blocks[blocksOffset++] = (values[valuesOffset++] << 41) | (values[valuesOffset] >>> 10); - blocks[blocksOffset++] = (values[valuesOffset++] << 54) | (values[valuesOffset++] << 3) | (values[valuesOffset] >>> 48); - blocks[blocksOffset++] = (values[valuesOffset++] << 16) | (values[valuesOffset] >>> 35); - blocks[blocksOffset++] = (values[valuesOffset++] << 29) | (values[valuesOffset] >>> 22); - blocks[blocksOffset++] = (values[valuesOffset++] << 42) | (values[valuesOffset] >>> 9); - blocks[blocksOffset++] = (values[valuesOffset++] << 55) | (values[valuesOffset++] << 4) | (values[valuesOffset] >>> 47); - blocks[blocksOffset++] = (values[valuesOffset++] << 17) | (values[valuesOffset] >>> 34); - blocks[blocksOffset++] = (values[valuesOffset++] << 30) | (values[valuesOffset] >>> 21); - blocks[blocksOffset++] = (values[valuesOffset++] << 43) | (values[valuesOffset] >>> 8); - blocks[blocksOffset++] = (values[valuesOffset++] << 56) | (values[valuesOffset++] << 5) | (values[valuesOffset] >>> 46); - blocks[blocksOffset++] = (values[valuesOffset++] << 18) | (values[valuesOffset] >>> 33); - blocks[blocksOffset++] = (values[valuesOffset++] << 31) | (values[valuesOffset] >>> 20); - blocks[blocksOffset++] = (values[valuesOffset++] << 44) | (values[valuesOffset] >>> 7); - blocks[blocksOffset++] = (values[valuesOffset++] << 57) | (values[valuesOffset++] << 6) | (values[valuesOffset] >>> 45); - blocks[blocksOffset++] = (values[valuesOffset++] << 19) | (values[valuesOffset] >>> 32); - blocks[blocksOffset++] = (values[valuesOffset++] << 32) | (values[valuesOffset] >>> 19); - blocks[blocksOffset++] = (values[valuesOffset++] << 45) | (values[valuesOffset] >>> 6); - blocks[blocksOffset++] = (values[valuesOffset++] << 58) | (values[valuesOffset++] << 7) | (values[valuesOffset] >>> 44); - blocks[blocksOffset++] = (values[valuesOffset++] << 20) | (values[valuesOffset] >>> 31); - blocks[blocksOffset++] = (values[valuesOffset++] << 33) | (values[valuesOffset] >>> 18); - blocks[blocksOffset++] = (values[valuesOffset++] << 46) | (values[valuesOffset] >>> 5); - blocks[blocksOffset++] = (values[valuesOffset++] << 59) | (values[valuesOffset++] << 8) | (values[valuesOffset] >>> 43); - blocks[blocksOffset++] = (values[valuesOffset++] << 21) | (values[valuesOffset] >>> 30); - blocks[blocksOffset++] = (values[valuesOffset++] << 34) | (values[valuesOffset] >>> 17); - blocks[blocksOffset++] = (values[valuesOffset++] << 47) | (values[valuesOffset] >>> 4); - blocks[blocksOffset++] = (values[valuesOffset++] << 60) | (values[valuesOffset++] << 9) | (values[valuesOffset] >>> 42); - blocks[blocksOffset++] = (values[valuesOffset++] << 22) | (values[valuesOffset] >>> 29); - blocks[blocksOffset++] = (values[valuesOffset++] << 35) | (values[valuesOffset] >>> 16); - blocks[blocksOffset++] = (values[valuesOffset++] << 48) | (values[valuesOffset] >>> 3); - blocks[blocksOffset++] = (values[valuesOffset++] << 61) | (values[valuesOffset++] << 10) | (values[valuesOffset] >>> 41); - blocks[blocksOffset++] = (values[valuesOffset++] << 23) | (values[valuesOffset] >>> 28); - blocks[blocksOffset++] = (values[valuesOffset++] << 36) | (values[valuesOffset] >>> 15); - blocks[blocksOffset++] = (values[valuesOffset++] << 49) | (values[valuesOffset] >>> 2); - blocks[blocksOffset++] = (values[valuesOffset++] << 62) | (values[valuesOffset++] << 11) | (values[valuesOffset] >>> 40); - blocks[blocksOffset++] = (values[valuesOffset++] << 24) | (values[valuesOffset] >>> 27); - blocks[blocksOffset++] = (values[valuesOffset++] << 37) | (values[valuesOffset] >>> 14); - blocks[blocksOffset++] = (values[valuesOffset++] << 50) | (values[valuesOffset] >>> 1); - blocks[blocksOffset++] = (values[valuesOffset++] << 63) | (values[valuesOffset++] << 12) | (values[valuesOffset] >>> 39); - blocks[blocksOffset++] = (values[valuesOffset++] << 25) | (values[valuesOffset] >>> 26); - blocks[blocksOffset++] = (values[valuesOffset++] << 38) | (values[valuesOffset] >>> 13); - blocks[blocksOffset++] = (values[valuesOffset++] << 51) | values[valuesOffset++]; - } - } - -} diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked52.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked52.java deleted file mode 100644 index a98984f38dc..00000000000 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked52.java +++ /dev/null @@ -1,253 +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 BulkOperationPacked52 extends BulkOperation { - @Override - public int blockCount() { - return 13; - } - - @Override - public int valueCount() { - return 16; - } - - @Override - public void decode(long[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) { - throw new UnsupportedOperationException(); - } - - @Override - public void decode(byte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) { - throw new UnsupportedOperationException(); - } - - @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 >>> 12; - final long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block0 & 4095L) << 40) | (block1 >>> 24); - final long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block1 & 16777215L) << 28) | (block2 >>> 36); - final long block3 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block2 & 68719476735L) << 16) | (block3 >>> 48); - final long block4 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block3 & 281474976710655L) << 4) | (block4 >>> 60); - values[valuesOffset++] = (block4 >>> 8) & 4503599627370495L; - final long block5 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block4 & 255L) << 44) | (block5 >>> 20); - final long block6 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block5 & 1048575L) << 32) | (block6 >>> 32); - final long block7 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block6 & 4294967295L) << 20) | (block7 >>> 44); - final long block8 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block7 & 17592186044415L) << 8) | (block8 >>> 56); - values[valuesOffset++] = (block8 >>> 4) & 4503599627370495L; - final long block9 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block8 & 15L) << 48) | (block9 >>> 16); - final long block10 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block9 & 65535L) << 36) | (block10 >>> 28); - final long block11 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block10 & 268435455L) << 24) | (block11 >>> 40); - final long block12 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block11 & 1099511627775L) << 12) | (block12 >>> 52); - values[valuesOffset++] = block12 & 4503599627370495L; - } - } - - @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; - final long byte3 = blocks[blocksOffset++] & 0xFF; - final long byte4 = blocks[blocksOffset++] & 0xFF; - final long byte5 = blocks[blocksOffset++] & 0xFF; - final long byte6 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte0 << 44) | (byte1 << 36) | (byte2 << 28) | (byte3 << 20) | (byte4 << 12) | (byte5 << 4) | (byte6 >>> 4); - final long byte7 = blocks[blocksOffset++] & 0xFF; - final long byte8 = blocks[blocksOffset++] & 0xFF; - final long byte9 = blocks[blocksOffset++] & 0xFF; - final long byte10 = blocks[blocksOffset++] & 0xFF; - final long byte11 = blocks[blocksOffset++] & 0xFF; - final long byte12 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte6 & 15) << 48) | (byte7 << 40) | (byte8 << 32) | (byte9 << 24) | (byte10 << 16) | (byte11 << 8) | byte12; - final long byte13 = blocks[blocksOffset++] & 0xFF; - final long byte14 = blocks[blocksOffset++] & 0xFF; - final long byte15 = blocks[blocksOffset++] & 0xFF; - final long byte16 = blocks[blocksOffset++] & 0xFF; - final long byte17 = blocks[blocksOffset++] & 0xFF; - final long byte18 = blocks[blocksOffset++] & 0xFF; - final long byte19 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte13 << 44) | (byte14 << 36) | (byte15 << 28) | (byte16 << 20) | (byte17 << 12) | (byte18 << 4) | (byte19 >>> 4); - final long byte20 = blocks[blocksOffset++] & 0xFF; - final long byte21 = blocks[blocksOffset++] & 0xFF; - final long byte22 = blocks[blocksOffset++] & 0xFF; - final long byte23 = blocks[blocksOffset++] & 0xFF; - final long byte24 = blocks[blocksOffset++] & 0xFF; - final long byte25 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte19 & 15) << 48) | (byte20 << 40) | (byte21 << 32) | (byte22 << 24) | (byte23 << 16) | (byte24 << 8) | byte25; - final long byte26 = blocks[blocksOffset++] & 0xFF; - final long byte27 = blocks[blocksOffset++] & 0xFF; - final long byte28 = blocks[blocksOffset++] & 0xFF; - final long byte29 = blocks[blocksOffset++] & 0xFF; - final long byte30 = blocks[blocksOffset++] & 0xFF; - final long byte31 = blocks[blocksOffset++] & 0xFF; - final long byte32 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte26 << 44) | (byte27 << 36) | (byte28 << 28) | (byte29 << 20) | (byte30 << 12) | (byte31 << 4) | (byte32 >>> 4); - final long byte33 = blocks[blocksOffset++] & 0xFF; - final long byte34 = blocks[blocksOffset++] & 0xFF; - final long byte35 = blocks[blocksOffset++] & 0xFF; - final long byte36 = blocks[blocksOffset++] & 0xFF; - final long byte37 = blocks[blocksOffset++] & 0xFF; - final long byte38 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte32 & 15) << 48) | (byte33 << 40) | (byte34 << 32) | (byte35 << 24) | (byte36 << 16) | (byte37 << 8) | byte38; - final long byte39 = blocks[blocksOffset++] & 0xFF; - final long byte40 = blocks[blocksOffset++] & 0xFF; - final long byte41 = blocks[blocksOffset++] & 0xFF; - final long byte42 = blocks[blocksOffset++] & 0xFF; - final long byte43 = blocks[blocksOffset++] & 0xFF; - final long byte44 = blocks[blocksOffset++] & 0xFF; - final long byte45 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte39 << 44) | (byte40 << 36) | (byte41 << 28) | (byte42 << 20) | (byte43 << 12) | (byte44 << 4) | (byte45 >>> 4); - final long byte46 = blocks[blocksOffset++] & 0xFF; - final long byte47 = blocks[blocksOffset++] & 0xFF; - final long byte48 = blocks[blocksOffset++] & 0xFF; - final long byte49 = blocks[blocksOffset++] & 0xFF; - final long byte50 = blocks[blocksOffset++] & 0xFF; - final long byte51 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte45 & 15) << 48) | (byte46 << 40) | (byte47 << 32) | (byte48 << 24) | (byte49 << 16) | (byte50 << 8) | byte51; - final long byte52 = blocks[blocksOffset++] & 0xFF; - final long byte53 = blocks[blocksOffset++] & 0xFF; - final long byte54 = blocks[blocksOffset++] & 0xFF; - final long byte55 = blocks[blocksOffset++] & 0xFF; - final long byte56 = blocks[blocksOffset++] & 0xFF; - final long byte57 = blocks[blocksOffset++] & 0xFF; - final long byte58 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte52 << 44) | (byte53 << 36) | (byte54 << 28) | (byte55 << 20) | (byte56 << 12) | (byte57 << 4) | (byte58 >>> 4); - final long byte59 = blocks[blocksOffset++] & 0xFF; - final long byte60 = blocks[blocksOffset++] & 0xFF; - final long byte61 = blocks[blocksOffset++] & 0xFF; - final long byte62 = blocks[blocksOffset++] & 0xFF; - final long byte63 = blocks[blocksOffset++] & 0xFF; - final long byte64 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte58 & 15) << 48) | (byte59 << 40) | (byte60 << 32) | (byte61 << 24) | (byte62 << 16) | (byte63 << 8) | byte64; - final long byte65 = blocks[blocksOffset++] & 0xFF; - final long byte66 = blocks[blocksOffset++] & 0xFF; - final long byte67 = blocks[blocksOffset++] & 0xFF; - final long byte68 = blocks[blocksOffset++] & 0xFF; - final long byte69 = blocks[blocksOffset++] & 0xFF; - final long byte70 = blocks[blocksOffset++] & 0xFF; - final long byte71 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte65 << 44) | (byte66 << 36) | (byte67 << 28) | (byte68 << 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; - final long byte75 = blocks[blocksOffset++] & 0xFF; - final long byte76 = blocks[blocksOffset++] & 0xFF; - final long byte77 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte71 & 15) << 48) | (byte72 << 40) | (byte73 << 32) | (byte74 << 24) | (byte75 << 16) | (byte76 << 8) | byte77; - final long byte78 = blocks[blocksOffset++] & 0xFF; - final long byte79 = blocks[blocksOffset++] & 0xFF; - final long byte80 = blocks[blocksOffset++] & 0xFF; - final long byte81 = blocks[blocksOffset++] & 0xFF; - final long byte82 = blocks[blocksOffset++] & 0xFF; - final long byte83 = blocks[blocksOffset++] & 0xFF; - final long byte84 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte78 << 44) | (byte79 << 36) | (byte80 << 28) | (byte81 << 20) | (byte82 << 12) | (byte83 << 4) | (byte84 >>> 4); - final long byte85 = blocks[blocksOffset++] & 0xFF; - final long byte86 = blocks[blocksOffset++] & 0xFF; - final long byte87 = blocks[blocksOffset++] & 0xFF; - final long byte88 = blocks[blocksOffset++] & 0xFF; - final long byte89 = blocks[blocksOffset++] & 0xFF; - final long byte90 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte84 & 15) << 48) | (byte85 << 40) | (byte86 << 32) | (byte87 << 24) | (byte88 << 16) | (byte89 << 8) | byte90; - final long byte91 = blocks[blocksOffset++] & 0xFF; - final long byte92 = blocks[blocksOffset++] & 0xFF; - final long byte93 = blocks[blocksOffset++] & 0xFF; - final long byte94 = blocks[blocksOffset++] & 0xFF; - final long byte95 = blocks[blocksOffset++] & 0xFF; - final long byte96 = blocks[blocksOffset++] & 0xFF; - final long byte97 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte91 << 44) | (byte92 << 36) | (byte93 << 28) | (byte94 << 20) | (byte95 << 12) | (byte96 << 4) | (byte97 >>> 4); - final long byte98 = blocks[blocksOffset++] & 0xFF; - final long byte99 = blocks[blocksOffset++] & 0xFF; - final long byte100 = blocks[blocksOffset++] & 0xFF; - final long byte101 = blocks[blocksOffset++] & 0xFF; - final long byte102 = blocks[blocksOffset++] & 0xFF; - final long byte103 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte97 & 15) << 48) | (byte98 << 40) | (byte99 << 32) | (byte100 << 24) | (byte101 << 16) | (byte102 << 8) | byte103; - } - } - - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 12) | ((values[valuesOffset] & 0xffffffffL) >>> 40); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 24) | ((values[valuesOffset] & 0xffffffffL) >>> 28); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 36) | ((values[valuesOffset] & 0xffffffffL) >>> 16); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 48) | ((values[valuesOffset] & 0xffffffffL) >>> 4); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 60) | ((values[valuesOffset++] & 0xffffffffL) << 8) | ((values[valuesOffset] & 0xffffffffL) >>> 44); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 20) | ((values[valuesOffset] & 0xffffffffL) >>> 32); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 32) | ((values[valuesOffset] & 0xffffffffL) >>> 20); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 44) | ((values[valuesOffset] & 0xffffffffL) >>> 8); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 56) | ((values[valuesOffset++] & 0xffffffffL) << 4) | ((values[valuesOffset] & 0xffffffffL) >>> 48); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 16) | ((values[valuesOffset] & 0xffffffffL) >>> 36); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 28) | ((values[valuesOffset] & 0xffffffffL) >>> 24); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 40) | ((values[valuesOffset] & 0xffffffffL) >>> 12); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 52) | (values[valuesOffset++] & 0xffffffffL); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] << 12) | (values[valuesOffset] >>> 40); - blocks[blocksOffset++] = (values[valuesOffset++] << 24) | (values[valuesOffset] >>> 28); - blocks[blocksOffset++] = (values[valuesOffset++] << 36) | (values[valuesOffset] >>> 16); - blocks[blocksOffset++] = (values[valuesOffset++] << 48) | (values[valuesOffset] >>> 4); - blocks[blocksOffset++] = (values[valuesOffset++] << 60) | (values[valuesOffset++] << 8) | (values[valuesOffset] >>> 44); - blocks[blocksOffset++] = (values[valuesOffset++] << 20) | (values[valuesOffset] >>> 32); - blocks[blocksOffset++] = (values[valuesOffset++] << 32) | (values[valuesOffset] >>> 20); - blocks[blocksOffset++] = (values[valuesOffset++] << 44) | (values[valuesOffset] >>> 8); - blocks[blocksOffset++] = (values[valuesOffset++] << 56) | (values[valuesOffset++] << 4) | (values[valuesOffset] >>> 48); - blocks[blocksOffset++] = (values[valuesOffset++] << 16) | (values[valuesOffset] >>> 36); - blocks[blocksOffset++] = (values[valuesOffset++] << 28) | (values[valuesOffset] >>> 24); - blocks[blocksOffset++] = (values[valuesOffset++] << 40) | (values[valuesOffset] >>> 12); - blocks[blocksOffset++] = (values[valuesOffset++] << 52) | values[valuesOffset++]; - } - } - -} diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked53.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked53.java deleted file mode 100644 index 4cd1844ed2c..00000000000 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked53.java +++ /dev/null @@ -1,789 +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 BulkOperationPacked53 extends BulkOperation { - @Override - public int blockCount() { - return 53; - } - - @Override - public int valueCount() { - return 64; - } - - @Override - public void decode(long[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) { - throw new UnsupportedOperationException(); - } - - @Override - public void decode(byte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) { - throw new UnsupportedOperationException(); - } - - @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 >>> 11; - final long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block0 & 2047L) << 42) | (block1 >>> 22); - final long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block1 & 4194303L) << 31) | (block2 >>> 33); - final long block3 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block2 & 8589934591L) << 20) | (block3 >>> 44); - final long block4 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block3 & 17592186044415L) << 9) | (block4 >>> 55); - values[valuesOffset++] = (block4 >>> 2) & 9007199254740991L; - final long block5 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block4 & 3L) << 51) | (block5 >>> 13); - final long block6 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block5 & 8191L) << 40) | (block6 >>> 24); - final long block7 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block6 & 16777215L) << 29) | (block7 >>> 35); - final long block8 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block7 & 34359738367L) << 18) | (block8 >>> 46); - final long block9 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block8 & 70368744177663L) << 7) | (block9 >>> 57); - values[valuesOffset++] = (block9 >>> 4) & 9007199254740991L; - final long block10 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block9 & 15L) << 49) | (block10 >>> 15); - final long block11 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block10 & 32767L) << 38) | (block11 >>> 26); - final long block12 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block11 & 67108863L) << 27) | (block12 >>> 37); - final long block13 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block12 & 137438953471L) << 16) | (block13 >>> 48); - final long block14 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block13 & 281474976710655L) << 5) | (block14 >>> 59); - values[valuesOffset++] = (block14 >>> 6) & 9007199254740991L; - final long block15 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block14 & 63L) << 47) | (block15 >>> 17); - final long block16 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block15 & 131071L) << 36) | (block16 >>> 28); - final long block17 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block16 & 268435455L) << 25) | (block17 >>> 39); - final long block18 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block17 & 549755813887L) << 14) | (block18 >>> 50); - final long block19 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block18 & 1125899906842623L) << 3) | (block19 >>> 61); - values[valuesOffset++] = (block19 >>> 8) & 9007199254740991L; - final long block20 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block19 & 255L) << 45) | (block20 >>> 19); - final long block21 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block20 & 524287L) << 34) | (block21 >>> 30); - final long block22 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block21 & 1073741823L) << 23) | (block22 >>> 41); - final long block23 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block22 & 2199023255551L) << 12) | (block23 >>> 52); - final long block24 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block23 & 4503599627370495L) << 1) | (block24 >>> 63); - values[valuesOffset++] = (block24 >>> 10) & 9007199254740991L; - final long block25 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block24 & 1023L) << 43) | (block25 >>> 21); - final long block26 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block25 & 2097151L) << 32) | (block26 >>> 32); - final long block27 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block26 & 4294967295L) << 21) | (block27 >>> 43); - final long block28 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block27 & 8796093022207L) << 10) | (block28 >>> 54); - values[valuesOffset++] = (block28 >>> 1) & 9007199254740991L; - final long block29 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block28 & 1L) << 52) | (block29 >>> 12); - final long block30 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block29 & 4095L) << 41) | (block30 >>> 23); - final long block31 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block30 & 8388607L) << 30) | (block31 >>> 34); - final long block32 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block31 & 17179869183L) << 19) | (block32 >>> 45); - final long block33 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block32 & 35184372088831L) << 8) | (block33 >>> 56); - values[valuesOffset++] = (block33 >>> 3) & 9007199254740991L; - final long block34 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block33 & 7L) << 50) | (block34 >>> 14); - final long block35 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block34 & 16383L) << 39) | (block35 >>> 25); - final long block36 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block35 & 33554431L) << 28) | (block36 >>> 36); - final long block37 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block36 & 68719476735L) << 17) | (block37 >>> 47); - final long block38 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block37 & 140737488355327L) << 6) | (block38 >>> 58); - values[valuesOffset++] = (block38 >>> 5) & 9007199254740991L; - final long block39 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block38 & 31L) << 48) | (block39 >>> 16); - final long block40 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block39 & 65535L) << 37) | (block40 >>> 27); - final long block41 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block40 & 134217727L) << 26) | (block41 >>> 38); - final long block42 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block41 & 274877906943L) << 15) | (block42 >>> 49); - final long block43 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block42 & 562949953421311L) << 4) | (block43 >>> 60); - values[valuesOffset++] = (block43 >>> 7) & 9007199254740991L; - final long block44 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block43 & 127L) << 46) | (block44 >>> 18); - final long block45 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block44 & 262143L) << 35) | (block45 >>> 29); - final long block46 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block45 & 536870911L) << 24) | (block46 >>> 40); - final long block47 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block46 & 1099511627775L) << 13) | (block47 >>> 51); - final long block48 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block47 & 2251799813685247L) << 2) | (block48 >>> 62); - values[valuesOffset++] = (block48 >>> 9) & 9007199254740991L; - final long block49 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block48 & 511L) << 44) | (block49 >>> 20); - final long block50 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block49 & 1048575L) << 33) | (block50 >>> 31); - final long block51 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block50 & 2147483647L) << 22) | (block51 >>> 42); - final long block52 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block51 & 4398046511103L) << 11) | (block52 >>> 53); - values[valuesOffset++] = block52 & 9007199254740991L; - } - } - - @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; - final long byte3 = blocks[blocksOffset++] & 0xFF; - final long byte4 = blocks[blocksOffset++] & 0xFF; - final long byte5 = blocks[blocksOffset++] & 0xFF; - final long byte6 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte0 << 45) | (byte1 << 37) | (byte2 << 29) | (byte3 << 21) | (byte4 << 13) | (byte5 << 5) | (byte6 >>> 3); - final long byte7 = blocks[blocksOffset++] & 0xFF; - final long byte8 = blocks[blocksOffset++] & 0xFF; - final long byte9 = blocks[blocksOffset++] & 0xFF; - final long byte10 = blocks[blocksOffset++] & 0xFF; - final long byte11 = blocks[blocksOffset++] & 0xFF; - final long byte12 = blocks[blocksOffset++] & 0xFF; - final long byte13 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte6 & 7) << 50) | (byte7 << 42) | (byte8 << 34) | (byte9 << 26) | (byte10 << 18) | (byte11 << 10) | (byte12 << 2) | (byte13 >>> 6); - final long byte14 = blocks[blocksOffset++] & 0xFF; - final long byte15 = blocks[blocksOffset++] & 0xFF; - final long byte16 = blocks[blocksOffset++] & 0xFF; - final long byte17 = blocks[blocksOffset++] & 0xFF; - final long byte18 = blocks[blocksOffset++] & 0xFF; - final long byte19 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte13 & 63) << 47) | (byte14 << 39) | (byte15 << 31) | (byte16 << 23) | (byte17 << 15) | (byte18 << 7) | (byte19 >>> 1); - final long byte20 = blocks[blocksOffset++] & 0xFF; - final long byte21 = blocks[blocksOffset++] & 0xFF; - final long byte22 = blocks[blocksOffset++] & 0xFF; - final long byte23 = blocks[blocksOffset++] & 0xFF; - final long byte24 = blocks[blocksOffset++] & 0xFF; - final long byte25 = blocks[blocksOffset++] & 0xFF; - final long byte26 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte19 & 1) << 52) | (byte20 << 44) | (byte21 << 36) | (byte22 << 28) | (byte23 << 20) | (byte24 << 12) | (byte25 << 4) | (byte26 >>> 4); - final long byte27 = blocks[blocksOffset++] & 0xFF; - final long byte28 = blocks[blocksOffset++] & 0xFF; - final long byte29 = blocks[blocksOffset++] & 0xFF; - final long byte30 = blocks[blocksOffset++] & 0xFF; - final long byte31 = blocks[blocksOffset++] & 0xFF; - final long byte32 = blocks[blocksOffset++] & 0xFF; - final long byte33 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte26 & 15) << 49) | (byte27 << 41) | (byte28 << 33) | (byte29 << 25) | (byte30 << 17) | (byte31 << 9) | (byte32 << 1) | (byte33 >>> 7); - final long byte34 = blocks[blocksOffset++] & 0xFF; - final long byte35 = blocks[blocksOffset++] & 0xFF; - final long byte36 = blocks[blocksOffset++] & 0xFF; - final long byte37 = blocks[blocksOffset++] & 0xFF; - final long byte38 = blocks[blocksOffset++] & 0xFF; - final long byte39 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte33 & 127) << 46) | (byte34 << 38) | (byte35 << 30) | (byte36 << 22) | (byte37 << 14) | (byte38 << 6) | (byte39 >>> 2); - final long byte40 = blocks[blocksOffset++] & 0xFF; - final long byte41 = blocks[blocksOffset++] & 0xFF; - final long byte42 = blocks[blocksOffset++] & 0xFF; - final long byte43 = blocks[blocksOffset++] & 0xFF; - final long byte44 = blocks[blocksOffset++] & 0xFF; - final long byte45 = blocks[blocksOffset++] & 0xFF; - final long byte46 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte39 & 3) << 51) | (byte40 << 43) | (byte41 << 35) | (byte42 << 27) | (byte43 << 19) | (byte44 << 11) | (byte45 << 3) | (byte46 >>> 5); - final long byte47 = blocks[blocksOffset++] & 0xFF; - final long byte48 = blocks[blocksOffset++] & 0xFF; - final long byte49 = blocks[blocksOffset++] & 0xFF; - final long byte50 = blocks[blocksOffset++] & 0xFF; - final long byte51 = blocks[blocksOffset++] & 0xFF; - final long byte52 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte46 & 31) << 48) | (byte47 << 40) | (byte48 << 32) | (byte49 << 24) | (byte50 << 16) | (byte51 << 8) | byte52; - final long byte53 = blocks[blocksOffset++] & 0xFF; - final long byte54 = blocks[blocksOffset++] & 0xFF; - final long byte55 = blocks[blocksOffset++] & 0xFF; - final long byte56 = blocks[blocksOffset++] & 0xFF; - final long byte57 = blocks[blocksOffset++] & 0xFF; - final long byte58 = blocks[blocksOffset++] & 0xFF; - final long byte59 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte53 << 45) | (byte54 << 37) | (byte55 << 29) | (byte56 << 21) | (byte57 << 13) | (byte58 << 5) | (byte59 >>> 3); - final long byte60 = blocks[blocksOffset++] & 0xFF; - final long byte61 = blocks[blocksOffset++] & 0xFF; - final long byte62 = blocks[blocksOffset++] & 0xFF; - final long byte63 = blocks[blocksOffset++] & 0xFF; - final long byte64 = blocks[blocksOffset++] & 0xFF; - final long byte65 = blocks[blocksOffset++] & 0xFF; - final long byte66 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte59 & 7) << 50) | (byte60 << 42) | (byte61 << 34) | (byte62 << 26) | (byte63 << 18) | (byte64 << 10) | (byte65 << 2) | (byte66 >>> 6); - final long byte67 = blocks[blocksOffset++] & 0xFF; - final long byte68 = blocks[blocksOffset++] & 0xFF; - final long byte69 = blocks[blocksOffset++] & 0xFF; - final long byte70 = blocks[blocksOffset++] & 0xFF; - final long byte71 = blocks[blocksOffset++] & 0xFF; - final long byte72 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte66 & 63) << 47) | (byte67 << 39) | (byte68 << 31) | (byte69 << 23) | (byte70 << 15) | (byte71 << 7) | (byte72 >>> 1); - final long byte73 = blocks[blocksOffset++] & 0xFF; - final long byte74 = blocks[blocksOffset++] & 0xFF; - final long byte75 = blocks[blocksOffset++] & 0xFF; - final long byte76 = blocks[blocksOffset++] & 0xFF; - final long byte77 = blocks[blocksOffset++] & 0xFF; - final long byte78 = blocks[blocksOffset++] & 0xFF; - final long byte79 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte72 & 1) << 52) | (byte73 << 44) | (byte74 << 36) | (byte75 << 28) | (byte76 << 20) | (byte77 << 12) | (byte78 << 4) | (byte79 >>> 4); - final long byte80 = blocks[blocksOffset++] & 0xFF; - final long byte81 = blocks[blocksOffset++] & 0xFF; - final long byte82 = blocks[blocksOffset++] & 0xFF; - final long byte83 = blocks[blocksOffset++] & 0xFF; - final long byte84 = blocks[blocksOffset++] & 0xFF; - final long byte85 = blocks[blocksOffset++] & 0xFF; - final long byte86 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte79 & 15) << 49) | (byte80 << 41) | (byte81 << 33) | (byte82 << 25) | (byte83 << 17) | (byte84 << 9) | (byte85 << 1) | (byte86 >>> 7); - final long byte87 = blocks[blocksOffset++] & 0xFF; - final long byte88 = blocks[blocksOffset++] & 0xFF; - final long byte89 = blocks[blocksOffset++] & 0xFF; - final long byte90 = blocks[blocksOffset++] & 0xFF; - final long byte91 = blocks[blocksOffset++] & 0xFF; - final long byte92 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte86 & 127) << 46) | (byte87 << 38) | (byte88 << 30) | (byte89 << 22) | (byte90 << 14) | (byte91 << 6) | (byte92 >>> 2); - final long byte93 = blocks[blocksOffset++] & 0xFF; - final long byte94 = blocks[blocksOffset++] & 0xFF; - final long byte95 = blocks[blocksOffset++] & 0xFF; - final long byte96 = blocks[blocksOffset++] & 0xFF; - final long byte97 = blocks[blocksOffset++] & 0xFF; - final long byte98 = blocks[blocksOffset++] & 0xFF; - final long byte99 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte92 & 3) << 51) | (byte93 << 43) | (byte94 << 35) | (byte95 << 27) | (byte96 << 19) | (byte97 << 11) | (byte98 << 3) | (byte99 >>> 5); - final long byte100 = blocks[blocksOffset++] & 0xFF; - final long byte101 = blocks[blocksOffset++] & 0xFF; - final long byte102 = blocks[blocksOffset++] & 0xFF; - final long byte103 = blocks[blocksOffset++] & 0xFF; - final long byte104 = blocks[blocksOffset++] & 0xFF; - final long byte105 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte99 & 31) << 48) | (byte100 << 40) | (byte101 << 32) | (byte102 << 24) | (byte103 << 16) | (byte104 << 8) | byte105; - final long byte106 = blocks[blocksOffset++] & 0xFF; - final long byte107 = blocks[blocksOffset++] & 0xFF; - final long byte108 = blocks[blocksOffset++] & 0xFF; - final long byte109 = blocks[blocksOffset++] & 0xFF; - final long byte110 = blocks[blocksOffset++] & 0xFF; - final long byte111 = blocks[blocksOffset++] & 0xFF; - final long byte112 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte106 << 45) | (byte107 << 37) | (byte108 << 29) | (byte109 << 21) | (byte110 << 13) | (byte111 << 5) | (byte112 >>> 3); - final long byte113 = blocks[blocksOffset++] & 0xFF; - final long byte114 = blocks[blocksOffset++] & 0xFF; - final long byte115 = blocks[blocksOffset++] & 0xFF; - final long byte116 = blocks[blocksOffset++] & 0xFF; - final long byte117 = blocks[blocksOffset++] & 0xFF; - final long byte118 = blocks[blocksOffset++] & 0xFF; - final long byte119 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte112 & 7) << 50) | (byte113 << 42) | (byte114 << 34) | (byte115 << 26) | (byte116 << 18) | (byte117 << 10) | (byte118 << 2) | (byte119 >>> 6); - final long byte120 = blocks[blocksOffset++] & 0xFF; - final long byte121 = blocks[blocksOffset++] & 0xFF; - final long byte122 = blocks[blocksOffset++] & 0xFF; - final long byte123 = blocks[blocksOffset++] & 0xFF; - final long byte124 = blocks[blocksOffset++] & 0xFF; - final long byte125 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte119 & 63) << 47) | (byte120 << 39) | (byte121 << 31) | (byte122 << 23) | (byte123 << 15) | (byte124 << 7) | (byte125 >>> 1); - final long byte126 = blocks[blocksOffset++] & 0xFF; - final long byte127 = blocks[blocksOffset++] & 0xFF; - final long byte128 = blocks[blocksOffset++] & 0xFF; - final long byte129 = blocks[blocksOffset++] & 0xFF; - final long byte130 = blocks[blocksOffset++] & 0xFF; - final long byte131 = blocks[blocksOffset++] & 0xFF; - final long byte132 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte125 & 1) << 52) | (byte126 << 44) | (byte127 << 36) | (byte128 << 28) | (byte129 << 20) | (byte130 << 12) | (byte131 << 4) | (byte132 >>> 4); - final long byte133 = blocks[blocksOffset++] & 0xFF; - final long byte134 = blocks[blocksOffset++] & 0xFF; - final long byte135 = blocks[blocksOffset++] & 0xFF; - final long byte136 = blocks[blocksOffset++] & 0xFF; - final long byte137 = blocks[blocksOffset++] & 0xFF; - final long byte138 = blocks[blocksOffset++] & 0xFF; - final long byte139 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte132 & 15) << 49) | (byte133 << 41) | (byte134 << 33) | (byte135 << 25) | (byte136 << 17) | (byte137 << 9) | (byte138 << 1) | (byte139 >>> 7); - final long byte140 = blocks[blocksOffset++] & 0xFF; - final long byte141 = blocks[blocksOffset++] & 0xFF; - final long byte142 = blocks[blocksOffset++] & 0xFF; - final long byte143 = blocks[blocksOffset++] & 0xFF; - final long byte144 = blocks[blocksOffset++] & 0xFF; - final long byte145 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte139 & 127) << 46) | (byte140 << 38) | (byte141 << 30) | (byte142 << 22) | (byte143 << 14) | (byte144 << 6) | (byte145 >>> 2); - final long byte146 = blocks[blocksOffset++] & 0xFF; - final long byte147 = blocks[blocksOffset++] & 0xFF; - final long byte148 = blocks[blocksOffset++] & 0xFF; - final long byte149 = blocks[blocksOffset++] & 0xFF; - final long byte150 = blocks[blocksOffset++] & 0xFF; - final long byte151 = blocks[blocksOffset++] & 0xFF; - final long byte152 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte145 & 3) << 51) | (byte146 << 43) | (byte147 << 35) | (byte148 << 27) | (byte149 << 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; - final long byte156 = blocks[blocksOffset++] & 0xFF; - final long byte157 = blocks[blocksOffset++] & 0xFF; - final long byte158 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte152 & 31) << 48) | (byte153 << 40) | (byte154 << 32) | (byte155 << 24) | (byte156 << 16) | (byte157 << 8) | byte158; - final long byte159 = blocks[blocksOffset++] & 0xFF; - final long byte160 = blocks[blocksOffset++] & 0xFF; - final long byte161 = blocks[blocksOffset++] & 0xFF; - final long byte162 = blocks[blocksOffset++] & 0xFF; - final long byte163 = blocks[blocksOffset++] & 0xFF; - final long byte164 = blocks[blocksOffset++] & 0xFF; - final long byte165 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte159 << 45) | (byte160 << 37) | (byte161 << 29) | (byte162 << 21) | (byte163 << 13) | (byte164 << 5) | (byte165 >>> 3); - final long byte166 = blocks[blocksOffset++] & 0xFF; - final long byte167 = blocks[blocksOffset++] & 0xFF; - final long byte168 = blocks[blocksOffset++] & 0xFF; - final long byte169 = blocks[blocksOffset++] & 0xFF; - final long byte170 = blocks[blocksOffset++] & 0xFF; - final long byte171 = blocks[blocksOffset++] & 0xFF; - final long byte172 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte165 & 7) << 50) | (byte166 << 42) | (byte167 << 34) | (byte168 << 26) | (byte169 << 18) | (byte170 << 10) | (byte171 << 2) | (byte172 >>> 6); - final long byte173 = blocks[blocksOffset++] & 0xFF; - final long byte174 = blocks[blocksOffset++] & 0xFF; - final long byte175 = blocks[blocksOffset++] & 0xFF; - final long byte176 = blocks[blocksOffset++] & 0xFF; - final long byte177 = blocks[blocksOffset++] & 0xFF; - final long byte178 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte172 & 63) << 47) | (byte173 << 39) | (byte174 << 31) | (byte175 << 23) | (byte176 << 15) | (byte177 << 7) | (byte178 >>> 1); - final long byte179 = blocks[blocksOffset++] & 0xFF; - final long byte180 = blocks[blocksOffset++] & 0xFF; - final long byte181 = blocks[blocksOffset++] & 0xFF; - final long byte182 = blocks[blocksOffset++] & 0xFF; - final long byte183 = blocks[blocksOffset++] & 0xFF; - final long byte184 = blocks[blocksOffset++] & 0xFF; - final long byte185 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte178 & 1) << 52) | (byte179 << 44) | (byte180 << 36) | (byte181 << 28) | (byte182 << 20) | (byte183 << 12) | (byte184 << 4) | (byte185 >>> 4); - final long byte186 = blocks[blocksOffset++] & 0xFF; - final long byte187 = blocks[blocksOffset++] & 0xFF; - final long byte188 = blocks[blocksOffset++] & 0xFF; - final long byte189 = blocks[blocksOffset++] & 0xFF; - final long byte190 = blocks[blocksOffset++] & 0xFF; - final long byte191 = blocks[blocksOffset++] & 0xFF; - final long byte192 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte185 & 15) << 49) | (byte186 << 41) | (byte187 << 33) | (byte188 << 25) | (byte189 << 17) | (byte190 << 9) | (byte191 << 1) | (byte192 >>> 7); - final long byte193 = blocks[blocksOffset++] & 0xFF; - final long byte194 = blocks[blocksOffset++] & 0xFF; - final long byte195 = blocks[blocksOffset++] & 0xFF; - final long byte196 = blocks[blocksOffset++] & 0xFF; - final long byte197 = blocks[blocksOffset++] & 0xFF; - final long byte198 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte192 & 127) << 46) | (byte193 << 38) | (byte194 << 30) | (byte195 << 22) | (byte196 << 14) | (byte197 << 6) | (byte198 >>> 2); - final long byte199 = blocks[blocksOffset++] & 0xFF; - final long byte200 = blocks[blocksOffset++] & 0xFF; - final long byte201 = blocks[blocksOffset++] & 0xFF; - final long byte202 = blocks[blocksOffset++] & 0xFF; - final long byte203 = blocks[blocksOffset++] & 0xFF; - final long byte204 = blocks[blocksOffset++] & 0xFF; - final long byte205 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte198 & 3) << 51) | (byte199 << 43) | (byte200 << 35) | (byte201 << 27) | (byte202 << 19) | (byte203 << 11) | (byte204 << 3) | (byte205 >>> 5); - final long byte206 = blocks[blocksOffset++] & 0xFF; - final long byte207 = blocks[blocksOffset++] & 0xFF; - final long byte208 = blocks[blocksOffset++] & 0xFF; - final long byte209 = blocks[blocksOffset++] & 0xFF; - final long byte210 = blocks[blocksOffset++] & 0xFF; - final long byte211 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte205 & 31) << 48) | (byte206 << 40) | (byte207 << 32) | (byte208 << 24) | (byte209 << 16) | (byte210 << 8) | byte211; - final long byte212 = blocks[blocksOffset++] & 0xFF; - final long byte213 = blocks[blocksOffset++] & 0xFF; - final long byte214 = blocks[blocksOffset++] & 0xFF; - final long byte215 = blocks[blocksOffset++] & 0xFF; - final long byte216 = blocks[blocksOffset++] & 0xFF; - final long byte217 = blocks[blocksOffset++] & 0xFF; - final long byte218 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte212 << 45) | (byte213 << 37) | (byte214 << 29) | (byte215 << 21) | (byte216 << 13) | (byte217 << 5) | (byte218 >>> 3); - final long byte219 = blocks[blocksOffset++] & 0xFF; - final long byte220 = blocks[blocksOffset++] & 0xFF; - final long byte221 = blocks[blocksOffset++] & 0xFF; - final long byte222 = blocks[blocksOffset++] & 0xFF; - final long byte223 = blocks[blocksOffset++] & 0xFF; - final long byte224 = blocks[blocksOffset++] & 0xFF; - final long byte225 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte218 & 7) << 50) | (byte219 << 42) | (byte220 << 34) | (byte221 << 26) | (byte222 << 18) | (byte223 << 10) | (byte224 << 2) | (byte225 >>> 6); - final long byte226 = blocks[blocksOffset++] & 0xFF; - final long byte227 = blocks[blocksOffset++] & 0xFF; - final long byte228 = blocks[blocksOffset++] & 0xFF; - final long byte229 = blocks[blocksOffset++] & 0xFF; - final long byte230 = blocks[blocksOffset++] & 0xFF; - final long byte231 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte225 & 63) << 47) | (byte226 << 39) | (byte227 << 31) | (byte228 << 23) | (byte229 << 15) | (byte230 << 7) | (byte231 >>> 1); - final long byte232 = blocks[blocksOffset++] & 0xFF; - final long byte233 = blocks[blocksOffset++] & 0xFF; - final long byte234 = blocks[blocksOffset++] & 0xFF; - final long byte235 = blocks[blocksOffset++] & 0xFF; - final long byte236 = blocks[blocksOffset++] & 0xFF; - final long byte237 = blocks[blocksOffset++] & 0xFF; - final long byte238 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte231 & 1) << 52) | (byte232 << 44) | (byte233 << 36) | (byte234 << 28) | (byte235 << 20) | (byte236 << 12) | (byte237 << 4) | (byte238 >>> 4); - final long byte239 = blocks[blocksOffset++] & 0xFF; - final long byte240 = blocks[blocksOffset++] & 0xFF; - final long byte241 = blocks[blocksOffset++] & 0xFF; - final long byte242 = blocks[blocksOffset++] & 0xFF; - final long byte243 = blocks[blocksOffset++] & 0xFF; - final long byte244 = blocks[blocksOffset++] & 0xFF; - final long byte245 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte238 & 15) << 49) | (byte239 << 41) | (byte240 << 33) | (byte241 << 25) | (byte242 << 17) | (byte243 << 9) | (byte244 << 1) | (byte245 >>> 7); - final long byte246 = blocks[blocksOffset++] & 0xFF; - final long byte247 = blocks[blocksOffset++] & 0xFF; - final long byte248 = blocks[blocksOffset++] & 0xFF; - final long byte249 = blocks[blocksOffset++] & 0xFF; - final long byte250 = blocks[blocksOffset++] & 0xFF; - final long byte251 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte245 & 127) << 46) | (byte246 << 38) | (byte247 << 30) | (byte248 << 22) | (byte249 << 14) | (byte250 << 6) | (byte251 >>> 2); - final long byte252 = blocks[blocksOffset++] & 0xFF; - final long byte253 = blocks[blocksOffset++] & 0xFF; - final long byte254 = blocks[blocksOffset++] & 0xFF; - final long byte255 = blocks[blocksOffset++] & 0xFF; - final long byte256 = blocks[blocksOffset++] & 0xFF; - final long byte257 = blocks[blocksOffset++] & 0xFF; - final long byte258 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte251 & 3) << 51) | (byte252 << 43) | (byte253 << 35) | (byte254 << 27) | (byte255 << 19) | (byte256 << 11) | (byte257 << 3) | (byte258 >>> 5); - final long byte259 = blocks[blocksOffset++] & 0xFF; - final long byte260 = blocks[blocksOffset++] & 0xFF; - final long byte261 = blocks[blocksOffset++] & 0xFF; - final long byte262 = blocks[blocksOffset++] & 0xFF; - final long byte263 = blocks[blocksOffset++] & 0xFF; - final long byte264 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte258 & 31) << 48) | (byte259 << 40) | (byte260 << 32) | (byte261 << 24) | (byte262 << 16) | (byte263 << 8) | byte264; - final long byte265 = blocks[blocksOffset++] & 0xFF; - final long byte266 = blocks[blocksOffset++] & 0xFF; - final long byte267 = blocks[blocksOffset++] & 0xFF; - final long byte268 = blocks[blocksOffset++] & 0xFF; - final long byte269 = blocks[blocksOffset++] & 0xFF; - final long byte270 = blocks[blocksOffset++] & 0xFF; - final long byte271 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte265 << 45) | (byte266 << 37) | (byte267 << 29) | (byte268 << 21) | (byte269 << 13) | (byte270 << 5) | (byte271 >>> 3); - final long byte272 = blocks[blocksOffset++] & 0xFF; - final long byte273 = blocks[blocksOffset++] & 0xFF; - final long byte274 = blocks[blocksOffset++] & 0xFF; - final long byte275 = blocks[blocksOffset++] & 0xFF; - final long byte276 = blocks[blocksOffset++] & 0xFF; - final long byte277 = blocks[blocksOffset++] & 0xFF; - final long byte278 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte271 & 7) << 50) | (byte272 << 42) | (byte273 << 34) | (byte274 << 26) | (byte275 << 18) | (byte276 << 10) | (byte277 << 2) | (byte278 >>> 6); - final long byte279 = blocks[blocksOffset++] & 0xFF; - final long byte280 = blocks[blocksOffset++] & 0xFF; - final long byte281 = blocks[blocksOffset++] & 0xFF; - final long byte282 = blocks[blocksOffset++] & 0xFF; - final long byte283 = blocks[blocksOffset++] & 0xFF; - final long byte284 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte278 & 63) << 47) | (byte279 << 39) | (byte280 << 31) | (byte281 << 23) | (byte282 << 15) | (byte283 << 7) | (byte284 >>> 1); - final long byte285 = blocks[blocksOffset++] & 0xFF; - final long byte286 = blocks[blocksOffset++] & 0xFF; - final long byte287 = blocks[blocksOffset++] & 0xFF; - final long byte288 = blocks[blocksOffset++] & 0xFF; - final long byte289 = blocks[blocksOffset++] & 0xFF; - final long byte290 = blocks[blocksOffset++] & 0xFF; - final long byte291 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte284 & 1) << 52) | (byte285 << 44) | (byte286 << 36) | (byte287 << 28) | (byte288 << 20) | (byte289 << 12) | (byte290 << 4) | (byte291 >>> 4); - final long byte292 = blocks[blocksOffset++] & 0xFF; - final long byte293 = blocks[blocksOffset++] & 0xFF; - final long byte294 = blocks[blocksOffset++] & 0xFF; - final long byte295 = blocks[blocksOffset++] & 0xFF; - final long byte296 = blocks[blocksOffset++] & 0xFF; - final long byte297 = blocks[blocksOffset++] & 0xFF; - final long byte298 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte291 & 15) << 49) | (byte292 << 41) | (byte293 << 33) | (byte294 << 25) | (byte295 << 17) | (byte296 << 9) | (byte297 << 1) | (byte298 >>> 7); - final long byte299 = blocks[blocksOffset++] & 0xFF; - final long byte300 = blocks[blocksOffset++] & 0xFF; - final long byte301 = blocks[blocksOffset++] & 0xFF; - final long byte302 = blocks[blocksOffset++] & 0xFF; - final long byte303 = blocks[blocksOffset++] & 0xFF; - final long byte304 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte298 & 127) << 46) | (byte299 << 38) | (byte300 << 30) | (byte301 << 22) | (byte302 << 14) | (byte303 << 6) | (byte304 >>> 2); - final long byte305 = blocks[blocksOffset++] & 0xFF; - final long byte306 = blocks[blocksOffset++] & 0xFF; - final long byte307 = blocks[blocksOffset++] & 0xFF; - final long byte308 = blocks[blocksOffset++] & 0xFF; - final long byte309 = blocks[blocksOffset++] & 0xFF; - final long byte310 = blocks[blocksOffset++] & 0xFF; - final long byte311 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte304 & 3) << 51) | (byte305 << 43) | (byte306 << 35) | (byte307 << 27) | (byte308 << 19) | (byte309 << 11) | (byte310 << 3) | (byte311 >>> 5); - final long byte312 = blocks[blocksOffset++] & 0xFF; - final long byte313 = blocks[blocksOffset++] & 0xFF; - final long byte314 = blocks[blocksOffset++] & 0xFF; - final long byte315 = blocks[blocksOffset++] & 0xFF; - final long byte316 = blocks[blocksOffset++] & 0xFF; - final long byte317 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte311 & 31) << 48) | (byte312 << 40) | (byte313 << 32) | (byte314 << 24) | (byte315 << 16) | (byte316 << 8) | byte317; - final long byte318 = blocks[blocksOffset++] & 0xFF; - final long byte319 = blocks[blocksOffset++] & 0xFF; - final long byte320 = blocks[blocksOffset++] & 0xFF; - final long byte321 = blocks[blocksOffset++] & 0xFF; - final long byte322 = blocks[blocksOffset++] & 0xFF; - final long byte323 = blocks[blocksOffset++] & 0xFF; - final long byte324 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte318 << 45) | (byte319 << 37) | (byte320 << 29) | (byte321 << 21) | (byte322 << 13) | (byte323 << 5) | (byte324 >>> 3); - final long byte325 = blocks[blocksOffset++] & 0xFF; - final long byte326 = blocks[blocksOffset++] & 0xFF; - final long byte327 = blocks[blocksOffset++] & 0xFF; - final long byte328 = blocks[blocksOffset++] & 0xFF; - final long byte329 = blocks[blocksOffset++] & 0xFF; - final long byte330 = blocks[blocksOffset++] & 0xFF; - final long byte331 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte324 & 7) << 50) | (byte325 << 42) | (byte326 << 34) | (byte327 << 26) | (byte328 << 18) | (byte329 << 10) | (byte330 << 2) | (byte331 >>> 6); - final long byte332 = blocks[blocksOffset++] & 0xFF; - final long byte333 = blocks[blocksOffset++] & 0xFF; - final long byte334 = blocks[blocksOffset++] & 0xFF; - final long byte335 = blocks[blocksOffset++] & 0xFF; - final long byte336 = blocks[blocksOffset++] & 0xFF; - final long byte337 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte331 & 63) << 47) | (byte332 << 39) | (byte333 << 31) | (byte334 << 23) | (byte335 << 15) | (byte336 << 7) | (byte337 >>> 1); - final long byte338 = blocks[blocksOffset++] & 0xFF; - final long byte339 = blocks[blocksOffset++] & 0xFF; - final long byte340 = blocks[blocksOffset++] & 0xFF; - final long byte341 = blocks[blocksOffset++] & 0xFF; - final long byte342 = blocks[blocksOffset++] & 0xFF; - final long byte343 = blocks[blocksOffset++] & 0xFF; - final long byte344 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte337 & 1) << 52) | (byte338 << 44) | (byte339 << 36) | (byte340 << 28) | (byte341 << 20) | (byte342 << 12) | (byte343 << 4) | (byte344 >>> 4); - final long byte345 = blocks[blocksOffset++] & 0xFF; - final long byte346 = blocks[blocksOffset++] & 0xFF; - final long byte347 = blocks[blocksOffset++] & 0xFF; - final long byte348 = blocks[blocksOffset++] & 0xFF; - final long byte349 = blocks[blocksOffset++] & 0xFF; - final long byte350 = blocks[blocksOffset++] & 0xFF; - final long byte351 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte344 & 15) << 49) | (byte345 << 41) | (byte346 << 33) | (byte347 << 25) | (byte348 << 17) | (byte349 << 9) | (byte350 << 1) | (byte351 >>> 7); - final long byte352 = blocks[blocksOffset++] & 0xFF; - final long byte353 = blocks[blocksOffset++] & 0xFF; - final long byte354 = blocks[blocksOffset++] & 0xFF; - final long byte355 = blocks[blocksOffset++] & 0xFF; - final long byte356 = blocks[blocksOffset++] & 0xFF; - final long byte357 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte351 & 127) << 46) | (byte352 << 38) | (byte353 << 30) | (byte354 << 22) | (byte355 << 14) | (byte356 << 6) | (byte357 >>> 2); - final long byte358 = blocks[blocksOffset++] & 0xFF; - final long byte359 = blocks[blocksOffset++] & 0xFF; - final long byte360 = blocks[blocksOffset++] & 0xFF; - final long byte361 = blocks[blocksOffset++] & 0xFF; - final long byte362 = blocks[blocksOffset++] & 0xFF; - final long byte363 = blocks[blocksOffset++] & 0xFF; - final long byte364 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte357 & 3) << 51) | (byte358 << 43) | (byte359 << 35) | (byte360 << 27) | (byte361 << 19) | (byte362 << 11) | (byte363 << 3) | (byte364 >>> 5); - final long byte365 = blocks[blocksOffset++] & 0xFF; - final long byte366 = blocks[blocksOffset++] & 0xFF; - final long byte367 = blocks[blocksOffset++] & 0xFF; - final long byte368 = blocks[blocksOffset++] & 0xFF; - final long byte369 = blocks[blocksOffset++] & 0xFF; - final long byte370 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte364 & 31) << 48) | (byte365 << 40) | (byte366 << 32) | (byte367 << 24) | (byte368 << 16) | (byte369 << 8) | byte370; - final long byte371 = blocks[blocksOffset++] & 0xFF; - final long byte372 = blocks[blocksOffset++] & 0xFF; - final long byte373 = blocks[blocksOffset++] & 0xFF; - final long byte374 = blocks[blocksOffset++] & 0xFF; - final long byte375 = blocks[blocksOffset++] & 0xFF; - final long byte376 = blocks[blocksOffset++] & 0xFF; - final long byte377 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte371 << 45) | (byte372 << 37) | (byte373 << 29) | (byte374 << 21) | (byte375 << 13) | (byte376 << 5) | (byte377 >>> 3); - final long byte378 = blocks[blocksOffset++] & 0xFF; - final long byte379 = blocks[blocksOffset++] & 0xFF; - final long byte380 = blocks[blocksOffset++] & 0xFF; - final long byte381 = blocks[blocksOffset++] & 0xFF; - final long byte382 = blocks[blocksOffset++] & 0xFF; - final long byte383 = blocks[blocksOffset++] & 0xFF; - final long byte384 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte377 & 7) << 50) | (byte378 << 42) | (byte379 << 34) | (byte380 << 26) | (byte381 << 18) | (byte382 << 10) | (byte383 << 2) | (byte384 >>> 6); - final long byte385 = blocks[blocksOffset++] & 0xFF; - final long byte386 = blocks[blocksOffset++] & 0xFF; - final long byte387 = blocks[blocksOffset++] & 0xFF; - final long byte388 = blocks[blocksOffset++] & 0xFF; - final long byte389 = blocks[blocksOffset++] & 0xFF; - final long byte390 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte384 & 63) << 47) | (byte385 << 39) | (byte386 << 31) | (byte387 << 23) | (byte388 << 15) | (byte389 << 7) | (byte390 >>> 1); - final long byte391 = blocks[blocksOffset++] & 0xFF; - final long byte392 = blocks[blocksOffset++] & 0xFF; - final long byte393 = blocks[blocksOffset++] & 0xFF; - final long byte394 = blocks[blocksOffset++] & 0xFF; - final long byte395 = blocks[blocksOffset++] & 0xFF; - final long byte396 = blocks[blocksOffset++] & 0xFF; - final long byte397 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte390 & 1) << 52) | (byte391 << 44) | (byte392 << 36) | (byte393 << 28) | (byte394 << 20) | (byte395 << 12) | (byte396 << 4) | (byte397 >>> 4); - final long byte398 = blocks[blocksOffset++] & 0xFF; - final long byte399 = blocks[blocksOffset++] & 0xFF; - final long byte400 = blocks[blocksOffset++] & 0xFF; - final long byte401 = blocks[blocksOffset++] & 0xFF; - final long byte402 = blocks[blocksOffset++] & 0xFF; - final long byte403 = blocks[blocksOffset++] & 0xFF; - final long byte404 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte397 & 15) << 49) | (byte398 << 41) | (byte399 << 33) | (byte400 << 25) | (byte401 << 17) | (byte402 << 9) | (byte403 << 1) | (byte404 >>> 7); - final long byte405 = blocks[blocksOffset++] & 0xFF; - final long byte406 = blocks[blocksOffset++] & 0xFF; - final long byte407 = blocks[blocksOffset++] & 0xFF; - final long byte408 = blocks[blocksOffset++] & 0xFF; - final long byte409 = blocks[blocksOffset++] & 0xFF; - final long byte410 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte404 & 127) << 46) | (byte405 << 38) | (byte406 << 30) | (byte407 << 22) | (byte408 << 14) | (byte409 << 6) | (byte410 >>> 2); - final long byte411 = blocks[blocksOffset++] & 0xFF; - final long byte412 = blocks[blocksOffset++] & 0xFF; - final long byte413 = blocks[blocksOffset++] & 0xFF; - final long byte414 = blocks[blocksOffset++] & 0xFF; - final long byte415 = blocks[blocksOffset++] & 0xFF; - final long byte416 = blocks[blocksOffset++] & 0xFF; - final long byte417 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte410 & 3) << 51) | (byte411 << 43) | (byte412 << 35) | (byte413 << 27) | (byte414 << 19) | (byte415 << 11) | (byte416 << 3) | (byte417 >>> 5); - final long byte418 = blocks[blocksOffset++] & 0xFF; - final long byte419 = blocks[blocksOffset++] & 0xFF; - final long byte420 = blocks[blocksOffset++] & 0xFF; - final long byte421 = blocks[blocksOffset++] & 0xFF; - final long byte422 = blocks[blocksOffset++] & 0xFF; - final long byte423 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte417 & 31) << 48) | (byte418 << 40) | (byte419 << 32) | (byte420 << 24) | (byte421 << 16) | (byte422 << 8) | byte423; - } - } - - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 11) | ((values[valuesOffset] & 0xffffffffL) >>> 42); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 22) | ((values[valuesOffset] & 0xffffffffL) >>> 31); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 33) | ((values[valuesOffset] & 0xffffffffL) >>> 20); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 44) | ((values[valuesOffset] & 0xffffffffL) >>> 9); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 55) | ((values[valuesOffset++] & 0xffffffffL) << 2) | ((values[valuesOffset] & 0xffffffffL) >>> 51); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 13) | ((values[valuesOffset] & 0xffffffffL) >>> 40); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 24) | ((values[valuesOffset] & 0xffffffffL) >>> 29); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 35) | ((values[valuesOffset] & 0xffffffffL) >>> 18); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 46) | ((values[valuesOffset] & 0xffffffffL) >>> 7); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 57) | ((values[valuesOffset++] & 0xffffffffL) << 4) | ((values[valuesOffset] & 0xffffffffL) >>> 49); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 15) | ((values[valuesOffset] & 0xffffffffL) >>> 38); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 26) | ((values[valuesOffset] & 0xffffffffL) >>> 27); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 37) | ((values[valuesOffset] & 0xffffffffL) >>> 16); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 48) | ((values[valuesOffset] & 0xffffffffL) >>> 5); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 59) | ((values[valuesOffset++] & 0xffffffffL) << 6) | ((values[valuesOffset] & 0xffffffffL) >>> 47); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 17) | ((values[valuesOffset] & 0xffffffffL) >>> 36); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 28) | ((values[valuesOffset] & 0xffffffffL) >>> 25); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 39) | ((values[valuesOffset] & 0xffffffffL) >>> 14); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 50) | ((values[valuesOffset] & 0xffffffffL) >>> 3); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 61) | ((values[valuesOffset++] & 0xffffffffL) << 8) | ((values[valuesOffset] & 0xffffffffL) >>> 45); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 19) | ((values[valuesOffset] & 0xffffffffL) >>> 34); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 30) | ((values[valuesOffset] & 0xffffffffL) >>> 23); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 41) | ((values[valuesOffset] & 0xffffffffL) >>> 12); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 52) | ((values[valuesOffset] & 0xffffffffL) >>> 1); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 63) | ((values[valuesOffset++] & 0xffffffffL) << 10) | ((values[valuesOffset] & 0xffffffffL) >>> 43); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 21) | ((values[valuesOffset] & 0xffffffffL) >>> 32); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 32) | ((values[valuesOffset] & 0xffffffffL) >>> 21); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 43) | ((values[valuesOffset] & 0xffffffffL) >>> 10); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 54) | ((values[valuesOffset++] & 0xffffffffL) << 1) | ((values[valuesOffset] & 0xffffffffL) >>> 52); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 12) | ((values[valuesOffset] & 0xffffffffL) >>> 41); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 23) | ((values[valuesOffset] & 0xffffffffL) >>> 30); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 34) | ((values[valuesOffset] & 0xffffffffL) >>> 19); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 45) | ((values[valuesOffset] & 0xffffffffL) >>> 8); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 56) | ((values[valuesOffset++] & 0xffffffffL) << 3) | ((values[valuesOffset] & 0xffffffffL) >>> 50); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 14) | ((values[valuesOffset] & 0xffffffffL) >>> 39); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 25) | ((values[valuesOffset] & 0xffffffffL) >>> 28); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 36) | ((values[valuesOffset] & 0xffffffffL) >>> 17); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 47) | ((values[valuesOffset] & 0xffffffffL) >>> 6); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 58) | ((values[valuesOffset++] & 0xffffffffL) << 5) | ((values[valuesOffset] & 0xffffffffL) >>> 48); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 16) | ((values[valuesOffset] & 0xffffffffL) >>> 37); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 27) | ((values[valuesOffset] & 0xffffffffL) >>> 26); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 38) | ((values[valuesOffset] & 0xffffffffL) >>> 15); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 49) | ((values[valuesOffset] & 0xffffffffL) >>> 4); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 60) | ((values[valuesOffset++] & 0xffffffffL) << 7) | ((values[valuesOffset] & 0xffffffffL) >>> 46); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 18) | ((values[valuesOffset] & 0xffffffffL) >>> 35); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 29) | ((values[valuesOffset] & 0xffffffffL) >>> 24); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 40) | ((values[valuesOffset] & 0xffffffffL) >>> 13); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 51) | ((values[valuesOffset] & 0xffffffffL) >>> 2); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 62) | ((values[valuesOffset++] & 0xffffffffL) << 9) | ((values[valuesOffset] & 0xffffffffL) >>> 44); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 20) | ((values[valuesOffset] & 0xffffffffL) >>> 33); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 31) | ((values[valuesOffset] & 0xffffffffL) >>> 22); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 42) | ((values[valuesOffset] & 0xffffffffL) >>> 11); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 53) | (values[valuesOffset++] & 0xffffffffL); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] << 11) | (values[valuesOffset] >>> 42); - blocks[blocksOffset++] = (values[valuesOffset++] << 22) | (values[valuesOffset] >>> 31); - blocks[blocksOffset++] = (values[valuesOffset++] << 33) | (values[valuesOffset] >>> 20); - blocks[blocksOffset++] = (values[valuesOffset++] << 44) | (values[valuesOffset] >>> 9); - blocks[blocksOffset++] = (values[valuesOffset++] << 55) | (values[valuesOffset++] << 2) | (values[valuesOffset] >>> 51); - blocks[blocksOffset++] = (values[valuesOffset++] << 13) | (values[valuesOffset] >>> 40); - blocks[blocksOffset++] = (values[valuesOffset++] << 24) | (values[valuesOffset] >>> 29); - blocks[blocksOffset++] = (values[valuesOffset++] << 35) | (values[valuesOffset] >>> 18); - blocks[blocksOffset++] = (values[valuesOffset++] << 46) | (values[valuesOffset] >>> 7); - blocks[blocksOffset++] = (values[valuesOffset++] << 57) | (values[valuesOffset++] << 4) | (values[valuesOffset] >>> 49); - blocks[blocksOffset++] = (values[valuesOffset++] << 15) | (values[valuesOffset] >>> 38); - blocks[blocksOffset++] = (values[valuesOffset++] << 26) | (values[valuesOffset] >>> 27); - blocks[blocksOffset++] = (values[valuesOffset++] << 37) | (values[valuesOffset] >>> 16); - blocks[blocksOffset++] = (values[valuesOffset++] << 48) | (values[valuesOffset] >>> 5); - blocks[blocksOffset++] = (values[valuesOffset++] << 59) | (values[valuesOffset++] << 6) | (values[valuesOffset] >>> 47); - blocks[blocksOffset++] = (values[valuesOffset++] << 17) | (values[valuesOffset] >>> 36); - blocks[blocksOffset++] = (values[valuesOffset++] << 28) | (values[valuesOffset] >>> 25); - blocks[blocksOffset++] = (values[valuesOffset++] << 39) | (values[valuesOffset] >>> 14); - blocks[blocksOffset++] = (values[valuesOffset++] << 50) | (values[valuesOffset] >>> 3); - blocks[blocksOffset++] = (values[valuesOffset++] << 61) | (values[valuesOffset++] << 8) | (values[valuesOffset] >>> 45); - blocks[blocksOffset++] = (values[valuesOffset++] << 19) | (values[valuesOffset] >>> 34); - blocks[blocksOffset++] = (values[valuesOffset++] << 30) | (values[valuesOffset] >>> 23); - blocks[blocksOffset++] = (values[valuesOffset++] << 41) | (values[valuesOffset] >>> 12); - blocks[blocksOffset++] = (values[valuesOffset++] << 52) | (values[valuesOffset] >>> 1); - blocks[blocksOffset++] = (values[valuesOffset++] << 63) | (values[valuesOffset++] << 10) | (values[valuesOffset] >>> 43); - blocks[blocksOffset++] = (values[valuesOffset++] << 21) | (values[valuesOffset] >>> 32); - blocks[blocksOffset++] = (values[valuesOffset++] << 32) | (values[valuesOffset] >>> 21); - blocks[blocksOffset++] = (values[valuesOffset++] << 43) | (values[valuesOffset] >>> 10); - blocks[blocksOffset++] = (values[valuesOffset++] << 54) | (values[valuesOffset++] << 1) | (values[valuesOffset] >>> 52); - blocks[blocksOffset++] = (values[valuesOffset++] << 12) | (values[valuesOffset] >>> 41); - blocks[blocksOffset++] = (values[valuesOffset++] << 23) | (values[valuesOffset] >>> 30); - blocks[blocksOffset++] = (values[valuesOffset++] << 34) | (values[valuesOffset] >>> 19); - blocks[blocksOffset++] = (values[valuesOffset++] << 45) | (values[valuesOffset] >>> 8); - blocks[blocksOffset++] = (values[valuesOffset++] << 56) | (values[valuesOffset++] << 3) | (values[valuesOffset] >>> 50); - blocks[blocksOffset++] = (values[valuesOffset++] << 14) | (values[valuesOffset] >>> 39); - blocks[blocksOffset++] = (values[valuesOffset++] << 25) | (values[valuesOffset] >>> 28); - blocks[blocksOffset++] = (values[valuesOffset++] << 36) | (values[valuesOffset] >>> 17); - blocks[blocksOffset++] = (values[valuesOffset++] << 47) | (values[valuesOffset] >>> 6); - blocks[blocksOffset++] = (values[valuesOffset++] << 58) | (values[valuesOffset++] << 5) | (values[valuesOffset] >>> 48); - blocks[blocksOffset++] = (values[valuesOffset++] << 16) | (values[valuesOffset] >>> 37); - blocks[blocksOffset++] = (values[valuesOffset++] << 27) | (values[valuesOffset] >>> 26); - blocks[blocksOffset++] = (values[valuesOffset++] << 38) | (values[valuesOffset] >>> 15); - blocks[blocksOffset++] = (values[valuesOffset++] << 49) | (values[valuesOffset] >>> 4); - blocks[blocksOffset++] = (values[valuesOffset++] << 60) | (values[valuesOffset++] << 7) | (values[valuesOffset] >>> 46); - blocks[blocksOffset++] = (values[valuesOffset++] << 18) | (values[valuesOffset] >>> 35); - blocks[blocksOffset++] = (values[valuesOffset++] << 29) | (values[valuesOffset] >>> 24); - blocks[blocksOffset++] = (values[valuesOffset++] << 40) | (values[valuesOffset] >>> 13); - blocks[blocksOffset++] = (values[valuesOffset++] << 51) | (values[valuesOffset] >>> 2); - blocks[blocksOffset++] = (values[valuesOffset++] << 62) | (values[valuesOffset++] << 9) | (values[valuesOffset] >>> 44); - blocks[blocksOffset++] = (values[valuesOffset++] << 20) | (values[valuesOffset] >>> 33); - blocks[blocksOffset++] = (values[valuesOffset++] << 31) | (values[valuesOffset] >>> 22); - blocks[blocksOffset++] = (values[valuesOffset++] << 42) | (values[valuesOffset] >>> 11); - blocks[blocksOffset++] = (values[valuesOffset++] << 53) | values[valuesOffset++]; - } - } - -} diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked54.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked54.java deleted file mode 100644 index 1b8e959b12a..00000000000 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked54.java +++ /dev/null @@ -1,439 +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 BulkOperationPacked54 extends BulkOperation { - @Override - public int blockCount() { - return 27; - } - - @Override - public int valueCount() { - return 32; - } - - @Override - public void decode(long[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) { - throw new UnsupportedOperationException(); - } - - @Override - public void decode(byte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) { - throw new UnsupportedOperationException(); - } - - @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 >>> 10; - final long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block0 & 1023L) << 44) | (block1 >>> 20); - final long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block1 & 1048575L) << 34) | (block2 >>> 30); - final long block3 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block2 & 1073741823L) << 24) | (block3 >>> 40); - final long block4 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block3 & 1099511627775L) << 14) | (block4 >>> 50); - final long block5 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block4 & 1125899906842623L) << 4) | (block5 >>> 60); - values[valuesOffset++] = (block5 >>> 6) & 18014398509481983L; - final long block6 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block5 & 63L) << 48) | (block6 >>> 16); - final long block7 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block6 & 65535L) << 38) | (block7 >>> 26); - final long block8 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block7 & 67108863L) << 28) | (block8 >>> 36); - final long block9 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block8 & 68719476735L) << 18) | (block9 >>> 46); - final long block10 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block9 & 70368744177663L) << 8) | (block10 >>> 56); - values[valuesOffset++] = (block10 >>> 2) & 18014398509481983L; - final long block11 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block10 & 3L) << 52) | (block11 >>> 12); - final long block12 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block11 & 4095L) << 42) | (block12 >>> 22); - final long block13 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block12 & 4194303L) << 32) | (block13 >>> 32); - final long block14 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block13 & 4294967295L) << 22) | (block14 >>> 42); - final long block15 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block14 & 4398046511103L) << 12) | (block15 >>> 52); - final long block16 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block15 & 4503599627370495L) << 2) | (block16 >>> 62); - values[valuesOffset++] = (block16 >>> 8) & 18014398509481983L; - final long block17 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block16 & 255L) << 46) | (block17 >>> 18); - final long block18 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block17 & 262143L) << 36) | (block18 >>> 28); - final long block19 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block18 & 268435455L) << 26) | (block19 >>> 38); - final long block20 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block19 & 274877906943L) << 16) | (block20 >>> 48); - final long block21 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block20 & 281474976710655L) << 6) | (block21 >>> 58); - values[valuesOffset++] = (block21 >>> 4) & 18014398509481983L; - final long block22 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block21 & 15L) << 50) | (block22 >>> 14); - final long block23 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block22 & 16383L) << 40) | (block23 >>> 24); - final long block24 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block23 & 16777215L) << 30) | (block24 >>> 34); - final long block25 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block24 & 17179869183L) << 20) | (block25 >>> 44); - final long block26 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block25 & 17592186044415L) << 10) | (block26 >>> 54); - values[valuesOffset++] = block26 & 18014398509481983L; - } - } - - @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; - final long byte3 = blocks[blocksOffset++] & 0xFF; - final long byte4 = blocks[blocksOffset++] & 0xFF; - final long byte5 = blocks[blocksOffset++] & 0xFF; - final long byte6 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte0 << 46) | (byte1 << 38) | (byte2 << 30) | (byte3 << 22) | (byte4 << 14) | (byte5 << 6) | (byte6 >>> 2); - final long byte7 = blocks[blocksOffset++] & 0xFF; - final long byte8 = blocks[blocksOffset++] & 0xFF; - final long byte9 = blocks[blocksOffset++] & 0xFF; - final long byte10 = blocks[blocksOffset++] & 0xFF; - final long byte11 = blocks[blocksOffset++] & 0xFF; - final long byte12 = blocks[blocksOffset++] & 0xFF; - final long byte13 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte6 & 3) << 52) | (byte7 << 44) | (byte8 << 36) | (byte9 << 28) | (byte10 << 20) | (byte11 << 12) | (byte12 << 4) | (byte13 >>> 4); - final long byte14 = blocks[blocksOffset++] & 0xFF; - final long byte15 = blocks[blocksOffset++] & 0xFF; - final long byte16 = blocks[blocksOffset++] & 0xFF; - final long byte17 = blocks[blocksOffset++] & 0xFF; - final long byte18 = blocks[blocksOffset++] & 0xFF; - final long byte19 = blocks[blocksOffset++] & 0xFF; - final long byte20 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte13 & 15) << 50) | (byte14 << 42) | (byte15 << 34) | (byte16 << 26) | (byte17 << 18) | (byte18 << 10) | (byte19 << 2) | (byte20 >>> 6); - final long byte21 = blocks[blocksOffset++] & 0xFF; - final long byte22 = blocks[blocksOffset++] & 0xFF; - final long byte23 = blocks[blocksOffset++] & 0xFF; - final long byte24 = blocks[blocksOffset++] & 0xFF; - final long byte25 = blocks[blocksOffset++] & 0xFF; - final long byte26 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte20 & 63) << 48) | (byte21 << 40) | (byte22 << 32) | (byte23 << 24) | (byte24 << 16) | (byte25 << 8) | byte26; - final long byte27 = blocks[blocksOffset++] & 0xFF; - final long byte28 = blocks[blocksOffset++] & 0xFF; - final long byte29 = blocks[blocksOffset++] & 0xFF; - final long byte30 = blocks[blocksOffset++] & 0xFF; - final long byte31 = blocks[blocksOffset++] & 0xFF; - final long byte32 = blocks[blocksOffset++] & 0xFF; - final long byte33 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte27 << 46) | (byte28 << 38) | (byte29 << 30) | (byte30 << 22) | (byte31 << 14) | (byte32 << 6) | (byte33 >>> 2); - final long byte34 = blocks[blocksOffset++] & 0xFF; - final long byte35 = blocks[blocksOffset++] & 0xFF; - final long byte36 = blocks[blocksOffset++] & 0xFF; - final long byte37 = blocks[blocksOffset++] & 0xFF; - final long byte38 = blocks[blocksOffset++] & 0xFF; - final long byte39 = blocks[blocksOffset++] & 0xFF; - final long byte40 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte33 & 3) << 52) | (byte34 << 44) | (byte35 << 36) | (byte36 << 28) | (byte37 << 20) | (byte38 << 12) | (byte39 << 4) | (byte40 >>> 4); - final long byte41 = blocks[blocksOffset++] & 0xFF; - final long byte42 = blocks[blocksOffset++] & 0xFF; - final long byte43 = blocks[blocksOffset++] & 0xFF; - final long byte44 = blocks[blocksOffset++] & 0xFF; - final long byte45 = blocks[blocksOffset++] & 0xFF; - final long byte46 = blocks[blocksOffset++] & 0xFF; - final long byte47 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte40 & 15) << 50) | (byte41 << 42) | (byte42 << 34) | (byte43 << 26) | (byte44 << 18) | (byte45 << 10) | (byte46 << 2) | (byte47 >>> 6); - final long byte48 = blocks[blocksOffset++] & 0xFF; - final long byte49 = blocks[blocksOffset++] & 0xFF; - final long byte50 = blocks[blocksOffset++] & 0xFF; - final long byte51 = blocks[blocksOffset++] & 0xFF; - final long byte52 = blocks[blocksOffset++] & 0xFF; - final long byte53 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte47 & 63) << 48) | (byte48 << 40) | (byte49 << 32) | (byte50 << 24) | (byte51 << 16) | (byte52 << 8) | byte53; - final long byte54 = blocks[blocksOffset++] & 0xFF; - final long byte55 = blocks[blocksOffset++] & 0xFF; - final long byte56 = blocks[blocksOffset++] & 0xFF; - final long byte57 = blocks[blocksOffset++] & 0xFF; - final long byte58 = blocks[blocksOffset++] & 0xFF; - final long byte59 = blocks[blocksOffset++] & 0xFF; - final long byte60 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte54 << 46) | (byte55 << 38) | (byte56 << 30) | (byte57 << 22) | (byte58 << 14) | (byte59 << 6) | (byte60 >>> 2); - final long byte61 = blocks[blocksOffset++] & 0xFF; - final long byte62 = blocks[blocksOffset++] & 0xFF; - final long byte63 = blocks[blocksOffset++] & 0xFF; - final long byte64 = blocks[blocksOffset++] & 0xFF; - final long byte65 = blocks[blocksOffset++] & 0xFF; - final long byte66 = blocks[blocksOffset++] & 0xFF; - final long byte67 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte60 & 3) << 52) | (byte61 << 44) | (byte62 << 36) | (byte63 << 28) | (byte64 << 20) | (byte65 << 12) | (byte66 << 4) | (byte67 >>> 4); - final long byte68 = blocks[blocksOffset++] & 0xFF; - final long byte69 = blocks[blocksOffset++] & 0xFF; - final long byte70 = blocks[blocksOffset++] & 0xFF; - final long byte71 = blocks[blocksOffset++] & 0xFF; - final long byte72 = blocks[blocksOffset++] & 0xFF; - final long byte73 = blocks[blocksOffset++] & 0xFF; - final long byte74 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte67 & 15) << 50) | (byte68 << 42) | (byte69 << 34) | (byte70 << 26) | (byte71 << 18) | (byte72 << 10) | (byte73 << 2) | (byte74 >>> 6); - final long byte75 = blocks[blocksOffset++] & 0xFF; - final long byte76 = blocks[blocksOffset++] & 0xFF; - final long byte77 = blocks[blocksOffset++] & 0xFF; - final long byte78 = blocks[blocksOffset++] & 0xFF; - final long byte79 = blocks[blocksOffset++] & 0xFF; - final long byte80 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte74 & 63) << 48) | (byte75 << 40) | (byte76 << 32) | (byte77 << 24) | (byte78 << 16) | (byte79 << 8) | byte80; - final long byte81 = blocks[blocksOffset++] & 0xFF; - final long byte82 = blocks[blocksOffset++] & 0xFF; - final long byte83 = blocks[blocksOffset++] & 0xFF; - final long byte84 = blocks[blocksOffset++] & 0xFF; - final long byte85 = blocks[blocksOffset++] & 0xFF; - final long byte86 = blocks[blocksOffset++] & 0xFF; - final long byte87 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte81 << 46) | (byte82 << 38) | (byte83 << 30) | (byte84 << 22) | (byte85 << 14) | (byte86 << 6) | (byte87 >>> 2); - final long byte88 = blocks[blocksOffset++] & 0xFF; - final long byte89 = blocks[blocksOffset++] & 0xFF; - final long byte90 = blocks[blocksOffset++] & 0xFF; - final long byte91 = blocks[blocksOffset++] & 0xFF; - final long byte92 = blocks[blocksOffset++] & 0xFF; - final long byte93 = blocks[blocksOffset++] & 0xFF; - final long byte94 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte87 & 3) << 52) | (byte88 << 44) | (byte89 << 36) | (byte90 << 28) | (byte91 << 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; - final long byte98 = blocks[blocksOffset++] & 0xFF; - final long byte99 = blocks[blocksOffset++] & 0xFF; - final long byte100 = blocks[blocksOffset++] & 0xFF; - final long byte101 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte94 & 15) << 50) | (byte95 << 42) | (byte96 << 34) | (byte97 << 26) | (byte98 << 18) | (byte99 << 10) | (byte100 << 2) | (byte101 >>> 6); - final long byte102 = blocks[blocksOffset++] & 0xFF; - final long byte103 = blocks[blocksOffset++] & 0xFF; - final long byte104 = blocks[blocksOffset++] & 0xFF; - final long byte105 = blocks[blocksOffset++] & 0xFF; - final long byte106 = blocks[blocksOffset++] & 0xFF; - final long byte107 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte101 & 63) << 48) | (byte102 << 40) | (byte103 << 32) | (byte104 << 24) | (byte105 << 16) | (byte106 << 8) | byte107; - final long byte108 = blocks[blocksOffset++] & 0xFF; - final long byte109 = blocks[blocksOffset++] & 0xFF; - final long byte110 = blocks[blocksOffset++] & 0xFF; - final long byte111 = blocks[blocksOffset++] & 0xFF; - final long byte112 = blocks[blocksOffset++] & 0xFF; - final long byte113 = blocks[blocksOffset++] & 0xFF; - final long byte114 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte108 << 46) | (byte109 << 38) | (byte110 << 30) | (byte111 << 22) | (byte112 << 14) | (byte113 << 6) | (byte114 >>> 2); - final long byte115 = blocks[blocksOffset++] & 0xFF; - final long byte116 = blocks[blocksOffset++] & 0xFF; - final long byte117 = blocks[blocksOffset++] & 0xFF; - final long byte118 = blocks[blocksOffset++] & 0xFF; - final long byte119 = blocks[blocksOffset++] & 0xFF; - final long byte120 = blocks[blocksOffset++] & 0xFF; - final long byte121 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte114 & 3) << 52) | (byte115 << 44) | (byte116 << 36) | (byte117 << 28) | (byte118 << 20) | (byte119 << 12) | (byte120 << 4) | (byte121 >>> 4); - final long byte122 = blocks[blocksOffset++] & 0xFF; - final long byte123 = blocks[blocksOffset++] & 0xFF; - final long byte124 = blocks[blocksOffset++] & 0xFF; - final long byte125 = blocks[blocksOffset++] & 0xFF; - final long byte126 = blocks[blocksOffset++] & 0xFF; - final long byte127 = blocks[blocksOffset++] & 0xFF; - final long byte128 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte121 & 15) << 50) | (byte122 << 42) | (byte123 << 34) | (byte124 << 26) | (byte125 << 18) | (byte126 << 10) | (byte127 << 2) | (byte128 >>> 6); - final long byte129 = blocks[blocksOffset++] & 0xFF; - final long byte130 = blocks[blocksOffset++] & 0xFF; - final long byte131 = blocks[blocksOffset++] & 0xFF; - final long byte132 = blocks[blocksOffset++] & 0xFF; - final long byte133 = blocks[blocksOffset++] & 0xFF; - final long byte134 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte128 & 63) << 48) | (byte129 << 40) | (byte130 << 32) | (byte131 << 24) | (byte132 << 16) | (byte133 << 8) | byte134; - final long byte135 = blocks[blocksOffset++] & 0xFF; - final long byte136 = blocks[blocksOffset++] & 0xFF; - final long byte137 = blocks[blocksOffset++] & 0xFF; - final long byte138 = blocks[blocksOffset++] & 0xFF; - final long byte139 = blocks[blocksOffset++] & 0xFF; - final long byte140 = blocks[blocksOffset++] & 0xFF; - final long byte141 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte135 << 46) | (byte136 << 38) | (byte137 << 30) | (byte138 << 22) | (byte139 << 14) | (byte140 << 6) | (byte141 >>> 2); - final long byte142 = blocks[blocksOffset++] & 0xFF; - final long byte143 = blocks[blocksOffset++] & 0xFF; - final long byte144 = blocks[blocksOffset++] & 0xFF; - final long byte145 = blocks[blocksOffset++] & 0xFF; - final long byte146 = blocks[blocksOffset++] & 0xFF; - final long byte147 = blocks[blocksOffset++] & 0xFF; - final long byte148 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte141 & 3) << 52) | (byte142 << 44) | (byte143 << 36) | (byte144 << 28) | (byte145 << 20) | (byte146 << 12) | (byte147 << 4) | (byte148 >>> 4); - final long byte149 = blocks[blocksOffset++] & 0xFF; - final long byte150 = blocks[blocksOffset++] & 0xFF; - final long byte151 = blocks[blocksOffset++] & 0xFF; - final long byte152 = blocks[blocksOffset++] & 0xFF; - final long byte153 = blocks[blocksOffset++] & 0xFF; - final long byte154 = blocks[blocksOffset++] & 0xFF; - final long byte155 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte148 & 15) << 50) | (byte149 << 42) | (byte150 << 34) | (byte151 << 26) | (byte152 << 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; - final long byte159 = blocks[blocksOffset++] & 0xFF; - final long byte160 = blocks[blocksOffset++] & 0xFF; - final long byte161 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte155 & 63) << 48) | (byte156 << 40) | (byte157 << 32) | (byte158 << 24) | (byte159 << 16) | (byte160 << 8) | byte161; - final long byte162 = blocks[blocksOffset++] & 0xFF; - final long byte163 = blocks[blocksOffset++] & 0xFF; - final long byte164 = blocks[blocksOffset++] & 0xFF; - final long byte165 = blocks[blocksOffset++] & 0xFF; - final long byte166 = blocks[blocksOffset++] & 0xFF; - final long byte167 = blocks[blocksOffset++] & 0xFF; - final long byte168 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte162 << 46) | (byte163 << 38) | (byte164 << 30) | (byte165 << 22) | (byte166 << 14) | (byte167 << 6) | (byte168 >>> 2); - final long byte169 = blocks[blocksOffset++] & 0xFF; - final long byte170 = blocks[blocksOffset++] & 0xFF; - final long byte171 = blocks[blocksOffset++] & 0xFF; - final long byte172 = blocks[blocksOffset++] & 0xFF; - final long byte173 = blocks[blocksOffset++] & 0xFF; - final long byte174 = blocks[blocksOffset++] & 0xFF; - final long byte175 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte168 & 3) << 52) | (byte169 << 44) | (byte170 << 36) | (byte171 << 28) | (byte172 << 20) | (byte173 << 12) | (byte174 << 4) | (byte175 >>> 4); - final long byte176 = blocks[blocksOffset++] & 0xFF; - final long byte177 = blocks[blocksOffset++] & 0xFF; - final long byte178 = blocks[blocksOffset++] & 0xFF; - final long byte179 = blocks[blocksOffset++] & 0xFF; - final long byte180 = blocks[blocksOffset++] & 0xFF; - final long byte181 = blocks[blocksOffset++] & 0xFF; - final long byte182 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte175 & 15) << 50) | (byte176 << 42) | (byte177 << 34) | (byte178 << 26) | (byte179 << 18) | (byte180 << 10) | (byte181 << 2) | (byte182 >>> 6); - final long byte183 = blocks[blocksOffset++] & 0xFF; - final long byte184 = blocks[blocksOffset++] & 0xFF; - final long byte185 = blocks[blocksOffset++] & 0xFF; - final long byte186 = blocks[blocksOffset++] & 0xFF; - final long byte187 = blocks[blocksOffset++] & 0xFF; - final long byte188 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte182 & 63) << 48) | (byte183 << 40) | (byte184 << 32) | (byte185 << 24) | (byte186 << 16) | (byte187 << 8) | byte188; - final long byte189 = blocks[blocksOffset++] & 0xFF; - final long byte190 = blocks[blocksOffset++] & 0xFF; - final long byte191 = blocks[blocksOffset++] & 0xFF; - final long byte192 = blocks[blocksOffset++] & 0xFF; - final long byte193 = blocks[blocksOffset++] & 0xFF; - final long byte194 = blocks[blocksOffset++] & 0xFF; - final long byte195 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte189 << 46) | (byte190 << 38) | (byte191 << 30) | (byte192 << 22) | (byte193 << 14) | (byte194 << 6) | (byte195 >>> 2); - final long byte196 = blocks[blocksOffset++] & 0xFF; - final long byte197 = blocks[blocksOffset++] & 0xFF; - final long byte198 = blocks[blocksOffset++] & 0xFF; - final long byte199 = blocks[blocksOffset++] & 0xFF; - final long byte200 = blocks[blocksOffset++] & 0xFF; - final long byte201 = blocks[blocksOffset++] & 0xFF; - final long byte202 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte195 & 3) << 52) | (byte196 << 44) | (byte197 << 36) | (byte198 << 28) | (byte199 << 20) | (byte200 << 12) | (byte201 << 4) | (byte202 >>> 4); - final long byte203 = blocks[blocksOffset++] & 0xFF; - final long byte204 = blocks[blocksOffset++] & 0xFF; - final long byte205 = blocks[blocksOffset++] & 0xFF; - final long byte206 = blocks[blocksOffset++] & 0xFF; - final long byte207 = blocks[blocksOffset++] & 0xFF; - final long byte208 = blocks[blocksOffset++] & 0xFF; - final long byte209 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte202 & 15) << 50) | (byte203 << 42) | (byte204 << 34) | (byte205 << 26) | (byte206 << 18) | (byte207 << 10) | (byte208 << 2) | (byte209 >>> 6); - final long byte210 = blocks[blocksOffset++] & 0xFF; - final long byte211 = blocks[blocksOffset++] & 0xFF; - final long byte212 = blocks[blocksOffset++] & 0xFF; - final long byte213 = blocks[blocksOffset++] & 0xFF; - final long byte214 = blocks[blocksOffset++] & 0xFF; - final long byte215 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte209 & 63) << 48) | (byte210 << 40) | (byte211 << 32) | (byte212 << 24) | (byte213 << 16) | (byte214 << 8) | byte215; - } - } - - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 10) | ((values[valuesOffset] & 0xffffffffL) >>> 44); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 20) | ((values[valuesOffset] & 0xffffffffL) >>> 34); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 30) | ((values[valuesOffset] & 0xffffffffL) >>> 24); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 40) | ((values[valuesOffset] & 0xffffffffL) >>> 14); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 50) | ((values[valuesOffset] & 0xffffffffL) >>> 4); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 60) | ((values[valuesOffset++] & 0xffffffffL) << 6) | ((values[valuesOffset] & 0xffffffffL) >>> 48); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 16) | ((values[valuesOffset] & 0xffffffffL) >>> 38); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 26) | ((values[valuesOffset] & 0xffffffffL) >>> 28); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 36) | ((values[valuesOffset] & 0xffffffffL) >>> 18); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 46) | ((values[valuesOffset] & 0xffffffffL) >>> 8); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 56) | ((values[valuesOffset++] & 0xffffffffL) << 2) | ((values[valuesOffset] & 0xffffffffL) >>> 52); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 12) | ((values[valuesOffset] & 0xffffffffL) >>> 42); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 22) | ((values[valuesOffset] & 0xffffffffL) >>> 32); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 32) | ((values[valuesOffset] & 0xffffffffL) >>> 22); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 42) | ((values[valuesOffset] & 0xffffffffL) >>> 12); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 52) | ((values[valuesOffset] & 0xffffffffL) >>> 2); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 62) | ((values[valuesOffset++] & 0xffffffffL) << 8) | ((values[valuesOffset] & 0xffffffffL) >>> 46); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 18) | ((values[valuesOffset] & 0xffffffffL) >>> 36); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 28) | ((values[valuesOffset] & 0xffffffffL) >>> 26); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 38) | ((values[valuesOffset] & 0xffffffffL) >>> 16); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 48) | ((values[valuesOffset] & 0xffffffffL) >>> 6); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 58) | ((values[valuesOffset++] & 0xffffffffL) << 4) | ((values[valuesOffset] & 0xffffffffL) >>> 50); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 14) | ((values[valuesOffset] & 0xffffffffL) >>> 40); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 24) | ((values[valuesOffset] & 0xffffffffL) >>> 30); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 34) | ((values[valuesOffset] & 0xffffffffL) >>> 20); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 44) | ((values[valuesOffset] & 0xffffffffL) >>> 10); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 54) | (values[valuesOffset++] & 0xffffffffL); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] << 10) | (values[valuesOffset] >>> 44); - blocks[blocksOffset++] = (values[valuesOffset++] << 20) | (values[valuesOffset] >>> 34); - blocks[blocksOffset++] = (values[valuesOffset++] << 30) | (values[valuesOffset] >>> 24); - blocks[blocksOffset++] = (values[valuesOffset++] << 40) | (values[valuesOffset] >>> 14); - blocks[blocksOffset++] = (values[valuesOffset++] << 50) | (values[valuesOffset] >>> 4); - blocks[blocksOffset++] = (values[valuesOffset++] << 60) | (values[valuesOffset++] << 6) | (values[valuesOffset] >>> 48); - blocks[blocksOffset++] = (values[valuesOffset++] << 16) | (values[valuesOffset] >>> 38); - blocks[blocksOffset++] = (values[valuesOffset++] << 26) | (values[valuesOffset] >>> 28); - blocks[blocksOffset++] = (values[valuesOffset++] << 36) | (values[valuesOffset] >>> 18); - blocks[blocksOffset++] = (values[valuesOffset++] << 46) | (values[valuesOffset] >>> 8); - blocks[blocksOffset++] = (values[valuesOffset++] << 56) | (values[valuesOffset++] << 2) | (values[valuesOffset] >>> 52); - blocks[blocksOffset++] = (values[valuesOffset++] << 12) | (values[valuesOffset] >>> 42); - blocks[blocksOffset++] = (values[valuesOffset++] << 22) | (values[valuesOffset] >>> 32); - blocks[blocksOffset++] = (values[valuesOffset++] << 32) | (values[valuesOffset] >>> 22); - blocks[blocksOffset++] = (values[valuesOffset++] << 42) | (values[valuesOffset] >>> 12); - blocks[blocksOffset++] = (values[valuesOffset++] << 52) | (values[valuesOffset] >>> 2); - blocks[blocksOffset++] = (values[valuesOffset++] << 62) | (values[valuesOffset++] << 8) | (values[valuesOffset] >>> 46); - blocks[blocksOffset++] = (values[valuesOffset++] << 18) | (values[valuesOffset] >>> 36); - blocks[blocksOffset++] = (values[valuesOffset++] << 28) | (values[valuesOffset] >>> 26); - blocks[blocksOffset++] = (values[valuesOffset++] << 38) | (values[valuesOffset] >>> 16); - blocks[blocksOffset++] = (values[valuesOffset++] << 48) | (values[valuesOffset] >>> 6); - blocks[blocksOffset++] = (values[valuesOffset++] << 58) | (values[valuesOffset++] << 4) | (values[valuesOffset] >>> 50); - blocks[blocksOffset++] = (values[valuesOffset++] << 14) | (values[valuesOffset] >>> 40); - blocks[blocksOffset++] = (values[valuesOffset++] << 24) | (values[valuesOffset] >>> 30); - blocks[blocksOffset++] = (values[valuesOffset++] << 34) | (values[valuesOffset] >>> 20); - blocks[blocksOffset++] = (values[valuesOffset++] << 44) | (values[valuesOffset] >>> 10); - blocks[blocksOffset++] = (values[valuesOffset++] << 54) | values[valuesOffset++]; - } - } - -} diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked55.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked55.java deleted file mode 100644 index 45737cdc92d..00000000000 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked55.java +++ /dev/null @@ -1,811 +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 BulkOperationPacked55 extends BulkOperation { - @Override - public int blockCount() { - return 55; - } - - @Override - public int valueCount() { - return 64; - } - - @Override - public void decode(long[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) { - throw new UnsupportedOperationException(); - } - - @Override - public void decode(byte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) { - throw new UnsupportedOperationException(); - } - - @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 >>> 9; - final long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block0 & 511L) << 46) | (block1 >>> 18); - final long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block1 & 262143L) << 37) | (block2 >>> 27); - final long block3 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block2 & 134217727L) << 28) | (block3 >>> 36); - final long block4 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block3 & 68719476735L) << 19) | (block4 >>> 45); - final long block5 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block4 & 35184372088831L) << 10) | (block5 >>> 54); - final long block6 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block5 & 18014398509481983L) << 1) | (block6 >>> 63); - values[valuesOffset++] = (block6 >>> 8) & 36028797018963967L; - final long block7 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block6 & 255L) << 47) | (block7 >>> 17); - final long block8 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block7 & 131071L) << 38) | (block8 >>> 26); - final long block9 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block8 & 67108863L) << 29) | (block9 >>> 35); - final long block10 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block9 & 34359738367L) << 20) | (block10 >>> 44); - final long block11 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block10 & 17592186044415L) << 11) | (block11 >>> 53); - final long block12 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block11 & 9007199254740991L) << 2) | (block12 >>> 62); - values[valuesOffset++] = (block12 >>> 7) & 36028797018963967L; - final long block13 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block12 & 127L) << 48) | (block13 >>> 16); - final long block14 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block13 & 65535L) << 39) | (block14 >>> 25); - final long block15 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block14 & 33554431L) << 30) | (block15 >>> 34); - final long block16 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block15 & 17179869183L) << 21) | (block16 >>> 43); - final long block17 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block16 & 8796093022207L) << 12) | (block17 >>> 52); - final long block18 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block17 & 4503599627370495L) << 3) | (block18 >>> 61); - values[valuesOffset++] = (block18 >>> 6) & 36028797018963967L; - final long block19 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block18 & 63L) << 49) | (block19 >>> 15); - final long block20 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block19 & 32767L) << 40) | (block20 >>> 24); - final long block21 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block20 & 16777215L) << 31) | (block21 >>> 33); - final long block22 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block21 & 8589934591L) << 22) | (block22 >>> 42); - final long block23 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block22 & 4398046511103L) << 13) | (block23 >>> 51); - final long block24 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block23 & 2251799813685247L) << 4) | (block24 >>> 60); - values[valuesOffset++] = (block24 >>> 5) & 36028797018963967L; - final long block25 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block24 & 31L) << 50) | (block25 >>> 14); - final long block26 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block25 & 16383L) << 41) | (block26 >>> 23); - final long block27 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block26 & 8388607L) << 32) | (block27 >>> 32); - final long block28 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block27 & 4294967295L) << 23) | (block28 >>> 41); - final long block29 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block28 & 2199023255551L) << 14) | (block29 >>> 50); - final long block30 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block29 & 1125899906842623L) << 5) | (block30 >>> 59); - values[valuesOffset++] = (block30 >>> 4) & 36028797018963967L; - final long block31 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block30 & 15L) << 51) | (block31 >>> 13); - final long block32 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block31 & 8191L) << 42) | (block32 >>> 22); - final long block33 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block32 & 4194303L) << 33) | (block33 >>> 31); - final long block34 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block33 & 2147483647L) << 24) | (block34 >>> 40); - final long block35 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block34 & 1099511627775L) << 15) | (block35 >>> 49); - final long block36 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block35 & 562949953421311L) << 6) | (block36 >>> 58); - values[valuesOffset++] = (block36 >>> 3) & 36028797018963967L; - final long block37 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block36 & 7L) << 52) | (block37 >>> 12); - final long block38 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block37 & 4095L) << 43) | (block38 >>> 21); - final long block39 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block38 & 2097151L) << 34) | (block39 >>> 30); - final long block40 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block39 & 1073741823L) << 25) | (block40 >>> 39); - final long block41 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block40 & 549755813887L) << 16) | (block41 >>> 48); - final long block42 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block41 & 281474976710655L) << 7) | (block42 >>> 57); - values[valuesOffset++] = (block42 >>> 2) & 36028797018963967L; - final long block43 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block42 & 3L) << 53) | (block43 >>> 11); - final long block44 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block43 & 2047L) << 44) | (block44 >>> 20); - final long block45 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block44 & 1048575L) << 35) | (block45 >>> 29); - final long block46 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block45 & 536870911L) << 26) | (block46 >>> 38); - final long block47 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block46 & 274877906943L) << 17) | (block47 >>> 47); - final long block48 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block47 & 140737488355327L) << 8) | (block48 >>> 56); - values[valuesOffset++] = (block48 >>> 1) & 36028797018963967L; - final long block49 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block48 & 1L) << 54) | (block49 >>> 10); - final long block50 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block49 & 1023L) << 45) | (block50 >>> 19); - final long block51 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block50 & 524287L) << 36) | (block51 >>> 28); - final long block52 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block51 & 268435455L) << 27) | (block52 >>> 37); - final long block53 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block52 & 137438953471L) << 18) | (block53 >>> 46); - final long block54 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block53 & 70368744177663L) << 9) | (block54 >>> 55); - values[valuesOffset++] = block54 & 36028797018963967L; - } - } - - @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; - final long byte3 = blocks[blocksOffset++] & 0xFF; - final long byte4 = blocks[blocksOffset++] & 0xFF; - final long byte5 = blocks[blocksOffset++] & 0xFF; - final long byte6 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte0 << 47) | (byte1 << 39) | (byte2 << 31) | (byte3 << 23) | (byte4 << 15) | (byte5 << 7) | (byte6 >>> 1); - final long byte7 = blocks[blocksOffset++] & 0xFF; - final long byte8 = blocks[blocksOffset++] & 0xFF; - final long byte9 = blocks[blocksOffset++] & 0xFF; - final long byte10 = blocks[blocksOffset++] & 0xFF; - final long byte11 = blocks[blocksOffset++] & 0xFF; - final long byte12 = blocks[blocksOffset++] & 0xFF; - final long byte13 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte6 & 1) << 54) | (byte7 << 46) | (byte8 << 38) | (byte9 << 30) | (byte10 << 22) | (byte11 << 14) | (byte12 << 6) | (byte13 >>> 2); - final long byte14 = blocks[blocksOffset++] & 0xFF; - final long byte15 = blocks[blocksOffset++] & 0xFF; - final long byte16 = blocks[blocksOffset++] & 0xFF; - final long byte17 = blocks[blocksOffset++] & 0xFF; - final long byte18 = blocks[blocksOffset++] & 0xFF; - final long byte19 = blocks[blocksOffset++] & 0xFF; - final long byte20 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte13 & 3) << 53) | (byte14 << 45) | (byte15 << 37) | (byte16 << 29) | (byte17 << 21) | (byte18 << 13) | (byte19 << 5) | (byte20 >>> 3); - final long byte21 = blocks[blocksOffset++] & 0xFF; - final long byte22 = blocks[blocksOffset++] & 0xFF; - final long byte23 = blocks[blocksOffset++] & 0xFF; - final long byte24 = blocks[blocksOffset++] & 0xFF; - final long byte25 = blocks[blocksOffset++] & 0xFF; - final long byte26 = blocks[blocksOffset++] & 0xFF; - final long byte27 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte20 & 7) << 52) | (byte21 << 44) | (byte22 << 36) | (byte23 << 28) | (byte24 << 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; - final long byte31 = blocks[blocksOffset++] & 0xFF; - final long byte32 = blocks[blocksOffset++] & 0xFF; - final long byte33 = blocks[blocksOffset++] & 0xFF; - final long byte34 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte27 & 15) << 51) | (byte28 << 43) | (byte29 << 35) | (byte30 << 27) | (byte31 << 19) | (byte32 << 11) | (byte33 << 3) | (byte34 >>> 5); - final long byte35 = blocks[blocksOffset++] & 0xFF; - final long byte36 = blocks[blocksOffset++] & 0xFF; - final long byte37 = blocks[blocksOffset++] & 0xFF; - final long byte38 = blocks[blocksOffset++] & 0xFF; - final long byte39 = blocks[blocksOffset++] & 0xFF; - final long byte40 = blocks[blocksOffset++] & 0xFF; - final long byte41 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte34 & 31) << 50) | (byte35 << 42) | (byte36 << 34) | (byte37 << 26) | (byte38 << 18) | (byte39 << 10) | (byte40 << 2) | (byte41 >>> 6); - final long byte42 = blocks[blocksOffset++] & 0xFF; - final long byte43 = blocks[blocksOffset++] & 0xFF; - final long byte44 = blocks[blocksOffset++] & 0xFF; - final long byte45 = blocks[blocksOffset++] & 0xFF; - final long byte46 = blocks[blocksOffset++] & 0xFF; - final long byte47 = blocks[blocksOffset++] & 0xFF; - final long byte48 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte41 & 63) << 49) | (byte42 << 41) | (byte43 << 33) | (byte44 << 25) | (byte45 << 17) | (byte46 << 9) | (byte47 << 1) | (byte48 >>> 7); - final long byte49 = blocks[blocksOffset++] & 0xFF; - final long byte50 = blocks[blocksOffset++] & 0xFF; - final long byte51 = blocks[blocksOffset++] & 0xFF; - final long byte52 = blocks[blocksOffset++] & 0xFF; - final long byte53 = blocks[blocksOffset++] & 0xFF; - final long byte54 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte48 & 127) << 48) | (byte49 << 40) | (byte50 << 32) | (byte51 << 24) | (byte52 << 16) | (byte53 << 8) | byte54; - final long byte55 = blocks[blocksOffset++] & 0xFF; - final long byte56 = blocks[blocksOffset++] & 0xFF; - final long byte57 = blocks[blocksOffset++] & 0xFF; - final long byte58 = blocks[blocksOffset++] & 0xFF; - final long byte59 = blocks[blocksOffset++] & 0xFF; - final long byte60 = blocks[blocksOffset++] & 0xFF; - final long byte61 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte55 << 47) | (byte56 << 39) | (byte57 << 31) | (byte58 << 23) | (byte59 << 15) | (byte60 << 7) | (byte61 >>> 1); - final long byte62 = blocks[blocksOffset++] & 0xFF; - final long byte63 = blocks[blocksOffset++] & 0xFF; - final long byte64 = blocks[blocksOffset++] & 0xFF; - final long byte65 = blocks[blocksOffset++] & 0xFF; - final long byte66 = blocks[blocksOffset++] & 0xFF; - final long byte67 = blocks[blocksOffset++] & 0xFF; - final long byte68 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte61 & 1) << 54) | (byte62 << 46) | (byte63 << 38) | (byte64 << 30) | (byte65 << 22) | (byte66 << 14) | (byte67 << 6) | (byte68 >>> 2); - final long byte69 = blocks[blocksOffset++] & 0xFF; - final long byte70 = blocks[blocksOffset++] & 0xFF; - final long byte71 = blocks[blocksOffset++] & 0xFF; - final long byte72 = blocks[blocksOffset++] & 0xFF; - final long byte73 = blocks[blocksOffset++] & 0xFF; - final long byte74 = blocks[blocksOffset++] & 0xFF; - final long byte75 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte68 & 3) << 53) | (byte69 << 45) | (byte70 << 37) | (byte71 << 29) | (byte72 << 21) | (byte73 << 13) | (byte74 << 5) | (byte75 >>> 3); - final long byte76 = blocks[blocksOffset++] & 0xFF; - final long byte77 = blocks[blocksOffset++] & 0xFF; - final long byte78 = blocks[blocksOffset++] & 0xFF; - final long byte79 = blocks[blocksOffset++] & 0xFF; - final long byte80 = blocks[blocksOffset++] & 0xFF; - final long byte81 = blocks[blocksOffset++] & 0xFF; - final long byte82 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte75 & 7) << 52) | (byte76 << 44) | (byte77 << 36) | (byte78 << 28) | (byte79 << 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; - final long byte86 = blocks[blocksOffset++] & 0xFF; - final long byte87 = blocks[blocksOffset++] & 0xFF; - final long byte88 = blocks[blocksOffset++] & 0xFF; - final long byte89 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte82 & 15) << 51) | (byte83 << 43) | (byte84 << 35) | (byte85 << 27) | (byte86 << 19) | (byte87 << 11) | (byte88 << 3) | (byte89 >>> 5); - final long byte90 = blocks[blocksOffset++] & 0xFF; - final long byte91 = blocks[blocksOffset++] & 0xFF; - final long byte92 = blocks[blocksOffset++] & 0xFF; - final long byte93 = blocks[blocksOffset++] & 0xFF; - final long byte94 = blocks[blocksOffset++] & 0xFF; - final long byte95 = blocks[blocksOffset++] & 0xFF; - final long byte96 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte89 & 31) << 50) | (byte90 << 42) | (byte91 << 34) | (byte92 << 26) | (byte93 << 18) | (byte94 << 10) | (byte95 << 2) | (byte96 >>> 6); - final long byte97 = blocks[blocksOffset++] & 0xFF; - final long byte98 = blocks[blocksOffset++] & 0xFF; - final long byte99 = blocks[blocksOffset++] & 0xFF; - final long byte100 = blocks[blocksOffset++] & 0xFF; - final long byte101 = blocks[blocksOffset++] & 0xFF; - final long byte102 = blocks[blocksOffset++] & 0xFF; - final long byte103 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte96 & 63) << 49) | (byte97 << 41) | (byte98 << 33) | (byte99 << 25) | (byte100 << 17) | (byte101 << 9) | (byte102 << 1) | (byte103 >>> 7); - final long byte104 = blocks[blocksOffset++] & 0xFF; - final long byte105 = blocks[blocksOffset++] & 0xFF; - final long byte106 = blocks[blocksOffset++] & 0xFF; - final long byte107 = blocks[blocksOffset++] & 0xFF; - final long byte108 = blocks[blocksOffset++] & 0xFF; - final long byte109 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte103 & 127) << 48) | (byte104 << 40) | (byte105 << 32) | (byte106 << 24) | (byte107 << 16) | (byte108 << 8) | byte109; - final long byte110 = blocks[blocksOffset++] & 0xFF; - final long byte111 = blocks[blocksOffset++] & 0xFF; - final long byte112 = blocks[blocksOffset++] & 0xFF; - final long byte113 = blocks[blocksOffset++] & 0xFF; - final long byte114 = blocks[blocksOffset++] & 0xFF; - final long byte115 = blocks[blocksOffset++] & 0xFF; - final long byte116 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte110 << 47) | (byte111 << 39) | (byte112 << 31) | (byte113 << 23) | (byte114 << 15) | (byte115 << 7) | (byte116 >>> 1); - final long byte117 = blocks[blocksOffset++] & 0xFF; - final long byte118 = blocks[blocksOffset++] & 0xFF; - final long byte119 = blocks[blocksOffset++] & 0xFF; - final long byte120 = blocks[blocksOffset++] & 0xFF; - final long byte121 = blocks[blocksOffset++] & 0xFF; - final long byte122 = blocks[blocksOffset++] & 0xFF; - final long byte123 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte116 & 1) << 54) | (byte117 << 46) | (byte118 << 38) | (byte119 << 30) | (byte120 << 22) | (byte121 << 14) | (byte122 << 6) | (byte123 >>> 2); - final long byte124 = blocks[blocksOffset++] & 0xFF; - final long byte125 = blocks[blocksOffset++] & 0xFF; - final long byte126 = blocks[blocksOffset++] & 0xFF; - final long byte127 = blocks[blocksOffset++] & 0xFF; - final long byte128 = blocks[blocksOffset++] & 0xFF; - final long byte129 = blocks[blocksOffset++] & 0xFF; - final long byte130 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte123 & 3) << 53) | (byte124 << 45) | (byte125 << 37) | (byte126 << 29) | (byte127 << 21) | (byte128 << 13) | (byte129 << 5) | (byte130 >>> 3); - final long byte131 = blocks[blocksOffset++] & 0xFF; - final long byte132 = blocks[blocksOffset++] & 0xFF; - final long byte133 = blocks[blocksOffset++] & 0xFF; - final long byte134 = blocks[blocksOffset++] & 0xFF; - final long byte135 = blocks[blocksOffset++] & 0xFF; - final long byte136 = blocks[blocksOffset++] & 0xFF; - final long byte137 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte130 & 7) << 52) | (byte131 << 44) | (byte132 << 36) | (byte133 << 28) | (byte134 << 20) | (byte135 << 12) | (byte136 << 4) | (byte137 >>> 4); - final long byte138 = blocks[blocksOffset++] & 0xFF; - final long byte139 = blocks[blocksOffset++] & 0xFF; - final long byte140 = blocks[blocksOffset++] & 0xFF; - final long byte141 = blocks[blocksOffset++] & 0xFF; - final long byte142 = blocks[blocksOffset++] & 0xFF; - final long byte143 = blocks[blocksOffset++] & 0xFF; - final long byte144 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte137 & 15) << 51) | (byte138 << 43) | (byte139 << 35) | (byte140 << 27) | (byte141 << 19) | (byte142 << 11) | (byte143 << 3) | (byte144 >>> 5); - final long byte145 = blocks[blocksOffset++] & 0xFF; - final long byte146 = blocks[blocksOffset++] & 0xFF; - final long byte147 = blocks[blocksOffset++] & 0xFF; - final long byte148 = blocks[blocksOffset++] & 0xFF; - final long byte149 = blocks[blocksOffset++] & 0xFF; - final long byte150 = blocks[blocksOffset++] & 0xFF; - final long byte151 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte144 & 31) << 50) | (byte145 << 42) | (byte146 << 34) | (byte147 << 26) | (byte148 << 18) | (byte149 << 10) | (byte150 << 2) | (byte151 >>> 6); - final long byte152 = blocks[blocksOffset++] & 0xFF; - final long byte153 = blocks[blocksOffset++] & 0xFF; - final long byte154 = blocks[blocksOffset++] & 0xFF; - final long byte155 = blocks[blocksOffset++] & 0xFF; - final long byte156 = blocks[blocksOffset++] & 0xFF; - final long byte157 = blocks[blocksOffset++] & 0xFF; - final long byte158 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte151 & 63) << 49) | (byte152 << 41) | (byte153 << 33) | (byte154 << 25) | (byte155 << 17) | (byte156 << 9) | (byte157 << 1) | (byte158 >>> 7); - final long byte159 = blocks[blocksOffset++] & 0xFF; - final long byte160 = blocks[blocksOffset++] & 0xFF; - final long byte161 = blocks[blocksOffset++] & 0xFF; - final long byte162 = blocks[blocksOffset++] & 0xFF; - final long byte163 = blocks[blocksOffset++] & 0xFF; - final long byte164 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte158 & 127) << 48) | (byte159 << 40) | (byte160 << 32) | (byte161 << 24) | (byte162 << 16) | (byte163 << 8) | byte164; - final long byte165 = blocks[blocksOffset++] & 0xFF; - final long byte166 = blocks[blocksOffset++] & 0xFF; - final long byte167 = blocks[blocksOffset++] & 0xFF; - final long byte168 = blocks[blocksOffset++] & 0xFF; - final long byte169 = blocks[blocksOffset++] & 0xFF; - final long byte170 = blocks[blocksOffset++] & 0xFF; - final long byte171 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte165 << 47) | (byte166 << 39) | (byte167 << 31) | (byte168 << 23) | (byte169 << 15) | (byte170 << 7) | (byte171 >>> 1); - final long byte172 = blocks[blocksOffset++] & 0xFF; - final long byte173 = blocks[blocksOffset++] & 0xFF; - final long byte174 = blocks[blocksOffset++] & 0xFF; - final long byte175 = blocks[blocksOffset++] & 0xFF; - final long byte176 = blocks[blocksOffset++] & 0xFF; - final long byte177 = blocks[blocksOffset++] & 0xFF; - final long byte178 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte171 & 1) << 54) | (byte172 << 46) | (byte173 << 38) | (byte174 << 30) | (byte175 << 22) | (byte176 << 14) | (byte177 << 6) | (byte178 >>> 2); - final long byte179 = blocks[blocksOffset++] & 0xFF; - final long byte180 = blocks[blocksOffset++] & 0xFF; - final long byte181 = blocks[blocksOffset++] & 0xFF; - final long byte182 = blocks[blocksOffset++] & 0xFF; - final long byte183 = blocks[blocksOffset++] & 0xFF; - final long byte184 = blocks[blocksOffset++] & 0xFF; - final long byte185 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte178 & 3) << 53) | (byte179 << 45) | (byte180 << 37) | (byte181 << 29) | (byte182 << 21) | (byte183 << 13) | (byte184 << 5) | (byte185 >>> 3); - final long byte186 = blocks[blocksOffset++] & 0xFF; - final long byte187 = blocks[blocksOffset++] & 0xFF; - final long byte188 = blocks[blocksOffset++] & 0xFF; - final long byte189 = blocks[blocksOffset++] & 0xFF; - final long byte190 = blocks[blocksOffset++] & 0xFF; - final long byte191 = blocks[blocksOffset++] & 0xFF; - final long byte192 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte185 & 7) << 52) | (byte186 << 44) | (byte187 << 36) | (byte188 << 28) | (byte189 << 20) | (byte190 << 12) | (byte191 << 4) | (byte192 >>> 4); - final long byte193 = blocks[blocksOffset++] & 0xFF; - final long byte194 = blocks[blocksOffset++] & 0xFF; - final long byte195 = blocks[blocksOffset++] & 0xFF; - final long byte196 = blocks[blocksOffset++] & 0xFF; - final long byte197 = blocks[blocksOffset++] & 0xFF; - final long byte198 = blocks[blocksOffset++] & 0xFF; - final long byte199 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte192 & 15) << 51) | (byte193 << 43) | (byte194 << 35) | (byte195 << 27) | (byte196 << 19) | (byte197 << 11) | (byte198 << 3) | (byte199 >>> 5); - final long byte200 = blocks[blocksOffset++] & 0xFF; - final long byte201 = blocks[blocksOffset++] & 0xFF; - final long byte202 = blocks[blocksOffset++] & 0xFF; - final long byte203 = blocks[blocksOffset++] & 0xFF; - final long byte204 = blocks[blocksOffset++] & 0xFF; - final long byte205 = blocks[blocksOffset++] & 0xFF; - final long byte206 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte199 & 31) << 50) | (byte200 << 42) | (byte201 << 34) | (byte202 << 26) | (byte203 << 18) | (byte204 << 10) | (byte205 << 2) | (byte206 >>> 6); - final long byte207 = blocks[blocksOffset++] & 0xFF; - final long byte208 = blocks[blocksOffset++] & 0xFF; - final long byte209 = blocks[blocksOffset++] & 0xFF; - final long byte210 = blocks[blocksOffset++] & 0xFF; - final long byte211 = blocks[blocksOffset++] & 0xFF; - final long byte212 = blocks[blocksOffset++] & 0xFF; - final long byte213 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte206 & 63) << 49) | (byte207 << 41) | (byte208 << 33) | (byte209 << 25) | (byte210 << 17) | (byte211 << 9) | (byte212 << 1) | (byte213 >>> 7); - final long byte214 = blocks[blocksOffset++] & 0xFF; - final long byte215 = blocks[blocksOffset++] & 0xFF; - final long byte216 = blocks[blocksOffset++] & 0xFF; - final long byte217 = blocks[blocksOffset++] & 0xFF; - final long byte218 = blocks[blocksOffset++] & 0xFF; - final long byte219 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte213 & 127) << 48) | (byte214 << 40) | (byte215 << 32) | (byte216 << 24) | (byte217 << 16) | (byte218 << 8) | byte219; - final long byte220 = blocks[blocksOffset++] & 0xFF; - final long byte221 = blocks[blocksOffset++] & 0xFF; - final long byte222 = blocks[blocksOffset++] & 0xFF; - final long byte223 = blocks[blocksOffset++] & 0xFF; - final long byte224 = blocks[blocksOffset++] & 0xFF; - final long byte225 = blocks[blocksOffset++] & 0xFF; - final long byte226 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte220 << 47) | (byte221 << 39) | (byte222 << 31) | (byte223 << 23) | (byte224 << 15) | (byte225 << 7) | (byte226 >>> 1); - final long byte227 = blocks[blocksOffset++] & 0xFF; - final long byte228 = blocks[blocksOffset++] & 0xFF; - final long byte229 = blocks[blocksOffset++] & 0xFF; - final long byte230 = blocks[blocksOffset++] & 0xFF; - final long byte231 = blocks[blocksOffset++] & 0xFF; - final long byte232 = blocks[blocksOffset++] & 0xFF; - final long byte233 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte226 & 1) << 54) | (byte227 << 46) | (byte228 << 38) | (byte229 << 30) | (byte230 << 22) | (byte231 << 14) | (byte232 << 6) | (byte233 >>> 2); - final long byte234 = blocks[blocksOffset++] & 0xFF; - final long byte235 = blocks[blocksOffset++] & 0xFF; - final long byte236 = blocks[blocksOffset++] & 0xFF; - final long byte237 = blocks[blocksOffset++] & 0xFF; - final long byte238 = blocks[blocksOffset++] & 0xFF; - final long byte239 = blocks[blocksOffset++] & 0xFF; - final long byte240 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte233 & 3) << 53) | (byte234 << 45) | (byte235 << 37) | (byte236 << 29) | (byte237 << 21) | (byte238 << 13) | (byte239 << 5) | (byte240 >>> 3); - final long byte241 = blocks[blocksOffset++] & 0xFF; - final long byte242 = blocks[blocksOffset++] & 0xFF; - final long byte243 = blocks[blocksOffset++] & 0xFF; - final long byte244 = blocks[blocksOffset++] & 0xFF; - final long byte245 = blocks[blocksOffset++] & 0xFF; - final long byte246 = blocks[blocksOffset++] & 0xFF; - final long byte247 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte240 & 7) << 52) | (byte241 << 44) | (byte242 << 36) | (byte243 << 28) | (byte244 << 20) | (byte245 << 12) | (byte246 << 4) | (byte247 >>> 4); - final long byte248 = blocks[blocksOffset++] & 0xFF; - final long byte249 = blocks[blocksOffset++] & 0xFF; - final long byte250 = blocks[blocksOffset++] & 0xFF; - final long byte251 = blocks[blocksOffset++] & 0xFF; - final long byte252 = blocks[blocksOffset++] & 0xFF; - final long byte253 = blocks[blocksOffset++] & 0xFF; - final long byte254 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte247 & 15) << 51) | (byte248 << 43) | (byte249 << 35) | (byte250 << 27) | (byte251 << 19) | (byte252 << 11) | (byte253 << 3) | (byte254 >>> 5); - final long byte255 = blocks[blocksOffset++] & 0xFF; - final long byte256 = blocks[blocksOffset++] & 0xFF; - final long byte257 = blocks[blocksOffset++] & 0xFF; - final long byte258 = blocks[blocksOffset++] & 0xFF; - final long byte259 = blocks[blocksOffset++] & 0xFF; - final long byte260 = blocks[blocksOffset++] & 0xFF; - final long byte261 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte254 & 31) << 50) | (byte255 << 42) | (byte256 << 34) | (byte257 << 26) | (byte258 << 18) | (byte259 << 10) | (byte260 << 2) | (byte261 >>> 6); - final long byte262 = blocks[blocksOffset++] & 0xFF; - final long byte263 = blocks[blocksOffset++] & 0xFF; - final long byte264 = blocks[blocksOffset++] & 0xFF; - final long byte265 = blocks[blocksOffset++] & 0xFF; - final long byte266 = blocks[blocksOffset++] & 0xFF; - final long byte267 = blocks[blocksOffset++] & 0xFF; - final long byte268 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte261 & 63) << 49) | (byte262 << 41) | (byte263 << 33) | (byte264 << 25) | (byte265 << 17) | (byte266 << 9) | (byte267 << 1) | (byte268 >>> 7); - final long byte269 = blocks[blocksOffset++] & 0xFF; - final long byte270 = blocks[blocksOffset++] & 0xFF; - final long byte271 = blocks[blocksOffset++] & 0xFF; - final long byte272 = blocks[blocksOffset++] & 0xFF; - final long byte273 = blocks[blocksOffset++] & 0xFF; - final long byte274 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte268 & 127) << 48) | (byte269 << 40) | (byte270 << 32) | (byte271 << 24) | (byte272 << 16) | (byte273 << 8) | byte274; - final long byte275 = blocks[blocksOffset++] & 0xFF; - final long byte276 = blocks[blocksOffset++] & 0xFF; - final long byte277 = blocks[blocksOffset++] & 0xFF; - final long byte278 = blocks[blocksOffset++] & 0xFF; - final long byte279 = blocks[blocksOffset++] & 0xFF; - final long byte280 = blocks[blocksOffset++] & 0xFF; - final long byte281 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte275 << 47) | (byte276 << 39) | (byte277 << 31) | (byte278 << 23) | (byte279 << 15) | (byte280 << 7) | (byte281 >>> 1); - final long byte282 = blocks[blocksOffset++] & 0xFF; - final long byte283 = blocks[blocksOffset++] & 0xFF; - final long byte284 = blocks[blocksOffset++] & 0xFF; - final long byte285 = blocks[blocksOffset++] & 0xFF; - final long byte286 = blocks[blocksOffset++] & 0xFF; - final long byte287 = blocks[blocksOffset++] & 0xFF; - final long byte288 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte281 & 1) << 54) | (byte282 << 46) | (byte283 << 38) | (byte284 << 30) | (byte285 << 22) | (byte286 << 14) | (byte287 << 6) | (byte288 >>> 2); - final long byte289 = blocks[blocksOffset++] & 0xFF; - final long byte290 = blocks[blocksOffset++] & 0xFF; - final long byte291 = blocks[blocksOffset++] & 0xFF; - final long byte292 = blocks[blocksOffset++] & 0xFF; - final long byte293 = blocks[blocksOffset++] & 0xFF; - final long byte294 = blocks[blocksOffset++] & 0xFF; - final long byte295 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte288 & 3) << 53) | (byte289 << 45) | (byte290 << 37) | (byte291 << 29) | (byte292 << 21) | (byte293 << 13) | (byte294 << 5) | (byte295 >>> 3); - final long byte296 = blocks[blocksOffset++] & 0xFF; - final long byte297 = blocks[blocksOffset++] & 0xFF; - final long byte298 = blocks[blocksOffset++] & 0xFF; - final long byte299 = blocks[blocksOffset++] & 0xFF; - final long byte300 = blocks[blocksOffset++] & 0xFF; - final long byte301 = blocks[blocksOffset++] & 0xFF; - final long byte302 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte295 & 7) << 52) | (byte296 << 44) | (byte297 << 36) | (byte298 << 28) | (byte299 << 20) | (byte300 << 12) | (byte301 << 4) | (byte302 >>> 4); - final long byte303 = blocks[blocksOffset++] & 0xFF; - final long byte304 = blocks[blocksOffset++] & 0xFF; - final long byte305 = blocks[blocksOffset++] & 0xFF; - final long byte306 = blocks[blocksOffset++] & 0xFF; - final long byte307 = blocks[blocksOffset++] & 0xFF; - final long byte308 = blocks[blocksOffset++] & 0xFF; - final long byte309 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte302 & 15) << 51) | (byte303 << 43) | (byte304 << 35) | (byte305 << 27) | (byte306 << 19) | (byte307 << 11) | (byte308 << 3) | (byte309 >>> 5); - final long byte310 = blocks[blocksOffset++] & 0xFF; - final long byte311 = blocks[blocksOffset++] & 0xFF; - final long byte312 = blocks[blocksOffset++] & 0xFF; - final long byte313 = blocks[blocksOffset++] & 0xFF; - final long byte314 = blocks[blocksOffset++] & 0xFF; - final long byte315 = blocks[blocksOffset++] & 0xFF; - final long byte316 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte309 & 31) << 50) | (byte310 << 42) | (byte311 << 34) | (byte312 << 26) | (byte313 << 18) | (byte314 << 10) | (byte315 << 2) | (byte316 >>> 6); - final long byte317 = blocks[blocksOffset++] & 0xFF; - final long byte318 = blocks[blocksOffset++] & 0xFF; - final long byte319 = blocks[blocksOffset++] & 0xFF; - final long byte320 = blocks[blocksOffset++] & 0xFF; - final long byte321 = blocks[blocksOffset++] & 0xFF; - final long byte322 = blocks[blocksOffset++] & 0xFF; - final long byte323 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte316 & 63) << 49) | (byte317 << 41) | (byte318 << 33) | (byte319 << 25) | (byte320 << 17) | (byte321 << 9) | (byte322 << 1) | (byte323 >>> 7); - final long byte324 = blocks[blocksOffset++] & 0xFF; - final long byte325 = blocks[blocksOffset++] & 0xFF; - final long byte326 = blocks[blocksOffset++] & 0xFF; - final long byte327 = blocks[blocksOffset++] & 0xFF; - final long byte328 = blocks[blocksOffset++] & 0xFF; - final long byte329 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte323 & 127) << 48) | (byte324 << 40) | (byte325 << 32) | (byte326 << 24) | (byte327 << 16) | (byte328 << 8) | byte329; - final long byte330 = blocks[blocksOffset++] & 0xFF; - final long byte331 = blocks[blocksOffset++] & 0xFF; - final long byte332 = blocks[blocksOffset++] & 0xFF; - final long byte333 = blocks[blocksOffset++] & 0xFF; - final long byte334 = blocks[blocksOffset++] & 0xFF; - final long byte335 = blocks[blocksOffset++] & 0xFF; - final long byte336 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte330 << 47) | (byte331 << 39) | (byte332 << 31) | (byte333 << 23) | (byte334 << 15) | (byte335 << 7) | (byte336 >>> 1); - final long byte337 = blocks[blocksOffset++] & 0xFF; - final long byte338 = blocks[blocksOffset++] & 0xFF; - final long byte339 = blocks[blocksOffset++] & 0xFF; - final long byte340 = blocks[blocksOffset++] & 0xFF; - final long byte341 = blocks[blocksOffset++] & 0xFF; - final long byte342 = blocks[blocksOffset++] & 0xFF; - final long byte343 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte336 & 1) << 54) | (byte337 << 46) | (byte338 << 38) | (byte339 << 30) | (byte340 << 22) | (byte341 << 14) | (byte342 << 6) | (byte343 >>> 2); - final long byte344 = blocks[blocksOffset++] & 0xFF; - final long byte345 = blocks[blocksOffset++] & 0xFF; - final long byte346 = blocks[blocksOffset++] & 0xFF; - final long byte347 = blocks[blocksOffset++] & 0xFF; - final long byte348 = blocks[blocksOffset++] & 0xFF; - final long byte349 = blocks[blocksOffset++] & 0xFF; - final long byte350 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte343 & 3) << 53) | (byte344 << 45) | (byte345 << 37) | (byte346 << 29) | (byte347 << 21) | (byte348 << 13) | (byte349 << 5) | (byte350 >>> 3); - final long byte351 = blocks[blocksOffset++] & 0xFF; - final long byte352 = blocks[blocksOffset++] & 0xFF; - final long byte353 = blocks[blocksOffset++] & 0xFF; - final long byte354 = blocks[blocksOffset++] & 0xFF; - final long byte355 = blocks[blocksOffset++] & 0xFF; - final long byte356 = blocks[blocksOffset++] & 0xFF; - final long byte357 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte350 & 7) << 52) | (byte351 << 44) | (byte352 << 36) | (byte353 << 28) | (byte354 << 20) | (byte355 << 12) | (byte356 << 4) | (byte357 >>> 4); - final long byte358 = blocks[blocksOffset++] & 0xFF; - final long byte359 = blocks[blocksOffset++] & 0xFF; - final long byte360 = blocks[blocksOffset++] & 0xFF; - final long byte361 = blocks[blocksOffset++] & 0xFF; - final long byte362 = blocks[blocksOffset++] & 0xFF; - final long byte363 = blocks[blocksOffset++] & 0xFF; - final long byte364 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte357 & 15) << 51) | (byte358 << 43) | (byte359 << 35) | (byte360 << 27) | (byte361 << 19) | (byte362 << 11) | (byte363 << 3) | (byte364 >>> 5); - final long byte365 = blocks[blocksOffset++] & 0xFF; - final long byte366 = blocks[blocksOffset++] & 0xFF; - final long byte367 = blocks[blocksOffset++] & 0xFF; - final long byte368 = blocks[blocksOffset++] & 0xFF; - final long byte369 = blocks[blocksOffset++] & 0xFF; - final long byte370 = blocks[blocksOffset++] & 0xFF; - final long byte371 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte364 & 31) << 50) | (byte365 << 42) | (byte366 << 34) | (byte367 << 26) | (byte368 << 18) | (byte369 << 10) | (byte370 << 2) | (byte371 >>> 6); - final long byte372 = blocks[blocksOffset++] & 0xFF; - final long byte373 = blocks[blocksOffset++] & 0xFF; - final long byte374 = blocks[blocksOffset++] & 0xFF; - final long byte375 = blocks[blocksOffset++] & 0xFF; - final long byte376 = blocks[blocksOffset++] & 0xFF; - final long byte377 = blocks[blocksOffset++] & 0xFF; - final long byte378 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte371 & 63) << 49) | (byte372 << 41) | (byte373 << 33) | (byte374 << 25) | (byte375 << 17) | (byte376 << 9) | (byte377 << 1) | (byte378 >>> 7); - final long byte379 = blocks[blocksOffset++] & 0xFF; - final long byte380 = blocks[blocksOffset++] & 0xFF; - final long byte381 = blocks[blocksOffset++] & 0xFF; - final long byte382 = blocks[blocksOffset++] & 0xFF; - final long byte383 = blocks[blocksOffset++] & 0xFF; - final long byte384 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte378 & 127) << 48) | (byte379 << 40) | (byte380 << 32) | (byte381 << 24) | (byte382 << 16) | (byte383 << 8) | byte384; - final long byte385 = blocks[blocksOffset++] & 0xFF; - final long byte386 = blocks[blocksOffset++] & 0xFF; - final long byte387 = blocks[blocksOffset++] & 0xFF; - final long byte388 = blocks[blocksOffset++] & 0xFF; - final long byte389 = blocks[blocksOffset++] & 0xFF; - final long byte390 = blocks[blocksOffset++] & 0xFF; - final long byte391 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte385 << 47) | (byte386 << 39) | (byte387 << 31) | (byte388 << 23) | (byte389 << 15) | (byte390 << 7) | (byte391 >>> 1); - final long byte392 = blocks[blocksOffset++] & 0xFF; - final long byte393 = blocks[blocksOffset++] & 0xFF; - final long byte394 = blocks[blocksOffset++] & 0xFF; - final long byte395 = blocks[blocksOffset++] & 0xFF; - final long byte396 = blocks[blocksOffset++] & 0xFF; - final long byte397 = blocks[blocksOffset++] & 0xFF; - final long byte398 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte391 & 1) << 54) | (byte392 << 46) | (byte393 << 38) | (byte394 << 30) | (byte395 << 22) | (byte396 << 14) | (byte397 << 6) | (byte398 >>> 2); - final long byte399 = blocks[blocksOffset++] & 0xFF; - final long byte400 = blocks[blocksOffset++] & 0xFF; - final long byte401 = blocks[blocksOffset++] & 0xFF; - final long byte402 = blocks[blocksOffset++] & 0xFF; - final long byte403 = blocks[blocksOffset++] & 0xFF; - final long byte404 = blocks[blocksOffset++] & 0xFF; - final long byte405 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte398 & 3) << 53) | (byte399 << 45) | (byte400 << 37) | (byte401 << 29) | (byte402 << 21) | (byte403 << 13) | (byte404 << 5) | (byte405 >>> 3); - final long byte406 = blocks[blocksOffset++] & 0xFF; - final long byte407 = blocks[blocksOffset++] & 0xFF; - final long byte408 = blocks[blocksOffset++] & 0xFF; - final long byte409 = blocks[blocksOffset++] & 0xFF; - final long byte410 = blocks[blocksOffset++] & 0xFF; - final long byte411 = blocks[blocksOffset++] & 0xFF; - final long byte412 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte405 & 7) << 52) | (byte406 << 44) | (byte407 << 36) | (byte408 << 28) | (byte409 << 20) | (byte410 << 12) | (byte411 << 4) | (byte412 >>> 4); - final long byte413 = blocks[blocksOffset++] & 0xFF; - final long byte414 = blocks[blocksOffset++] & 0xFF; - final long byte415 = blocks[blocksOffset++] & 0xFF; - final long byte416 = blocks[blocksOffset++] & 0xFF; - final long byte417 = blocks[blocksOffset++] & 0xFF; - final long byte418 = blocks[blocksOffset++] & 0xFF; - final long byte419 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte412 & 15) << 51) | (byte413 << 43) | (byte414 << 35) | (byte415 << 27) | (byte416 << 19) | (byte417 << 11) | (byte418 << 3) | (byte419 >>> 5); - final long byte420 = blocks[blocksOffset++] & 0xFF; - final long byte421 = blocks[blocksOffset++] & 0xFF; - final long byte422 = blocks[blocksOffset++] & 0xFF; - final long byte423 = blocks[blocksOffset++] & 0xFF; - final long byte424 = blocks[blocksOffset++] & 0xFF; - final long byte425 = blocks[blocksOffset++] & 0xFF; - final long byte426 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte419 & 31) << 50) | (byte420 << 42) | (byte421 << 34) | (byte422 << 26) | (byte423 << 18) | (byte424 << 10) | (byte425 << 2) | (byte426 >>> 6); - final long byte427 = blocks[blocksOffset++] & 0xFF; - final long byte428 = blocks[blocksOffset++] & 0xFF; - final long byte429 = blocks[blocksOffset++] & 0xFF; - final long byte430 = blocks[blocksOffset++] & 0xFF; - final long byte431 = blocks[blocksOffset++] & 0xFF; - final long byte432 = blocks[blocksOffset++] & 0xFF; - final long byte433 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte426 & 63) << 49) | (byte427 << 41) | (byte428 << 33) | (byte429 << 25) | (byte430 << 17) | (byte431 << 9) | (byte432 << 1) | (byte433 >>> 7); - final long byte434 = blocks[blocksOffset++] & 0xFF; - final long byte435 = blocks[blocksOffset++] & 0xFF; - final long byte436 = blocks[blocksOffset++] & 0xFF; - final long byte437 = blocks[blocksOffset++] & 0xFF; - final long byte438 = blocks[blocksOffset++] & 0xFF; - final long byte439 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte433 & 127) << 48) | (byte434 << 40) | (byte435 << 32) | (byte436 << 24) | (byte437 << 16) | (byte438 << 8) | byte439; - } - } - - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 9) | ((values[valuesOffset] & 0xffffffffL) >>> 46); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 18) | ((values[valuesOffset] & 0xffffffffL) >>> 37); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 27) | ((values[valuesOffset] & 0xffffffffL) >>> 28); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 36) | ((values[valuesOffset] & 0xffffffffL) >>> 19); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 45) | ((values[valuesOffset] & 0xffffffffL) >>> 10); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 54) | ((values[valuesOffset] & 0xffffffffL) >>> 1); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 63) | ((values[valuesOffset++] & 0xffffffffL) << 8) | ((values[valuesOffset] & 0xffffffffL) >>> 47); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 17) | ((values[valuesOffset] & 0xffffffffL) >>> 38); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 26) | ((values[valuesOffset] & 0xffffffffL) >>> 29); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 35) | ((values[valuesOffset] & 0xffffffffL) >>> 20); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 44) | ((values[valuesOffset] & 0xffffffffL) >>> 11); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 53) | ((values[valuesOffset] & 0xffffffffL) >>> 2); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 62) | ((values[valuesOffset++] & 0xffffffffL) << 7) | ((values[valuesOffset] & 0xffffffffL) >>> 48); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 16) | ((values[valuesOffset] & 0xffffffffL) >>> 39); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 25) | ((values[valuesOffset] & 0xffffffffL) >>> 30); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 34) | ((values[valuesOffset] & 0xffffffffL) >>> 21); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 43) | ((values[valuesOffset] & 0xffffffffL) >>> 12); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 52) | ((values[valuesOffset] & 0xffffffffL) >>> 3); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 61) | ((values[valuesOffset++] & 0xffffffffL) << 6) | ((values[valuesOffset] & 0xffffffffL) >>> 49); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 15) | ((values[valuesOffset] & 0xffffffffL) >>> 40); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 24) | ((values[valuesOffset] & 0xffffffffL) >>> 31); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 33) | ((values[valuesOffset] & 0xffffffffL) >>> 22); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 42) | ((values[valuesOffset] & 0xffffffffL) >>> 13); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 51) | ((values[valuesOffset] & 0xffffffffL) >>> 4); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 60) | ((values[valuesOffset++] & 0xffffffffL) << 5) | ((values[valuesOffset] & 0xffffffffL) >>> 50); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 14) | ((values[valuesOffset] & 0xffffffffL) >>> 41); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 23) | ((values[valuesOffset] & 0xffffffffL) >>> 32); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 32) | ((values[valuesOffset] & 0xffffffffL) >>> 23); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 41) | ((values[valuesOffset] & 0xffffffffL) >>> 14); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 50) | ((values[valuesOffset] & 0xffffffffL) >>> 5); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 59) | ((values[valuesOffset++] & 0xffffffffL) << 4) | ((values[valuesOffset] & 0xffffffffL) >>> 51); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 13) | ((values[valuesOffset] & 0xffffffffL) >>> 42); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 22) | ((values[valuesOffset] & 0xffffffffL) >>> 33); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 31) | ((values[valuesOffset] & 0xffffffffL) >>> 24); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 40) | ((values[valuesOffset] & 0xffffffffL) >>> 15); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 49) | ((values[valuesOffset] & 0xffffffffL) >>> 6); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 58) | ((values[valuesOffset++] & 0xffffffffL) << 3) | ((values[valuesOffset] & 0xffffffffL) >>> 52); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 12) | ((values[valuesOffset] & 0xffffffffL) >>> 43); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 21) | ((values[valuesOffset] & 0xffffffffL) >>> 34); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 30) | ((values[valuesOffset] & 0xffffffffL) >>> 25); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 39) | ((values[valuesOffset] & 0xffffffffL) >>> 16); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 48) | ((values[valuesOffset] & 0xffffffffL) >>> 7); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 57) | ((values[valuesOffset++] & 0xffffffffL) << 2) | ((values[valuesOffset] & 0xffffffffL) >>> 53); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 11) | ((values[valuesOffset] & 0xffffffffL) >>> 44); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 20) | ((values[valuesOffset] & 0xffffffffL) >>> 35); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 29) | ((values[valuesOffset] & 0xffffffffL) >>> 26); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 38) | ((values[valuesOffset] & 0xffffffffL) >>> 17); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 47) | ((values[valuesOffset] & 0xffffffffL) >>> 8); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 56) | ((values[valuesOffset++] & 0xffffffffL) << 1) | ((values[valuesOffset] & 0xffffffffL) >>> 54); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 10) | ((values[valuesOffset] & 0xffffffffL) >>> 45); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 19) | ((values[valuesOffset] & 0xffffffffL) >>> 36); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 28) | ((values[valuesOffset] & 0xffffffffL) >>> 27); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 37) | ((values[valuesOffset] & 0xffffffffL) >>> 18); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 46) | ((values[valuesOffset] & 0xffffffffL) >>> 9); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 55) | (values[valuesOffset++] & 0xffffffffL); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] << 9) | (values[valuesOffset] >>> 46); - blocks[blocksOffset++] = (values[valuesOffset++] << 18) | (values[valuesOffset] >>> 37); - blocks[blocksOffset++] = (values[valuesOffset++] << 27) | (values[valuesOffset] >>> 28); - blocks[blocksOffset++] = (values[valuesOffset++] << 36) | (values[valuesOffset] >>> 19); - blocks[blocksOffset++] = (values[valuesOffset++] << 45) | (values[valuesOffset] >>> 10); - blocks[blocksOffset++] = (values[valuesOffset++] << 54) | (values[valuesOffset] >>> 1); - blocks[blocksOffset++] = (values[valuesOffset++] << 63) | (values[valuesOffset++] << 8) | (values[valuesOffset] >>> 47); - blocks[blocksOffset++] = (values[valuesOffset++] << 17) | (values[valuesOffset] >>> 38); - blocks[blocksOffset++] = (values[valuesOffset++] << 26) | (values[valuesOffset] >>> 29); - blocks[blocksOffset++] = (values[valuesOffset++] << 35) | (values[valuesOffset] >>> 20); - blocks[blocksOffset++] = (values[valuesOffset++] << 44) | (values[valuesOffset] >>> 11); - blocks[blocksOffset++] = (values[valuesOffset++] << 53) | (values[valuesOffset] >>> 2); - blocks[blocksOffset++] = (values[valuesOffset++] << 62) | (values[valuesOffset++] << 7) | (values[valuesOffset] >>> 48); - blocks[blocksOffset++] = (values[valuesOffset++] << 16) | (values[valuesOffset] >>> 39); - blocks[blocksOffset++] = (values[valuesOffset++] << 25) | (values[valuesOffset] >>> 30); - blocks[blocksOffset++] = (values[valuesOffset++] << 34) | (values[valuesOffset] >>> 21); - blocks[blocksOffset++] = (values[valuesOffset++] << 43) | (values[valuesOffset] >>> 12); - blocks[blocksOffset++] = (values[valuesOffset++] << 52) | (values[valuesOffset] >>> 3); - blocks[blocksOffset++] = (values[valuesOffset++] << 61) | (values[valuesOffset++] << 6) | (values[valuesOffset] >>> 49); - blocks[blocksOffset++] = (values[valuesOffset++] << 15) | (values[valuesOffset] >>> 40); - blocks[blocksOffset++] = (values[valuesOffset++] << 24) | (values[valuesOffset] >>> 31); - blocks[blocksOffset++] = (values[valuesOffset++] << 33) | (values[valuesOffset] >>> 22); - blocks[blocksOffset++] = (values[valuesOffset++] << 42) | (values[valuesOffset] >>> 13); - blocks[blocksOffset++] = (values[valuesOffset++] << 51) | (values[valuesOffset] >>> 4); - blocks[blocksOffset++] = (values[valuesOffset++] << 60) | (values[valuesOffset++] << 5) | (values[valuesOffset] >>> 50); - blocks[blocksOffset++] = (values[valuesOffset++] << 14) | (values[valuesOffset] >>> 41); - blocks[blocksOffset++] = (values[valuesOffset++] << 23) | (values[valuesOffset] >>> 32); - blocks[blocksOffset++] = (values[valuesOffset++] << 32) | (values[valuesOffset] >>> 23); - blocks[blocksOffset++] = (values[valuesOffset++] << 41) | (values[valuesOffset] >>> 14); - blocks[blocksOffset++] = (values[valuesOffset++] << 50) | (values[valuesOffset] >>> 5); - blocks[blocksOffset++] = (values[valuesOffset++] << 59) | (values[valuesOffset++] << 4) | (values[valuesOffset] >>> 51); - blocks[blocksOffset++] = (values[valuesOffset++] << 13) | (values[valuesOffset] >>> 42); - blocks[blocksOffset++] = (values[valuesOffset++] << 22) | (values[valuesOffset] >>> 33); - blocks[blocksOffset++] = (values[valuesOffset++] << 31) | (values[valuesOffset] >>> 24); - blocks[blocksOffset++] = (values[valuesOffset++] << 40) | (values[valuesOffset] >>> 15); - blocks[blocksOffset++] = (values[valuesOffset++] << 49) | (values[valuesOffset] >>> 6); - blocks[blocksOffset++] = (values[valuesOffset++] << 58) | (values[valuesOffset++] << 3) | (values[valuesOffset] >>> 52); - blocks[blocksOffset++] = (values[valuesOffset++] << 12) | (values[valuesOffset] >>> 43); - blocks[blocksOffset++] = (values[valuesOffset++] << 21) | (values[valuesOffset] >>> 34); - blocks[blocksOffset++] = (values[valuesOffset++] << 30) | (values[valuesOffset] >>> 25); - blocks[blocksOffset++] = (values[valuesOffset++] << 39) | (values[valuesOffset] >>> 16); - blocks[blocksOffset++] = (values[valuesOffset++] << 48) | (values[valuesOffset] >>> 7); - blocks[blocksOffset++] = (values[valuesOffset++] << 57) | (values[valuesOffset++] << 2) | (values[valuesOffset] >>> 53); - blocks[blocksOffset++] = (values[valuesOffset++] << 11) | (values[valuesOffset] >>> 44); - blocks[blocksOffset++] = (values[valuesOffset++] << 20) | (values[valuesOffset] >>> 35); - blocks[blocksOffset++] = (values[valuesOffset++] << 29) | (values[valuesOffset] >>> 26); - blocks[blocksOffset++] = (values[valuesOffset++] << 38) | (values[valuesOffset] >>> 17); - blocks[blocksOffset++] = (values[valuesOffset++] << 47) | (values[valuesOffset] >>> 8); - blocks[blocksOffset++] = (values[valuesOffset++] << 56) | (values[valuesOffset++] << 1) | (values[valuesOffset] >>> 54); - blocks[blocksOffset++] = (values[valuesOffset++] << 10) | (values[valuesOffset] >>> 45); - blocks[blocksOffset++] = (values[valuesOffset++] << 19) | (values[valuesOffset] >>> 36); - blocks[blocksOffset++] = (values[valuesOffset++] << 28) | (values[valuesOffset] >>> 27); - blocks[blocksOffset++] = (values[valuesOffset++] << 37) | (values[valuesOffset] >>> 18); - blocks[blocksOffset++] = (values[valuesOffset++] << 46) | (values[valuesOffset] >>> 9); - blocks[blocksOffset++] = (values[valuesOffset++] << 55) | values[valuesOffset++]; - } - } - -} diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked56.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked56.java deleted file mode 100644 index 8b752bc2f96..00000000000 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked56.java +++ /dev/null @@ -1,171 +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 BulkOperationPacked56 extends BulkOperation { - @Override - public int blockCount() { - return 7; - } - - @Override - public int valueCount() { - return 8; - } - - @Override - public void decode(long[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) { - throw new UnsupportedOperationException(); - } - - @Override - public void decode(byte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) { - throw new UnsupportedOperationException(); - } - - @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 >>> 8; - final long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block0 & 255L) << 48) | (block1 >>> 16); - final long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block1 & 65535L) << 40) | (block2 >>> 24); - final long block3 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block2 & 16777215L) << 32) | (block3 >>> 32); - final long block4 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block3 & 4294967295L) << 24) | (block4 >>> 40); - final long block5 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block4 & 1099511627775L) << 16) | (block5 >>> 48); - final long block6 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block5 & 281474976710655L) << 8) | (block6 >>> 56); - values[valuesOffset++] = block6 & 72057594037927935L; - } - } - - @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; - final long byte3 = blocks[blocksOffset++] & 0xFF; - final long byte4 = blocks[blocksOffset++] & 0xFF; - final long byte5 = blocks[blocksOffset++] & 0xFF; - final long byte6 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte0 << 48) | (byte1 << 40) | (byte2 << 32) | (byte3 << 24) | (byte4 << 16) | (byte5 << 8) | byte6; - final long byte7 = blocks[blocksOffset++] & 0xFF; - final long byte8 = blocks[blocksOffset++] & 0xFF; - final long byte9 = blocks[blocksOffset++] & 0xFF; - final long byte10 = blocks[blocksOffset++] & 0xFF; - final long byte11 = blocks[blocksOffset++] & 0xFF; - final long byte12 = blocks[blocksOffset++] & 0xFF; - final long byte13 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte7 << 48) | (byte8 << 40) | (byte9 << 32) | (byte10 << 24) | (byte11 << 16) | (byte12 << 8) | byte13; - final long byte14 = blocks[blocksOffset++] & 0xFF; - final long byte15 = blocks[blocksOffset++] & 0xFF; - final long byte16 = blocks[blocksOffset++] & 0xFF; - final long byte17 = blocks[blocksOffset++] & 0xFF; - final long byte18 = blocks[blocksOffset++] & 0xFF; - final long byte19 = blocks[blocksOffset++] & 0xFF; - final long byte20 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte14 << 48) | (byte15 << 40) | (byte16 << 32) | (byte17 << 24) | (byte18 << 16) | (byte19 << 8) | byte20; - final long byte21 = blocks[blocksOffset++] & 0xFF; - final long byte22 = blocks[blocksOffset++] & 0xFF; - final long byte23 = blocks[blocksOffset++] & 0xFF; - final long byte24 = blocks[blocksOffset++] & 0xFF; - final long byte25 = blocks[blocksOffset++] & 0xFF; - final long byte26 = blocks[blocksOffset++] & 0xFF; - final long byte27 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte21 << 48) | (byte22 << 40) | (byte23 << 32) | (byte24 << 24) | (byte25 << 16) | (byte26 << 8) | byte27; - final long byte28 = blocks[blocksOffset++] & 0xFF; - final long byte29 = blocks[blocksOffset++] & 0xFF; - final long byte30 = blocks[blocksOffset++] & 0xFF; - final long byte31 = blocks[blocksOffset++] & 0xFF; - final long byte32 = blocks[blocksOffset++] & 0xFF; - final long byte33 = blocks[blocksOffset++] & 0xFF; - final long byte34 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte28 << 48) | (byte29 << 40) | (byte30 << 32) | (byte31 << 24) | (byte32 << 16) | (byte33 << 8) | byte34; - final long byte35 = blocks[blocksOffset++] & 0xFF; - final long byte36 = blocks[blocksOffset++] & 0xFF; - final long byte37 = blocks[blocksOffset++] & 0xFF; - final long byte38 = blocks[blocksOffset++] & 0xFF; - final long byte39 = blocks[blocksOffset++] & 0xFF; - final long byte40 = blocks[blocksOffset++] & 0xFF; - final long byte41 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte35 << 48) | (byte36 << 40) | (byte37 << 32) | (byte38 << 24) | (byte39 << 16) | (byte40 << 8) | byte41; - final long byte42 = blocks[blocksOffset++] & 0xFF; - final long byte43 = blocks[blocksOffset++] & 0xFF; - final long byte44 = blocks[blocksOffset++] & 0xFF; - final long byte45 = blocks[blocksOffset++] & 0xFF; - final long byte46 = blocks[blocksOffset++] & 0xFF; - final long byte47 = blocks[blocksOffset++] & 0xFF; - final long byte48 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte42 << 48) | (byte43 << 40) | (byte44 << 32) | (byte45 << 24) | (byte46 << 16) | (byte47 << 8) | byte48; - final long byte49 = blocks[blocksOffset++] & 0xFF; - final long byte50 = blocks[blocksOffset++] & 0xFF; - final long byte51 = blocks[blocksOffset++] & 0xFF; - final long byte52 = blocks[blocksOffset++] & 0xFF; - final long byte53 = blocks[blocksOffset++] & 0xFF; - final long byte54 = blocks[blocksOffset++] & 0xFF; - final long byte55 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte49 << 48) | (byte50 << 40) | (byte51 << 32) | (byte52 << 24) | (byte53 << 16) | (byte54 << 8) | byte55; - } - } - - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 8) | ((values[valuesOffset] & 0xffffffffL) >>> 48); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 16) | ((values[valuesOffset] & 0xffffffffL) >>> 40); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 24) | ((values[valuesOffset] & 0xffffffffL) >>> 32); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 32) | ((values[valuesOffset] & 0xffffffffL) >>> 24); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 40) | ((values[valuesOffset] & 0xffffffffL) >>> 16); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 48) | ((values[valuesOffset] & 0xffffffffL) >>> 8); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 56) | (values[valuesOffset++] & 0xffffffffL); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] << 8) | (values[valuesOffset] >>> 48); - blocks[blocksOffset++] = (values[valuesOffset++] << 16) | (values[valuesOffset] >>> 40); - blocks[blocksOffset++] = (values[valuesOffset++] << 24) | (values[valuesOffset] >>> 32); - blocks[blocksOffset++] = (values[valuesOffset++] << 32) | (values[valuesOffset] >>> 24); - blocks[blocksOffset++] = (values[valuesOffset++] << 40) | (values[valuesOffset] >>> 16); - blocks[blocksOffset++] = (values[valuesOffset++] << 48) | (values[valuesOffset] >>> 8); - blocks[blocksOffset++] = (values[valuesOffset++] << 56) | values[valuesOffset++]; - } - } - -} diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked57.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked57.java deleted file mode 100644 index 360ed343fd9..00000000000 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked57.java +++ /dev/null @@ -1,833 +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 BulkOperationPacked57 extends BulkOperation { - @Override - public int blockCount() { - return 57; - } - - @Override - public int valueCount() { - return 64; - } - - @Override - public void decode(long[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) { - throw new UnsupportedOperationException(); - } - - @Override - public void decode(byte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) { - throw new UnsupportedOperationException(); - } - - @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 >>> 7; - final long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block0 & 127L) << 50) | (block1 >>> 14); - final long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block1 & 16383L) << 43) | (block2 >>> 21); - final long block3 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block2 & 2097151L) << 36) | (block3 >>> 28); - final long block4 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block3 & 268435455L) << 29) | (block4 >>> 35); - final long block5 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block4 & 34359738367L) << 22) | (block5 >>> 42); - final long block6 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block5 & 4398046511103L) << 15) | (block6 >>> 49); - final long block7 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block6 & 562949953421311L) << 8) | (block7 >>> 56); - final long block8 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block7 & 72057594037927935L) << 1) | (block8 >>> 63); - values[valuesOffset++] = (block8 >>> 6) & 144115188075855871L; - final long block9 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block8 & 63L) << 51) | (block9 >>> 13); - final long block10 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block9 & 8191L) << 44) | (block10 >>> 20); - final long block11 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block10 & 1048575L) << 37) | (block11 >>> 27); - final long block12 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block11 & 134217727L) << 30) | (block12 >>> 34); - final long block13 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block12 & 17179869183L) << 23) | (block13 >>> 41); - final long block14 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block13 & 2199023255551L) << 16) | (block14 >>> 48); - final long block15 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block14 & 281474976710655L) << 9) | (block15 >>> 55); - final long block16 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block15 & 36028797018963967L) << 2) | (block16 >>> 62); - values[valuesOffset++] = (block16 >>> 5) & 144115188075855871L; - final long block17 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block16 & 31L) << 52) | (block17 >>> 12); - final long block18 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block17 & 4095L) << 45) | (block18 >>> 19); - final long block19 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block18 & 524287L) << 38) | (block19 >>> 26); - final long block20 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block19 & 67108863L) << 31) | (block20 >>> 33); - final long block21 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block20 & 8589934591L) << 24) | (block21 >>> 40); - final long block22 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block21 & 1099511627775L) << 17) | (block22 >>> 47); - final long block23 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block22 & 140737488355327L) << 10) | (block23 >>> 54); - final long block24 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block23 & 18014398509481983L) << 3) | (block24 >>> 61); - values[valuesOffset++] = (block24 >>> 4) & 144115188075855871L; - final long block25 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block24 & 15L) << 53) | (block25 >>> 11); - final long block26 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block25 & 2047L) << 46) | (block26 >>> 18); - final long block27 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block26 & 262143L) << 39) | (block27 >>> 25); - final long block28 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block27 & 33554431L) << 32) | (block28 >>> 32); - final long block29 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block28 & 4294967295L) << 25) | (block29 >>> 39); - final long block30 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block29 & 549755813887L) << 18) | (block30 >>> 46); - final long block31 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block30 & 70368744177663L) << 11) | (block31 >>> 53); - final long block32 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block31 & 9007199254740991L) << 4) | (block32 >>> 60); - values[valuesOffset++] = (block32 >>> 3) & 144115188075855871L; - final long block33 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block32 & 7L) << 54) | (block33 >>> 10); - final long block34 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block33 & 1023L) << 47) | (block34 >>> 17); - final long block35 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block34 & 131071L) << 40) | (block35 >>> 24); - final long block36 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block35 & 16777215L) << 33) | (block36 >>> 31); - final long block37 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block36 & 2147483647L) << 26) | (block37 >>> 38); - final long block38 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block37 & 274877906943L) << 19) | (block38 >>> 45); - final long block39 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block38 & 35184372088831L) << 12) | (block39 >>> 52); - final long block40 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block39 & 4503599627370495L) << 5) | (block40 >>> 59); - values[valuesOffset++] = (block40 >>> 2) & 144115188075855871L; - final long block41 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block40 & 3L) << 55) | (block41 >>> 9); - final long block42 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block41 & 511L) << 48) | (block42 >>> 16); - final long block43 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block42 & 65535L) << 41) | (block43 >>> 23); - final long block44 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block43 & 8388607L) << 34) | (block44 >>> 30); - final long block45 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block44 & 1073741823L) << 27) | (block45 >>> 37); - final long block46 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block45 & 137438953471L) << 20) | (block46 >>> 44); - final long block47 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block46 & 17592186044415L) << 13) | (block47 >>> 51); - final long block48 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block47 & 2251799813685247L) << 6) | (block48 >>> 58); - values[valuesOffset++] = (block48 >>> 1) & 144115188075855871L; - final long block49 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block48 & 1L) << 56) | (block49 >>> 8); - final long block50 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block49 & 255L) << 49) | (block50 >>> 15); - final long block51 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block50 & 32767L) << 42) | (block51 >>> 22); - final long block52 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block51 & 4194303L) << 35) | (block52 >>> 29); - final long block53 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block52 & 536870911L) << 28) | (block53 >>> 36); - final long block54 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block53 & 68719476735L) << 21) | (block54 >>> 43); - final long block55 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block54 & 8796093022207L) << 14) | (block55 >>> 50); - final long block56 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block55 & 1125899906842623L) << 7) | (block56 >>> 57); - values[valuesOffset++] = block56 & 144115188075855871L; - } - } - - @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; - final long byte3 = blocks[blocksOffset++] & 0xFF; - final long byte4 = blocks[blocksOffset++] & 0xFF; - final long byte5 = blocks[blocksOffset++] & 0xFF; - final long byte6 = blocks[blocksOffset++] & 0xFF; - final long byte7 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte0 << 49) | (byte1 << 41) | (byte2 << 33) | (byte3 << 25) | (byte4 << 17) | (byte5 << 9) | (byte6 << 1) | (byte7 >>> 7); - final long byte8 = blocks[blocksOffset++] & 0xFF; - final long byte9 = blocks[blocksOffset++] & 0xFF; - final long byte10 = blocks[blocksOffset++] & 0xFF; - final long byte11 = blocks[blocksOffset++] & 0xFF; - final long byte12 = blocks[blocksOffset++] & 0xFF; - final long byte13 = blocks[blocksOffset++] & 0xFF; - final long byte14 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte7 & 127) << 50) | (byte8 << 42) | (byte9 << 34) | (byte10 << 26) | (byte11 << 18) | (byte12 << 10) | (byte13 << 2) | (byte14 >>> 6); - final long byte15 = blocks[blocksOffset++] & 0xFF; - final long byte16 = blocks[blocksOffset++] & 0xFF; - final long byte17 = blocks[blocksOffset++] & 0xFF; - final long byte18 = blocks[blocksOffset++] & 0xFF; - final long byte19 = blocks[blocksOffset++] & 0xFF; - final long byte20 = blocks[blocksOffset++] & 0xFF; - final long byte21 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte14 & 63) << 51) | (byte15 << 43) | (byte16 << 35) | (byte17 << 27) | (byte18 << 19) | (byte19 << 11) | (byte20 << 3) | (byte21 >>> 5); - final long byte22 = blocks[blocksOffset++] & 0xFF; - final long byte23 = blocks[blocksOffset++] & 0xFF; - final long byte24 = blocks[blocksOffset++] & 0xFF; - final long byte25 = blocks[blocksOffset++] & 0xFF; - final long byte26 = blocks[blocksOffset++] & 0xFF; - final long byte27 = blocks[blocksOffset++] & 0xFF; - final long byte28 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte21 & 31) << 52) | (byte22 << 44) | (byte23 << 36) | (byte24 << 28) | (byte25 << 20) | (byte26 << 12) | (byte27 << 4) | (byte28 >>> 4); - final long byte29 = blocks[blocksOffset++] & 0xFF; - final long byte30 = blocks[blocksOffset++] & 0xFF; - final long byte31 = blocks[blocksOffset++] & 0xFF; - final long byte32 = blocks[blocksOffset++] & 0xFF; - final long byte33 = blocks[blocksOffset++] & 0xFF; - final long byte34 = blocks[blocksOffset++] & 0xFF; - final long byte35 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte28 & 15) << 53) | (byte29 << 45) | (byte30 << 37) | (byte31 << 29) | (byte32 << 21) | (byte33 << 13) | (byte34 << 5) | (byte35 >>> 3); - final long byte36 = blocks[blocksOffset++] & 0xFF; - final long byte37 = blocks[blocksOffset++] & 0xFF; - final long byte38 = blocks[blocksOffset++] & 0xFF; - final long byte39 = blocks[blocksOffset++] & 0xFF; - final long byte40 = blocks[blocksOffset++] & 0xFF; - final long byte41 = blocks[blocksOffset++] & 0xFF; - final long byte42 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte35 & 7) << 54) | (byte36 << 46) | (byte37 << 38) | (byte38 << 30) | (byte39 << 22) | (byte40 << 14) | (byte41 << 6) | (byte42 >>> 2); - final long byte43 = blocks[blocksOffset++] & 0xFF; - final long byte44 = blocks[blocksOffset++] & 0xFF; - final long byte45 = blocks[blocksOffset++] & 0xFF; - final long byte46 = blocks[blocksOffset++] & 0xFF; - final long byte47 = blocks[blocksOffset++] & 0xFF; - final long byte48 = blocks[blocksOffset++] & 0xFF; - final long byte49 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte42 & 3) << 55) | (byte43 << 47) | (byte44 << 39) | (byte45 << 31) | (byte46 << 23) | (byte47 << 15) | (byte48 << 7) | (byte49 >>> 1); - final long byte50 = blocks[blocksOffset++] & 0xFF; - final long byte51 = blocks[blocksOffset++] & 0xFF; - final long byte52 = blocks[blocksOffset++] & 0xFF; - final long byte53 = blocks[blocksOffset++] & 0xFF; - final long byte54 = blocks[blocksOffset++] & 0xFF; - final long byte55 = blocks[blocksOffset++] & 0xFF; - final long byte56 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte49 & 1) << 56) | (byte50 << 48) | (byte51 << 40) | (byte52 << 32) | (byte53 << 24) | (byte54 << 16) | (byte55 << 8) | byte56; - final long byte57 = blocks[blocksOffset++] & 0xFF; - final long byte58 = blocks[blocksOffset++] & 0xFF; - final long byte59 = blocks[blocksOffset++] & 0xFF; - final long byte60 = blocks[blocksOffset++] & 0xFF; - final long byte61 = blocks[blocksOffset++] & 0xFF; - final long byte62 = blocks[blocksOffset++] & 0xFF; - final long byte63 = blocks[blocksOffset++] & 0xFF; - final long byte64 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte57 << 49) | (byte58 << 41) | (byte59 << 33) | (byte60 << 25) | (byte61 << 17) | (byte62 << 9) | (byte63 << 1) | (byte64 >>> 7); - final long byte65 = blocks[blocksOffset++] & 0xFF; - final long byte66 = blocks[blocksOffset++] & 0xFF; - final long byte67 = blocks[blocksOffset++] & 0xFF; - final long byte68 = blocks[blocksOffset++] & 0xFF; - final long byte69 = blocks[blocksOffset++] & 0xFF; - final long byte70 = blocks[blocksOffset++] & 0xFF; - final long byte71 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte64 & 127) << 50) | (byte65 << 42) | (byte66 << 34) | (byte67 << 26) | (byte68 << 18) | (byte69 << 10) | (byte70 << 2) | (byte71 >>> 6); - final long byte72 = blocks[blocksOffset++] & 0xFF; - final long byte73 = blocks[blocksOffset++] & 0xFF; - final long byte74 = blocks[blocksOffset++] & 0xFF; - final long byte75 = blocks[blocksOffset++] & 0xFF; - final long byte76 = blocks[blocksOffset++] & 0xFF; - final long byte77 = blocks[blocksOffset++] & 0xFF; - final long byte78 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte71 & 63) << 51) | (byte72 << 43) | (byte73 << 35) | (byte74 << 27) | (byte75 << 19) | (byte76 << 11) | (byte77 << 3) | (byte78 >>> 5); - final long byte79 = blocks[blocksOffset++] & 0xFF; - final long byte80 = blocks[blocksOffset++] & 0xFF; - final long byte81 = blocks[blocksOffset++] & 0xFF; - final long byte82 = blocks[blocksOffset++] & 0xFF; - final long byte83 = blocks[blocksOffset++] & 0xFF; - final long byte84 = blocks[blocksOffset++] & 0xFF; - final long byte85 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte78 & 31) << 52) | (byte79 << 44) | (byte80 << 36) | (byte81 << 28) | (byte82 << 20) | (byte83 << 12) | (byte84 << 4) | (byte85 >>> 4); - final long byte86 = blocks[blocksOffset++] & 0xFF; - final long byte87 = blocks[blocksOffset++] & 0xFF; - final long byte88 = blocks[blocksOffset++] & 0xFF; - final long byte89 = blocks[blocksOffset++] & 0xFF; - final long byte90 = blocks[blocksOffset++] & 0xFF; - final long byte91 = blocks[blocksOffset++] & 0xFF; - final long byte92 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte85 & 15) << 53) | (byte86 << 45) | (byte87 << 37) | (byte88 << 29) | (byte89 << 21) | (byte90 << 13) | (byte91 << 5) | (byte92 >>> 3); - final long byte93 = blocks[blocksOffset++] & 0xFF; - final long byte94 = blocks[blocksOffset++] & 0xFF; - final long byte95 = blocks[blocksOffset++] & 0xFF; - final long byte96 = blocks[blocksOffset++] & 0xFF; - final long byte97 = blocks[blocksOffset++] & 0xFF; - final long byte98 = blocks[blocksOffset++] & 0xFF; - final long byte99 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte92 & 7) << 54) | (byte93 << 46) | (byte94 << 38) | (byte95 << 30) | (byte96 << 22) | (byte97 << 14) | (byte98 << 6) | (byte99 >>> 2); - final long byte100 = blocks[blocksOffset++] & 0xFF; - final long byte101 = blocks[blocksOffset++] & 0xFF; - final long byte102 = blocks[blocksOffset++] & 0xFF; - final long byte103 = blocks[blocksOffset++] & 0xFF; - final long byte104 = blocks[blocksOffset++] & 0xFF; - final long byte105 = blocks[blocksOffset++] & 0xFF; - final long byte106 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte99 & 3) << 55) | (byte100 << 47) | (byte101 << 39) | (byte102 << 31) | (byte103 << 23) | (byte104 << 15) | (byte105 << 7) | (byte106 >>> 1); - final long byte107 = blocks[blocksOffset++] & 0xFF; - final long byte108 = blocks[blocksOffset++] & 0xFF; - final long byte109 = blocks[blocksOffset++] & 0xFF; - final long byte110 = blocks[blocksOffset++] & 0xFF; - final long byte111 = blocks[blocksOffset++] & 0xFF; - final long byte112 = blocks[blocksOffset++] & 0xFF; - final long byte113 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte106 & 1) << 56) | (byte107 << 48) | (byte108 << 40) | (byte109 << 32) | (byte110 << 24) | (byte111 << 16) | (byte112 << 8) | byte113; - final long byte114 = blocks[blocksOffset++] & 0xFF; - final long byte115 = blocks[blocksOffset++] & 0xFF; - final long byte116 = blocks[blocksOffset++] & 0xFF; - final long byte117 = blocks[blocksOffset++] & 0xFF; - final long byte118 = blocks[blocksOffset++] & 0xFF; - final long byte119 = blocks[blocksOffset++] & 0xFF; - final long byte120 = blocks[blocksOffset++] & 0xFF; - final long byte121 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte114 << 49) | (byte115 << 41) | (byte116 << 33) | (byte117 << 25) | (byte118 << 17) | (byte119 << 9) | (byte120 << 1) | (byte121 >>> 7); - final long byte122 = blocks[blocksOffset++] & 0xFF; - final long byte123 = blocks[blocksOffset++] & 0xFF; - final long byte124 = blocks[blocksOffset++] & 0xFF; - final long byte125 = blocks[blocksOffset++] & 0xFF; - final long byte126 = blocks[blocksOffset++] & 0xFF; - final long byte127 = blocks[blocksOffset++] & 0xFF; - final long byte128 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte121 & 127) << 50) | (byte122 << 42) | (byte123 << 34) | (byte124 << 26) | (byte125 << 18) | (byte126 << 10) | (byte127 << 2) | (byte128 >>> 6); - final long byte129 = blocks[blocksOffset++] & 0xFF; - final long byte130 = blocks[blocksOffset++] & 0xFF; - final long byte131 = blocks[blocksOffset++] & 0xFF; - final long byte132 = blocks[blocksOffset++] & 0xFF; - final long byte133 = blocks[blocksOffset++] & 0xFF; - final long byte134 = blocks[blocksOffset++] & 0xFF; - final long byte135 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte128 & 63) << 51) | (byte129 << 43) | (byte130 << 35) | (byte131 << 27) | (byte132 << 19) | (byte133 << 11) | (byte134 << 3) | (byte135 >>> 5); - final long byte136 = blocks[blocksOffset++] & 0xFF; - final long byte137 = blocks[blocksOffset++] & 0xFF; - final long byte138 = blocks[blocksOffset++] & 0xFF; - final long byte139 = blocks[blocksOffset++] & 0xFF; - final long byte140 = blocks[blocksOffset++] & 0xFF; - final long byte141 = blocks[blocksOffset++] & 0xFF; - final long byte142 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte135 & 31) << 52) | (byte136 << 44) | (byte137 << 36) | (byte138 << 28) | (byte139 << 20) | (byte140 << 12) | (byte141 << 4) | (byte142 >>> 4); - final long byte143 = blocks[blocksOffset++] & 0xFF; - final long byte144 = blocks[blocksOffset++] & 0xFF; - final long byte145 = blocks[blocksOffset++] & 0xFF; - final long byte146 = blocks[blocksOffset++] & 0xFF; - final long byte147 = blocks[blocksOffset++] & 0xFF; - final long byte148 = blocks[blocksOffset++] & 0xFF; - final long byte149 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte142 & 15) << 53) | (byte143 << 45) | (byte144 << 37) | (byte145 << 29) | (byte146 << 21) | (byte147 << 13) | (byte148 << 5) | (byte149 >>> 3); - final long byte150 = blocks[blocksOffset++] & 0xFF; - final long byte151 = blocks[blocksOffset++] & 0xFF; - final long byte152 = blocks[blocksOffset++] & 0xFF; - final long byte153 = blocks[blocksOffset++] & 0xFF; - final long byte154 = blocks[blocksOffset++] & 0xFF; - final long byte155 = blocks[blocksOffset++] & 0xFF; - final long byte156 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte149 & 7) << 54) | (byte150 << 46) | (byte151 << 38) | (byte152 << 30) | (byte153 << 22) | (byte154 << 14) | (byte155 << 6) | (byte156 >>> 2); - final long byte157 = blocks[blocksOffset++] & 0xFF; - final long byte158 = blocks[blocksOffset++] & 0xFF; - final long byte159 = blocks[blocksOffset++] & 0xFF; - final long byte160 = blocks[blocksOffset++] & 0xFF; - final long byte161 = blocks[blocksOffset++] & 0xFF; - final long byte162 = blocks[blocksOffset++] & 0xFF; - final long byte163 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte156 & 3) << 55) | (byte157 << 47) | (byte158 << 39) | (byte159 << 31) | (byte160 << 23) | (byte161 << 15) | (byte162 << 7) | (byte163 >>> 1); - final long byte164 = blocks[blocksOffset++] & 0xFF; - final long byte165 = blocks[blocksOffset++] & 0xFF; - final long byte166 = blocks[blocksOffset++] & 0xFF; - final long byte167 = blocks[blocksOffset++] & 0xFF; - final long byte168 = blocks[blocksOffset++] & 0xFF; - final long byte169 = blocks[blocksOffset++] & 0xFF; - final long byte170 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte163 & 1) << 56) | (byte164 << 48) | (byte165 << 40) | (byte166 << 32) | (byte167 << 24) | (byte168 << 16) | (byte169 << 8) | byte170; - final long byte171 = blocks[blocksOffset++] & 0xFF; - final long byte172 = blocks[blocksOffset++] & 0xFF; - final long byte173 = blocks[blocksOffset++] & 0xFF; - final long byte174 = blocks[blocksOffset++] & 0xFF; - final long byte175 = blocks[blocksOffset++] & 0xFF; - final long byte176 = blocks[blocksOffset++] & 0xFF; - final long byte177 = blocks[blocksOffset++] & 0xFF; - final long byte178 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte171 << 49) | (byte172 << 41) | (byte173 << 33) | (byte174 << 25) | (byte175 << 17) | (byte176 << 9) | (byte177 << 1) | (byte178 >>> 7); - final long byte179 = blocks[blocksOffset++] & 0xFF; - final long byte180 = blocks[blocksOffset++] & 0xFF; - final long byte181 = blocks[blocksOffset++] & 0xFF; - final long byte182 = blocks[blocksOffset++] & 0xFF; - final long byte183 = blocks[blocksOffset++] & 0xFF; - final long byte184 = blocks[blocksOffset++] & 0xFF; - final long byte185 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte178 & 127) << 50) | (byte179 << 42) | (byte180 << 34) | (byte181 << 26) | (byte182 << 18) | (byte183 << 10) | (byte184 << 2) | (byte185 >>> 6); - final long byte186 = blocks[blocksOffset++] & 0xFF; - final long byte187 = blocks[blocksOffset++] & 0xFF; - final long byte188 = blocks[blocksOffset++] & 0xFF; - final long byte189 = blocks[blocksOffset++] & 0xFF; - final long byte190 = blocks[blocksOffset++] & 0xFF; - final long byte191 = blocks[blocksOffset++] & 0xFF; - final long byte192 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte185 & 63) << 51) | (byte186 << 43) | (byte187 << 35) | (byte188 << 27) | (byte189 << 19) | (byte190 << 11) | (byte191 << 3) | (byte192 >>> 5); - final long byte193 = blocks[blocksOffset++] & 0xFF; - final long byte194 = blocks[blocksOffset++] & 0xFF; - final long byte195 = blocks[blocksOffset++] & 0xFF; - final long byte196 = blocks[blocksOffset++] & 0xFF; - final long byte197 = blocks[blocksOffset++] & 0xFF; - final long byte198 = blocks[blocksOffset++] & 0xFF; - final long byte199 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte192 & 31) << 52) | (byte193 << 44) | (byte194 << 36) | (byte195 << 28) | (byte196 << 20) | (byte197 << 12) | (byte198 << 4) | (byte199 >>> 4); - final long byte200 = blocks[blocksOffset++] & 0xFF; - final long byte201 = blocks[blocksOffset++] & 0xFF; - final long byte202 = blocks[blocksOffset++] & 0xFF; - final long byte203 = blocks[blocksOffset++] & 0xFF; - final long byte204 = blocks[blocksOffset++] & 0xFF; - final long byte205 = blocks[blocksOffset++] & 0xFF; - final long byte206 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte199 & 15) << 53) | (byte200 << 45) | (byte201 << 37) | (byte202 << 29) | (byte203 << 21) | (byte204 << 13) | (byte205 << 5) | (byte206 >>> 3); - final long byte207 = blocks[blocksOffset++] & 0xFF; - final long byte208 = blocks[blocksOffset++] & 0xFF; - final long byte209 = blocks[blocksOffset++] & 0xFF; - final long byte210 = blocks[blocksOffset++] & 0xFF; - final long byte211 = blocks[blocksOffset++] & 0xFF; - final long byte212 = blocks[blocksOffset++] & 0xFF; - final long byte213 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte206 & 7) << 54) | (byte207 << 46) | (byte208 << 38) | (byte209 << 30) | (byte210 << 22) | (byte211 << 14) | (byte212 << 6) | (byte213 >>> 2); - final long byte214 = blocks[blocksOffset++] & 0xFF; - final long byte215 = blocks[blocksOffset++] & 0xFF; - final long byte216 = blocks[blocksOffset++] & 0xFF; - final long byte217 = blocks[blocksOffset++] & 0xFF; - final long byte218 = blocks[blocksOffset++] & 0xFF; - final long byte219 = blocks[blocksOffset++] & 0xFF; - final long byte220 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte213 & 3) << 55) | (byte214 << 47) | (byte215 << 39) | (byte216 << 31) | (byte217 << 23) | (byte218 << 15) | (byte219 << 7) | (byte220 >>> 1); - final long byte221 = blocks[blocksOffset++] & 0xFF; - final long byte222 = blocks[blocksOffset++] & 0xFF; - final long byte223 = blocks[blocksOffset++] & 0xFF; - final long byte224 = blocks[blocksOffset++] & 0xFF; - final long byte225 = blocks[blocksOffset++] & 0xFF; - final long byte226 = blocks[blocksOffset++] & 0xFF; - final long byte227 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte220 & 1) << 56) | (byte221 << 48) | (byte222 << 40) | (byte223 << 32) | (byte224 << 24) | (byte225 << 16) | (byte226 << 8) | byte227; - final long byte228 = blocks[blocksOffset++] & 0xFF; - final long byte229 = blocks[blocksOffset++] & 0xFF; - final long byte230 = blocks[blocksOffset++] & 0xFF; - final long byte231 = blocks[blocksOffset++] & 0xFF; - final long byte232 = blocks[blocksOffset++] & 0xFF; - final long byte233 = blocks[blocksOffset++] & 0xFF; - final long byte234 = blocks[blocksOffset++] & 0xFF; - final long byte235 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte228 << 49) | (byte229 << 41) | (byte230 << 33) | (byte231 << 25) | (byte232 << 17) | (byte233 << 9) | (byte234 << 1) | (byte235 >>> 7); - final long byte236 = blocks[blocksOffset++] & 0xFF; - final long byte237 = blocks[blocksOffset++] & 0xFF; - final long byte238 = blocks[blocksOffset++] & 0xFF; - final long byte239 = blocks[blocksOffset++] & 0xFF; - final long byte240 = blocks[blocksOffset++] & 0xFF; - final long byte241 = blocks[blocksOffset++] & 0xFF; - final long byte242 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte235 & 127) << 50) | (byte236 << 42) | (byte237 << 34) | (byte238 << 26) | (byte239 << 18) | (byte240 << 10) | (byte241 << 2) | (byte242 >>> 6); - final long byte243 = blocks[blocksOffset++] & 0xFF; - final long byte244 = blocks[blocksOffset++] & 0xFF; - final long byte245 = blocks[blocksOffset++] & 0xFF; - final long byte246 = blocks[blocksOffset++] & 0xFF; - final long byte247 = blocks[blocksOffset++] & 0xFF; - final long byte248 = blocks[blocksOffset++] & 0xFF; - final long byte249 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte242 & 63) << 51) | (byte243 << 43) | (byte244 << 35) | (byte245 << 27) | (byte246 << 19) | (byte247 << 11) | (byte248 << 3) | (byte249 >>> 5); - final long byte250 = blocks[blocksOffset++] & 0xFF; - final long byte251 = blocks[blocksOffset++] & 0xFF; - final long byte252 = blocks[blocksOffset++] & 0xFF; - final long byte253 = blocks[blocksOffset++] & 0xFF; - final long byte254 = blocks[blocksOffset++] & 0xFF; - final long byte255 = blocks[blocksOffset++] & 0xFF; - final long byte256 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte249 & 31) << 52) | (byte250 << 44) | (byte251 << 36) | (byte252 << 28) | (byte253 << 20) | (byte254 << 12) | (byte255 << 4) | (byte256 >>> 4); - final long byte257 = blocks[blocksOffset++] & 0xFF; - final long byte258 = blocks[blocksOffset++] & 0xFF; - final long byte259 = blocks[blocksOffset++] & 0xFF; - final long byte260 = blocks[blocksOffset++] & 0xFF; - final long byte261 = blocks[blocksOffset++] & 0xFF; - final long byte262 = blocks[blocksOffset++] & 0xFF; - final long byte263 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte256 & 15) << 53) | (byte257 << 45) | (byte258 << 37) | (byte259 << 29) | (byte260 << 21) | (byte261 << 13) | (byte262 << 5) | (byte263 >>> 3); - final long byte264 = blocks[blocksOffset++] & 0xFF; - final long byte265 = blocks[blocksOffset++] & 0xFF; - final long byte266 = blocks[blocksOffset++] & 0xFF; - final long byte267 = blocks[blocksOffset++] & 0xFF; - final long byte268 = blocks[blocksOffset++] & 0xFF; - final long byte269 = blocks[blocksOffset++] & 0xFF; - final long byte270 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte263 & 7) << 54) | (byte264 << 46) | (byte265 << 38) | (byte266 << 30) | (byte267 << 22) | (byte268 << 14) | (byte269 << 6) | (byte270 >>> 2); - final long byte271 = blocks[blocksOffset++] & 0xFF; - final long byte272 = blocks[blocksOffset++] & 0xFF; - final long byte273 = blocks[blocksOffset++] & 0xFF; - final long byte274 = blocks[blocksOffset++] & 0xFF; - final long byte275 = blocks[blocksOffset++] & 0xFF; - final long byte276 = blocks[blocksOffset++] & 0xFF; - final long byte277 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte270 & 3) << 55) | (byte271 << 47) | (byte272 << 39) | (byte273 << 31) | (byte274 << 23) | (byte275 << 15) | (byte276 << 7) | (byte277 >>> 1); - final long byte278 = blocks[blocksOffset++] & 0xFF; - final long byte279 = blocks[blocksOffset++] & 0xFF; - final long byte280 = blocks[blocksOffset++] & 0xFF; - final long byte281 = blocks[blocksOffset++] & 0xFF; - final long byte282 = blocks[blocksOffset++] & 0xFF; - final long byte283 = blocks[blocksOffset++] & 0xFF; - final long byte284 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte277 & 1) << 56) | (byte278 << 48) | (byte279 << 40) | (byte280 << 32) | (byte281 << 24) | (byte282 << 16) | (byte283 << 8) | byte284; - final long byte285 = blocks[blocksOffset++] & 0xFF; - final long byte286 = blocks[blocksOffset++] & 0xFF; - final long byte287 = blocks[blocksOffset++] & 0xFF; - final long byte288 = blocks[blocksOffset++] & 0xFF; - final long byte289 = blocks[blocksOffset++] & 0xFF; - final long byte290 = blocks[blocksOffset++] & 0xFF; - final long byte291 = blocks[blocksOffset++] & 0xFF; - final long byte292 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte285 << 49) | (byte286 << 41) | (byte287 << 33) | (byte288 << 25) | (byte289 << 17) | (byte290 << 9) | (byte291 << 1) | (byte292 >>> 7); - final long byte293 = blocks[blocksOffset++] & 0xFF; - final long byte294 = blocks[blocksOffset++] & 0xFF; - final long byte295 = blocks[blocksOffset++] & 0xFF; - final long byte296 = blocks[blocksOffset++] & 0xFF; - final long byte297 = blocks[blocksOffset++] & 0xFF; - final long byte298 = blocks[blocksOffset++] & 0xFF; - final long byte299 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte292 & 127) << 50) | (byte293 << 42) | (byte294 << 34) | (byte295 << 26) | (byte296 << 18) | (byte297 << 10) | (byte298 << 2) | (byte299 >>> 6); - final long byte300 = blocks[blocksOffset++] & 0xFF; - final long byte301 = blocks[blocksOffset++] & 0xFF; - final long byte302 = blocks[blocksOffset++] & 0xFF; - final long byte303 = blocks[blocksOffset++] & 0xFF; - final long byte304 = blocks[blocksOffset++] & 0xFF; - final long byte305 = blocks[blocksOffset++] & 0xFF; - final long byte306 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte299 & 63) << 51) | (byte300 << 43) | (byte301 << 35) | (byte302 << 27) | (byte303 << 19) | (byte304 << 11) | (byte305 << 3) | (byte306 >>> 5); - final long byte307 = blocks[blocksOffset++] & 0xFF; - final long byte308 = blocks[blocksOffset++] & 0xFF; - final long byte309 = blocks[blocksOffset++] & 0xFF; - final long byte310 = blocks[blocksOffset++] & 0xFF; - final long byte311 = blocks[blocksOffset++] & 0xFF; - final long byte312 = blocks[blocksOffset++] & 0xFF; - final long byte313 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte306 & 31) << 52) | (byte307 << 44) | (byte308 << 36) | (byte309 << 28) | (byte310 << 20) | (byte311 << 12) | (byte312 << 4) | (byte313 >>> 4); - final long byte314 = blocks[blocksOffset++] & 0xFF; - final long byte315 = blocks[blocksOffset++] & 0xFF; - final long byte316 = blocks[blocksOffset++] & 0xFF; - final long byte317 = blocks[blocksOffset++] & 0xFF; - final long byte318 = blocks[blocksOffset++] & 0xFF; - final long byte319 = blocks[blocksOffset++] & 0xFF; - final long byte320 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte313 & 15) << 53) | (byte314 << 45) | (byte315 << 37) | (byte316 << 29) | (byte317 << 21) | (byte318 << 13) | (byte319 << 5) | (byte320 >>> 3); - final long byte321 = blocks[blocksOffset++] & 0xFF; - final long byte322 = blocks[blocksOffset++] & 0xFF; - final long byte323 = blocks[blocksOffset++] & 0xFF; - final long byte324 = blocks[blocksOffset++] & 0xFF; - final long byte325 = blocks[blocksOffset++] & 0xFF; - final long byte326 = blocks[blocksOffset++] & 0xFF; - final long byte327 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte320 & 7) << 54) | (byte321 << 46) | (byte322 << 38) | (byte323 << 30) | (byte324 << 22) | (byte325 << 14) | (byte326 << 6) | (byte327 >>> 2); - final long byte328 = blocks[blocksOffset++] & 0xFF; - final long byte329 = blocks[blocksOffset++] & 0xFF; - final long byte330 = blocks[blocksOffset++] & 0xFF; - final long byte331 = blocks[blocksOffset++] & 0xFF; - final long byte332 = blocks[blocksOffset++] & 0xFF; - final long byte333 = blocks[blocksOffset++] & 0xFF; - final long byte334 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte327 & 3) << 55) | (byte328 << 47) | (byte329 << 39) | (byte330 << 31) | (byte331 << 23) | (byte332 << 15) | (byte333 << 7) | (byte334 >>> 1); - final long byte335 = blocks[blocksOffset++] & 0xFF; - final long byte336 = blocks[blocksOffset++] & 0xFF; - final long byte337 = blocks[blocksOffset++] & 0xFF; - final long byte338 = blocks[blocksOffset++] & 0xFF; - final long byte339 = blocks[blocksOffset++] & 0xFF; - final long byte340 = blocks[blocksOffset++] & 0xFF; - final long byte341 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte334 & 1) << 56) | (byte335 << 48) | (byte336 << 40) | (byte337 << 32) | (byte338 << 24) | (byte339 << 16) | (byte340 << 8) | byte341; - final long byte342 = blocks[blocksOffset++] & 0xFF; - final long byte343 = blocks[blocksOffset++] & 0xFF; - final long byte344 = blocks[blocksOffset++] & 0xFF; - final long byte345 = blocks[blocksOffset++] & 0xFF; - final long byte346 = blocks[blocksOffset++] & 0xFF; - final long byte347 = blocks[blocksOffset++] & 0xFF; - final long byte348 = blocks[blocksOffset++] & 0xFF; - final long byte349 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte342 << 49) | (byte343 << 41) | (byte344 << 33) | (byte345 << 25) | (byte346 << 17) | (byte347 << 9) | (byte348 << 1) | (byte349 >>> 7); - final long byte350 = blocks[blocksOffset++] & 0xFF; - final long byte351 = blocks[blocksOffset++] & 0xFF; - final long byte352 = blocks[blocksOffset++] & 0xFF; - final long byte353 = blocks[blocksOffset++] & 0xFF; - final long byte354 = blocks[blocksOffset++] & 0xFF; - final long byte355 = blocks[blocksOffset++] & 0xFF; - final long byte356 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte349 & 127) << 50) | (byte350 << 42) | (byte351 << 34) | (byte352 << 26) | (byte353 << 18) | (byte354 << 10) | (byte355 << 2) | (byte356 >>> 6); - final long byte357 = blocks[blocksOffset++] & 0xFF; - final long byte358 = blocks[blocksOffset++] & 0xFF; - final long byte359 = blocks[blocksOffset++] & 0xFF; - final long byte360 = blocks[blocksOffset++] & 0xFF; - final long byte361 = blocks[blocksOffset++] & 0xFF; - final long byte362 = blocks[blocksOffset++] & 0xFF; - final long byte363 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte356 & 63) << 51) | (byte357 << 43) | (byte358 << 35) | (byte359 << 27) | (byte360 << 19) | (byte361 << 11) | (byte362 << 3) | (byte363 >>> 5); - final long byte364 = blocks[blocksOffset++] & 0xFF; - final long byte365 = blocks[blocksOffset++] & 0xFF; - final long byte366 = blocks[blocksOffset++] & 0xFF; - final long byte367 = blocks[blocksOffset++] & 0xFF; - final long byte368 = blocks[blocksOffset++] & 0xFF; - final long byte369 = blocks[blocksOffset++] & 0xFF; - final long byte370 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte363 & 31) << 52) | (byte364 << 44) | (byte365 << 36) | (byte366 << 28) | (byte367 << 20) | (byte368 << 12) | (byte369 << 4) | (byte370 >>> 4); - final long byte371 = blocks[blocksOffset++] & 0xFF; - final long byte372 = blocks[blocksOffset++] & 0xFF; - final long byte373 = blocks[blocksOffset++] & 0xFF; - final long byte374 = blocks[blocksOffset++] & 0xFF; - final long byte375 = blocks[blocksOffset++] & 0xFF; - final long byte376 = blocks[blocksOffset++] & 0xFF; - final long byte377 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte370 & 15) << 53) | (byte371 << 45) | (byte372 << 37) | (byte373 << 29) | (byte374 << 21) | (byte375 << 13) | (byte376 << 5) | (byte377 >>> 3); - final long byte378 = blocks[blocksOffset++] & 0xFF; - final long byte379 = blocks[blocksOffset++] & 0xFF; - final long byte380 = blocks[blocksOffset++] & 0xFF; - final long byte381 = blocks[blocksOffset++] & 0xFF; - final long byte382 = blocks[blocksOffset++] & 0xFF; - final long byte383 = blocks[blocksOffset++] & 0xFF; - final long byte384 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte377 & 7) << 54) | (byte378 << 46) | (byte379 << 38) | (byte380 << 30) | (byte381 << 22) | (byte382 << 14) | (byte383 << 6) | (byte384 >>> 2); - final long byte385 = blocks[blocksOffset++] & 0xFF; - final long byte386 = blocks[blocksOffset++] & 0xFF; - final long byte387 = blocks[blocksOffset++] & 0xFF; - final long byte388 = blocks[blocksOffset++] & 0xFF; - final long byte389 = blocks[blocksOffset++] & 0xFF; - final long byte390 = blocks[blocksOffset++] & 0xFF; - final long byte391 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte384 & 3) << 55) | (byte385 << 47) | (byte386 << 39) | (byte387 << 31) | (byte388 << 23) | (byte389 << 15) | (byte390 << 7) | (byte391 >>> 1); - final long byte392 = blocks[blocksOffset++] & 0xFF; - final long byte393 = blocks[blocksOffset++] & 0xFF; - final long byte394 = blocks[blocksOffset++] & 0xFF; - final long byte395 = blocks[blocksOffset++] & 0xFF; - final long byte396 = blocks[blocksOffset++] & 0xFF; - final long byte397 = blocks[blocksOffset++] & 0xFF; - final long byte398 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte391 & 1) << 56) | (byte392 << 48) | (byte393 << 40) | (byte394 << 32) | (byte395 << 24) | (byte396 << 16) | (byte397 << 8) | byte398; - final long byte399 = blocks[blocksOffset++] & 0xFF; - final long byte400 = blocks[blocksOffset++] & 0xFF; - final long byte401 = blocks[blocksOffset++] & 0xFF; - final long byte402 = blocks[blocksOffset++] & 0xFF; - final long byte403 = blocks[blocksOffset++] & 0xFF; - final long byte404 = blocks[blocksOffset++] & 0xFF; - final long byte405 = blocks[blocksOffset++] & 0xFF; - final long byte406 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte399 << 49) | (byte400 << 41) | (byte401 << 33) | (byte402 << 25) | (byte403 << 17) | (byte404 << 9) | (byte405 << 1) | (byte406 >>> 7); - final long byte407 = blocks[blocksOffset++] & 0xFF; - final long byte408 = blocks[blocksOffset++] & 0xFF; - final long byte409 = blocks[blocksOffset++] & 0xFF; - final long byte410 = blocks[blocksOffset++] & 0xFF; - final long byte411 = blocks[blocksOffset++] & 0xFF; - final long byte412 = blocks[blocksOffset++] & 0xFF; - final long byte413 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte406 & 127) << 50) | (byte407 << 42) | (byte408 << 34) | (byte409 << 26) | (byte410 << 18) | (byte411 << 10) | (byte412 << 2) | (byte413 >>> 6); - final long byte414 = blocks[blocksOffset++] & 0xFF; - final long byte415 = blocks[blocksOffset++] & 0xFF; - final long byte416 = blocks[blocksOffset++] & 0xFF; - final long byte417 = blocks[blocksOffset++] & 0xFF; - final long byte418 = blocks[blocksOffset++] & 0xFF; - final long byte419 = blocks[blocksOffset++] & 0xFF; - final long byte420 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte413 & 63) << 51) | (byte414 << 43) | (byte415 << 35) | (byte416 << 27) | (byte417 << 19) | (byte418 << 11) | (byte419 << 3) | (byte420 >>> 5); - final long byte421 = blocks[blocksOffset++] & 0xFF; - final long byte422 = blocks[blocksOffset++] & 0xFF; - final long byte423 = blocks[blocksOffset++] & 0xFF; - final long byte424 = blocks[blocksOffset++] & 0xFF; - final long byte425 = blocks[blocksOffset++] & 0xFF; - final long byte426 = blocks[blocksOffset++] & 0xFF; - final long byte427 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte420 & 31) << 52) | (byte421 << 44) | (byte422 << 36) | (byte423 << 28) | (byte424 << 20) | (byte425 << 12) | (byte426 << 4) | (byte427 >>> 4); - final long byte428 = blocks[blocksOffset++] & 0xFF; - final long byte429 = blocks[blocksOffset++] & 0xFF; - final long byte430 = blocks[blocksOffset++] & 0xFF; - final long byte431 = blocks[blocksOffset++] & 0xFF; - final long byte432 = blocks[blocksOffset++] & 0xFF; - final long byte433 = blocks[blocksOffset++] & 0xFF; - final long byte434 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte427 & 15) << 53) | (byte428 << 45) | (byte429 << 37) | (byte430 << 29) | (byte431 << 21) | (byte432 << 13) | (byte433 << 5) | (byte434 >>> 3); - final long byte435 = blocks[blocksOffset++] & 0xFF; - final long byte436 = blocks[blocksOffset++] & 0xFF; - final long byte437 = blocks[blocksOffset++] & 0xFF; - final long byte438 = blocks[blocksOffset++] & 0xFF; - final long byte439 = blocks[blocksOffset++] & 0xFF; - final long byte440 = blocks[blocksOffset++] & 0xFF; - final long byte441 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte434 & 7) << 54) | (byte435 << 46) | (byte436 << 38) | (byte437 << 30) | (byte438 << 22) | (byte439 << 14) | (byte440 << 6) | (byte441 >>> 2); - final long byte442 = blocks[blocksOffset++] & 0xFF; - final long byte443 = blocks[blocksOffset++] & 0xFF; - final long byte444 = blocks[blocksOffset++] & 0xFF; - final long byte445 = blocks[blocksOffset++] & 0xFF; - final long byte446 = blocks[blocksOffset++] & 0xFF; - final long byte447 = blocks[blocksOffset++] & 0xFF; - final long byte448 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte441 & 3) << 55) | (byte442 << 47) | (byte443 << 39) | (byte444 << 31) | (byte445 << 23) | (byte446 << 15) | (byte447 << 7) | (byte448 >>> 1); - final long byte449 = blocks[blocksOffset++] & 0xFF; - final long byte450 = blocks[blocksOffset++] & 0xFF; - final long byte451 = blocks[blocksOffset++] & 0xFF; - final long byte452 = blocks[blocksOffset++] & 0xFF; - final long byte453 = blocks[blocksOffset++] & 0xFF; - final long byte454 = blocks[blocksOffset++] & 0xFF; - final long byte455 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte448 & 1) << 56) | (byte449 << 48) | (byte450 << 40) | (byte451 << 32) | (byte452 << 24) | (byte453 << 16) | (byte454 << 8) | byte455; - } - } - - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 7) | ((values[valuesOffset] & 0xffffffffL) >>> 50); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 14) | ((values[valuesOffset] & 0xffffffffL) >>> 43); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 21) | ((values[valuesOffset] & 0xffffffffL) >>> 36); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 28) | ((values[valuesOffset] & 0xffffffffL) >>> 29); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 35) | ((values[valuesOffset] & 0xffffffffL) >>> 22); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 42) | ((values[valuesOffset] & 0xffffffffL) >>> 15); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 49) | ((values[valuesOffset] & 0xffffffffL) >>> 8); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 56) | ((values[valuesOffset] & 0xffffffffL) >>> 1); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 63) | ((values[valuesOffset++] & 0xffffffffL) << 6) | ((values[valuesOffset] & 0xffffffffL) >>> 51); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 13) | ((values[valuesOffset] & 0xffffffffL) >>> 44); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 20) | ((values[valuesOffset] & 0xffffffffL) >>> 37); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 27) | ((values[valuesOffset] & 0xffffffffL) >>> 30); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 34) | ((values[valuesOffset] & 0xffffffffL) >>> 23); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 41) | ((values[valuesOffset] & 0xffffffffL) >>> 16); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 48) | ((values[valuesOffset] & 0xffffffffL) >>> 9); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 55) | ((values[valuesOffset] & 0xffffffffL) >>> 2); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 62) | ((values[valuesOffset++] & 0xffffffffL) << 5) | ((values[valuesOffset] & 0xffffffffL) >>> 52); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 12) | ((values[valuesOffset] & 0xffffffffL) >>> 45); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 19) | ((values[valuesOffset] & 0xffffffffL) >>> 38); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 26) | ((values[valuesOffset] & 0xffffffffL) >>> 31); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 33) | ((values[valuesOffset] & 0xffffffffL) >>> 24); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 40) | ((values[valuesOffset] & 0xffffffffL) >>> 17); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 47) | ((values[valuesOffset] & 0xffffffffL) >>> 10); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 54) | ((values[valuesOffset] & 0xffffffffL) >>> 3); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 61) | ((values[valuesOffset++] & 0xffffffffL) << 4) | ((values[valuesOffset] & 0xffffffffL) >>> 53); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 11) | ((values[valuesOffset] & 0xffffffffL) >>> 46); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 18) | ((values[valuesOffset] & 0xffffffffL) >>> 39); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 25) | ((values[valuesOffset] & 0xffffffffL) >>> 32); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 32) | ((values[valuesOffset] & 0xffffffffL) >>> 25); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 39) | ((values[valuesOffset] & 0xffffffffL) >>> 18); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 46) | ((values[valuesOffset] & 0xffffffffL) >>> 11); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 53) | ((values[valuesOffset] & 0xffffffffL) >>> 4); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 60) | ((values[valuesOffset++] & 0xffffffffL) << 3) | ((values[valuesOffset] & 0xffffffffL) >>> 54); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 10) | ((values[valuesOffset] & 0xffffffffL) >>> 47); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 17) | ((values[valuesOffset] & 0xffffffffL) >>> 40); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 24) | ((values[valuesOffset] & 0xffffffffL) >>> 33); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 31) | ((values[valuesOffset] & 0xffffffffL) >>> 26); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 38) | ((values[valuesOffset] & 0xffffffffL) >>> 19); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 45) | ((values[valuesOffset] & 0xffffffffL) >>> 12); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 52) | ((values[valuesOffset] & 0xffffffffL) >>> 5); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 59) | ((values[valuesOffset++] & 0xffffffffL) << 2) | ((values[valuesOffset] & 0xffffffffL) >>> 55); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 9) | ((values[valuesOffset] & 0xffffffffL) >>> 48); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 16) | ((values[valuesOffset] & 0xffffffffL) >>> 41); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 23) | ((values[valuesOffset] & 0xffffffffL) >>> 34); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 30) | ((values[valuesOffset] & 0xffffffffL) >>> 27); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 37) | ((values[valuesOffset] & 0xffffffffL) >>> 20); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 44) | ((values[valuesOffset] & 0xffffffffL) >>> 13); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 51) | ((values[valuesOffset] & 0xffffffffL) >>> 6); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 58) | ((values[valuesOffset++] & 0xffffffffL) << 1) | ((values[valuesOffset] & 0xffffffffL) >>> 56); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 8) | ((values[valuesOffset] & 0xffffffffL) >>> 49); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 15) | ((values[valuesOffset] & 0xffffffffL) >>> 42); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 22) | ((values[valuesOffset] & 0xffffffffL) >>> 35); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 29) | ((values[valuesOffset] & 0xffffffffL) >>> 28); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 36) | ((values[valuesOffset] & 0xffffffffL) >>> 21); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 43) | ((values[valuesOffset] & 0xffffffffL) >>> 14); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 50) | ((values[valuesOffset] & 0xffffffffL) >>> 7); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 57) | (values[valuesOffset++] & 0xffffffffL); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] << 7) | (values[valuesOffset] >>> 50); - blocks[blocksOffset++] = (values[valuesOffset++] << 14) | (values[valuesOffset] >>> 43); - blocks[blocksOffset++] = (values[valuesOffset++] << 21) | (values[valuesOffset] >>> 36); - blocks[blocksOffset++] = (values[valuesOffset++] << 28) | (values[valuesOffset] >>> 29); - blocks[blocksOffset++] = (values[valuesOffset++] << 35) | (values[valuesOffset] >>> 22); - blocks[blocksOffset++] = (values[valuesOffset++] << 42) | (values[valuesOffset] >>> 15); - blocks[blocksOffset++] = (values[valuesOffset++] << 49) | (values[valuesOffset] >>> 8); - blocks[blocksOffset++] = (values[valuesOffset++] << 56) | (values[valuesOffset] >>> 1); - blocks[blocksOffset++] = (values[valuesOffset++] << 63) | (values[valuesOffset++] << 6) | (values[valuesOffset] >>> 51); - blocks[blocksOffset++] = (values[valuesOffset++] << 13) | (values[valuesOffset] >>> 44); - blocks[blocksOffset++] = (values[valuesOffset++] << 20) | (values[valuesOffset] >>> 37); - blocks[blocksOffset++] = (values[valuesOffset++] << 27) | (values[valuesOffset] >>> 30); - blocks[blocksOffset++] = (values[valuesOffset++] << 34) | (values[valuesOffset] >>> 23); - blocks[blocksOffset++] = (values[valuesOffset++] << 41) | (values[valuesOffset] >>> 16); - blocks[blocksOffset++] = (values[valuesOffset++] << 48) | (values[valuesOffset] >>> 9); - blocks[blocksOffset++] = (values[valuesOffset++] << 55) | (values[valuesOffset] >>> 2); - blocks[blocksOffset++] = (values[valuesOffset++] << 62) | (values[valuesOffset++] << 5) | (values[valuesOffset] >>> 52); - blocks[blocksOffset++] = (values[valuesOffset++] << 12) | (values[valuesOffset] >>> 45); - blocks[blocksOffset++] = (values[valuesOffset++] << 19) | (values[valuesOffset] >>> 38); - blocks[blocksOffset++] = (values[valuesOffset++] << 26) | (values[valuesOffset] >>> 31); - blocks[blocksOffset++] = (values[valuesOffset++] << 33) | (values[valuesOffset] >>> 24); - blocks[blocksOffset++] = (values[valuesOffset++] << 40) | (values[valuesOffset] >>> 17); - blocks[blocksOffset++] = (values[valuesOffset++] << 47) | (values[valuesOffset] >>> 10); - blocks[blocksOffset++] = (values[valuesOffset++] << 54) | (values[valuesOffset] >>> 3); - blocks[blocksOffset++] = (values[valuesOffset++] << 61) | (values[valuesOffset++] << 4) | (values[valuesOffset] >>> 53); - blocks[blocksOffset++] = (values[valuesOffset++] << 11) | (values[valuesOffset] >>> 46); - blocks[blocksOffset++] = (values[valuesOffset++] << 18) | (values[valuesOffset] >>> 39); - blocks[blocksOffset++] = (values[valuesOffset++] << 25) | (values[valuesOffset] >>> 32); - blocks[blocksOffset++] = (values[valuesOffset++] << 32) | (values[valuesOffset] >>> 25); - blocks[blocksOffset++] = (values[valuesOffset++] << 39) | (values[valuesOffset] >>> 18); - blocks[blocksOffset++] = (values[valuesOffset++] << 46) | (values[valuesOffset] >>> 11); - blocks[blocksOffset++] = (values[valuesOffset++] << 53) | (values[valuesOffset] >>> 4); - blocks[blocksOffset++] = (values[valuesOffset++] << 60) | (values[valuesOffset++] << 3) | (values[valuesOffset] >>> 54); - blocks[blocksOffset++] = (values[valuesOffset++] << 10) | (values[valuesOffset] >>> 47); - blocks[blocksOffset++] = (values[valuesOffset++] << 17) | (values[valuesOffset] >>> 40); - blocks[blocksOffset++] = (values[valuesOffset++] << 24) | (values[valuesOffset] >>> 33); - blocks[blocksOffset++] = (values[valuesOffset++] << 31) | (values[valuesOffset] >>> 26); - blocks[blocksOffset++] = (values[valuesOffset++] << 38) | (values[valuesOffset] >>> 19); - blocks[blocksOffset++] = (values[valuesOffset++] << 45) | (values[valuesOffset] >>> 12); - blocks[blocksOffset++] = (values[valuesOffset++] << 52) | (values[valuesOffset] >>> 5); - blocks[blocksOffset++] = (values[valuesOffset++] << 59) | (values[valuesOffset++] << 2) | (values[valuesOffset] >>> 55); - blocks[blocksOffset++] = (values[valuesOffset++] << 9) | (values[valuesOffset] >>> 48); - blocks[blocksOffset++] = (values[valuesOffset++] << 16) | (values[valuesOffset] >>> 41); - blocks[blocksOffset++] = (values[valuesOffset++] << 23) | (values[valuesOffset] >>> 34); - blocks[blocksOffset++] = (values[valuesOffset++] << 30) | (values[valuesOffset] >>> 27); - blocks[blocksOffset++] = (values[valuesOffset++] << 37) | (values[valuesOffset] >>> 20); - blocks[blocksOffset++] = (values[valuesOffset++] << 44) | (values[valuesOffset] >>> 13); - blocks[blocksOffset++] = (values[valuesOffset++] << 51) | (values[valuesOffset] >>> 6); - blocks[blocksOffset++] = (values[valuesOffset++] << 58) | (values[valuesOffset++] << 1) | (values[valuesOffset] >>> 56); - blocks[blocksOffset++] = (values[valuesOffset++] << 8) | (values[valuesOffset] >>> 49); - blocks[blocksOffset++] = (values[valuesOffset++] << 15) | (values[valuesOffset] >>> 42); - blocks[blocksOffset++] = (values[valuesOffset++] << 22) | (values[valuesOffset] >>> 35); - blocks[blocksOffset++] = (values[valuesOffset++] << 29) | (values[valuesOffset] >>> 28); - blocks[blocksOffset++] = (values[valuesOffset++] << 36) | (values[valuesOffset] >>> 21); - blocks[blocksOffset++] = (values[valuesOffset++] << 43) | (values[valuesOffset] >>> 14); - blocks[blocksOffset++] = (values[valuesOffset++] << 50) | (values[valuesOffset] >>> 7); - blocks[blocksOffset++] = (values[valuesOffset++] << 57) | values[valuesOffset++]; - } - } - -} diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked58.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked58.java deleted file mode 100644 index 107de04de63..00000000000 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked58.java +++ /dev/null @@ -1,461 +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 BulkOperationPacked58 extends BulkOperation { - @Override - public int blockCount() { - return 29; - } - - @Override - public int valueCount() { - return 32; - } - - @Override - public void decode(long[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) { - throw new UnsupportedOperationException(); - } - - @Override - public void decode(byte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) { - throw new UnsupportedOperationException(); - } - - @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 >>> 6; - final long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block0 & 63L) << 52) | (block1 >>> 12); - final long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block1 & 4095L) << 46) | (block2 >>> 18); - final long block3 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block2 & 262143L) << 40) | (block3 >>> 24); - final long block4 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block3 & 16777215L) << 34) | (block4 >>> 30); - final long block5 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block4 & 1073741823L) << 28) | (block5 >>> 36); - final long block6 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block5 & 68719476735L) << 22) | (block6 >>> 42); - final long block7 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block6 & 4398046511103L) << 16) | (block7 >>> 48); - final long block8 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block7 & 281474976710655L) << 10) | (block8 >>> 54); - final long block9 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block8 & 18014398509481983L) << 4) | (block9 >>> 60); - values[valuesOffset++] = (block9 >>> 2) & 288230376151711743L; - final long block10 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block9 & 3L) << 56) | (block10 >>> 8); - final long block11 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block10 & 255L) << 50) | (block11 >>> 14); - final long block12 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block11 & 16383L) << 44) | (block12 >>> 20); - final long block13 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block12 & 1048575L) << 38) | (block13 >>> 26); - final long block14 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block13 & 67108863L) << 32) | (block14 >>> 32); - final long block15 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block14 & 4294967295L) << 26) | (block15 >>> 38); - final long block16 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block15 & 274877906943L) << 20) | (block16 >>> 44); - final long block17 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block16 & 17592186044415L) << 14) | (block17 >>> 50); - final long block18 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block17 & 1125899906842623L) << 8) | (block18 >>> 56); - final long block19 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block18 & 72057594037927935L) << 2) | (block19 >>> 62); - values[valuesOffset++] = (block19 >>> 4) & 288230376151711743L; - final long block20 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block19 & 15L) << 54) | (block20 >>> 10); - final long block21 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block20 & 1023L) << 48) | (block21 >>> 16); - final long block22 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block21 & 65535L) << 42) | (block22 >>> 22); - final long block23 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block22 & 4194303L) << 36) | (block23 >>> 28); - final long block24 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block23 & 268435455L) << 30) | (block24 >>> 34); - final long block25 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block24 & 17179869183L) << 24) | (block25 >>> 40); - final long block26 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block25 & 1099511627775L) << 18) | (block26 >>> 46); - final long block27 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block26 & 70368744177663L) << 12) | (block27 >>> 52); - final long block28 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block27 & 4503599627370495L) << 6) | (block28 >>> 58); - values[valuesOffset++] = block28 & 288230376151711743L; - } - } - - @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; - final long byte3 = blocks[blocksOffset++] & 0xFF; - final long byte4 = blocks[blocksOffset++] & 0xFF; - final long byte5 = blocks[blocksOffset++] & 0xFF; - final long byte6 = blocks[blocksOffset++] & 0xFF; - final long byte7 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte0 << 50) | (byte1 << 42) | (byte2 << 34) | (byte3 << 26) | (byte4 << 18) | (byte5 << 10) | (byte6 << 2) | (byte7 >>> 6); - final long byte8 = blocks[blocksOffset++] & 0xFF; - final long byte9 = blocks[blocksOffset++] & 0xFF; - final long byte10 = blocks[blocksOffset++] & 0xFF; - final long byte11 = blocks[blocksOffset++] & 0xFF; - final long byte12 = blocks[blocksOffset++] & 0xFF; - final long byte13 = blocks[blocksOffset++] & 0xFF; - final long byte14 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte7 & 63) << 52) | (byte8 << 44) | (byte9 << 36) | (byte10 << 28) | (byte11 << 20) | (byte12 << 12) | (byte13 << 4) | (byte14 >>> 4); - final long byte15 = blocks[blocksOffset++] & 0xFF; - final long byte16 = blocks[blocksOffset++] & 0xFF; - final long byte17 = blocks[blocksOffset++] & 0xFF; - final long byte18 = blocks[blocksOffset++] & 0xFF; - final long byte19 = blocks[blocksOffset++] & 0xFF; - final long byte20 = blocks[blocksOffset++] & 0xFF; - final long byte21 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte14 & 15) << 54) | (byte15 << 46) | (byte16 << 38) | (byte17 << 30) | (byte18 << 22) | (byte19 << 14) | (byte20 << 6) | (byte21 >>> 2); - final long byte22 = blocks[blocksOffset++] & 0xFF; - final long byte23 = blocks[blocksOffset++] & 0xFF; - final long byte24 = blocks[blocksOffset++] & 0xFF; - final long byte25 = blocks[blocksOffset++] & 0xFF; - final long byte26 = blocks[blocksOffset++] & 0xFF; - final long byte27 = blocks[blocksOffset++] & 0xFF; - final long byte28 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte21 & 3) << 56) | (byte22 << 48) | (byte23 << 40) | (byte24 << 32) | (byte25 << 24) | (byte26 << 16) | (byte27 << 8) | byte28; - final long byte29 = blocks[blocksOffset++] & 0xFF; - final long byte30 = blocks[blocksOffset++] & 0xFF; - final long byte31 = blocks[blocksOffset++] & 0xFF; - final long byte32 = blocks[blocksOffset++] & 0xFF; - final long byte33 = blocks[blocksOffset++] & 0xFF; - final long byte34 = blocks[blocksOffset++] & 0xFF; - final long byte35 = blocks[blocksOffset++] & 0xFF; - final long byte36 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte29 << 50) | (byte30 << 42) | (byte31 << 34) | (byte32 << 26) | (byte33 << 18) | (byte34 << 10) | (byte35 << 2) | (byte36 >>> 6); - final long byte37 = blocks[blocksOffset++] & 0xFF; - final long byte38 = blocks[blocksOffset++] & 0xFF; - final long byte39 = blocks[blocksOffset++] & 0xFF; - final long byte40 = blocks[blocksOffset++] & 0xFF; - final long byte41 = blocks[blocksOffset++] & 0xFF; - final long byte42 = blocks[blocksOffset++] & 0xFF; - final long byte43 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte36 & 63) << 52) | (byte37 << 44) | (byte38 << 36) | (byte39 << 28) | (byte40 << 20) | (byte41 << 12) | (byte42 << 4) | (byte43 >>> 4); - final long byte44 = blocks[blocksOffset++] & 0xFF; - final long byte45 = blocks[blocksOffset++] & 0xFF; - final long byte46 = blocks[blocksOffset++] & 0xFF; - final long byte47 = blocks[blocksOffset++] & 0xFF; - final long byte48 = blocks[blocksOffset++] & 0xFF; - final long byte49 = blocks[blocksOffset++] & 0xFF; - final long byte50 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte43 & 15) << 54) | (byte44 << 46) | (byte45 << 38) | (byte46 << 30) | (byte47 << 22) | (byte48 << 14) | (byte49 << 6) | (byte50 >>> 2); - final long byte51 = blocks[blocksOffset++] & 0xFF; - final long byte52 = blocks[blocksOffset++] & 0xFF; - final long byte53 = blocks[blocksOffset++] & 0xFF; - final long byte54 = blocks[blocksOffset++] & 0xFF; - final long byte55 = blocks[blocksOffset++] & 0xFF; - final long byte56 = blocks[blocksOffset++] & 0xFF; - final long byte57 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte50 & 3) << 56) | (byte51 << 48) | (byte52 << 40) | (byte53 << 32) | (byte54 << 24) | (byte55 << 16) | (byte56 << 8) | byte57; - final long byte58 = blocks[blocksOffset++] & 0xFF; - final long byte59 = blocks[blocksOffset++] & 0xFF; - final long byte60 = blocks[blocksOffset++] & 0xFF; - final long byte61 = blocks[blocksOffset++] & 0xFF; - final long byte62 = blocks[blocksOffset++] & 0xFF; - final long byte63 = blocks[blocksOffset++] & 0xFF; - final long byte64 = blocks[blocksOffset++] & 0xFF; - final long byte65 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte58 << 50) | (byte59 << 42) | (byte60 << 34) | (byte61 << 26) | (byte62 << 18) | (byte63 << 10) | (byte64 << 2) | (byte65 >>> 6); - final long byte66 = blocks[blocksOffset++] & 0xFF; - final long byte67 = blocks[blocksOffset++] & 0xFF; - final long byte68 = blocks[blocksOffset++] & 0xFF; - final long byte69 = blocks[blocksOffset++] & 0xFF; - final long byte70 = blocks[blocksOffset++] & 0xFF; - final long byte71 = blocks[blocksOffset++] & 0xFF; - final long byte72 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte65 & 63) << 52) | (byte66 << 44) | (byte67 << 36) | (byte68 << 28) | (byte69 << 20) | (byte70 << 12) | (byte71 << 4) | (byte72 >>> 4); - final long byte73 = blocks[blocksOffset++] & 0xFF; - final long byte74 = blocks[blocksOffset++] & 0xFF; - final long byte75 = blocks[blocksOffset++] & 0xFF; - final long byte76 = blocks[blocksOffset++] & 0xFF; - final long byte77 = blocks[blocksOffset++] & 0xFF; - final long byte78 = blocks[blocksOffset++] & 0xFF; - final long byte79 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte72 & 15) << 54) | (byte73 << 46) | (byte74 << 38) | (byte75 << 30) | (byte76 << 22) | (byte77 << 14) | (byte78 << 6) | (byte79 >>> 2); - final long byte80 = blocks[blocksOffset++] & 0xFF; - final long byte81 = blocks[blocksOffset++] & 0xFF; - final long byte82 = blocks[blocksOffset++] & 0xFF; - final long byte83 = blocks[blocksOffset++] & 0xFF; - final long byte84 = blocks[blocksOffset++] & 0xFF; - final long byte85 = blocks[blocksOffset++] & 0xFF; - final long byte86 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte79 & 3) << 56) | (byte80 << 48) | (byte81 << 40) | (byte82 << 32) | (byte83 << 24) | (byte84 << 16) | (byte85 << 8) | byte86; - final long byte87 = blocks[blocksOffset++] & 0xFF; - final long byte88 = blocks[blocksOffset++] & 0xFF; - final long byte89 = blocks[blocksOffset++] & 0xFF; - final long byte90 = blocks[blocksOffset++] & 0xFF; - final long byte91 = blocks[blocksOffset++] & 0xFF; - final long byte92 = blocks[blocksOffset++] & 0xFF; - final long byte93 = blocks[blocksOffset++] & 0xFF; - final long byte94 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte87 << 50) | (byte88 << 42) | (byte89 << 34) | (byte90 << 26) | (byte91 << 18) | (byte92 << 10) | (byte93 << 2) | (byte94 >>> 6); - final long byte95 = blocks[blocksOffset++] & 0xFF; - final long byte96 = blocks[blocksOffset++] & 0xFF; - final long byte97 = blocks[blocksOffset++] & 0xFF; - final long byte98 = blocks[blocksOffset++] & 0xFF; - final long byte99 = blocks[blocksOffset++] & 0xFF; - final long byte100 = blocks[blocksOffset++] & 0xFF; - final long byte101 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte94 & 63) << 52) | (byte95 << 44) | (byte96 << 36) | (byte97 << 28) | (byte98 << 20) | (byte99 << 12) | (byte100 << 4) | (byte101 >>> 4); - final long byte102 = blocks[blocksOffset++] & 0xFF; - final long byte103 = blocks[blocksOffset++] & 0xFF; - final long byte104 = blocks[blocksOffset++] & 0xFF; - final long byte105 = blocks[blocksOffset++] & 0xFF; - final long byte106 = blocks[blocksOffset++] & 0xFF; - final long byte107 = blocks[blocksOffset++] & 0xFF; - final long byte108 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte101 & 15) << 54) | (byte102 << 46) | (byte103 << 38) | (byte104 << 30) | (byte105 << 22) | (byte106 << 14) | (byte107 << 6) | (byte108 >>> 2); - final long byte109 = blocks[blocksOffset++] & 0xFF; - final long byte110 = blocks[blocksOffset++] & 0xFF; - final long byte111 = blocks[blocksOffset++] & 0xFF; - final long byte112 = blocks[blocksOffset++] & 0xFF; - final long byte113 = blocks[blocksOffset++] & 0xFF; - final long byte114 = blocks[blocksOffset++] & 0xFF; - final long byte115 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte108 & 3) << 56) | (byte109 << 48) | (byte110 << 40) | (byte111 << 32) | (byte112 << 24) | (byte113 << 16) | (byte114 << 8) | byte115; - final long byte116 = blocks[blocksOffset++] & 0xFF; - final long byte117 = blocks[blocksOffset++] & 0xFF; - final long byte118 = blocks[blocksOffset++] & 0xFF; - final long byte119 = blocks[blocksOffset++] & 0xFF; - final long byte120 = blocks[blocksOffset++] & 0xFF; - final long byte121 = blocks[blocksOffset++] & 0xFF; - final long byte122 = blocks[blocksOffset++] & 0xFF; - final long byte123 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte116 << 50) | (byte117 << 42) | (byte118 << 34) | (byte119 << 26) | (byte120 << 18) | (byte121 << 10) | (byte122 << 2) | (byte123 >>> 6); - final long byte124 = blocks[blocksOffset++] & 0xFF; - final long byte125 = blocks[blocksOffset++] & 0xFF; - final long byte126 = blocks[blocksOffset++] & 0xFF; - final long byte127 = blocks[blocksOffset++] & 0xFF; - final long byte128 = blocks[blocksOffset++] & 0xFF; - final long byte129 = blocks[blocksOffset++] & 0xFF; - final long byte130 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte123 & 63) << 52) | (byte124 << 44) | (byte125 << 36) | (byte126 << 28) | (byte127 << 20) | (byte128 << 12) | (byte129 << 4) | (byte130 >>> 4); - final long byte131 = blocks[blocksOffset++] & 0xFF; - final long byte132 = blocks[blocksOffset++] & 0xFF; - final long byte133 = blocks[blocksOffset++] & 0xFF; - final long byte134 = blocks[blocksOffset++] & 0xFF; - final long byte135 = blocks[blocksOffset++] & 0xFF; - final long byte136 = blocks[blocksOffset++] & 0xFF; - final long byte137 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte130 & 15) << 54) | (byte131 << 46) | (byte132 << 38) | (byte133 << 30) | (byte134 << 22) | (byte135 << 14) | (byte136 << 6) | (byte137 >>> 2); - final long byte138 = blocks[blocksOffset++] & 0xFF; - final long byte139 = blocks[blocksOffset++] & 0xFF; - final long byte140 = blocks[blocksOffset++] & 0xFF; - final long byte141 = blocks[blocksOffset++] & 0xFF; - final long byte142 = blocks[blocksOffset++] & 0xFF; - final long byte143 = blocks[blocksOffset++] & 0xFF; - final long byte144 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte137 & 3) << 56) | (byte138 << 48) | (byte139 << 40) | (byte140 << 32) | (byte141 << 24) | (byte142 << 16) | (byte143 << 8) | byte144; - final long byte145 = blocks[blocksOffset++] & 0xFF; - final long byte146 = blocks[blocksOffset++] & 0xFF; - final long byte147 = blocks[blocksOffset++] & 0xFF; - final long byte148 = blocks[blocksOffset++] & 0xFF; - final long byte149 = blocks[blocksOffset++] & 0xFF; - final long byte150 = blocks[blocksOffset++] & 0xFF; - final long byte151 = blocks[blocksOffset++] & 0xFF; - final long byte152 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte145 << 50) | (byte146 << 42) | (byte147 << 34) | (byte148 << 26) | (byte149 << 18) | (byte150 << 10) | (byte151 << 2) | (byte152 >>> 6); - final long byte153 = blocks[blocksOffset++] & 0xFF; - final long byte154 = blocks[blocksOffset++] & 0xFF; - final long byte155 = blocks[blocksOffset++] & 0xFF; - final long byte156 = blocks[blocksOffset++] & 0xFF; - final long byte157 = blocks[blocksOffset++] & 0xFF; - final long byte158 = blocks[blocksOffset++] & 0xFF; - final long byte159 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte152 & 63) << 52) | (byte153 << 44) | (byte154 << 36) | (byte155 << 28) | (byte156 << 20) | (byte157 << 12) | (byte158 << 4) | (byte159 >>> 4); - final long byte160 = blocks[blocksOffset++] & 0xFF; - final long byte161 = blocks[blocksOffset++] & 0xFF; - final long byte162 = blocks[blocksOffset++] & 0xFF; - final long byte163 = blocks[blocksOffset++] & 0xFF; - final long byte164 = blocks[blocksOffset++] & 0xFF; - final long byte165 = blocks[blocksOffset++] & 0xFF; - final long byte166 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte159 & 15) << 54) | (byte160 << 46) | (byte161 << 38) | (byte162 << 30) | (byte163 << 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; - final long byte170 = blocks[blocksOffset++] & 0xFF; - final long byte171 = blocks[blocksOffset++] & 0xFF; - final long byte172 = blocks[blocksOffset++] & 0xFF; - final long byte173 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte166 & 3) << 56) | (byte167 << 48) | (byte168 << 40) | (byte169 << 32) | (byte170 << 24) | (byte171 << 16) | (byte172 << 8) | byte173; - final long byte174 = blocks[blocksOffset++] & 0xFF; - final long byte175 = blocks[blocksOffset++] & 0xFF; - final long byte176 = blocks[blocksOffset++] & 0xFF; - final long byte177 = blocks[blocksOffset++] & 0xFF; - final long byte178 = blocks[blocksOffset++] & 0xFF; - final long byte179 = blocks[blocksOffset++] & 0xFF; - final long byte180 = blocks[blocksOffset++] & 0xFF; - final long byte181 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte174 << 50) | (byte175 << 42) | (byte176 << 34) | (byte177 << 26) | (byte178 << 18) | (byte179 << 10) | (byte180 << 2) | (byte181 >>> 6); - final long byte182 = blocks[blocksOffset++] & 0xFF; - final long byte183 = blocks[blocksOffset++] & 0xFF; - final long byte184 = blocks[blocksOffset++] & 0xFF; - final long byte185 = blocks[blocksOffset++] & 0xFF; - final long byte186 = blocks[blocksOffset++] & 0xFF; - final long byte187 = blocks[blocksOffset++] & 0xFF; - final long byte188 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte181 & 63) << 52) | (byte182 << 44) | (byte183 << 36) | (byte184 << 28) | (byte185 << 20) | (byte186 << 12) | (byte187 << 4) | (byte188 >>> 4); - final long byte189 = blocks[blocksOffset++] & 0xFF; - final long byte190 = blocks[blocksOffset++] & 0xFF; - final long byte191 = blocks[blocksOffset++] & 0xFF; - final long byte192 = blocks[blocksOffset++] & 0xFF; - final long byte193 = blocks[blocksOffset++] & 0xFF; - final long byte194 = blocks[blocksOffset++] & 0xFF; - final long byte195 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte188 & 15) << 54) | (byte189 << 46) | (byte190 << 38) | (byte191 << 30) | (byte192 << 22) | (byte193 << 14) | (byte194 << 6) | (byte195 >>> 2); - final long byte196 = blocks[blocksOffset++] & 0xFF; - final long byte197 = blocks[blocksOffset++] & 0xFF; - final long byte198 = blocks[blocksOffset++] & 0xFF; - final long byte199 = blocks[blocksOffset++] & 0xFF; - final long byte200 = blocks[blocksOffset++] & 0xFF; - final long byte201 = blocks[blocksOffset++] & 0xFF; - final long byte202 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte195 & 3) << 56) | (byte196 << 48) | (byte197 << 40) | (byte198 << 32) | (byte199 << 24) | (byte200 << 16) | (byte201 << 8) | byte202; - final long byte203 = blocks[blocksOffset++] & 0xFF; - final long byte204 = blocks[blocksOffset++] & 0xFF; - final long byte205 = blocks[blocksOffset++] & 0xFF; - final long byte206 = blocks[blocksOffset++] & 0xFF; - final long byte207 = blocks[blocksOffset++] & 0xFF; - final long byte208 = blocks[blocksOffset++] & 0xFF; - final long byte209 = blocks[blocksOffset++] & 0xFF; - final long byte210 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte203 << 50) | (byte204 << 42) | (byte205 << 34) | (byte206 << 26) | (byte207 << 18) | (byte208 << 10) | (byte209 << 2) | (byte210 >>> 6); - final long byte211 = blocks[blocksOffset++] & 0xFF; - final long byte212 = blocks[blocksOffset++] & 0xFF; - final long byte213 = blocks[blocksOffset++] & 0xFF; - final long byte214 = blocks[blocksOffset++] & 0xFF; - final long byte215 = blocks[blocksOffset++] & 0xFF; - final long byte216 = blocks[blocksOffset++] & 0xFF; - final long byte217 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte210 & 63) << 52) | (byte211 << 44) | (byte212 << 36) | (byte213 << 28) | (byte214 << 20) | (byte215 << 12) | (byte216 << 4) | (byte217 >>> 4); - final long byte218 = blocks[blocksOffset++] & 0xFF; - final long byte219 = blocks[blocksOffset++] & 0xFF; - final long byte220 = blocks[blocksOffset++] & 0xFF; - final long byte221 = blocks[blocksOffset++] & 0xFF; - final long byte222 = blocks[blocksOffset++] & 0xFF; - final long byte223 = blocks[blocksOffset++] & 0xFF; - final long byte224 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte217 & 15) << 54) | (byte218 << 46) | (byte219 << 38) | (byte220 << 30) | (byte221 << 22) | (byte222 << 14) | (byte223 << 6) | (byte224 >>> 2); - final long byte225 = blocks[blocksOffset++] & 0xFF; - final long byte226 = blocks[blocksOffset++] & 0xFF; - final long byte227 = blocks[blocksOffset++] & 0xFF; - final long byte228 = blocks[blocksOffset++] & 0xFF; - final long byte229 = blocks[blocksOffset++] & 0xFF; - final long byte230 = blocks[blocksOffset++] & 0xFF; - final long byte231 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte224 & 3) << 56) | (byte225 << 48) | (byte226 << 40) | (byte227 << 32) | (byte228 << 24) | (byte229 << 16) | (byte230 << 8) | byte231; - } - } - - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 6) | ((values[valuesOffset] & 0xffffffffL) >>> 52); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 12) | ((values[valuesOffset] & 0xffffffffL) >>> 46); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 18) | ((values[valuesOffset] & 0xffffffffL) >>> 40); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 24) | ((values[valuesOffset] & 0xffffffffL) >>> 34); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 30) | ((values[valuesOffset] & 0xffffffffL) >>> 28); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 36) | ((values[valuesOffset] & 0xffffffffL) >>> 22); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 42) | ((values[valuesOffset] & 0xffffffffL) >>> 16); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 48) | ((values[valuesOffset] & 0xffffffffL) >>> 10); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 54) | ((values[valuesOffset] & 0xffffffffL) >>> 4); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 60) | ((values[valuesOffset++] & 0xffffffffL) << 2) | ((values[valuesOffset] & 0xffffffffL) >>> 56); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 8) | ((values[valuesOffset] & 0xffffffffL) >>> 50); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 14) | ((values[valuesOffset] & 0xffffffffL) >>> 44); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 20) | ((values[valuesOffset] & 0xffffffffL) >>> 38); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 26) | ((values[valuesOffset] & 0xffffffffL) >>> 32); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 32) | ((values[valuesOffset] & 0xffffffffL) >>> 26); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 38) | ((values[valuesOffset] & 0xffffffffL) >>> 20); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 44) | ((values[valuesOffset] & 0xffffffffL) >>> 14); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 50) | ((values[valuesOffset] & 0xffffffffL) >>> 8); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 56) | ((values[valuesOffset] & 0xffffffffL) >>> 2); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 62) | ((values[valuesOffset++] & 0xffffffffL) << 4) | ((values[valuesOffset] & 0xffffffffL) >>> 54); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 10) | ((values[valuesOffset] & 0xffffffffL) >>> 48); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 16) | ((values[valuesOffset] & 0xffffffffL) >>> 42); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 22) | ((values[valuesOffset] & 0xffffffffL) >>> 36); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 28) | ((values[valuesOffset] & 0xffffffffL) >>> 30); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 34) | ((values[valuesOffset] & 0xffffffffL) >>> 24); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 40) | ((values[valuesOffset] & 0xffffffffL) >>> 18); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 46) | ((values[valuesOffset] & 0xffffffffL) >>> 12); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 52) | ((values[valuesOffset] & 0xffffffffL) >>> 6); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 58) | (values[valuesOffset++] & 0xffffffffL); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] << 6) | (values[valuesOffset] >>> 52); - blocks[blocksOffset++] = (values[valuesOffset++] << 12) | (values[valuesOffset] >>> 46); - blocks[blocksOffset++] = (values[valuesOffset++] << 18) | (values[valuesOffset] >>> 40); - blocks[blocksOffset++] = (values[valuesOffset++] << 24) | (values[valuesOffset] >>> 34); - blocks[blocksOffset++] = (values[valuesOffset++] << 30) | (values[valuesOffset] >>> 28); - blocks[blocksOffset++] = (values[valuesOffset++] << 36) | (values[valuesOffset] >>> 22); - blocks[blocksOffset++] = (values[valuesOffset++] << 42) | (values[valuesOffset] >>> 16); - blocks[blocksOffset++] = (values[valuesOffset++] << 48) | (values[valuesOffset] >>> 10); - blocks[blocksOffset++] = (values[valuesOffset++] << 54) | (values[valuesOffset] >>> 4); - blocks[blocksOffset++] = (values[valuesOffset++] << 60) | (values[valuesOffset++] << 2) | (values[valuesOffset] >>> 56); - blocks[blocksOffset++] = (values[valuesOffset++] << 8) | (values[valuesOffset] >>> 50); - blocks[blocksOffset++] = (values[valuesOffset++] << 14) | (values[valuesOffset] >>> 44); - blocks[blocksOffset++] = (values[valuesOffset++] << 20) | (values[valuesOffset] >>> 38); - blocks[blocksOffset++] = (values[valuesOffset++] << 26) | (values[valuesOffset] >>> 32); - blocks[blocksOffset++] = (values[valuesOffset++] << 32) | (values[valuesOffset] >>> 26); - blocks[blocksOffset++] = (values[valuesOffset++] << 38) | (values[valuesOffset] >>> 20); - blocks[blocksOffset++] = (values[valuesOffset++] << 44) | (values[valuesOffset] >>> 14); - blocks[blocksOffset++] = (values[valuesOffset++] << 50) | (values[valuesOffset] >>> 8); - blocks[blocksOffset++] = (values[valuesOffset++] << 56) | (values[valuesOffset] >>> 2); - blocks[blocksOffset++] = (values[valuesOffset++] << 62) | (values[valuesOffset++] << 4) | (values[valuesOffset] >>> 54); - blocks[blocksOffset++] = (values[valuesOffset++] << 10) | (values[valuesOffset] >>> 48); - blocks[blocksOffset++] = (values[valuesOffset++] << 16) | (values[valuesOffset] >>> 42); - blocks[blocksOffset++] = (values[valuesOffset++] << 22) | (values[valuesOffset] >>> 36); - blocks[blocksOffset++] = (values[valuesOffset++] << 28) | (values[valuesOffset] >>> 30); - blocks[blocksOffset++] = (values[valuesOffset++] << 34) | (values[valuesOffset] >>> 24); - blocks[blocksOffset++] = (values[valuesOffset++] << 40) | (values[valuesOffset] >>> 18); - blocks[blocksOffset++] = (values[valuesOffset++] << 46) | (values[valuesOffset] >>> 12); - blocks[blocksOffset++] = (values[valuesOffset++] << 52) | (values[valuesOffset] >>> 6); - blocks[blocksOffset++] = (values[valuesOffset++] << 58) | values[valuesOffset++]; - } - } - -} diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked59.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked59.java deleted file mode 100644 index 897d09aed6c..00000000000 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked59.java +++ /dev/null @@ -1,855 +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 BulkOperationPacked59 extends BulkOperation { - @Override - public int blockCount() { - return 59; - } - - @Override - public int valueCount() { - return 64; - } - - @Override - public void decode(long[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) { - throw new UnsupportedOperationException(); - } - - @Override - public void decode(byte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) { - throw new UnsupportedOperationException(); - } - - @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 >>> 5; - final long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block0 & 31L) << 54) | (block1 >>> 10); - final long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block1 & 1023L) << 49) | (block2 >>> 15); - final long block3 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block2 & 32767L) << 44) | (block3 >>> 20); - final long block4 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block3 & 1048575L) << 39) | (block4 >>> 25); - final long block5 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block4 & 33554431L) << 34) | (block5 >>> 30); - final long block6 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block5 & 1073741823L) << 29) | (block6 >>> 35); - final long block7 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block6 & 34359738367L) << 24) | (block7 >>> 40); - final long block8 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block7 & 1099511627775L) << 19) | (block8 >>> 45); - final long block9 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block8 & 35184372088831L) << 14) | (block9 >>> 50); - final long block10 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block9 & 1125899906842623L) << 9) | (block10 >>> 55); - final long block11 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block10 & 36028797018963967L) << 4) | (block11 >>> 60); - values[valuesOffset++] = (block11 >>> 1) & 576460752303423487L; - final long block12 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block11 & 1L) << 58) | (block12 >>> 6); - final long block13 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block12 & 63L) << 53) | (block13 >>> 11); - final long block14 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block13 & 2047L) << 48) | (block14 >>> 16); - final long block15 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block14 & 65535L) << 43) | (block15 >>> 21); - final long block16 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block15 & 2097151L) << 38) | (block16 >>> 26); - final long block17 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block16 & 67108863L) << 33) | (block17 >>> 31); - final long block18 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block17 & 2147483647L) << 28) | (block18 >>> 36); - final long block19 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block18 & 68719476735L) << 23) | (block19 >>> 41); - final long block20 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block19 & 2199023255551L) << 18) | (block20 >>> 46); - final long block21 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block20 & 70368744177663L) << 13) | (block21 >>> 51); - final long block22 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block21 & 2251799813685247L) << 8) | (block22 >>> 56); - final long block23 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block22 & 72057594037927935L) << 3) | (block23 >>> 61); - values[valuesOffset++] = (block23 >>> 2) & 576460752303423487L; - final long block24 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block23 & 3L) << 57) | (block24 >>> 7); - final long block25 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block24 & 127L) << 52) | (block25 >>> 12); - final long block26 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block25 & 4095L) << 47) | (block26 >>> 17); - final long block27 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block26 & 131071L) << 42) | (block27 >>> 22); - final long block28 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block27 & 4194303L) << 37) | (block28 >>> 27); - final long block29 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block28 & 134217727L) << 32) | (block29 >>> 32); - final long block30 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block29 & 4294967295L) << 27) | (block30 >>> 37); - final long block31 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block30 & 137438953471L) << 22) | (block31 >>> 42); - final long block32 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block31 & 4398046511103L) << 17) | (block32 >>> 47); - final long block33 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block32 & 140737488355327L) << 12) | (block33 >>> 52); - final long block34 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block33 & 4503599627370495L) << 7) | (block34 >>> 57); - final long block35 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block34 & 144115188075855871L) << 2) | (block35 >>> 62); - values[valuesOffset++] = (block35 >>> 3) & 576460752303423487L; - final long block36 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block35 & 7L) << 56) | (block36 >>> 8); - final long block37 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block36 & 255L) << 51) | (block37 >>> 13); - final long block38 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block37 & 8191L) << 46) | (block38 >>> 18); - final long block39 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block38 & 262143L) << 41) | (block39 >>> 23); - final long block40 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block39 & 8388607L) << 36) | (block40 >>> 28); - final long block41 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block40 & 268435455L) << 31) | (block41 >>> 33); - final long block42 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block41 & 8589934591L) << 26) | (block42 >>> 38); - final long block43 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block42 & 274877906943L) << 21) | (block43 >>> 43); - final long block44 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block43 & 8796093022207L) << 16) | (block44 >>> 48); - final long block45 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block44 & 281474976710655L) << 11) | (block45 >>> 53); - final long block46 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block45 & 9007199254740991L) << 6) | (block46 >>> 58); - final long block47 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block46 & 288230376151711743L) << 1) | (block47 >>> 63); - values[valuesOffset++] = (block47 >>> 4) & 576460752303423487L; - final long block48 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block47 & 15L) << 55) | (block48 >>> 9); - final long block49 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block48 & 511L) << 50) | (block49 >>> 14); - final long block50 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block49 & 16383L) << 45) | (block50 >>> 19); - final long block51 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block50 & 524287L) << 40) | (block51 >>> 24); - final long block52 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block51 & 16777215L) << 35) | (block52 >>> 29); - final long block53 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block52 & 536870911L) << 30) | (block53 >>> 34); - final long block54 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block53 & 17179869183L) << 25) | (block54 >>> 39); - final long block55 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block54 & 549755813887L) << 20) | (block55 >>> 44); - final long block56 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block55 & 17592186044415L) << 15) | (block56 >>> 49); - final long block57 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block56 & 562949953421311L) << 10) | (block57 >>> 54); - final long block58 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block57 & 18014398509481983L) << 5) | (block58 >>> 59); - values[valuesOffset++] = block58 & 576460752303423487L; - } - } - - @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; - final long byte3 = blocks[blocksOffset++] & 0xFF; - final long byte4 = blocks[blocksOffset++] & 0xFF; - final long byte5 = blocks[blocksOffset++] & 0xFF; - final long byte6 = blocks[blocksOffset++] & 0xFF; - final long byte7 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte0 << 51) | (byte1 << 43) | (byte2 << 35) | (byte3 << 27) | (byte4 << 19) | (byte5 << 11) | (byte6 << 3) | (byte7 >>> 5); - final long byte8 = blocks[blocksOffset++] & 0xFF; - final long byte9 = blocks[blocksOffset++] & 0xFF; - final long byte10 = blocks[blocksOffset++] & 0xFF; - final long byte11 = blocks[blocksOffset++] & 0xFF; - final long byte12 = blocks[blocksOffset++] & 0xFF; - final long byte13 = blocks[blocksOffset++] & 0xFF; - final long byte14 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte7 & 31) << 54) | (byte8 << 46) | (byte9 << 38) | (byte10 << 30) | (byte11 << 22) | (byte12 << 14) | (byte13 << 6) | (byte14 >>> 2); - final long byte15 = blocks[blocksOffset++] & 0xFF; - final long byte16 = blocks[blocksOffset++] & 0xFF; - final long byte17 = blocks[blocksOffset++] & 0xFF; - final long byte18 = blocks[blocksOffset++] & 0xFF; - final long byte19 = blocks[blocksOffset++] & 0xFF; - final long byte20 = blocks[blocksOffset++] & 0xFF; - final long byte21 = blocks[blocksOffset++] & 0xFF; - final long byte22 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte14 & 3) << 57) | (byte15 << 49) | (byte16 << 41) | (byte17 << 33) | (byte18 << 25) | (byte19 << 17) | (byte20 << 9) | (byte21 << 1) | (byte22 >>> 7); - final long byte23 = blocks[blocksOffset++] & 0xFF; - final long byte24 = blocks[blocksOffset++] & 0xFF; - final long byte25 = blocks[blocksOffset++] & 0xFF; - final long byte26 = blocks[blocksOffset++] & 0xFF; - final long byte27 = blocks[blocksOffset++] & 0xFF; - final long byte28 = blocks[blocksOffset++] & 0xFF; - final long byte29 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte22 & 127) << 52) | (byte23 << 44) | (byte24 << 36) | (byte25 << 28) | (byte26 << 20) | (byte27 << 12) | (byte28 << 4) | (byte29 >>> 4); - final long byte30 = blocks[blocksOffset++] & 0xFF; - final long byte31 = blocks[blocksOffset++] & 0xFF; - final long byte32 = blocks[blocksOffset++] & 0xFF; - final long byte33 = blocks[blocksOffset++] & 0xFF; - final long byte34 = blocks[blocksOffset++] & 0xFF; - final long byte35 = blocks[blocksOffset++] & 0xFF; - final long byte36 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte29 & 15) << 55) | (byte30 << 47) | (byte31 << 39) | (byte32 << 31) | (byte33 << 23) | (byte34 << 15) | (byte35 << 7) | (byte36 >>> 1); - final long byte37 = blocks[blocksOffset++] & 0xFF; - final long byte38 = blocks[blocksOffset++] & 0xFF; - final long byte39 = blocks[blocksOffset++] & 0xFF; - final long byte40 = blocks[blocksOffset++] & 0xFF; - final long byte41 = blocks[blocksOffset++] & 0xFF; - final long byte42 = blocks[blocksOffset++] & 0xFF; - final long byte43 = blocks[blocksOffset++] & 0xFF; - final long byte44 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte36 & 1) << 58) | (byte37 << 50) | (byte38 << 42) | (byte39 << 34) | (byte40 << 26) | (byte41 << 18) | (byte42 << 10) | (byte43 << 2) | (byte44 >>> 6); - final long byte45 = blocks[blocksOffset++] & 0xFF; - final long byte46 = blocks[blocksOffset++] & 0xFF; - final long byte47 = blocks[blocksOffset++] & 0xFF; - final long byte48 = blocks[blocksOffset++] & 0xFF; - final long byte49 = blocks[blocksOffset++] & 0xFF; - final long byte50 = blocks[blocksOffset++] & 0xFF; - final long byte51 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte44 & 63) << 53) | (byte45 << 45) | (byte46 << 37) | (byte47 << 29) | (byte48 << 21) | (byte49 << 13) | (byte50 << 5) | (byte51 >>> 3); - final long byte52 = blocks[blocksOffset++] & 0xFF; - final long byte53 = blocks[blocksOffset++] & 0xFF; - final long byte54 = blocks[blocksOffset++] & 0xFF; - final long byte55 = blocks[blocksOffset++] & 0xFF; - final long byte56 = blocks[blocksOffset++] & 0xFF; - final long byte57 = blocks[blocksOffset++] & 0xFF; - final long byte58 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte51 & 7) << 56) | (byte52 << 48) | (byte53 << 40) | (byte54 << 32) | (byte55 << 24) | (byte56 << 16) | (byte57 << 8) | byte58; - final long byte59 = blocks[blocksOffset++] & 0xFF; - final long byte60 = blocks[blocksOffset++] & 0xFF; - final long byte61 = blocks[blocksOffset++] & 0xFF; - final long byte62 = blocks[blocksOffset++] & 0xFF; - final long byte63 = blocks[blocksOffset++] & 0xFF; - final long byte64 = blocks[blocksOffset++] & 0xFF; - final long byte65 = blocks[blocksOffset++] & 0xFF; - final long byte66 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte59 << 51) | (byte60 << 43) | (byte61 << 35) | (byte62 << 27) | (byte63 << 19) | (byte64 << 11) | (byte65 << 3) | (byte66 >>> 5); - final long byte67 = blocks[blocksOffset++] & 0xFF; - final long byte68 = blocks[blocksOffset++] & 0xFF; - final long byte69 = blocks[blocksOffset++] & 0xFF; - final long byte70 = blocks[blocksOffset++] & 0xFF; - final long byte71 = blocks[blocksOffset++] & 0xFF; - final long byte72 = blocks[blocksOffset++] & 0xFF; - final long byte73 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte66 & 31) << 54) | (byte67 << 46) | (byte68 << 38) | (byte69 << 30) | (byte70 << 22) | (byte71 << 14) | (byte72 << 6) | (byte73 >>> 2); - final long byte74 = blocks[blocksOffset++] & 0xFF; - final long byte75 = blocks[blocksOffset++] & 0xFF; - final long byte76 = blocks[blocksOffset++] & 0xFF; - final long byte77 = blocks[blocksOffset++] & 0xFF; - final long byte78 = blocks[blocksOffset++] & 0xFF; - final long byte79 = blocks[blocksOffset++] & 0xFF; - final long byte80 = blocks[blocksOffset++] & 0xFF; - final long byte81 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte73 & 3) << 57) | (byte74 << 49) | (byte75 << 41) | (byte76 << 33) | (byte77 << 25) | (byte78 << 17) | (byte79 << 9) | (byte80 << 1) | (byte81 >>> 7); - final long byte82 = blocks[blocksOffset++] & 0xFF; - final long byte83 = blocks[blocksOffset++] & 0xFF; - final long byte84 = blocks[blocksOffset++] & 0xFF; - final long byte85 = blocks[blocksOffset++] & 0xFF; - final long byte86 = blocks[blocksOffset++] & 0xFF; - final long byte87 = blocks[blocksOffset++] & 0xFF; - final long byte88 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte81 & 127) << 52) | (byte82 << 44) | (byte83 << 36) | (byte84 << 28) | (byte85 << 20) | (byte86 << 12) | (byte87 << 4) | (byte88 >>> 4); - final long byte89 = blocks[blocksOffset++] & 0xFF; - final long byte90 = blocks[blocksOffset++] & 0xFF; - final long byte91 = blocks[blocksOffset++] & 0xFF; - final long byte92 = blocks[blocksOffset++] & 0xFF; - final long byte93 = blocks[blocksOffset++] & 0xFF; - final long byte94 = blocks[blocksOffset++] & 0xFF; - final long byte95 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte88 & 15) << 55) | (byte89 << 47) | (byte90 << 39) | (byte91 << 31) | (byte92 << 23) | (byte93 << 15) | (byte94 << 7) | (byte95 >>> 1); - final long byte96 = blocks[blocksOffset++] & 0xFF; - final long byte97 = blocks[blocksOffset++] & 0xFF; - final long byte98 = blocks[blocksOffset++] & 0xFF; - final long byte99 = blocks[blocksOffset++] & 0xFF; - final long byte100 = blocks[blocksOffset++] & 0xFF; - final long byte101 = blocks[blocksOffset++] & 0xFF; - final long byte102 = blocks[blocksOffset++] & 0xFF; - final long byte103 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte95 & 1) << 58) | (byte96 << 50) | (byte97 << 42) | (byte98 << 34) | (byte99 << 26) | (byte100 << 18) | (byte101 << 10) | (byte102 << 2) | (byte103 >>> 6); - final long byte104 = blocks[blocksOffset++] & 0xFF; - final long byte105 = blocks[blocksOffset++] & 0xFF; - final long byte106 = blocks[blocksOffset++] & 0xFF; - final long byte107 = blocks[blocksOffset++] & 0xFF; - final long byte108 = blocks[blocksOffset++] & 0xFF; - final long byte109 = blocks[blocksOffset++] & 0xFF; - final long byte110 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte103 & 63) << 53) | (byte104 << 45) | (byte105 << 37) | (byte106 << 29) | (byte107 << 21) | (byte108 << 13) | (byte109 << 5) | (byte110 >>> 3); - final long byte111 = blocks[blocksOffset++] & 0xFF; - final long byte112 = blocks[blocksOffset++] & 0xFF; - final long byte113 = blocks[blocksOffset++] & 0xFF; - final long byte114 = blocks[blocksOffset++] & 0xFF; - final long byte115 = blocks[blocksOffset++] & 0xFF; - final long byte116 = blocks[blocksOffset++] & 0xFF; - final long byte117 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte110 & 7) << 56) | (byte111 << 48) | (byte112 << 40) | (byte113 << 32) | (byte114 << 24) | (byte115 << 16) | (byte116 << 8) | byte117; - final long byte118 = blocks[blocksOffset++] & 0xFF; - final long byte119 = blocks[blocksOffset++] & 0xFF; - final long byte120 = blocks[blocksOffset++] & 0xFF; - final long byte121 = blocks[blocksOffset++] & 0xFF; - final long byte122 = blocks[blocksOffset++] & 0xFF; - final long byte123 = blocks[blocksOffset++] & 0xFF; - final long byte124 = blocks[blocksOffset++] & 0xFF; - final long byte125 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte118 << 51) | (byte119 << 43) | (byte120 << 35) | (byte121 << 27) | (byte122 << 19) | (byte123 << 11) | (byte124 << 3) | (byte125 >>> 5); - final long byte126 = blocks[blocksOffset++] & 0xFF; - final long byte127 = blocks[blocksOffset++] & 0xFF; - final long byte128 = blocks[blocksOffset++] & 0xFF; - final long byte129 = blocks[blocksOffset++] & 0xFF; - final long byte130 = blocks[blocksOffset++] & 0xFF; - final long byte131 = blocks[blocksOffset++] & 0xFF; - final long byte132 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte125 & 31) << 54) | (byte126 << 46) | (byte127 << 38) | (byte128 << 30) | (byte129 << 22) | (byte130 << 14) | (byte131 << 6) | (byte132 >>> 2); - final long byte133 = blocks[blocksOffset++] & 0xFF; - final long byte134 = blocks[blocksOffset++] & 0xFF; - final long byte135 = blocks[blocksOffset++] & 0xFF; - final long byte136 = blocks[blocksOffset++] & 0xFF; - final long byte137 = blocks[blocksOffset++] & 0xFF; - final long byte138 = blocks[blocksOffset++] & 0xFF; - final long byte139 = blocks[blocksOffset++] & 0xFF; - final long byte140 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte132 & 3) << 57) | (byte133 << 49) | (byte134 << 41) | (byte135 << 33) | (byte136 << 25) | (byte137 << 17) | (byte138 << 9) | (byte139 << 1) | (byte140 >>> 7); - final long byte141 = blocks[blocksOffset++] & 0xFF; - final long byte142 = blocks[blocksOffset++] & 0xFF; - final long byte143 = blocks[blocksOffset++] & 0xFF; - final long byte144 = blocks[blocksOffset++] & 0xFF; - final long byte145 = blocks[blocksOffset++] & 0xFF; - final long byte146 = blocks[blocksOffset++] & 0xFF; - final long byte147 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte140 & 127) << 52) | (byte141 << 44) | (byte142 << 36) | (byte143 << 28) | (byte144 << 20) | (byte145 << 12) | (byte146 << 4) | (byte147 >>> 4); - final long byte148 = blocks[blocksOffset++] & 0xFF; - final long byte149 = blocks[blocksOffset++] & 0xFF; - final long byte150 = blocks[blocksOffset++] & 0xFF; - final long byte151 = blocks[blocksOffset++] & 0xFF; - final long byte152 = blocks[blocksOffset++] & 0xFF; - final long byte153 = blocks[blocksOffset++] & 0xFF; - final long byte154 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte147 & 15) << 55) | (byte148 << 47) | (byte149 << 39) | (byte150 << 31) | (byte151 << 23) | (byte152 << 15) | (byte153 << 7) | (byte154 >>> 1); - final long byte155 = blocks[blocksOffset++] & 0xFF; - final long byte156 = blocks[blocksOffset++] & 0xFF; - final long byte157 = blocks[blocksOffset++] & 0xFF; - final long byte158 = blocks[blocksOffset++] & 0xFF; - final long byte159 = blocks[blocksOffset++] & 0xFF; - final long byte160 = blocks[blocksOffset++] & 0xFF; - final long byte161 = blocks[blocksOffset++] & 0xFF; - final long byte162 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte154 & 1) << 58) | (byte155 << 50) | (byte156 << 42) | (byte157 << 34) | (byte158 << 26) | (byte159 << 18) | (byte160 << 10) | (byte161 << 2) | (byte162 >>> 6); - final long byte163 = blocks[blocksOffset++] & 0xFF; - final long byte164 = blocks[blocksOffset++] & 0xFF; - final long byte165 = blocks[blocksOffset++] & 0xFF; - final long byte166 = blocks[blocksOffset++] & 0xFF; - final long byte167 = blocks[blocksOffset++] & 0xFF; - final long byte168 = blocks[blocksOffset++] & 0xFF; - final long byte169 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte162 & 63) << 53) | (byte163 << 45) | (byte164 << 37) | (byte165 << 29) | (byte166 << 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; - final long byte173 = blocks[blocksOffset++] & 0xFF; - final long byte174 = blocks[blocksOffset++] & 0xFF; - final long byte175 = blocks[blocksOffset++] & 0xFF; - final long byte176 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte169 & 7) << 56) | (byte170 << 48) | (byte171 << 40) | (byte172 << 32) | (byte173 << 24) | (byte174 << 16) | (byte175 << 8) | byte176; - final long byte177 = blocks[blocksOffset++] & 0xFF; - final long byte178 = blocks[blocksOffset++] & 0xFF; - final long byte179 = blocks[blocksOffset++] & 0xFF; - final long byte180 = blocks[blocksOffset++] & 0xFF; - final long byte181 = blocks[blocksOffset++] & 0xFF; - final long byte182 = blocks[blocksOffset++] & 0xFF; - final long byte183 = blocks[blocksOffset++] & 0xFF; - final long byte184 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte177 << 51) | (byte178 << 43) | (byte179 << 35) | (byte180 << 27) | (byte181 << 19) | (byte182 << 11) | (byte183 << 3) | (byte184 >>> 5); - final long byte185 = blocks[blocksOffset++] & 0xFF; - final long byte186 = blocks[blocksOffset++] & 0xFF; - final long byte187 = blocks[blocksOffset++] & 0xFF; - final long byte188 = blocks[blocksOffset++] & 0xFF; - final long byte189 = blocks[blocksOffset++] & 0xFF; - final long byte190 = blocks[blocksOffset++] & 0xFF; - final long byte191 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte184 & 31) << 54) | (byte185 << 46) | (byte186 << 38) | (byte187 << 30) | (byte188 << 22) | (byte189 << 14) | (byte190 << 6) | (byte191 >>> 2); - final long byte192 = blocks[blocksOffset++] & 0xFF; - final long byte193 = blocks[blocksOffset++] & 0xFF; - final long byte194 = blocks[blocksOffset++] & 0xFF; - final long byte195 = blocks[blocksOffset++] & 0xFF; - final long byte196 = blocks[blocksOffset++] & 0xFF; - final long byte197 = blocks[blocksOffset++] & 0xFF; - final long byte198 = blocks[blocksOffset++] & 0xFF; - final long byte199 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte191 & 3) << 57) | (byte192 << 49) | (byte193 << 41) | (byte194 << 33) | (byte195 << 25) | (byte196 << 17) | (byte197 << 9) | (byte198 << 1) | (byte199 >>> 7); - final long byte200 = blocks[blocksOffset++] & 0xFF; - final long byte201 = blocks[blocksOffset++] & 0xFF; - final long byte202 = blocks[blocksOffset++] & 0xFF; - final long byte203 = blocks[blocksOffset++] & 0xFF; - final long byte204 = blocks[blocksOffset++] & 0xFF; - final long byte205 = blocks[blocksOffset++] & 0xFF; - final long byte206 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte199 & 127) << 52) | (byte200 << 44) | (byte201 << 36) | (byte202 << 28) | (byte203 << 20) | (byte204 << 12) | (byte205 << 4) | (byte206 >>> 4); - final long byte207 = blocks[blocksOffset++] & 0xFF; - final long byte208 = blocks[blocksOffset++] & 0xFF; - final long byte209 = blocks[blocksOffset++] & 0xFF; - final long byte210 = blocks[blocksOffset++] & 0xFF; - final long byte211 = blocks[blocksOffset++] & 0xFF; - final long byte212 = blocks[blocksOffset++] & 0xFF; - final long byte213 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte206 & 15) << 55) | (byte207 << 47) | (byte208 << 39) | (byte209 << 31) | (byte210 << 23) | (byte211 << 15) | (byte212 << 7) | (byte213 >>> 1); - final long byte214 = blocks[blocksOffset++] & 0xFF; - final long byte215 = blocks[blocksOffset++] & 0xFF; - final long byte216 = blocks[blocksOffset++] & 0xFF; - final long byte217 = blocks[blocksOffset++] & 0xFF; - final long byte218 = blocks[blocksOffset++] & 0xFF; - final long byte219 = blocks[blocksOffset++] & 0xFF; - final long byte220 = blocks[blocksOffset++] & 0xFF; - final long byte221 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte213 & 1) << 58) | (byte214 << 50) | (byte215 << 42) | (byte216 << 34) | (byte217 << 26) | (byte218 << 18) | (byte219 << 10) | (byte220 << 2) | (byte221 >>> 6); - final long byte222 = blocks[blocksOffset++] & 0xFF; - final long byte223 = blocks[blocksOffset++] & 0xFF; - final long byte224 = blocks[blocksOffset++] & 0xFF; - final long byte225 = blocks[blocksOffset++] & 0xFF; - final long byte226 = blocks[blocksOffset++] & 0xFF; - final long byte227 = blocks[blocksOffset++] & 0xFF; - final long byte228 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte221 & 63) << 53) | (byte222 << 45) | (byte223 << 37) | (byte224 << 29) | (byte225 << 21) | (byte226 << 13) | (byte227 << 5) | (byte228 >>> 3); - final long byte229 = blocks[blocksOffset++] & 0xFF; - final long byte230 = blocks[blocksOffset++] & 0xFF; - final long byte231 = blocks[blocksOffset++] & 0xFF; - final long byte232 = blocks[blocksOffset++] & 0xFF; - final long byte233 = blocks[blocksOffset++] & 0xFF; - final long byte234 = blocks[blocksOffset++] & 0xFF; - final long byte235 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte228 & 7) << 56) | (byte229 << 48) | (byte230 << 40) | (byte231 << 32) | (byte232 << 24) | (byte233 << 16) | (byte234 << 8) | byte235; - final long byte236 = blocks[blocksOffset++] & 0xFF; - final long byte237 = blocks[blocksOffset++] & 0xFF; - final long byte238 = blocks[blocksOffset++] & 0xFF; - final long byte239 = blocks[blocksOffset++] & 0xFF; - final long byte240 = blocks[blocksOffset++] & 0xFF; - final long byte241 = blocks[blocksOffset++] & 0xFF; - final long byte242 = blocks[blocksOffset++] & 0xFF; - final long byte243 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte236 << 51) | (byte237 << 43) | (byte238 << 35) | (byte239 << 27) | (byte240 << 19) | (byte241 << 11) | (byte242 << 3) | (byte243 >>> 5); - final long byte244 = blocks[blocksOffset++] & 0xFF; - final long byte245 = blocks[blocksOffset++] & 0xFF; - final long byte246 = blocks[blocksOffset++] & 0xFF; - final long byte247 = blocks[blocksOffset++] & 0xFF; - final long byte248 = blocks[blocksOffset++] & 0xFF; - final long byte249 = blocks[blocksOffset++] & 0xFF; - final long byte250 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte243 & 31) << 54) | (byte244 << 46) | (byte245 << 38) | (byte246 << 30) | (byte247 << 22) | (byte248 << 14) | (byte249 << 6) | (byte250 >>> 2); - final long byte251 = blocks[blocksOffset++] & 0xFF; - final long byte252 = blocks[blocksOffset++] & 0xFF; - final long byte253 = blocks[blocksOffset++] & 0xFF; - final long byte254 = blocks[blocksOffset++] & 0xFF; - final long byte255 = blocks[blocksOffset++] & 0xFF; - final long byte256 = blocks[blocksOffset++] & 0xFF; - final long byte257 = blocks[blocksOffset++] & 0xFF; - final long byte258 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte250 & 3) << 57) | (byte251 << 49) | (byte252 << 41) | (byte253 << 33) | (byte254 << 25) | (byte255 << 17) | (byte256 << 9) | (byte257 << 1) | (byte258 >>> 7); - final long byte259 = blocks[blocksOffset++] & 0xFF; - final long byte260 = blocks[blocksOffset++] & 0xFF; - final long byte261 = blocks[blocksOffset++] & 0xFF; - final long byte262 = blocks[blocksOffset++] & 0xFF; - final long byte263 = blocks[blocksOffset++] & 0xFF; - final long byte264 = blocks[blocksOffset++] & 0xFF; - final long byte265 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte258 & 127) << 52) | (byte259 << 44) | (byte260 << 36) | (byte261 << 28) | (byte262 << 20) | (byte263 << 12) | (byte264 << 4) | (byte265 >>> 4); - final long byte266 = blocks[blocksOffset++] & 0xFF; - final long byte267 = blocks[blocksOffset++] & 0xFF; - final long byte268 = blocks[blocksOffset++] & 0xFF; - final long byte269 = blocks[blocksOffset++] & 0xFF; - final long byte270 = blocks[blocksOffset++] & 0xFF; - final long byte271 = blocks[blocksOffset++] & 0xFF; - final long byte272 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte265 & 15) << 55) | (byte266 << 47) | (byte267 << 39) | (byte268 << 31) | (byte269 << 23) | (byte270 << 15) | (byte271 << 7) | (byte272 >>> 1); - final long byte273 = blocks[blocksOffset++] & 0xFF; - final long byte274 = blocks[blocksOffset++] & 0xFF; - final long byte275 = blocks[blocksOffset++] & 0xFF; - final long byte276 = blocks[blocksOffset++] & 0xFF; - final long byte277 = blocks[blocksOffset++] & 0xFF; - final long byte278 = blocks[blocksOffset++] & 0xFF; - final long byte279 = blocks[blocksOffset++] & 0xFF; - final long byte280 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte272 & 1) << 58) | (byte273 << 50) | (byte274 << 42) | (byte275 << 34) | (byte276 << 26) | (byte277 << 18) | (byte278 << 10) | (byte279 << 2) | (byte280 >>> 6); - final long byte281 = blocks[blocksOffset++] & 0xFF; - final long byte282 = blocks[blocksOffset++] & 0xFF; - final long byte283 = blocks[blocksOffset++] & 0xFF; - final long byte284 = blocks[blocksOffset++] & 0xFF; - final long byte285 = blocks[blocksOffset++] & 0xFF; - final long byte286 = blocks[blocksOffset++] & 0xFF; - final long byte287 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte280 & 63) << 53) | (byte281 << 45) | (byte282 << 37) | (byte283 << 29) | (byte284 << 21) | (byte285 << 13) | (byte286 << 5) | (byte287 >>> 3); - final long byte288 = blocks[blocksOffset++] & 0xFF; - final long byte289 = blocks[blocksOffset++] & 0xFF; - final long byte290 = blocks[blocksOffset++] & 0xFF; - final long byte291 = blocks[blocksOffset++] & 0xFF; - final long byte292 = blocks[blocksOffset++] & 0xFF; - final long byte293 = blocks[blocksOffset++] & 0xFF; - final long byte294 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte287 & 7) << 56) | (byte288 << 48) | (byte289 << 40) | (byte290 << 32) | (byte291 << 24) | (byte292 << 16) | (byte293 << 8) | byte294; - final long byte295 = blocks[blocksOffset++] & 0xFF; - final long byte296 = blocks[blocksOffset++] & 0xFF; - final long byte297 = blocks[blocksOffset++] & 0xFF; - final long byte298 = blocks[blocksOffset++] & 0xFF; - final long byte299 = blocks[blocksOffset++] & 0xFF; - final long byte300 = blocks[blocksOffset++] & 0xFF; - final long byte301 = blocks[blocksOffset++] & 0xFF; - final long byte302 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte295 << 51) | (byte296 << 43) | (byte297 << 35) | (byte298 << 27) | (byte299 << 19) | (byte300 << 11) | (byte301 << 3) | (byte302 >>> 5); - final long byte303 = blocks[blocksOffset++] & 0xFF; - final long byte304 = blocks[blocksOffset++] & 0xFF; - final long byte305 = blocks[blocksOffset++] & 0xFF; - final long byte306 = blocks[blocksOffset++] & 0xFF; - final long byte307 = blocks[blocksOffset++] & 0xFF; - final long byte308 = blocks[blocksOffset++] & 0xFF; - final long byte309 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte302 & 31) << 54) | (byte303 << 46) | (byte304 << 38) | (byte305 << 30) | (byte306 << 22) | (byte307 << 14) | (byte308 << 6) | (byte309 >>> 2); - final long byte310 = blocks[blocksOffset++] & 0xFF; - final long byte311 = blocks[blocksOffset++] & 0xFF; - final long byte312 = blocks[blocksOffset++] & 0xFF; - final long byte313 = blocks[blocksOffset++] & 0xFF; - final long byte314 = blocks[blocksOffset++] & 0xFF; - final long byte315 = blocks[blocksOffset++] & 0xFF; - final long byte316 = blocks[blocksOffset++] & 0xFF; - final long byte317 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte309 & 3) << 57) | (byte310 << 49) | (byte311 << 41) | (byte312 << 33) | (byte313 << 25) | (byte314 << 17) | (byte315 << 9) | (byte316 << 1) | (byte317 >>> 7); - final long byte318 = blocks[blocksOffset++] & 0xFF; - final long byte319 = blocks[blocksOffset++] & 0xFF; - final long byte320 = blocks[blocksOffset++] & 0xFF; - final long byte321 = blocks[blocksOffset++] & 0xFF; - final long byte322 = blocks[blocksOffset++] & 0xFF; - final long byte323 = blocks[blocksOffset++] & 0xFF; - final long byte324 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte317 & 127) << 52) | (byte318 << 44) | (byte319 << 36) | (byte320 << 28) | (byte321 << 20) | (byte322 << 12) | (byte323 << 4) | (byte324 >>> 4); - final long byte325 = blocks[blocksOffset++] & 0xFF; - final long byte326 = blocks[blocksOffset++] & 0xFF; - final long byte327 = blocks[blocksOffset++] & 0xFF; - final long byte328 = blocks[blocksOffset++] & 0xFF; - final long byte329 = blocks[blocksOffset++] & 0xFF; - final long byte330 = blocks[blocksOffset++] & 0xFF; - final long byte331 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte324 & 15) << 55) | (byte325 << 47) | (byte326 << 39) | (byte327 << 31) | (byte328 << 23) | (byte329 << 15) | (byte330 << 7) | (byte331 >>> 1); - final long byte332 = blocks[blocksOffset++] & 0xFF; - final long byte333 = blocks[blocksOffset++] & 0xFF; - final long byte334 = blocks[blocksOffset++] & 0xFF; - final long byte335 = blocks[blocksOffset++] & 0xFF; - final long byte336 = blocks[blocksOffset++] & 0xFF; - final long byte337 = blocks[blocksOffset++] & 0xFF; - final long byte338 = blocks[blocksOffset++] & 0xFF; - final long byte339 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte331 & 1) << 58) | (byte332 << 50) | (byte333 << 42) | (byte334 << 34) | (byte335 << 26) | (byte336 << 18) | (byte337 << 10) | (byte338 << 2) | (byte339 >>> 6); - final long byte340 = blocks[blocksOffset++] & 0xFF; - final long byte341 = blocks[blocksOffset++] & 0xFF; - final long byte342 = blocks[blocksOffset++] & 0xFF; - final long byte343 = blocks[blocksOffset++] & 0xFF; - final long byte344 = blocks[blocksOffset++] & 0xFF; - final long byte345 = blocks[blocksOffset++] & 0xFF; - final long byte346 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte339 & 63) << 53) | (byte340 << 45) | (byte341 << 37) | (byte342 << 29) | (byte343 << 21) | (byte344 << 13) | (byte345 << 5) | (byte346 >>> 3); - final long byte347 = blocks[blocksOffset++] & 0xFF; - final long byte348 = blocks[blocksOffset++] & 0xFF; - final long byte349 = blocks[blocksOffset++] & 0xFF; - final long byte350 = blocks[blocksOffset++] & 0xFF; - final long byte351 = blocks[blocksOffset++] & 0xFF; - final long byte352 = blocks[blocksOffset++] & 0xFF; - final long byte353 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte346 & 7) << 56) | (byte347 << 48) | (byte348 << 40) | (byte349 << 32) | (byte350 << 24) | (byte351 << 16) | (byte352 << 8) | byte353; - final long byte354 = blocks[blocksOffset++] & 0xFF; - final long byte355 = blocks[blocksOffset++] & 0xFF; - final long byte356 = blocks[blocksOffset++] & 0xFF; - final long byte357 = blocks[blocksOffset++] & 0xFF; - final long byte358 = blocks[blocksOffset++] & 0xFF; - final long byte359 = blocks[blocksOffset++] & 0xFF; - final long byte360 = blocks[blocksOffset++] & 0xFF; - final long byte361 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte354 << 51) | (byte355 << 43) | (byte356 << 35) | (byte357 << 27) | (byte358 << 19) | (byte359 << 11) | (byte360 << 3) | (byte361 >>> 5); - final long byte362 = blocks[blocksOffset++] & 0xFF; - final long byte363 = blocks[blocksOffset++] & 0xFF; - final long byte364 = blocks[blocksOffset++] & 0xFF; - final long byte365 = blocks[blocksOffset++] & 0xFF; - final long byte366 = blocks[blocksOffset++] & 0xFF; - final long byte367 = blocks[blocksOffset++] & 0xFF; - final long byte368 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte361 & 31) << 54) | (byte362 << 46) | (byte363 << 38) | (byte364 << 30) | (byte365 << 22) | (byte366 << 14) | (byte367 << 6) | (byte368 >>> 2); - final long byte369 = blocks[blocksOffset++] & 0xFF; - final long byte370 = blocks[blocksOffset++] & 0xFF; - final long byte371 = blocks[blocksOffset++] & 0xFF; - final long byte372 = blocks[blocksOffset++] & 0xFF; - final long byte373 = blocks[blocksOffset++] & 0xFF; - final long byte374 = blocks[blocksOffset++] & 0xFF; - final long byte375 = blocks[blocksOffset++] & 0xFF; - final long byte376 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte368 & 3) << 57) | (byte369 << 49) | (byte370 << 41) | (byte371 << 33) | (byte372 << 25) | (byte373 << 17) | (byte374 << 9) | (byte375 << 1) | (byte376 >>> 7); - final long byte377 = blocks[blocksOffset++] & 0xFF; - final long byte378 = blocks[blocksOffset++] & 0xFF; - final long byte379 = blocks[blocksOffset++] & 0xFF; - final long byte380 = blocks[blocksOffset++] & 0xFF; - final long byte381 = blocks[blocksOffset++] & 0xFF; - final long byte382 = blocks[blocksOffset++] & 0xFF; - final long byte383 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte376 & 127) << 52) | (byte377 << 44) | (byte378 << 36) | (byte379 << 28) | (byte380 << 20) | (byte381 << 12) | (byte382 << 4) | (byte383 >>> 4); - final long byte384 = blocks[blocksOffset++] & 0xFF; - final long byte385 = blocks[blocksOffset++] & 0xFF; - final long byte386 = blocks[blocksOffset++] & 0xFF; - final long byte387 = blocks[blocksOffset++] & 0xFF; - final long byte388 = blocks[blocksOffset++] & 0xFF; - final long byte389 = blocks[blocksOffset++] & 0xFF; - final long byte390 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte383 & 15) << 55) | (byte384 << 47) | (byte385 << 39) | (byte386 << 31) | (byte387 << 23) | (byte388 << 15) | (byte389 << 7) | (byte390 >>> 1); - final long byte391 = blocks[blocksOffset++] & 0xFF; - final long byte392 = blocks[blocksOffset++] & 0xFF; - final long byte393 = blocks[blocksOffset++] & 0xFF; - final long byte394 = blocks[blocksOffset++] & 0xFF; - final long byte395 = blocks[blocksOffset++] & 0xFF; - final long byte396 = blocks[blocksOffset++] & 0xFF; - final long byte397 = blocks[blocksOffset++] & 0xFF; - final long byte398 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte390 & 1) << 58) | (byte391 << 50) | (byte392 << 42) | (byte393 << 34) | (byte394 << 26) | (byte395 << 18) | (byte396 << 10) | (byte397 << 2) | (byte398 >>> 6); - final long byte399 = blocks[blocksOffset++] & 0xFF; - final long byte400 = blocks[blocksOffset++] & 0xFF; - final long byte401 = blocks[blocksOffset++] & 0xFF; - final long byte402 = blocks[blocksOffset++] & 0xFF; - final long byte403 = blocks[blocksOffset++] & 0xFF; - final long byte404 = blocks[blocksOffset++] & 0xFF; - final long byte405 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte398 & 63) << 53) | (byte399 << 45) | (byte400 << 37) | (byte401 << 29) | (byte402 << 21) | (byte403 << 13) | (byte404 << 5) | (byte405 >>> 3); - final long byte406 = blocks[blocksOffset++] & 0xFF; - final long byte407 = blocks[blocksOffset++] & 0xFF; - final long byte408 = blocks[blocksOffset++] & 0xFF; - final long byte409 = blocks[blocksOffset++] & 0xFF; - final long byte410 = blocks[blocksOffset++] & 0xFF; - final long byte411 = blocks[blocksOffset++] & 0xFF; - final long byte412 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte405 & 7) << 56) | (byte406 << 48) | (byte407 << 40) | (byte408 << 32) | (byte409 << 24) | (byte410 << 16) | (byte411 << 8) | byte412; - final long byte413 = blocks[blocksOffset++] & 0xFF; - final long byte414 = blocks[blocksOffset++] & 0xFF; - final long byte415 = blocks[blocksOffset++] & 0xFF; - final long byte416 = blocks[blocksOffset++] & 0xFF; - final long byte417 = blocks[blocksOffset++] & 0xFF; - final long byte418 = blocks[blocksOffset++] & 0xFF; - final long byte419 = blocks[blocksOffset++] & 0xFF; - final long byte420 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte413 << 51) | (byte414 << 43) | (byte415 << 35) | (byte416 << 27) | (byte417 << 19) | (byte418 << 11) | (byte419 << 3) | (byte420 >>> 5); - final long byte421 = blocks[blocksOffset++] & 0xFF; - final long byte422 = blocks[blocksOffset++] & 0xFF; - final long byte423 = blocks[blocksOffset++] & 0xFF; - final long byte424 = blocks[blocksOffset++] & 0xFF; - final long byte425 = blocks[blocksOffset++] & 0xFF; - final long byte426 = blocks[blocksOffset++] & 0xFF; - final long byte427 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte420 & 31) << 54) | (byte421 << 46) | (byte422 << 38) | (byte423 << 30) | (byte424 << 22) | (byte425 << 14) | (byte426 << 6) | (byte427 >>> 2); - final long byte428 = blocks[blocksOffset++] & 0xFF; - final long byte429 = blocks[blocksOffset++] & 0xFF; - final long byte430 = blocks[blocksOffset++] & 0xFF; - final long byte431 = blocks[blocksOffset++] & 0xFF; - final long byte432 = blocks[blocksOffset++] & 0xFF; - final long byte433 = blocks[blocksOffset++] & 0xFF; - final long byte434 = blocks[blocksOffset++] & 0xFF; - final long byte435 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte427 & 3) << 57) | (byte428 << 49) | (byte429 << 41) | (byte430 << 33) | (byte431 << 25) | (byte432 << 17) | (byte433 << 9) | (byte434 << 1) | (byte435 >>> 7); - final long byte436 = blocks[blocksOffset++] & 0xFF; - final long byte437 = blocks[blocksOffset++] & 0xFF; - final long byte438 = blocks[blocksOffset++] & 0xFF; - final long byte439 = blocks[blocksOffset++] & 0xFF; - final long byte440 = blocks[blocksOffset++] & 0xFF; - final long byte441 = blocks[blocksOffset++] & 0xFF; - final long byte442 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte435 & 127) << 52) | (byte436 << 44) | (byte437 << 36) | (byte438 << 28) | (byte439 << 20) | (byte440 << 12) | (byte441 << 4) | (byte442 >>> 4); - final long byte443 = blocks[blocksOffset++] & 0xFF; - final long byte444 = blocks[blocksOffset++] & 0xFF; - final long byte445 = blocks[blocksOffset++] & 0xFF; - final long byte446 = blocks[blocksOffset++] & 0xFF; - final long byte447 = blocks[blocksOffset++] & 0xFF; - final long byte448 = blocks[blocksOffset++] & 0xFF; - final long byte449 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte442 & 15) << 55) | (byte443 << 47) | (byte444 << 39) | (byte445 << 31) | (byte446 << 23) | (byte447 << 15) | (byte448 << 7) | (byte449 >>> 1); - final long byte450 = blocks[blocksOffset++] & 0xFF; - final long byte451 = blocks[blocksOffset++] & 0xFF; - final long byte452 = blocks[blocksOffset++] & 0xFF; - final long byte453 = blocks[blocksOffset++] & 0xFF; - final long byte454 = blocks[blocksOffset++] & 0xFF; - final long byte455 = blocks[blocksOffset++] & 0xFF; - final long byte456 = blocks[blocksOffset++] & 0xFF; - final long byte457 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte449 & 1) << 58) | (byte450 << 50) | (byte451 << 42) | (byte452 << 34) | (byte453 << 26) | (byte454 << 18) | (byte455 << 10) | (byte456 << 2) | (byte457 >>> 6); - final long byte458 = blocks[blocksOffset++] & 0xFF; - final long byte459 = blocks[blocksOffset++] & 0xFF; - final long byte460 = blocks[blocksOffset++] & 0xFF; - final long byte461 = blocks[blocksOffset++] & 0xFF; - final long byte462 = blocks[blocksOffset++] & 0xFF; - final long byte463 = blocks[blocksOffset++] & 0xFF; - final long byte464 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte457 & 63) << 53) | (byte458 << 45) | (byte459 << 37) | (byte460 << 29) | (byte461 << 21) | (byte462 << 13) | (byte463 << 5) | (byte464 >>> 3); - final long byte465 = blocks[blocksOffset++] & 0xFF; - final long byte466 = blocks[blocksOffset++] & 0xFF; - final long byte467 = blocks[blocksOffset++] & 0xFF; - final long byte468 = blocks[blocksOffset++] & 0xFF; - final long byte469 = blocks[blocksOffset++] & 0xFF; - final long byte470 = blocks[blocksOffset++] & 0xFF; - final long byte471 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte464 & 7) << 56) | (byte465 << 48) | (byte466 << 40) | (byte467 << 32) | (byte468 << 24) | (byte469 << 16) | (byte470 << 8) | byte471; - } - } - - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 5) | ((values[valuesOffset] & 0xffffffffL) >>> 54); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 10) | ((values[valuesOffset] & 0xffffffffL) >>> 49); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 15) | ((values[valuesOffset] & 0xffffffffL) >>> 44); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 20) | ((values[valuesOffset] & 0xffffffffL) >>> 39); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 25) | ((values[valuesOffset] & 0xffffffffL) >>> 34); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 30) | ((values[valuesOffset] & 0xffffffffL) >>> 29); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 35) | ((values[valuesOffset] & 0xffffffffL) >>> 24); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 40) | ((values[valuesOffset] & 0xffffffffL) >>> 19); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 45) | ((values[valuesOffset] & 0xffffffffL) >>> 14); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 50) | ((values[valuesOffset] & 0xffffffffL) >>> 9); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 55) | ((values[valuesOffset] & 0xffffffffL) >>> 4); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 60) | ((values[valuesOffset++] & 0xffffffffL) << 1) | ((values[valuesOffset] & 0xffffffffL) >>> 58); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 6) | ((values[valuesOffset] & 0xffffffffL) >>> 53); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 11) | ((values[valuesOffset] & 0xffffffffL) >>> 48); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 16) | ((values[valuesOffset] & 0xffffffffL) >>> 43); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 21) | ((values[valuesOffset] & 0xffffffffL) >>> 38); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 26) | ((values[valuesOffset] & 0xffffffffL) >>> 33); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 31) | ((values[valuesOffset] & 0xffffffffL) >>> 28); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 36) | ((values[valuesOffset] & 0xffffffffL) >>> 23); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 41) | ((values[valuesOffset] & 0xffffffffL) >>> 18); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 46) | ((values[valuesOffset] & 0xffffffffL) >>> 13); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 51) | ((values[valuesOffset] & 0xffffffffL) >>> 8); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 56) | ((values[valuesOffset] & 0xffffffffL) >>> 3); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 61) | ((values[valuesOffset++] & 0xffffffffL) << 2) | ((values[valuesOffset] & 0xffffffffL) >>> 57); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 7) | ((values[valuesOffset] & 0xffffffffL) >>> 52); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 12) | ((values[valuesOffset] & 0xffffffffL) >>> 47); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 17) | ((values[valuesOffset] & 0xffffffffL) >>> 42); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 22) | ((values[valuesOffset] & 0xffffffffL) >>> 37); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 27) | ((values[valuesOffset] & 0xffffffffL) >>> 32); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 32) | ((values[valuesOffset] & 0xffffffffL) >>> 27); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 37) | ((values[valuesOffset] & 0xffffffffL) >>> 22); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 42) | ((values[valuesOffset] & 0xffffffffL) >>> 17); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 47) | ((values[valuesOffset] & 0xffffffffL) >>> 12); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 52) | ((values[valuesOffset] & 0xffffffffL) >>> 7); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 57) | ((values[valuesOffset] & 0xffffffffL) >>> 2); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 62) | ((values[valuesOffset++] & 0xffffffffL) << 3) | ((values[valuesOffset] & 0xffffffffL) >>> 56); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 8) | ((values[valuesOffset] & 0xffffffffL) >>> 51); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 13) | ((values[valuesOffset] & 0xffffffffL) >>> 46); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 18) | ((values[valuesOffset] & 0xffffffffL) >>> 41); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 23) | ((values[valuesOffset] & 0xffffffffL) >>> 36); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 28) | ((values[valuesOffset] & 0xffffffffL) >>> 31); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 33) | ((values[valuesOffset] & 0xffffffffL) >>> 26); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 38) | ((values[valuesOffset] & 0xffffffffL) >>> 21); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 43) | ((values[valuesOffset] & 0xffffffffL) >>> 16); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 48) | ((values[valuesOffset] & 0xffffffffL) >>> 11); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 53) | ((values[valuesOffset] & 0xffffffffL) >>> 6); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 58) | ((values[valuesOffset] & 0xffffffffL) >>> 1); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 63) | ((values[valuesOffset++] & 0xffffffffL) << 4) | ((values[valuesOffset] & 0xffffffffL) >>> 55); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 9) | ((values[valuesOffset] & 0xffffffffL) >>> 50); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 14) | ((values[valuesOffset] & 0xffffffffL) >>> 45); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 19) | ((values[valuesOffset] & 0xffffffffL) >>> 40); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 24) | ((values[valuesOffset] & 0xffffffffL) >>> 35); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 29) | ((values[valuesOffset] & 0xffffffffL) >>> 30); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 34) | ((values[valuesOffset] & 0xffffffffL) >>> 25); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 39) | ((values[valuesOffset] & 0xffffffffL) >>> 20); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 44) | ((values[valuesOffset] & 0xffffffffL) >>> 15); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 49) | ((values[valuesOffset] & 0xffffffffL) >>> 10); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 54) | ((values[valuesOffset] & 0xffffffffL) >>> 5); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 59) | (values[valuesOffset++] & 0xffffffffL); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] << 5) | (values[valuesOffset] >>> 54); - blocks[blocksOffset++] = (values[valuesOffset++] << 10) | (values[valuesOffset] >>> 49); - blocks[blocksOffset++] = (values[valuesOffset++] << 15) | (values[valuesOffset] >>> 44); - blocks[blocksOffset++] = (values[valuesOffset++] << 20) | (values[valuesOffset] >>> 39); - blocks[blocksOffset++] = (values[valuesOffset++] << 25) | (values[valuesOffset] >>> 34); - blocks[blocksOffset++] = (values[valuesOffset++] << 30) | (values[valuesOffset] >>> 29); - blocks[blocksOffset++] = (values[valuesOffset++] << 35) | (values[valuesOffset] >>> 24); - blocks[blocksOffset++] = (values[valuesOffset++] << 40) | (values[valuesOffset] >>> 19); - blocks[blocksOffset++] = (values[valuesOffset++] << 45) | (values[valuesOffset] >>> 14); - blocks[blocksOffset++] = (values[valuesOffset++] << 50) | (values[valuesOffset] >>> 9); - blocks[blocksOffset++] = (values[valuesOffset++] << 55) | (values[valuesOffset] >>> 4); - blocks[blocksOffset++] = (values[valuesOffset++] << 60) | (values[valuesOffset++] << 1) | (values[valuesOffset] >>> 58); - blocks[blocksOffset++] = (values[valuesOffset++] << 6) | (values[valuesOffset] >>> 53); - blocks[blocksOffset++] = (values[valuesOffset++] << 11) | (values[valuesOffset] >>> 48); - blocks[blocksOffset++] = (values[valuesOffset++] << 16) | (values[valuesOffset] >>> 43); - blocks[blocksOffset++] = (values[valuesOffset++] << 21) | (values[valuesOffset] >>> 38); - blocks[blocksOffset++] = (values[valuesOffset++] << 26) | (values[valuesOffset] >>> 33); - blocks[blocksOffset++] = (values[valuesOffset++] << 31) | (values[valuesOffset] >>> 28); - blocks[blocksOffset++] = (values[valuesOffset++] << 36) | (values[valuesOffset] >>> 23); - blocks[blocksOffset++] = (values[valuesOffset++] << 41) | (values[valuesOffset] >>> 18); - blocks[blocksOffset++] = (values[valuesOffset++] << 46) | (values[valuesOffset] >>> 13); - blocks[blocksOffset++] = (values[valuesOffset++] << 51) | (values[valuesOffset] >>> 8); - blocks[blocksOffset++] = (values[valuesOffset++] << 56) | (values[valuesOffset] >>> 3); - blocks[blocksOffset++] = (values[valuesOffset++] << 61) | (values[valuesOffset++] << 2) | (values[valuesOffset] >>> 57); - blocks[blocksOffset++] = (values[valuesOffset++] << 7) | (values[valuesOffset] >>> 52); - blocks[blocksOffset++] = (values[valuesOffset++] << 12) | (values[valuesOffset] >>> 47); - blocks[blocksOffset++] = (values[valuesOffset++] << 17) | (values[valuesOffset] >>> 42); - blocks[blocksOffset++] = (values[valuesOffset++] << 22) | (values[valuesOffset] >>> 37); - blocks[blocksOffset++] = (values[valuesOffset++] << 27) | (values[valuesOffset] >>> 32); - blocks[blocksOffset++] = (values[valuesOffset++] << 32) | (values[valuesOffset] >>> 27); - blocks[blocksOffset++] = (values[valuesOffset++] << 37) | (values[valuesOffset] >>> 22); - blocks[blocksOffset++] = (values[valuesOffset++] << 42) | (values[valuesOffset] >>> 17); - blocks[blocksOffset++] = (values[valuesOffset++] << 47) | (values[valuesOffset] >>> 12); - blocks[blocksOffset++] = (values[valuesOffset++] << 52) | (values[valuesOffset] >>> 7); - blocks[blocksOffset++] = (values[valuesOffset++] << 57) | (values[valuesOffset] >>> 2); - blocks[blocksOffset++] = (values[valuesOffset++] << 62) | (values[valuesOffset++] << 3) | (values[valuesOffset] >>> 56); - blocks[blocksOffset++] = (values[valuesOffset++] << 8) | (values[valuesOffset] >>> 51); - blocks[blocksOffset++] = (values[valuesOffset++] << 13) | (values[valuesOffset] >>> 46); - blocks[blocksOffset++] = (values[valuesOffset++] << 18) | (values[valuesOffset] >>> 41); - blocks[blocksOffset++] = (values[valuesOffset++] << 23) | (values[valuesOffset] >>> 36); - blocks[blocksOffset++] = (values[valuesOffset++] << 28) | (values[valuesOffset] >>> 31); - blocks[blocksOffset++] = (values[valuesOffset++] << 33) | (values[valuesOffset] >>> 26); - blocks[blocksOffset++] = (values[valuesOffset++] << 38) | (values[valuesOffset] >>> 21); - blocks[blocksOffset++] = (values[valuesOffset++] << 43) | (values[valuesOffset] >>> 16); - blocks[blocksOffset++] = (values[valuesOffset++] << 48) | (values[valuesOffset] >>> 11); - blocks[blocksOffset++] = (values[valuesOffset++] << 53) | (values[valuesOffset] >>> 6); - blocks[blocksOffset++] = (values[valuesOffset++] << 58) | (values[valuesOffset] >>> 1); - blocks[blocksOffset++] = (values[valuesOffset++] << 63) | (values[valuesOffset++] << 4) | (values[valuesOffset] >>> 55); - blocks[blocksOffset++] = (values[valuesOffset++] << 9) | (values[valuesOffset] >>> 50); - blocks[blocksOffset++] = (values[valuesOffset++] << 14) | (values[valuesOffset] >>> 45); - blocks[blocksOffset++] = (values[valuesOffset++] << 19) | (values[valuesOffset] >>> 40); - blocks[blocksOffset++] = (values[valuesOffset++] << 24) | (values[valuesOffset] >>> 35); - blocks[blocksOffset++] = (values[valuesOffset++] << 29) | (values[valuesOffset] >>> 30); - blocks[blocksOffset++] = (values[valuesOffset++] << 34) | (values[valuesOffset] >>> 25); - blocks[blocksOffset++] = (values[valuesOffset++] << 39) | (values[valuesOffset] >>> 20); - blocks[blocksOffset++] = (values[valuesOffset++] << 44) | (values[valuesOffset] >>> 15); - blocks[blocksOffset++] = (values[valuesOffset++] << 49) | (values[valuesOffset] >>> 10); - blocks[blocksOffset++] = (values[valuesOffset++] << 54) | (values[valuesOffset] >>> 5); - blocks[blocksOffset++] = (values[valuesOffset++] << 59) | values[valuesOffset++]; - } - } - -} diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked6.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked6.java index b2a45a3181c..c51708d2c21 100644 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked6.java +++ b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked6.java @@ -22,15 +22,12 @@ package org.apache.lucene.util.packed; /** * Efficient sequential read/write of packed integers. */ -final class BulkOperationPacked6 extends BulkOperation { - @Override - public int blockCount() { - return 3; - } +final class BulkOperationPacked6 extends BulkOperationPacked { - @Override - public int valueCount() { - return 32; + public BulkOperationPacked6() { + super(6); + assert blockCount() == 3; + assert valueCount() == 32; } @Override @@ -247,26 +244,4 @@ final class BulkOperationPacked6 extends BulkOperation { } } - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 58) | ((values[valuesOffset++] & 0xffffffffL) << 52) | ((values[valuesOffset++] & 0xffffffffL) << 46) | ((values[valuesOffset++] & 0xffffffffL) << 40) | ((values[valuesOffset++] & 0xffffffffL) << 34) | ((values[valuesOffset++] & 0xffffffffL) << 28) | ((values[valuesOffset++] & 0xffffffffL) << 22) | ((values[valuesOffset++] & 0xffffffffL) << 16) | ((values[valuesOffset++] & 0xffffffffL) << 10) | ((values[valuesOffset++] & 0xffffffffL) << 4) | ((values[valuesOffset] & 0xffffffffL) >>> 2); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 62) | ((values[valuesOffset++] & 0xffffffffL) << 56) | ((values[valuesOffset++] & 0xffffffffL) << 50) | ((values[valuesOffset++] & 0xffffffffL) << 44) | ((values[valuesOffset++] & 0xffffffffL) << 38) | ((values[valuesOffset++] & 0xffffffffL) << 32) | ((values[valuesOffset++] & 0xffffffffL) << 26) | ((values[valuesOffset++] & 0xffffffffL) << 20) | ((values[valuesOffset++] & 0xffffffffL) << 14) | ((values[valuesOffset++] & 0xffffffffL) << 8) | ((values[valuesOffset++] & 0xffffffffL) << 2) | ((values[valuesOffset] & 0xffffffffL) >>> 4); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 60) | ((values[valuesOffset++] & 0xffffffffL) << 54) | ((values[valuesOffset++] & 0xffffffffL) << 48) | ((values[valuesOffset++] & 0xffffffffL) << 42) | ((values[valuesOffset++] & 0xffffffffL) << 36) | ((values[valuesOffset++] & 0xffffffffL) << 30) | ((values[valuesOffset++] & 0xffffffffL) << 24) | ((values[valuesOffset++] & 0xffffffffL) << 18) | ((values[valuesOffset++] & 0xffffffffL) << 12) | ((values[valuesOffset++] & 0xffffffffL) << 6) | (values[valuesOffset++] & 0xffffffffL); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] << 58) | (values[valuesOffset++] << 52) | (values[valuesOffset++] << 46) | (values[valuesOffset++] << 40) | (values[valuesOffset++] << 34) | (values[valuesOffset++] << 28) | (values[valuesOffset++] << 22) | (values[valuesOffset++] << 16) | (values[valuesOffset++] << 10) | (values[valuesOffset++] << 4) | (values[valuesOffset] >>> 2); - blocks[blocksOffset++] = (values[valuesOffset++] << 62) | (values[valuesOffset++] << 56) | (values[valuesOffset++] << 50) | (values[valuesOffset++] << 44) | (values[valuesOffset++] << 38) | (values[valuesOffset++] << 32) | (values[valuesOffset++] << 26) | (values[valuesOffset++] << 20) | (values[valuesOffset++] << 14) | (values[valuesOffset++] << 8) | (values[valuesOffset++] << 2) | (values[valuesOffset] >>> 4); - blocks[blocksOffset++] = (values[valuesOffset++] << 60) | (values[valuesOffset++] << 54) | (values[valuesOffset++] << 48) | (values[valuesOffset++] << 42) | (values[valuesOffset++] << 36) | (values[valuesOffset++] << 30) | (values[valuesOffset++] << 24) | (values[valuesOffset++] << 18) | (values[valuesOffset++] << 12) | (values[valuesOffset++] << 6) | values[valuesOffset++]; - } - } - } diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked60.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked60.java deleted file mode 100644 index e3c46b0e87f..00000000000 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked60.java +++ /dev/null @@ -1,275 +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 BulkOperationPacked60 extends BulkOperation { - @Override - public int blockCount() { - return 15; - } - - @Override - public int valueCount() { - return 16; - } - - @Override - public void decode(long[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) { - throw new UnsupportedOperationException(); - } - - @Override - public void decode(byte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) { - throw new UnsupportedOperationException(); - } - - @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 >>> 4; - final long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block0 & 15L) << 56) | (block1 >>> 8); - final long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block1 & 255L) << 52) | (block2 >>> 12); - final long block3 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block2 & 4095L) << 48) | (block3 >>> 16); - final long block4 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block3 & 65535L) << 44) | (block4 >>> 20); - final long block5 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block4 & 1048575L) << 40) | (block5 >>> 24); - final long block6 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block5 & 16777215L) << 36) | (block6 >>> 28); - final long block7 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block6 & 268435455L) << 32) | (block7 >>> 32); - final long block8 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block7 & 4294967295L) << 28) | (block8 >>> 36); - final long block9 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block8 & 68719476735L) << 24) | (block9 >>> 40); - final long block10 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block9 & 1099511627775L) << 20) | (block10 >>> 44); - final long block11 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block10 & 17592186044415L) << 16) | (block11 >>> 48); - final long block12 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block11 & 281474976710655L) << 12) | (block12 >>> 52); - final long block13 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block12 & 4503599627370495L) << 8) | (block13 >>> 56); - final long block14 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block13 & 72057594037927935L) << 4) | (block14 >>> 60); - values[valuesOffset++] = block14 & 1152921504606846975L; - } - } - - @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; - final long byte3 = blocks[blocksOffset++] & 0xFF; - final long byte4 = blocks[blocksOffset++] & 0xFF; - final long byte5 = blocks[blocksOffset++] & 0xFF; - final long byte6 = blocks[blocksOffset++] & 0xFF; - final long byte7 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte0 << 52) | (byte1 << 44) | (byte2 << 36) | (byte3 << 28) | (byte4 << 20) | (byte5 << 12) | (byte6 << 4) | (byte7 >>> 4); - final long byte8 = blocks[blocksOffset++] & 0xFF; - final long byte9 = blocks[blocksOffset++] & 0xFF; - final long byte10 = blocks[blocksOffset++] & 0xFF; - final long byte11 = blocks[blocksOffset++] & 0xFF; - final long byte12 = blocks[blocksOffset++] & 0xFF; - final long byte13 = blocks[blocksOffset++] & 0xFF; - final long byte14 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte7 & 15) << 56) | (byte8 << 48) | (byte9 << 40) | (byte10 << 32) | (byte11 << 24) | (byte12 << 16) | (byte13 << 8) | byte14; - final long byte15 = blocks[blocksOffset++] & 0xFF; - final long byte16 = blocks[blocksOffset++] & 0xFF; - final long byte17 = blocks[blocksOffset++] & 0xFF; - final long byte18 = blocks[blocksOffset++] & 0xFF; - final long byte19 = blocks[blocksOffset++] & 0xFF; - final long byte20 = blocks[blocksOffset++] & 0xFF; - final long byte21 = blocks[blocksOffset++] & 0xFF; - final long byte22 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte15 << 52) | (byte16 << 44) | (byte17 << 36) | (byte18 << 28) | (byte19 << 20) | (byte20 << 12) | (byte21 << 4) | (byte22 >>> 4); - final long byte23 = blocks[blocksOffset++] & 0xFF; - final long byte24 = blocks[blocksOffset++] & 0xFF; - final long byte25 = blocks[blocksOffset++] & 0xFF; - final long byte26 = blocks[blocksOffset++] & 0xFF; - final long byte27 = blocks[blocksOffset++] & 0xFF; - final long byte28 = blocks[blocksOffset++] & 0xFF; - final long byte29 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte22 & 15) << 56) | (byte23 << 48) | (byte24 << 40) | (byte25 << 32) | (byte26 << 24) | (byte27 << 16) | (byte28 << 8) | byte29; - final long byte30 = blocks[blocksOffset++] & 0xFF; - final long byte31 = blocks[blocksOffset++] & 0xFF; - final long byte32 = blocks[blocksOffset++] & 0xFF; - final long byte33 = blocks[blocksOffset++] & 0xFF; - final long byte34 = blocks[blocksOffset++] & 0xFF; - final long byte35 = blocks[blocksOffset++] & 0xFF; - final long byte36 = blocks[blocksOffset++] & 0xFF; - final long byte37 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte30 << 52) | (byte31 << 44) | (byte32 << 36) | (byte33 << 28) | (byte34 << 20) | (byte35 << 12) | (byte36 << 4) | (byte37 >>> 4); - final long byte38 = blocks[blocksOffset++] & 0xFF; - final long byte39 = blocks[blocksOffset++] & 0xFF; - final long byte40 = blocks[blocksOffset++] & 0xFF; - final long byte41 = blocks[blocksOffset++] & 0xFF; - final long byte42 = blocks[blocksOffset++] & 0xFF; - final long byte43 = blocks[blocksOffset++] & 0xFF; - final long byte44 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte37 & 15) << 56) | (byte38 << 48) | (byte39 << 40) | (byte40 << 32) | (byte41 << 24) | (byte42 << 16) | (byte43 << 8) | byte44; - final long byte45 = blocks[blocksOffset++] & 0xFF; - final long byte46 = blocks[blocksOffset++] & 0xFF; - final long byte47 = blocks[blocksOffset++] & 0xFF; - final long byte48 = blocks[blocksOffset++] & 0xFF; - final long byte49 = blocks[blocksOffset++] & 0xFF; - final long byte50 = blocks[blocksOffset++] & 0xFF; - final long byte51 = blocks[blocksOffset++] & 0xFF; - final long byte52 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte45 << 52) | (byte46 << 44) | (byte47 << 36) | (byte48 << 28) | (byte49 << 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; - final long byte56 = blocks[blocksOffset++] & 0xFF; - final long byte57 = blocks[blocksOffset++] & 0xFF; - final long byte58 = blocks[blocksOffset++] & 0xFF; - final long byte59 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte52 & 15) << 56) | (byte53 << 48) | (byte54 << 40) | (byte55 << 32) | (byte56 << 24) | (byte57 << 16) | (byte58 << 8) | byte59; - final long byte60 = blocks[blocksOffset++] & 0xFF; - final long byte61 = blocks[blocksOffset++] & 0xFF; - final long byte62 = blocks[blocksOffset++] & 0xFF; - final long byte63 = blocks[blocksOffset++] & 0xFF; - final long byte64 = blocks[blocksOffset++] & 0xFF; - final long byte65 = blocks[blocksOffset++] & 0xFF; - final long byte66 = blocks[blocksOffset++] & 0xFF; - final long byte67 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte60 << 52) | (byte61 << 44) | (byte62 << 36) | (byte63 << 28) | (byte64 << 20) | (byte65 << 12) | (byte66 << 4) | (byte67 >>> 4); - final long byte68 = blocks[blocksOffset++] & 0xFF; - final long byte69 = blocks[blocksOffset++] & 0xFF; - final long byte70 = blocks[blocksOffset++] & 0xFF; - final long byte71 = blocks[blocksOffset++] & 0xFF; - final long byte72 = blocks[blocksOffset++] & 0xFF; - final long byte73 = blocks[blocksOffset++] & 0xFF; - final long byte74 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte67 & 15) << 56) | (byte68 << 48) | (byte69 << 40) | (byte70 << 32) | (byte71 << 24) | (byte72 << 16) | (byte73 << 8) | byte74; - final long byte75 = blocks[blocksOffset++] & 0xFF; - final long byte76 = blocks[blocksOffset++] & 0xFF; - final long byte77 = blocks[blocksOffset++] & 0xFF; - final long byte78 = blocks[blocksOffset++] & 0xFF; - final long byte79 = blocks[blocksOffset++] & 0xFF; - final long byte80 = blocks[blocksOffset++] & 0xFF; - final long byte81 = blocks[blocksOffset++] & 0xFF; - final long byte82 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte75 << 52) | (byte76 << 44) | (byte77 << 36) | (byte78 << 28) | (byte79 << 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; - final long byte86 = blocks[blocksOffset++] & 0xFF; - final long byte87 = blocks[blocksOffset++] & 0xFF; - final long byte88 = blocks[blocksOffset++] & 0xFF; - final long byte89 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte82 & 15) << 56) | (byte83 << 48) | (byte84 << 40) | (byte85 << 32) | (byte86 << 24) | (byte87 << 16) | (byte88 << 8) | byte89; - final long byte90 = blocks[blocksOffset++] & 0xFF; - final long byte91 = blocks[blocksOffset++] & 0xFF; - final long byte92 = blocks[blocksOffset++] & 0xFF; - final long byte93 = blocks[blocksOffset++] & 0xFF; - final long byte94 = blocks[blocksOffset++] & 0xFF; - final long byte95 = blocks[blocksOffset++] & 0xFF; - final long byte96 = blocks[blocksOffset++] & 0xFF; - final long byte97 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte90 << 52) | (byte91 << 44) | (byte92 << 36) | (byte93 << 28) | (byte94 << 20) | (byte95 << 12) | (byte96 << 4) | (byte97 >>> 4); - final long byte98 = blocks[blocksOffset++] & 0xFF; - final long byte99 = blocks[blocksOffset++] & 0xFF; - final long byte100 = blocks[blocksOffset++] & 0xFF; - final long byte101 = blocks[blocksOffset++] & 0xFF; - final long byte102 = blocks[blocksOffset++] & 0xFF; - final long byte103 = blocks[blocksOffset++] & 0xFF; - final long byte104 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte97 & 15) << 56) | (byte98 << 48) | (byte99 << 40) | (byte100 << 32) | (byte101 << 24) | (byte102 << 16) | (byte103 << 8) | byte104; - final long byte105 = blocks[blocksOffset++] & 0xFF; - final long byte106 = blocks[blocksOffset++] & 0xFF; - final long byte107 = blocks[blocksOffset++] & 0xFF; - final long byte108 = blocks[blocksOffset++] & 0xFF; - final long byte109 = blocks[blocksOffset++] & 0xFF; - final long byte110 = blocks[blocksOffset++] & 0xFF; - final long byte111 = blocks[blocksOffset++] & 0xFF; - final long byte112 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte105 << 52) | (byte106 << 44) | (byte107 << 36) | (byte108 << 28) | (byte109 << 20) | (byte110 << 12) | (byte111 << 4) | (byte112 >>> 4); - final long byte113 = blocks[blocksOffset++] & 0xFF; - final long byte114 = blocks[blocksOffset++] & 0xFF; - final long byte115 = blocks[blocksOffset++] & 0xFF; - final long byte116 = blocks[blocksOffset++] & 0xFF; - final long byte117 = blocks[blocksOffset++] & 0xFF; - final long byte118 = blocks[blocksOffset++] & 0xFF; - final long byte119 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte112 & 15) << 56) | (byte113 << 48) | (byte114 << 40) | (byte115 << 32) | (byte116 << 24) | (byte117 << 16) | (byte118 << 8) | byte119; - } - } - - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 4) | ((values[valuesOffset] & 0xffffffffL) >>> 56); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 8) | ((values[valuesOffset] & 0xffffffffL) >>> 52); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 12) | ((values[valuesOffset] & 0xffffffffL) >>> 48); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 16) | ((values[valuesOffset] & 0xffffffffL) >>> 44); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 20) | ((values[valuesOffset] & 0xffffffffL) >>> 40); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 24) | ((values[valuesOffset] & 0xffffffffL) >>> 36); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 28) | ((values[valuesOffset] & 0xffffffffL) >>> 32); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 32) | ((values[valuesOffset] & 0xffffffffL) >>> 28); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 36) | ((values[valuesOffset] & 0xffffffffL) >>> 24); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 40) | ((values[valuesOffset] & 0xffffffffL) >>> 20); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 44) | ((values[valuesOffset] & 0xffffffffL) >>> 16); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 48) | ((values[valuesOffset] & 0xffffffffL) >>> 12); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 52) | ((values[valuesOffset] & 0xffffffffL) >>> 8); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 56) | ((values[valuesOffset] & 0xffffffffL) >>> 4); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 60) | (values[valuesOffset++] & 0xffffffffL); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] << 4) | (values[valuesOffset] >>> 56); - blocks[blocksOffset++] = (values[valuesOffset++] << 8) | (values[valuesOffset] >>> 52); - blocks[blocksOffset++] = (values[valuesOffset++] << 12) | (values[valuesOffset] >>> 48); - blocks[blocksOffset++] = (values[valuesOffset++] << 16) | (values[valuesOffset] >>> 44); - blocks[blocksOffset++] = (values[valuesOffset++] << 20) | (values[valuesOffset] >>> 40); - blocks[blocksOffset++] = (values[valuesOffset++] << 24) | (values[valuesOffset] >>> 36); - blocks[blocksOffset++] = (values[valuesOffset++] << 28) | (values[valuesOffset] >>> 32); - blocks[blocksOffset++] = (values[valuesOffset++] << 32) | (values[valuesOffset] >>> 28); - blocks[blocksOffset++] = (values[valuesOffset++] << 36) | (values[valuesOffset] >>> 24); - blocks[blocksOffset++] = (values[valuesOffset++] << 40) | (values[valuesOffset] >>> 20); - blocks[blocksOffset++] = (values[valuesOffset++] << 44) | (values[valuesOffset] >>> 16); - blocks[blocksOffset++] = (values[valuesOffset++] << 48) | (values[valuesOffset] >>> 12); - blocks[blocksOffset++] = (values[valuesOffset++] << 52) | (values[valuesOffset] >>> 8); - blocks[blocksOffset++] = (values[valuesOffset++] << 56) | (values[valuesOffset] >>> 4); - blocks[blocksOffset++] = (values[valuesOffset++] << 60) | values[valuesOffset++]; - } - } - -} diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked61.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked61.java deleted file mode 100644 index 650d23a0671..00000000000 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked61.java +++ /dev/null @@ -1,877 +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 BulkOperationPacked61 extends BulkOperation { - @Override - public int blockCount() { - return 61; - } - - @Override - public int valueCount() { - return 64; - } - - @Override - public void decode(long[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) { - throw new UnsupportedOperationException(); - } - - @Override - public void decode(byte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) { - throw new UnsupportedOperationException(); - } - - @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 >>> 3; - final long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block0 & 7L) << 58) | (block1 >>> 6); - final long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block1 & 63L) << 55) | (block2 >>> 9); - final long block3 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block2 & 511L) << 52) | (block3 >>> 12); - final long block4 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block3 & 4095L) << 49) | (block4 >>> 15); - final long block5 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block4 & 32767L) << 46) | (block5 >>> 18); - final long block6 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block5 & 262143L) << 43) | (block6 >>> 21); - final long block7 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block6 & 2097151L) << 40) | (block7 >>> 24); - final long block8 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block7 & 16777215L) << 37) | (block8 >>> 27); - final long block9 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block8 & 134217727L) << 34) | (block9 >>> 30); - final long block10 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block9 & 1073741823L) << 31) | (block10 >>> 33); - final long block11 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block10 & 8589934591L) << 28) | (block11 >>> 36); - final long block12 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block11 & 68719476735L) << 25) | (block12 >>> 39); - final long block13 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block12 & 549755813887L) << 22) | (block13 >>> 42); - final long block14 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block13 & 4398046511103L) << 19) | (block14 >>> 45); - final long block15 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block14 & 35184372088831L) << 16) | (block15 >>> 48); - final long block16 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block15 & 281474976710655L) << 13) | (block16 >>> 51); - final long block17 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block16 & 2251799813685247L) << 10) | (block17 >>> 54); - final long block18 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block17 & 18014398509481983L) << 7) | (block18 >>> 57); - final long block19 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block18 & 144115188075855871L) << 4) | (block19 >>> 60); - final long block20 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block19 & 1152921504606846975L) << 1) | (block20 >>> 63); - values[valuesOffset++] = (block20 >>> 2) & 2305843009213693951L; - final long block21 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block20 & 3L) << 59) | (block21 >>> 5); - final long block22 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block21 & 31L) << 56) | (block22 >>> 8); - final long block23 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block22 & 255L) << 53) | (block23 >>> 11); - final long block24 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block23 & 2047L) << 50) | (block24 >>> 14); - final long block25 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block24 & 16383L) << 47) | (block25 >>> 17); - final long block26 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block25 & 131071L) << 44) | (block26 >>> 20); - final long block27 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block26 & 1048575L) << 41) | (block27 >>> 23); - final long block28 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block27 & 8388607L) << 38) | (block28 >>> 26); - final long block29 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block28 & 67108863L) << 35) | (block29 >>> 29); - final long block30 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block29 & 536870911L) << 32) | (block30 >>> 32); - final long block31 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block30 & 4294967295L) << 29) | (block31 >>> 35); - final long block32 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block31 & 34359738367L) << 26) | (block32 >>> 38); - final long block33 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block32 & 274877906943L) << 23) | (block33 >>> 41); - final long block34 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block33 & 2199023255551L) << 20) | (block34 >>> 44); - final long block35 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block34 & 17592186044415L) << 17) | (block35 >>> 47); - final long block36 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block35 & 140737488355327L) << 14) | (block36 >>> 50); - final long block37 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block36 & 1125899906842623L) << 11) | (block37 >>> 53); - final long block38 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block37 & 9007199254740991L) << 8) | (block38 >>> 56); - final long block39 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block38 & 72057594037927935L) << 5) | (block39 >>> 59); - final long block40 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block39 & 576460752303423487L) << 2) | (block40 >>> 62); - values[valuesOffset++] = (block40 >>> 1) & 2305843009213693951L; - final long block41 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block40 & 1L) << 60) | (block41 >>> 4); - final long block42 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block41 & 15L) << 57) | (block42 >>> 7); - final long block43 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block42 & 127L) << 54) | (block43 >>> 10); - final long block44 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block43 & 1023L) << 51) | (block44 >>> 13); - final long block45 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block44 & 8191L) << 48) | (block45 >>> 16); - final long block46 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block45 & 65535L) << 45) | (block46 >>> 19); - final long block47 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block46 & 524287L) << 42) | (block47 >>> 22); - final long block48 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block47 & 4194303L) << 39) | (block48 >>> 25); - final long block49 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block48 & 33554431L) << 36) | (block49 >>> 28); - final long block50 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block49 & 268435455L) << 33) | (block50 >>> 31); - final long block51 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block50 & 2147483647L) << 30) | (block51 >>> 34); - final long block52 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block51 & 17179869183L) << 27) | (block52 >>> 37); - final long block53 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block52 & 137438953471L) << 24) | (block53 >>> 40); - final long block54 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block53 & 1099511627775L) << 21) | (block54 >>> 43); - final long block55 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block54 & 8796093022207L) << 18) | (block55 >>> 46); - final long block56 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block55 & 70368744177663L) << 15) | (block56 >>> 49); - final long block57 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block56 & 562949953421311L) << 12) | (block57 >>> 52); - final long block58 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block57 & 4503599627370495L) << 9) | (block58 >>> 55); - final long block59 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block58 & 36028797018963967L) << 6) | (block59 >>> 58); - final long block60 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block59 & 288230376151711743L) << 3) | (block60 >>> 61); - values[valuesOffset++] = block60 & 2305843009213693951L; - } - } - - @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; - final long byte3 = blocks[blocksOffset++] & 0xFF; - final long byte4 = blocks[blocksOffset++] & 0xFF; - final long byte5 = blocks[blocksOffset++] & 0xFF; - final long byte6 = blocks[blocksOffset++] & 0xFF; - final long byte7 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte0 << 53) | (byte1 << 45) | (byte2 << 37) | (byte3 << 29) | (byte4 << 21) | (byte5 << 13) | (byte6 << 5) | (byte7 >>> 3); - final long byte8 = blocks[blocksOffset++] & 0xFF; - final long byte9 = blocks[blocksOffset++] & 0xFF; - final long byte10 = blocks[blocksOffset++] & 0xFF; - final long byte11 = blocks[blocksOffset++] & 0xFF; - final long byte12 = blocks[blocksOffset++] & 0xFF; - final long byte13 = blocks[blocksOffset++] & 0xFF; - final long byte14 = blocks[blocksOffset++] & 0xFF; - final long byte15 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte7 & 7) << 58) | (byte8 << 50) | (byte9 << 42) | (byte10 << 34) | (byte11 << 26) | (byte12 << 18) | (byte13 << 10) | (byte14 << 2) | (byte15 >>> 6); - final long byte16 = blocks[blocksOffset++] & 0xFF; - final long byte17 = blocks[blocksOffset++] & 0xFF; - final long byte18 = blocks[blocksOffset++] & 0xFF; - final long byte19 = blocks[blocksOffset++] & 0xFF; - final long byte20 = blocks[blocksOffset++] & 0xFF; - final long byte21 = blocks[blocksOffset++] & 0xFF; - final long byte22 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte15 & 63) << 55) | (byte16 << 47) | (byte17 << 39) | (byte18 << 31) | (byte19 << 23) | (byte20 << 15) | (byte21 << 7) | (byte22 >>> 1); - final long byte23 = blocks[blocksOffset++] & 0xFF; - final long byte24 = blocks[blocksOffset++] & 0xFF; - final long byte25 = blocks[blocksOffset++] & 0xFF; - final long byte26 = blocks[blocksOffset++] & 0xFF; - final long byte27 = blocks[blocksOffset++] & 0xFF; - final long byte28 = blocks[blocksOffset++] & 0xFF; - final long byte29 = blocks[blocksOffset++] & 0xFF; - final long byte30 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte22 & 1) << 60) | (byte23 << 52) | (byte24 << 44) | (byte25 << 36) | (byte26 << 28) | (byte27 << 20) | (byte28 << 12) | (byte29 << 4) | (byte30 >>> 4); - final long byte31 = blocks[blocksOffset++] & 0xFF; - final long byte32 = blocks[blocksOffset++] & 0xFF; - final long byte33 = blocks[blocksOffset++] & 0xFF; - final long byte34 = blocks[blocksOffset++] & 0xFF; - final long byte35 = blocks[blocksOffset++] & 0xFF; - final long byte36 = blocks[blocksOffset++] & 0xFF; - final long byte37 = blocks[blocksOffset++] & 0xFF; - final long byte38 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte30 & 15) << 57) | (byte31 << 49) | (byte32 << 41) | (byte33 << 33) | (byte34 << 25) | (byte35 << 17) | (byte36 << 9) | (byte37 << 1) | (byte38 >>> 7); - final long byte39 = blocks[blocksOffset++] & 0xFF; - final long byte40 = blocks[blocksOffset++] & 0xFF; - final long byte41 = blocks[blocksOffset++] & 0xFF; - final long byte42 = blocks[blocksOffset++] & 0xFF; - final long byte43 = blocks[blocksOffset++] & 0xFF; - final long byte44 = blocks[blocksOffset++] & 0xFF; - final long byte45 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte38 & 127) << 54) | (byte39 << 46) | (byte40 << 38) | (byte41 << 30) | (byte42 << 22) | (byte43 << 14) | (byte44 << 6) | (byte45 >>> 2); - final long byte46 = blocks[blocksOffset++] & 0xFF; - final long byte47 = blocks[blocksOffset++] & 0xFF; - final long byte48 = blocks[blocksOffset++] & 0xFF; - final long byte49 = blocks[blocksOffset++] & 0xFF; - final long byte50 = blocks[blocksOffset++] & 0xFF; - final long byte51 = blocks[blocksOffset++] & 0xFF; - final long byte52 = blocks[blocksOffset++] & 0xFF; - final long byte53 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte45 & 3) << 59) | (byte46 << 51) | (byte47 << 43) | (byte48 << 35) | (byte49 << 27) | (byte50 << 19) | (byte51 << 11) | (byte52 << 3) | (byte53 >>> 5); - final long byte54 = blocks[blocksOffset++] & 0xFF; - final long byte55 = blocks[blocksOffset++] & 0xFF; - final long byte56 = blocks[blocksOffset++] & 0xFF; - final long byte57 = blocks[blocksOffset++] & 0xFF; - final long byte58 = blocks[blocksOffset++] & 0xFF; - final long byte59 = blocks[blocksOffset++] & 0xFF; - final long byte60 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte53 & 31) << 56) | (byte54 << 48) | (byte55 << 40) | (byte56 << 32) | (byte57 << 24) | (byte58 << 16) | (byte59 << 8) | byte60; - final long byte61 = blocks[blocksOffset++] & 0xFF; - final long byte62 = blocks[blocksOffset++] & 0xFF; - final long byte63 = blocks[blocksOffset++] & 0xFF; - final long byte64 = blocks[blocksOffset++] & 0xFF; - final long byte65 = blocks[blocksOffset++] & 0xFF; - final long byte66 = blocks[blocksOffset++] & 0xFF; - final long byte67 = blocks[blocksOffset++] & 0xFF; - final long byte68 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte61 << 53) | (byte62 << 45) | (byte63 << 37) | (byte64 << 29) | (byte65 << 21) | (byte66 << 13) | (byte67 << 5) | (byte68 >>> 3); - final long byte69 = blocks[blocksOffset++] & 0xFF; - final long byte70 = blocks[blocksOffset++] & 0xFF; - final long byte71 = blocks[blocksOffset++] & 0xFF; - final long byte72 = blocks[blocksOffset++] & 0xFF; - final long byte73 = blocks[blocksOffset++] & 0xFF; - final long byte74 = blocks[blocksOffset++] & 0xFF; - final long byte75 = blocks[blocksOffset++] & 0xFF; - final long byte76 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte68 & 7) << 58) | (byte69 << 50) | (byte70 << 42) | (byte71 << 34) | (byte72 << 26) | (byte73 << 18) | (byte74 << 10) | (byte75 << 2) | (byte76 >>> 6); - final long byte77 = blocks[blocksOffset++] & 0xFF; - final long byte78 = blocks[blocksOffset++] & 0xFF; - final long byte79 = blocks[blocksOffset++] & 0xFF; - final long byte80 = blocks[blocksOffset++] & 0xFF; - final long byte81 = blocks[blocksOffset++] & 0xFF; - final long byte82 = blocks[blocksOffset++] & 0xFF; - final long byte83 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte76 & 63) << 55) | (byte77 << 47) | (byte78 << 39) | (byte79 << 31) | (byte80 << 23) | (byte81 << 15) | (byte82 << 7) | (byte83 >>> 1); - final long byte84 = blocks[blocksOffset++] & 0xFF; - final long byte85 = blocks[blocksOffset++] & 0xFF; - final long byte86 = blocks[blocksOffset++] & 0xFF; - final long byte87 = blocks[blocksOffset++] & 0xFF; - final long byte88 = blocks[blocksOffset++] & 0xFF; - final long byte89 = blocks[blocksOffset++] & 0xFF; - final long byte90 = blocks[blocksOffset++] & 0xFF; - final long byte91 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte83 & 1) << 60) | (byte84 << 52) | (byte85 << 44) | (byte86 << 36) | (byte87 << 28) | (byte88 << 20) | (byte89 << 12) | (byte90 << 4) | (byte91 >>> 4); - final long byte92 = blocks[blocksOffset++] & 0xFF; - final long byte93 = blocks[blocksOffset++] & 0xFF; - final long byte94 = blocks[blocksOffset++] & 0xFF; - final long byte95 = blocks[blocksOffset++] & 0xFF; - final long byte96 = blocks[blocksOffset++] & 0xFF; - final long byte97 = blocks[blocksOffset++] & 0xFF; - final long byte98 = blocks[blocksOffset++] & 0xFF; - final long byte99 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte91 & 15) << 57) | (byte92 << 49) | (byte93 << 41) | (byte94 << 33) | (byte95 << 25) | (byte96 << 17) | (byte97 << 9) | (byte98 << 1) | (byte99 >>> 7); - final long byte100 = blocks[blocksOffset++] & 0xFF; - final long byte101 = blocks[blocksOffset++] & 0xFF; - final long byte102 = blocks[blocksOffset++] & 0xFF; - final long byte103 = blocks[blocksOffset++] & 0xFF; - final long byte104 = blocks[blocksOffset++] & 0xFF; - final long byte105 = blocks[blocksOffset++] & 0xFF; - final long byte106 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte99 & 127) << 54) | (byte100 << 46) | (byte101 << 38) | (byte102 << 30) | (byte103 << 22) | (byte104 << 14) | (byte105 << 6) | (byte106 >>> 2); - final long byte107 = blocks[blocksOffset++] & 0xFF; - final long byte108 = blocks[blocksOffset++] & 0xFF; - final long byte109 = blocks[blocksOffset++] & 0xFF; - final long byte110 = blocks[blocksOffset++] & 0xFF; - final long byte111 = blocks[blocksOffset++] & 0xFF; - final long byte112 = blocks[blocksOffset++] & 0xFF; - final long byte113 = blocks[blocksOffset++] & 0xFF; - final long byte114 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte106 & 3) << 59) | (byte107 << 51) | (byte108 << 43) | (byte109 << 35) | (byte110 << 27) | (byte111 << 19) | (byte112 << 11) | (byte113 << 3) | (byte114 >>> 5); - final long byte115 = blocks[blocksOffset++] & 0xFF; - final long byte116 = blocks[blocksOffset++] & 0xFF; - final long byte117 = blocks[blocksOffset++] & 0xFF; - final long byte118 = blocks[blocksOffset++] & 0xFF; - final long byte119 = blocks[blocksOffset++] & 0xFF; - final long byte120 = blocks[blocksOffset++] & 0xFF; - final long byte121 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte114 & 31) << 56) | (byte115 << 48) | (byte116 << 40) | (byte117 << 32) | (byte118 << 24) | (byte119 << 16) | (byte120 << 8) | byte121; - final long byte122 = blocks[blocksOffset++] & 0xFF; - final long byte123 = blocks[blocksOffset++] & 0xFF; - final long byte124 = blocks[blocksOffset++] & 0xFF; - final long byte125 = blocks[blocksOffset++] & 0xFF; - final long byte126 = blocks[blocksOffset++] & 0xFF; - final long byte127 = blocks[blocksOffset++] & 0xFF; - final long byte128 = blocks[blocksOffset++] & 0xFF; - final long byte129 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte122 << 53) | (byte123 << 45) | (byte124 << 37) | (byte125 << 29) | (byte126 << 21) | (byte127 << 13) | (byte128 << 5) | (byte129 >>> 3); - final long byte130 = blocks[blocksOffset++] & 0xFF; - final long byte131 = blocks[blocksOffset++] & 0xFF; - final long byte132 = blocks[blocksOffset++] & 0xFF; - final long byte133 = blocks[blocksOffset++] & 0xFF; - final long byte134 = blocks[blocksOffset++] & 0xFF; - final long byte135 = blocks[blocksOffset++] & 0xFF; - final long byte136 = blocks[blocksOffset++] & 0xFF; - final long byte137 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte129 & 7) << 58) | (byte130 << 50) | (byte131 << 42) | (byte132 << 34) | (byte133 << 26) | (byte134 << 18) | (byte135 << 10) | (byte136 << 2) | (byte137 >>> 6); - final long byte138 = blocks[blocksOffset++] & 0xFF; - final long byte139 = blocks[blocksOffset++] & 0xFF; - final long byte140 = blocks[blocksOffset++] & 0xFF; - final long byte141 = blocks[blocksOffset++] & 0xFF; - final long byte142 = blocks[blocksOffset++] & 0xFF; - final long byte143 = blocks[blocksOffset++] & 0xFF; - final long byte144 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte137 & 63) << 55) | (byte138 << 47) | (byte139 << 39) | (byte140 << 31) | (byte141 << 23) | (byte142 << 15) | (byte143 << 7) | (byte144 >>> 1); - final long byte145 = blocks[blocksOffset++] & 0xFF; - final long byte146 = blocks[blocksOffset++] & 0xFF; - final long byte147 = blocks[blocksOffset++] & 0xFF; - final long byte148 = blocks[blocksOffset++] & 0xFF; - final long byte149 = blocks[blocksOffset++] & 0xFF; - final long byte150 = blocks[blocksOffset++] & 0xFF; - final long byte151 = blocks[blocksOffset++] & 0xFF; - final long byte152 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte144 & 1) << 60) | (byte145 << 52) | (byte146 << 44) | (byte147 << 36) | (byte148 << 28) | (byte149 << 20) | (byte150 << 12) | (byte151 << 4) | (byte152 >>> 4); - final long byte153 = blocks[blocksOffset++] & 0xFF; - final long byte154 = blocks[blocksOffset++] & 0xFF; - final long byte155 = blocks[blocksOffset++] & 0xFF; - final long byte156 = blocks[blocksOffset++] & 0xFF; - final long byte157 = blocks[blocksOffset++] & 0xFF; - final long byte158 = blocks[blocksOffset++] & 0xFF; - final long byte159 = blocks[blocksOffset++] & 0xFF; - final long byte160 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte152 & 15) << 57) | (byte153 << 49) | (byte154 << 41) | (byte155 << 33) | (byte156 << 25) | (byte157 << 17) | (byte158 << 9) | (byte159 << 1) | (byte160 >>> 7); - final long byte161 = blocks[blocksOffset++] & 0xFF; - final long byte162 = blocks[blocksOffset++] & 0xFF; - final long byte163 = blocks[blocksOffset++] & 0xFF; - final long byte164 = blocks[blocksOffset++] & 0xFF; - final long byte165 = blocks[blocksOffset++] & 0xFF; - final long byte166 = blocks[blocksOffset++] & 0xFF; - final long byte167 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte160 & 127) << 54) | (byte161 << 46) | (byte162 << 38) | (byte163 << 30) | (byte164 << 22) | (byte165 << 14) | (byte166 << 6) | (byte167 >>> 2); - final long byte168 = blocks[blocksOffset++] & 0xFF; - final long byte169 = blocks[blocksOffset++] & 0xFF; - final long byte170 = blocks[blocksOffset++] & 0xFF; - final long byte171 = blocks[blocksOffset++] & 0xFF; - final long byte172 = blocks[blocksOffset++] & 0xFF; - final long byte173 = blocks[blocksOffset++] & 0xFF; - final long byte174 = blocks[blocksOffset++] & 0xFF; - final long byte175 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte167 & 3) << 59) | (byte168 << 51) | (byte169 << 43) | (byte170 << 35) | (byte171 << 27) | (byte172 << 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; - final long byte179 = blocks[blocksOffset++] & 0xFF; - final long byte180 = blocks[blocksOffset++] & 0xFF; - final long byte181 = blocks[blocksOffset++] & 0xFF; - final long byte182 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte175 & 31) << 56) | (byte176 << 48) | (byte177 << 40) | (byte178 << 32) | (byte179 << 24) | (byte180 << 16) | (byte181 << 8) | byte182; - final long byte183 = blocks[blocksOffset++] & 0xFF; - final long byte184 = blocks[blocksOffset++] & 0xFF; - final long byte185 = blocks[blocksOffset++] & 0xFF; - final long byte186 = blocks[blocksOffset++] & 0xFF; - final long byte187 = blocks[blocksOffset++] & 0xFF; - final long byte188 = blocks[blocksOffset++] & 0xFF; - final long byte189 = blocks[blocksOffset++] & 0xFF; - final long byte190 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte183 << 53) | (byte184 << 45) | (byte185 << 37) | (byte186 << 29) | (byte187 << 21) | (byte188 << 13) | (byte189 << 5) | (byte190 >>> 3); - final long byte191 = blocks[blocksOffset++] & 0xFF; - final long byte192 = blocks[blocksOffset++] & 0xFF; - final long byte193 = blocks[blocksOffset++] & 0xFF; - final long byte194 = blocks[blocksOffset++] & 0xFF; - final long byte195 = blocks[blocksOffset++] & 0xFF; - final long byte196 = blocks[blocksOffset++] & 0xFF; - final long byte197 = blocks[blocksOffset++] & 0xFF; - final long byte198 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte190 & 7) << 58) | (byte191 << 50) | (byte192 << 42) | (byte193 << 34) | (byte194 << 26) | (byte195 << 18) | (byte196 << 10) | (byte197 << 2) | (byte198 >>> 6); - final long byte199 = blocks[blocksOffset++] & 0xFF; - final long byte200 = blocks[blocksOffset++] & 0xFF; - final long byte201 = blocks[blocksOffset++] & 0xFF; - final long byte202 = blocks[blocksOffset++] & 0xFF; - final long byte203 = blocks[blocksOffset++] & 0xFF; - final long byte204 = blocks[blocksOffset++] & 0xFF; - final long byte205 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte198 & 63) << 55) | (byte199 << 47) | (byte200 << 39) | (byte201 << 31) | (byte202 << 23) | (byte203 << 15) | (byte204 << 7) | (byte205 >>> 1); - final long byte206 = blocks[blocksOffset++] & 0xFF; - final long byte207 = blocks[blocksOffset++] & 0xFF; - final long byte208 = blocks[blocksOffset++] & 0xFF; - final long byte209 = blocks[blocksOffset++] & 0xFF; - final long byte210 = blocks[blocksOffset++] & 0xFF; - final long byte211 = blocks[blocksOffset++] & 0xFF; - final long byte212 = blocks[blocksOffset++] & 0xFF; - final long byte213 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte205 & 1) << 60) | (byte206 << 52) | (byte207 << 44) | (byte208 << 36) | (byte209 << 28) | (byte210 << 20) | (byte211 << 12) | (byte212 << 4) | (byte213 >>> 4); - final long byte214 = blocks[blocksOffset++] & 0xFF; - final long byte215 = blocks[blocksOffset++] & 0xFF; - final long byte216 = blocks[blocksOffset++] & 0xFF; - final long byte217 = blocks[blocksOffset++] & 0xFF; - final long byte218 = blocks[blocksOffset++] & 0xFF; - final long byte219 = blocks[blocksOffset++] & 0xFF; - final long byte220 = blocks[blocksOffset++] & 0xFF; - final long byte221 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte213 & 15) << 57) | (byte214 << 49) | (byte215 << 41) | (byte216 << 33) | (byte217 << 25) | (byte218 << 17) | (byte219 << 9) | (byte220 << 1) | (byte221 >>> 7); - final long byte222 = blocks[blocksOffset++] & 0xFF; - final long byte223 = blocks[blocksOffset++] & 0xFF; - final long byte224 = blocks[blocksOffset++] & 0xFF; - final long byte225 = blocks[blocksOffset++] & 0xFF; - final long byte226 = blocks[blocksOffset++] & 0xFF; - final long byte227 = blocks[blocksOffset++] & 0xFF; - final long byte228 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte221 & 127) << 54) | (byte222 << 46) | (byte223 << 38) | (byte224 << 30) | (byte225 << 22) | (byte226 << 14) | (byte227 << 6) | (byte228 >>> 2); - final long byte229 = blocks[blocksOffset++] & 0xFF; - final long byte230 = blocks[blocksOffset++] & 0xFF; - final long byte231 = blocks[blocksOffset++] & 0xFF; - final long byte232 = blocks[blocksOffset++] & 0xFF; - final long byte233 = blocks[blocksOffset++] & 0xFF; - final long byte234 = blocks[blocksOffset++] & 0xFF; - final long byte235 = blocks[blocksOffset++] & 0xFF; - final long byte236 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte228 & 3) << 59) | (byte229 << 51) | (byte230 << 43) | (byte231 << 35) | (byte232 << 27) | (byte233 << 19) | (byte234 << 11) | (byte235 << 3) | (byte236 >>> 5); - final long byte237 = blocks[blocksOffset++] & 0xFF; - final long byte238 = blocks[blocksOffset++] & 0xFF; - final long byte239 = blocks[blocksOffset++] & 0xFF; - final long byte240 = blocks[blocksOffset++] & 0xFF; - final long byte241 = blocks[blocksOffset++] & 0xFF; - final long byte242 = blocks[blocksOffset++] & 0xFF; - final long byte243 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte236 & 31) << 56) | (byte237 << 48) | (byte238 << 40) | (byte239 << 32) | (byte240 << 24) | (byte241 << 16) | (byte242 << 8) | byte243; - final long byte244 = blocks[blocksOffset++] & 0xFF; - final long byte245 = blocks[blocksOffset++] & 0xFF; - final long byte246 = blocks[blocksOffset++] & 0xFF; - final long byte247 = blocks[blocksOffset++] & 0xFF; - final long byte248 = blocks[blocksOffset++] & 0xFF; - final long byte249 = blocks[blocksOffset++] & 0xFF; - final long byte250 = blocks[blocksOffset++] & 0xFF; - final long byte251 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte244 << 53) | (byte245 << 45) | (byte246 << 37) | (byte247 << 29) | (byte248 << 21) | (byte249 << 13) | (byte250 << 5) | (byte251 >>> 3); - final long byte252 = blocks[blocksOffset++] & 0xFF; - final long byte253 = blocks[blocksOffset++] & 0xFF; - final long byte254 = blocks[blocksOffset++] & 0xFF; - final long byte255 = blocks[blocksOffset++] & 0xFF; - final long byte256 = blocks[blocksOffset++] & 0xFF; - final long byte257 = blocks[blocksOffset++] & 0xFF; - final long byte258 = blocks[blocksOffset++] & 0xFF; - final long byte259 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte251 & 7) << 58) | (byte252 << 50) | (byte253 << 42) | (byte254 << 34) | (byte255 << 26) | (byte256 << 18) | (byte257 << 10) | (byte258 << 2) | (byte259 >>> 6); - final long byte260 = blocks[blocksOffset++] & 0xFF; - final long byte261 = blocks[blocksOffset++] & 0xFF; - final long byte262 = blocks[blocksOffset++] & 0xFF; - final long byte263 = blocks[blocksOffset++] & 0xFF; - final long byte264 = blocks[blocksOffset++] & 0xFF; - final long byte265 = blocks[blocksOffset++] & 0xFF; - final long byte266 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte259 & 63) << 55) | (byte260 << 47) | (byte261 << 39) | (byte262 << 31) | (byte263 << 23) | (byte264 << 15) | (byte265 << 7) | (byte266 >>> 1); - final long byte267 = blocks[blocksOffset++] & 0xFF; - final long byte268 = blocks[blocksOffset++] & 0xFF; - final long byte269 = blocks[blocksOffset++] & 0xFF; - final long byte270 = blocks[blocksOffset++] & 0xFF; - final long byte271 = blocks[blocksOffset++] & 0xFF; - final long byte272 = blocks[blocksOffset++] & 0xFF; - final long byte273 = blocks[blocksOffset++] & 0xFF; - final long byte274 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte266 & 1) << 60) | (byte267 << 52) | (byte268 << 44) | (byte269 << 36) | (byte270 << 28) | (byte271 << 20) | (byte272 << 12) | (byte273 << 4) | (byte274 >>> 4); - final long byte275 = blocks[blocksOffset++] & 0xFF; - final long byte276 = blocks[blocksOffset++] & 0xFF; - final long byte277 = blocks[blocksOffset++] & 0xFF; - final long byte278 = blocks[blocksOffset++] & 0xFF; - final long byte279 = blocks[blocksOffset++] & 0xFF; - final long byte280 = blocks[blocksOffset++] & 0xFF; - final long byte281 = blocks[blocksOffset++] & 0xFF; - final long byte282 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte274 & 15) << 57) | (byte275 << 49) | (byte276 << 41) | (byte277 << 33) | (byte278 << 25) | (byte279 << 17) | (byte280 << 9) | (byte281 << 1) | (byte282 >>> 7); - final long byte283 = blocks[blocksOffset++] & 0xFF; - final long byte284 = blocks[blocksOffset++] & 0xFF; - final long byte285 = blocks[blocksOffset++] & 0xFF; - final long byte286 = blocks[blocksOffset++] & 0xFF; - final long byte287 = blocks[blocksOffset++] & 0xFF; - final long byte288 = blocks[blocksOffset++] & 0xFF; - final long byte289 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte282 & 127) << 54) | (byte283 << 46) | (byte284 << 38) | (byte285 << 30) | (byte286 << 22) | (byte287 << 14) | (byte288 << 6) | (byte289 >>> 2); - final long byte290 = blocks[blocksOffset++] & 0xFF; - final long byte291 = blocks[blocksOffset++] & 0xFF; - final long byte292 = blocks[blocksOffset++] & 0xFF; - final long byte293 = blocks[blocksOffset++] & 0xFF; - final long byte294 = blocks[blocksOffset++] & 0xFF; - final long byte295 = blocks[blocksOffset++] & 0xFF; - final long byte296 = blocks[blocksOffset++] & 0xFF; - final long byte297 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte289 & 3) << 59) | (byte290 << 51) | (byte291 << 43) | (byte292 << 35) | (byte293 << 27) | (byte294 << 19) | (byte295 << 11) | (byte296 << 3) | (byte297 >>> 5); - final long byte298 = blocks[blocksOffset++] & 0xFF; - final long byte299 = blocks[blocksOffset++] & 0xFF; - final long byte300 = blocks[blocksOffset++] & 0xFF; - final long byte301 = blocks[blocksOffset++] & 0xFF; - final long byte302 = blocks[blocksOffset++] & 0xFF; - final long byte303 = blocks[blocksOffset++] & 0xFF; - final long byte304 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte297 & 31) << 56) | (byte298 << 48) | (byte299 << 40) | (byte300 << 32) | (byte301 << 24) | (byte302 << 16) | (byte303 << 8) | byte304; - final long byte305 = blocks[blocksOffset++] & 0xFF; - final long byte306 = blocks[blocksOffset++] & 0xFF; - final long byte307 = blocks[blocksOffset++] & 0xFF; - final long byte308 = blocks[blocksOffset++] & 0xFF; - final long byte309 = blocks[blocksOffset++] & 0xFF; - final long byte310 = blocks[blocksOffset++] & 0xFF; - final long byte311 = blocks[blocksOffset++] & 0xFF; - final long byte312 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte305 << 53) | (byte306 << 45) | (byte307 << 37) | (byte308 << 29) | (byte309 << 21) | (byte310 << 13) | (byte311 << 5) | (byte312 >>> 3); - final long byte313 = blocks[blocksOffset++] & 0xFF; - final long byte314 = blocks[blocksOffset++] & 0xFF; - final long byte315 = blocks[blocksOffset++] & 0xFF; - final long byte316 = blocks[blocksOffset++] & 0xFF; - final long byte317 = blocks[blocksOffset++] & 0xFF; - final long byte318 = blocks[blocksOffset++] & 0xFF; - final long byte319 = blocks[blocksOffset++] & 0xFF; - final long byte320 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte312 & 7) << 58) | (byte313 << 50) | (byte314 << 42) | (byte315 << 34) | (byte316 << 26) | (byte317 << 18) | (byte318 << 10) | (byte319 << 2) | (byte320 >>> 6); - final long byte321 = blocks[blocksOffset++] & 0xFF; - final long byte322 = blocks[blocksOffset++] & 0xFF; - final long byte323 = blocks[blocksOffset++] & 0xFF; - final long byte324 = blocks[blocksOffset++] & 0xFF; - final long byte325 = blocks[blocksOffset++] & 0xFF; - final long byte326 = blocks[blocksOffset++] & 0xFF; - final long byte327 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte320 & 63) << 55) | (byte321 << 47) | (byte322 << 39) | (byte323 << 31) | (byte324 << 23) | (byte325 << 15) | (byte326 << 7) | (byte327 >>> 1); - final long byte328 = blocks[blocksOffset++] & 0xFF; - final long byte329 = blocks[blocksOffset++] & 0xFF; - final long byte330 = blocks[blocksOffset++] & 0xFF; - final long byte331 = blocks[blocksOffset++] & 0xFF; - final long byte332 = blocks[blocksOffset++] & 0xFF; - final long byte333 = blocks[blocksOffset++] & 0xFF; - final long byte334 = blocks[blocksOffset++] & 0xFF; - final long byte335 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte327 & 1) << 60) | (byte328 << 52) | (byte329 << 44) | (byte330 << 36) | (byte331 << 28) | (byte332 << 20) | (byte333 << 12) | (byte334 << 4) | (byte335 >>> 4); - final long byte336 = blocks[blocksOffset++] & 0xFF; - final long byte337 = blocks[blocksOffset++] & 0xFF; - final long byte338 = blocks[blocksOffset++] & 0xFF; - final long byte339 = blocks[blocksOffset++] & 0xFF; - final long byte340 = blocks[blocksOffset++] & 0xFF; - final long byte341 = blocks[blocksOffset++] & 0xFF; - final long byte342 = blocks[blocksOffset++] & 0xFF; - final long byte343 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte335 & 15) << 57) | (byte336 << 49) | (byte337 << 41) | (byte338 << 33) | (byte339 << 25) | (byte340 << 17) | (byte341 << 9) | (byte342 << 1) | (byte343 >>> 7); - final long byte344 = blocks[blocksOffset++] & 0xFF; - final long byte345 = blocks[blocksOffset++] & 0xFF; - final long byte346 = blocks[blocksOffset++] & 0xFF; - final long byte347 = blocks[blocksOffset++] & 0xFF; - final long byte348 = blocks[blocksOffset++] & 0xFF; - final long byte349 = blocks[blocksOffset++] & 0xFF; - final long byte350 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte343 & 127) << 54) | (byte344 << 46) | (byte345 << 38) | (byte346 << 30) | (byte347 << 22) | (byte348 << 14) | (byte349 << 6) | (byte350 >>> 2); - final long byte351 = blocks[blocksOffset++] & 0xFF; - final long byte352 = blocks[blocksOffset++] & 0xFF; - final long byte353 = blocks[blocksOffset++] & 0xFF; - final long byte354 = blocks[blocksOffset++] & 0xFF; - final long byte355 = blocks[blocksOffset++] & 0xFF; - final long byte356 = blocks[blocksOffset++] & 0xFF; - final long byte357 = blocks[blocksOffset++] & 0xFF; - final long byte358 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte350 & 3) << 59) | (byte351 << 51) | (byte352 << 43) | (byte353 << 35) | (byte354 << 27) | (byte355 << 19) | (byte356 << 11) | (byte357 << 3) | (byte358 >>> 5); - final long byte359 = blocks[blocksOffset++] & 0xFF; - final long byte360 = blocks[blocksOffset++] & 0xFF; - final long byte361 = blocks[blocksOffset++] & 0xFF; - final long byte362 = blocks[blocksOffset++] & 0xFF; - final long byte363 = blocks[blocksOffset++] & 0xFF; - final long byte364 = blocks[blocksOffset++] & 0xFF; - final long byte365 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte358 & 31) << 56) | (byte359 << 48) | (byte360 << 40) | (byte361 << 32) | (byte362 << 24) | (byte363 << 16) | (byte364 << 8) | byte365; - final long byte366 = blocks[blocksOffset++] & 0xFF; - final long byte367 = blocks[blocksOffset++] & 0xFF; - final long byte368 = blocks[blocksOffset++] & 0xFF; - final long byte369 = blocks[blocksOffset++] & 0xFF; - final long byte370 = blocks[blocksOffset++] & 0xFF; - final long byte371 = blocks[blocksOffset++] & 0xFF; - final long byte372 = blocks[blocksOffset++] & 0xFF; - final long byte373 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte366 << 53) | (byte367 << 45) | (byte368 << 37) | (byte369 << 29) | (byte370 << 21) | (byte371 << 13) | (byte372 << 5) | (byte373 >>> 3); - final long byte374 = blocks[blocksOffset++] & 0xFF; - final long byte375 = blocks[blocksOffset++] & 0xFF; - final long byte376 = blocks[blocksOffset++] & 0xFF; - final long byte377 = blocks[blocksOffset++] & 0xFF; - final long byte378 = blocks[blocksOffset++] & 0xFF; - final long byte379 = blocks[blocksOffset++] & 0xFF; - final long byte380 = blocks[blocksOffset++] & 0xFF; - final long byte381 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte373 & 7) << 58) | (byte374 << 50) | (byte375 << 42) | (byte376 << 34) | (byte377 << 26) | (byte378 << 18) | (byte379 << 10) | (byte380 << 2) | (byte381 >>> 6); - final long byte382 = blocks[blocksOffset++] & 0xFF; - final long byte383 = blocks[blocksOffset++] & 0xFF; - final long byte384 = blocks[blocksOffset++] & 0xFF; - final long byte385 = blocks[blocksOffset++] & 0xFF; - final long byte386 = blocks[blocksOffset++] & 0xFF; - final long byte387 = blocks[blocksOffset++] & 0xFF; - final long byte388 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte381 & 63) << 55) | (byte382 << 47) | (byte383 << 39) | (byte384 << 31) | (byte385 << 23) | (byte386 << 15) | (byte387 << 7) | (byte388 >>> 1); - final long byte389 = blocks[blocksOffset++] & 0xFF; - final long byte390 = blocks[blocksOffset++] & 0xFF; - final long byte391 = blocks[blocksOffset++] & 0xFF; - final long byte392 = blocks[blocksOffset++] & 0xFF; - final long byte393 = blocks[blocksOffset++] & 0xFF; - final long byte394 = blocks[blocksOffset++] & 0xFF; - final long byte395 = blocks[blocksOffset++] & 0xFF; - final long byte396 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte388 & 1) << 60) | (byte389 << 52) | (byte390 << 44) | (byte391 << 36) | (byte392 << 28) | (byte393 << 20) | (byte394 << 12) | (byte395 << 4) | (byte396 >>> 4); - final long byte397 = blocks[blocksOffset++] & 0xFF; - final long byte398 = blocks[blocksOffset++] & 0xFF; - final long byte399 = blocks[blocksOffset++] & 0xFF; - final long byte400 = blocks[blocksOffset++] & 0xFF; - final long byte401 = blocks[blocksOffset++] & 0xFF; - final long byte402 = blocks[blocksOffset++] & 0xFF; - final long byte403 = blocks[blocksOffset++] & 0xFF; - final long byte404 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte396 & 15) << 57) | (byte397 << 49) | (byte398 << 41) | (byte399 << 33) | (byte400 << 25) | (byte401 << 17) | (byte402 << 9) | (byte403 << 1) | (byte404 >>> 7); - final long byte405 = blocks[blocksOffset++] & 0xFF; - final long byte406 = blocks[blocksOffset++] & 0xFF; - final long byte407 = blocks[blocksOffset++] & 0xFF; - final long byte408 = blocks[blocksOffset++] & 0xFF; - final long byte409 = blocks[blocksOffset++] & 0xFF; - final long byte410 = blocks[blocksOffset++] & 0xFF; - final long byte411 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte404 & 127) << 54) | (byte405 << 46) | (byte406 << 38) | (byte407 << 30) | (byte408 << 22) | (byte409 << 14) | (byte410 << 6) | (byte411 >>> 2); - final long byte412 = blocks[blocksOffset++] & 0xFF; - final long byte413 = blocks[blocksOffset++] & 0xFF; - final long byte414 = blocks[blocksOffset++] & 0xFF; - final long byte415 = blocks[blocksOffset++] & 0xFF; - final long byte416 = blocks[blocksOffset++] & 0xFF; - final long byte417 = blocks[blocksOffset++] & 0xFF; - final long byte418 = blocks[blocksOffset++] & 0xFF; - final long byte419 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte411 & 3) << 59) | (byte412 << 51) | (byte413 << 43) | (byte414 << 35) | (byte415 << 27) | (byte416 << 19) | (byte417 << 11) | (byte418 << 3) | (byte419 >>> 5); - final long byte420 = blocks[blocksOffset++] & 0xFF; - final long byte421 = blocks[blocksOffset++] & 0xFF; - final long byte422 = blocks[blocksOffset++] & 0xFF; - final long byte423 = blocks[blocksOffset++] & 0xFF; - final long byte424 = blocks[blocksOffset++] & 0xFF; - final long byte425 = blocks[blocksOffset++] & 0xFF; - final long byte426 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte419 & 31) << 56) | (byte420 << 48) | (byte421 << 40) | (byte422 << 32) | (byte423 << 24) | (byte424 << 16) | (byte425 << 8) | byte426; - final long byte427 = blocks[blocksOffset++] & 0xFF; - final long byte428 = blocks[blocksOffset++] & 0xFF; - final long byte429 = blocks[blocksOffset++] & 0xFF; - final long byte430 = blocks[blocksOffset++] & 0xFF; - final long byte431 = blocks[blocksOffset++] & 0xFF; - final long byte432 = blocks[blocksOffset++] & 0xFF; - final long byte433 = blocks[blocksOffset++] & 0xFF; - final long byte434 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte427 << 53) | (byte428 << 45) | (byte429 << 37) | (byte430 << 29) | (byte431 << 21) | (byte432 << 13) | (byte433 << 5) | (byte434 >>> 3); - final long byte435 = blocks[blocksOffset++] & 0xFF; - final long byte436 = blocks[blocksOffset++] & 0xFF; - final long byte437 = blocks[blocksOffset++] & 0xFF; - final long byte438 = blocks[blocksOffset++] & 0xFF; - final long byte439 = blocks[blocksOffset++] & 0xFF; - final long byte440 = blocks[blocksOffset++] & 0xFF; - final long byte441 = blocks[blocksOffset++] & 0xFF; - final long byte442 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte434 & 7) << 58) | (byte435 << 50) | (byte436 << 42) | (byte437 << 34) | (byte438 << 26) | (byte439 << 18) | (byte440 << 10) | (byte441 << 2) | (byte442 >>> 6); - final long byte443 = blocks[blocksOffset++] & 0xFF; - final long byte444 = blocks[blocksOffset++] & 0xFF; - final long byte445 = blocks[blocksOffset++] & 0xFF; - final long byte446 = blocks[blocksOffset++] & 0xFF; - final long byte447 = blocks[blocksOffset++] & 0xFF; - final long byte448 = blocks[blocksOffset++] & 0xFF; - final long byte449 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte442 & 63) << 55) | (byte443 << 47) | (byte444 << 39) | (byte445 << 31) | (byte446 << 23) | (byte447 << 15) | (byte448 << 7) | (byte449 >>> 1); - final long byte450 = blocks[blocksOffset++] & 0xFF; - final long byte451 = blocks[blocksOffset++] & 0xFF; - final long byte452 = blocks[blocksOffset++] & 0xFF; - final long byte453 = blocks[blocksOffset++] & 0xFF; - final long byte454 = blocks[blocksOffset++] & 0xFF; - final long byte455 = blocks[blocksOffset++] & 0xFF; - final long byte456 = blocks[blocksOffset++] & 0xFF; - final long byte457 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte449 & 1) << 60) | (byte450 << 52) | (byte451 << 44) | (byte452 << 36) | (byte453 << 28) | (byte454 << 20) | (byte455 << 12) | (byte456 << 4) | (byte457 >>> 4); - final long byte458 = blocks[blocksOffset++] & 0xFF; - final long byte459 = blocks[blocksOffset++] & 0xFF; - final long byte460 = blocks[blocksOffset++] & 0xFF; - final long byte461 = blocks[blocksOffset++] & 0xFF; - final long byte462 = blocks[blocksOffset++] & 0xFF; - final long byte463 = blocks[blocksOffset++] & 0xFF; - final long byte464 = blocks[blocksOffset++] & 0xFF; - final long byte465 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte457 & 15) << 57) | (byte458 << 49) | (byte459 << 41) | (byte460 << 33) | (byte461 << 25) | (byte462 << 17) | (byte463 << 9) | (byte464 << 1) | (byte465 >>> 7); - final long byte466 = blocks[blocksOffset++] & 0xFF; - final long byte467 = blocks[blocksOffset++] & 0xFF; - final long byte468 = blocks[blocksOffset++] & 0xFF; - final long byte469 = blocks[blocksOffset++] & 0xFF; - final long byte470 = blocks[blocksOffset++] & 0xFF; - final long byte471 = blocks[blocksOffset++] & 0xFF; - final long byte472 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte465 & 127) << 54) | (byte466 << 46) | (byte467 << 38) | (byte468 << 30) | (byte469 << 22) | (byte470 << 14) | (byte471 << 6) | (byte472 >>> 2); - final long byte473 = blocks[blocksOffset++] & 0xFF; - final long byte474 = blocks[blocksOffset++] & 0xFF; - final long byte475 = blocks[blocksOffset++] & 0xFF; - final long byte476 = blocks[blocksOffset++] & 0xFF; - final long byte477 = blocks[blocksOffset++] & 0xFF; - final long byte478 = blocks[blocksOffset++] & 0xFF; - final long byte479 = blocks[blocksOffset++] & 0xFF; - final long byte480 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte472 & 3) << 59) | (byte473 << 51) | (byte474 << 43) | (byte475 << 35) | (byte476 << 27) | (byte477 << 19) | (byte478 << 11) | (byte479 << 3) | (byte480 >>> 5); - final long byte481 = blocks[blocksOffset++] & 0xFF; - final long byte482 = blocks[blocksOffset++] & 0xFF; - final long byte483 = blocks[blocksOffset++] & 0xFF; - final long byte484 = blocks[blocksOffset++] & 0xFF; - final long byte485 = blocks[blocksOffset++] & 0xFF; - final long byte486 = blocks[blocksOffset++] & 0xFF; - final long byte487 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte480 & 31) << 56) | (byte481 << 48) | (byte482 << 40) | (byte483 << 32) | (byte484 << 24) | (byte485 << 16) | (byte486 << 8) | byte487; - } - } - - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 3) | ((values[valuesOffset] & 0xffffffffL) >>> 58); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 6) | ((values[valuesOffset] & 0xffffffffL) >>> 55); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 9) | ((values[valuesOffset] & 0xffffffffL) >>> 52); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 12) | ((values[valuesOffset] & 0xffffffffL) >>> 49); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 15) | ((values[valuesOffset] & 0xffffffffL) >>> 46); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 18) | ((values[valuesOffset] & 0xffffffffL) >>> 43); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 21) | ((values[valuesOffset] & 0xffffffffL) >>> 40); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 24) | ((values[valuesOffset] & 0xffffffffL) >>> 37); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 27) | ((values[valuesOffset] & 0xffffffffL) >>> 34); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 30) | ((values[valuesOffset] & 0xffffffffL) >>> 31); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 33) | ((values[valuesOffset] & 0xffffffffL) >>> 28); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 36) | ((values[valuesOffset] & 0xffffffffL) >>> 25); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 39) | ((values[valuesOffset] & 0xffffffffL) >>> 22); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 42) | ((values[valuesOffset] & 0xffffffffL) >>> 19); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 45) | ((values[valuesOffset] & 0xffffffffL) >>> 16); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 48) | ((values[valuesOffset] & 0xffffffffL) >>> 13); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 51) | ((values[valuesOffset] & 0xffffffffL) >>> 10); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 54) | ((values[valuesOffset] & 0xffffffffL) >>> 7); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 57) | ((values[valuesOffset] & 0xffffffffL) >>> 4); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 60) | ((values[valuesOffset] & 0xffffffffL) >>> 1); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 63) | ((values[valuesOffset++] & 0xffffffffL) << 2) | ((values[valuesOffset] & 0xffffffffL) >>> 59); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 5) | ((values[valuesOffset] & 0xffffffffL) >>> 56); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 8) | ((values[valuesOffset] & 0xffffffffL) >>> 53); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 11) | ((values[valuesOffset] & 0xffffffffL) >>> 50); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 14) | ((values[valuesOffset] & 0xffffffffL) >>> 47); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 17) | ((values[valuesOffset] & 0xffffffffL) >>> 44); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 20) | ((values[valuesOffset] & 0xffffffffL) >>> 41); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 23) | ((values[valuesOffset] & 0xffffffffL) >>> 38); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 26) | ((values[valuesOffset] & 0xffffffffL) >>> 35); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 29) | ((values[valuesOffset] & 0xffffffffL) >>> 32); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 32) | ((values[valuesOffset] & 0xffffffffL) >>> 29); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 35) | ((values[valuesOffset] & 0xffffffffL) >>> 26); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 38) | ((values[valuesOffset] & 0xffffffffL) >>> 23); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 41) | ((values[valuesOffset] & 0xffffffffL) >>> 20); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 44) | ((values[valuesOffset] & 0xffffffffL) >>> 17); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 47) | ((values[valuesOffset] & 0xffffffffL) >>> 14); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 50) | ((values[valuesOffset] & 0xffffffffL) >>> 11); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 53) | ((values[valuesOffset] & 0xffffffffL) >>> 8); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 56) | ((values[valuesOffset] & 0xffffffffL) >>> 5); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 59) | ((values[valuesOffset] & 0xffffffffL) >>> 2); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 62) | ((values[valuesOffset++] & 0xffffffffL) << 1) | ((values[valuesOffset] & 0xffffffffL) >>> 60); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 4) | ((values[valuesOffset] & 0xffffffffL) >>> 57); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 7) | ((values[valuesOffset] & 0xffffffffL) >>> 54); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 10) | ((values[valuesOffset] & 0xffffffffL) >>> 51); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 13) | ((values[valuesOffset] & 0xffffffffL) >>> 48); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 16) | ((values[valuesOffset] & 0xffffffffL) >>> 45); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 19) | ((values[valuesOffset] & 0xffffffffL) >>> 42); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 22) | ((values[valuesOffset] & 0xffffffffL) >>> 39); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 25) | ((values[valuesOffset] & 0xffffffffL) >>> 36); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 28) | ((values[valuesOffset] & 0xffffffffL) >>> 33); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 31) | ((values[valuesOffset] & 0xffffffffL) >>> 30); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 34) | ((values[valuesOffset] & 0xffffffffL) >>> 27); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 37) | ((values[valuesOffset] & 0xffffffffL) >>> 24); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 40) | ((values[valuesOffset] & 0xffffffffL) >>> 21); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 43) | ((values[valuesOffset] & 0xffffffffL) >>> 18); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 46) | ((values[valuesOffset] & 0xffffffffL) >>> 15); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 49) | ((values[valuesOffset] & 0xffffffffL) >>> 12); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 52) | ((values[valuesOffset] & 0xffffffffL) >>> 9); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 55) | ((values[valuesOffset] & 0xffffffffL) >>> 6); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 58) | ((values[valuesOffset] & 0xffffffffL) >>> 3); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 61) | (values[valuesOffset++] & 0xffffffffL); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] << 3) | (values[valuesOffset] >>> 58); - blocks[blocksOffset++] = (values[valuesOffset++] << 6) | (values[valuesOffset] >>> 55); - blocks[blocksOffset++] = (values[valuesOffset++] << 9) | (values[valuesOffset] >>> 52); - blocks[blocksOffset++] = (values[valuesOffset++] << 12) | (values[valuesOffset] >>> 49); - blocks[blocksOffset++] = (values[valuesOffset++] << 15) | (values[valuesOffset] >>> 46); - blocks[blocksOffset++] = (values[valuesOffset++] << 18) | (values[valuesOffset] >>> 43); - blocks[blocksOffset++] = (values[valuesOffset++] << 21) | (values[valuesOffset] >>> 40); - blocks[blocksOffset++] = (values[valuesOffset++] << 24) | (values[valuesOffset] >>> 37); - blocks[blocksOffset++] = (values[valuesOffset++] << 27) | (values[valuesOffset] >>> 34); - blocks[blocksOffset++] = (values[valuesOffset++] << 30) | (values[valuesOffset] >>> 31); - blocks[blocksOffset++] = (values[valuesOffset++] << 33) | (values[valuesOffset] >>> 28); - blocks[blocksOffset++] = (values[valuesOffset++] << 36) | (values[valuesOffset] >>> 25); - blocks[blocksOffset++] = (values[valuesOffset++] << 39) | (values[valuesOffset] >>> 22); - blocks[blocksOffset++] = (values[valuesOffset++] << 42) | (values[valuesOffset] >>> 19); - blocks[blocksOffset++] = (values[valuesOffset++] << 45) | (values[valuesOffset] >>> 16); - blocks[blocksOffset++] = (values[valuesOffset++] << 48) | (values[valuesOffset] >>> 13); - blocks[blocksOffset++] = (values[valuesOffset++] << 51) | (values[valuesOffset] >>> 10); - blocks[blocksOffset++] = (values[valuesOffset++] << 54) | (values[valuesOffset] >>> 7); - blocks[blocksOffset++] = (values[valuesOffset++] << 57) | (values[valuesOffset] >>> 4); - blocks[blocksOffset++] = (values[valuesOffset++] << 60) | (values[valuesOffset] >>> 1); - blocks[blocksOffset++] = (values[valuesOffset++] << 63) | (values[valuesOffset++] << 2) | (values[valuesOffset] >>> 59); - blocks[blocksOffset++] = (values[valuesOffset++] << 5) | (values[valuesOffset] >>> 56); - blocks[blocksOffset++] = (values[valuesOffset++] << 8) | (values[valuesOffset] >>> 53); - blocks[blocksOffset++] = (values[valuesOffset++] << 11) | (values[valuesOffset] >>> 50); - blocks[blocksOffset++] = (values[valuesOffset++] << 14) | (values[valuesOffset] >>> 47); - blocks[blocksOffset++] = (values[valuesOffset++] << 17) | (values[valuesOffset] >>> 44); - blocks[blocksOffset++] = (values[valuesOffset++] << 20) | (values[valuesOffset] >>> 41); - blocks[blocksOffset++] = (values[valuesOffset++] << 23) | (values[valuesOffset] >>> 38); - blocks[blocksOffset++] = (values[valuesOffset++] << 26) | (values[valuesOffset] >>> 35); - blocks[blocksOffset++] = (values[valuesOffset++] << 29) | (values[valuesOffset] >>> 32); - blocks[blocksOffset++] = (values[valuesOffset++] << 32) | (values[valuesOffset] >>> 29); - blocks[blocksOffset++] = (values[valuesOffset++] << 35) | (values[valuesOffset] >>> 26); - blocks[blocksOffset++] = (values[valuesOffset++] << 38) | (values[valuesOffset] >>> 23); - blocks[blocksOffset++] = (values[valuesOffset++] << 41) | (values[valuesOffset] >>> 20); - blocks[blocksOffset++] = (values[valuesOffset++] << 44) | (values[valuesOffset] >>> 17); - blocks[blocksOffset++] = (values[valuesOffset++] << 47) | (values[valuesOffset] >>> 14); - blocks[blocksOffset++] = (values[valuesOffset++] << 50) | (values[valuesOffset] >>> 11); - blocks[blocksOffset++] = (values[valuesOffset++] << 53) | (values[valuesOffset] >>> 8); - blocks[blocksOffset++] = (values[valuesOffset++] << 56) | (values[valuesOffset] >>> 5); - blocks[blocksOffset++] = (values[valuesOffset++] << 59) | (values[valuesOffset] >>> 2); - blocks[blocksOffset++] = (values[valuesOffset++] << 62) | (values[valuesOffset++] << 1) | (values[valuesOffset] >>> 60); - blocks[blocksOffset++] = (values[valuesOffset++] << 4) | (values[valuesOffset] >>> 57); - blocks[blocksOffset++] = (values[valuesOffset++] << 7) | (values[valuesOffset] >>> 54); - blocks[blocksOffset++] = (values[valuesOffset++] << 10) | (values[valuesOffset] >>> 51); - blocks[blocksOffset++] = (values[valuesOffset++] << 13) | (values[valuesOffset] >>> 48); - blocks[blocksOffset++] = (values[valuesOffset++] << 16) | (values[valuesOffset] >>> 45); - blocks[blocksOffset++] = (values[valuesOffset++] << 19) | (values[valuesOffset] >>> 42); - blocks[blocksOffset++] = (values[valuesOffset++] << 22) | (values[valuesOffset] >>> 39); - blocks[blocksOffset++] = (values[valuesOffset++] << 25) | (values[valuesOffset] >>> 36); - blocks[blocksOffset++] = (values[valuesOffset++] << 28) | (values[valuesOffset] >>> 33); - blocks[blocksOffset++] = (values[valuesOffset++] << 31) | (values[valuesOffset] >>> 30); - blocks[blocksOffset++] = (values[valuesOffset++] << 34) | (values[valuesOffset] >>> 27); - blocks[blocksOffset++] = (values[valuesOffset++] << 37) | (values[valuesOffset] >>> 24); - blocks[blocksOffset++] = (values[valuesOffset++] << 40) | (values[valuesOffset] >>> 21); - blocks[blocksOffset++] = (values[valuesOffset++] << 43) | (values[valuesOffset] >>> 18); - blocks[blocksOffset++] = (values[valuesOffset++] << 46) | (values[valuesOffset] >>> 15); - blocks[blocksOffset++] = (values[valuesOffset++] << 49) | (values[valuesOffset] >>> 12); - blocks[blocksOffset++] = (values[valuesOffset++] << 52) | (values[valuesOffset] >>> 9); - blocks[blocksOffset++] = (values[valuesOffset++] << 55) | (values[valuesOffset] >>> 6); - blocks[blocksOffset++] = (values[valuesOffset++] << 58) | (values[valuesOffset] >>> 3); - blocks[blocksOffset++] = (values[valuesOffset++] << 61) | values[valuesOffset++]; - } - } - -} diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked62.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked62.java deleted file mode 100644 index 90c518049a4..00000000000 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked62.java +++ /dev/null @@ -1,483 +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 BulkOperationPacked62 extends BulkOperation { - @Override - public int blockCount() { - return 31; - } - - @Override - public int valueCount() { - return 32; - } - - @Override - public void decode(long[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) { - throw new UnsupportedOperationException(); - } - - @Override - public void decode(byte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) { - throw new UnsupportedOperationException(); - } - - @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 >>> 2; - final long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block0 & 3L) << 60) | (block1 >>> 4); - final long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block1 & 15L) << 58) | (block2 >>> 6); - final long block3 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block2 & 63L) << 56) | (block3 >>> 8); - final long block4 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block3 & 255L) << 54) | (block4 >>> 10); - final long block5 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block4 & 1023L) << 52) | (block5 >>> 12); - final long block6 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block5 & 4095L) << 50) | (block6 >>> 14); - final long block7 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block6 & 16383L) << 48) | (block7 >>> 16); - final long block8 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block7 & 65535L) << 46) | (block8 >>> 18); - final long block9 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block8 & 262143L) << 44) | (block9 >>> 20); - final long block10 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block9 & 1048575L) << 42) | (block10 >>> 22); - final long block11 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block10 & 4194303L) << 40) | (block11 >>> 24); - final long block12 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block11 & 16777215L) << 38) | (block12 >>> 26); - final long block13 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block12 & 67108863L) << 36) | (block13 >>> 28); - final long block14 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block13 & 268435455L) << 34) | (block14 >>> 30); - final long block15 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block14 & 1073741823L) << 32) | (block15 >>> 32); - final long block16 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block15 & 4294967295L) << 30) | (block16 >>> 34); - final long block17 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block16 & 17179869183L) << 28) | (block17 >>> 36); - final long block18 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block17 & 68719476735L) << 26) | (block18 >>> 38); - final long block19 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block18 & 274877906943L) << 24) | (block19 >>> 40); - final long block20 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block19 & 1099511627775L) << 22) | (block20 >>> 42); - final long block21 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block20 & 4398046511103L) << 20) | (block21 >>> 44); - final long block22 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block21 & 17592186044415L) << 18) | (block22 >>> 46); - final long block23 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block22 & 70368744177663L) << 16) | (block23 >>> 48); - final long block24 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block23 & 281474976710655L) << 14) | (block24 >>> 50); - final long block25 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block24 & 1125899906842623L) << 12) | (block25 >>> 52); - final long block26 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block25 & 4503599627370495L) << 10) | (block26 >>> 54); - final long block27 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block26 & 18014398509481983L) << 8) | (block27 >>> 56); - final long block28 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block27 & 72057594037927935L) << 6) | (block28 >>> 58); - final long block29 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block28 & 288230376151711743L) << 4) | (block29 >>> 60); - final long block30 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block29 & 1152921504606846975L) << 2) | (block30 >>> 62); - values[valuesOffset++] = block30 & 4611686018427387903L; - } - } - - @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; - final long byte3 = blocks[blocksOffset++] & 0xFF; - final long byte4 = blocks[blocksOffset++] & 0xFF; - final long byte5 = blocks[blocksOffset++] & 0xFF; - final long byte6 = blocks[blocksOffset++] & 0xFF; - final long byte7 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte0 << 54) | (byte1 << 46) | (byte2 << 38) | (byte3 << 30) | (byte4 << 22) | (byte5 << 14) | (byte6 << 6) | (byte7 >>> 2); - final long byte8 = blocks[blocksOffset++] & 0xFF; - final long byte9 = blocks[blocksOffset++] & 0xFF; - final long byte10 = blocks[blocksOffset++] & 0xFF; - final long byte11 = blocks[blocksOffset++] & 0xFF; - final long byte12 = blocks[blocksOffset++] & 0xFF; - final long byte13 = blocks[blocksOffset++] & 0xFF; - final long byte14 = blocks[blocksOffset++] & 0xFF; - final long byte15 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte7 & 3) << 60) | (byte8 << 52) | (byte9 << 44) | (byte10 << 36) | (byte11 << 28) | (byte12 << 20) | (byte13 << 12) | (byte14 << 4) | (byte15 >>> 4); - final long byte16 = blocks[blocksOffset++] & 0xFF; - final long byte17 = blocks[blocksOffset++] & 0xFF; - final long byte18 = blocks[blocksOffset++] & 0xFF; - final long byte19 = blocks[blocksOffset++] & 0xFF; - final long byte20 = blocks[blocksOffset++] & 0xFF; - final long byte21 = blocks[blocksOffset++] & 0xFF; - final long byte22 = blocks[blocksOffset++] & 0xFF; - final long byte23 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte15 & 15) << 58) | (byte16 << 50) | (byte17 << 42) | (byte18 << 34) | (byte19 << 26) | (byte20 << 18) | (byte21 << 10) | (byte22 << 2) | (byte23 >>> 6); - final long byte24 = blocks[blocksOffset++] & 0xFF; - final long byte25 = blocks[blocksOffset++] & 0xFF; - final long byte26 = blocks[blocksOffset++] & 0xFF; - final long byte27 = blocks[blocksOffset++] & 0xFF; - final long byte28 = blocks[blocksOffset++] & 0xFF; - final long byte29 = blocks[blocksOffset++] & 0xFF; - final long byte30 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte23 & 63) << 56) | (byte24 << 48) | (byte25 << 40) | (byte26 << 32) | (byte27 << 24) | (byte28 << 16) | (byte29 << 8) | byte30; - final long byte31 = blocks[blocksOffset++] & 0xFF; - final long byte32 = blocks[blocksOffset++] & 0xFF; - final long byte33 = blocks[blocksOffset++] & 0xFF; - final long byte34 = blocks[blocksOffset++] & 0xFF; - final long byte35 = blocks[blocksOffset++] & 0xFF; - final long byte36 = blocks[blocksOffset++] & 0xFF; - final long byte37 = blocks[blocksOffset++] & 0xFF; - final long byte38 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte31 << 54) | (byte32 << 46) | (byte33 << 38) | (byte34 << 30) | (byte35 << 22) | (byte36 << 14) | (byte37 << 6) | (byte38 >>> 2); - final long byte39 = blocks[blocksOffset++] & 0xFF; - final long byte40 = blocks[blocksOffset++] & 0xFF; - final long byte41 = blocks[blocksOffset++] & 0xFF; - final long byte42 = blocks[blocksOffset++] & 0xFF; - final long byte43 = blocks[blocksOffset++] & 0xFF; - final long byte44 = blocks[blocksOffset++] & 0xFF; - final long byte45 = blocks[blocksOffset++] & 0xFF; - final long byte46 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte38 & 3) << 60) | (byte39 << 52) | (byte40 << 44) | (byte41 << 36) | (byte42 << 28) | (byte43 << 20) | (byte44 << 12) | (byte45 << 4) | (byte46 >>> 4); - final long byte47 = blocks[blocksOffset++] & 0xFF; - final long byte48 = blocks[blocksOffset++] & 0xFF; - final long byte49 = blocks[blocksOffset++] & 0xFF; - final long byte50 = blocks[blocksOffset++] & 0xFF; - final long byte51 = blocks[blocksOffset++] & 0xFF; - final long byte52 = blocks[blocksOffset++] & 0xFF; - final long byte53 = blocks[blocksOffset++] & 0xFF; - final long byte54 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte46 & 15) << 58) | (byte47 << 50) | (byte48 << 42) | (byte49 << 34) | (byte50 << 26) | (byte51 << 18) | (byte52 << 10) | (byte53 << 2) | (byte54 >>> 6); - final long byte55 = blocks[blocksOffset++] & 0xFF; - final long byte56 = blocks[blocksOffset++] & 0xFF; - final long byte57 = blocks[blocksOffset++] & 0xFF; - final long byte58 = blocks[blocksOffset++] & 0xFF; - final long byte59 = blocks[blocksOffset++] & 0xFF; - final long byte60 = blocks[blocksOffset++] & 0xFF; - final long byte61 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte54 & 63) << 56) | (byte55 << 48) | (byte56 << 40) | (byte57 << 32) | (byte58 << 24) | (byte59 << 16) | (byte60 << 8) | byte61; - final long byte62 = blocks[blocksOffset++] & 0xFF; - final long byte63 = blocks[blocksOffset++] & 0xFF; - final long byte64 = blocks[blocksOffset++] & 0xFF; - final long byte65 = blocks[blocksOffset++] & 0xFF; - final long byte66 = blocks[blocksOffset++] & 0xFF; - final long byte67 = blocks[blocksOffset++] & 0xFF; - final long byte68 = blocks[blocksOffset++] & 0xFF; - final long byte69 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte62 << 54) | (byte63 << 46) | (byte64 << 38) | (byte65 << 30) | (byte66 << 22) | (byte67 << 14) | (byte68 << 6) | (byte69 >>> 2); - final long byte70 = blocks[blocksOffset++] & 0xFF; - final long byte71 = blocks[blocksOffset++] & 0xFF; - final long byte72 = blocks[blocksOffset++] & 0xFF; - final long byte73 = blocks[blocksOffset++] & 0xFF; - final long byte74 = blocks[blocksOffset++] & 0xFF; - final long byte75 = blocks[blocksOffset++] & 0xFF; - final long byte76 = blocks[blocksOffset++] & 0xFF; - final long byte77 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte69 & 3) << 60) | (byte70 << 52) | (byte71 << 44) | (byte72 << 36) | (byte73 << 28) | (byte74 << 20) | (byte75 << 12) | (byte76 << 4) | (byte77 >>> 4); - final long byte78 = blocks[blocksOffset++] & 0xFF; - final long byte79 = blocks[blocksOffset++] & 0xFF; - final long byte80 = blocks[blocksOffset++] & 0xFF; - final long byte81 = blocks[blocksOffset++] & 0xFF; - final long byte82 = blocks[blocksOffset++] & 0xFF; - final long byte83 = blocks[blocksOffset++] & 0xFF; - final long byte84 = blocks[blocksOffset++] & 0xFF; - final long byte85 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte77 & 15) << 58) | (byte78 << 50) | (byte79 << 42) | (byte80 << 34) | (byte81 << 26) | (byte82 << 18) | (byte83 << 10) | (byte84 << 2) | (byte85 >>> 6); - final long byte86 = blocks[blocksOffset++] & 0xFF; - final long byte87 = blocks[blocksOffset++] & 0xFF; - final long byte88 = blocks[blocksOffset++] & 0xFF; - final long byte89 = blocks[blocksOffset++] & 0xFF; - final long byte90 = blocks[blocksOffset++] & 0xFF; - final long byte91 = blocks[blocksOffset++] & 0xFF; - final long byte92 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte85 & 63) << 56) | (byte86 << 48) | (byte87 << 40) | (byte88 << 32) | (byte89 << 24) | (byte90 << 16) | (byte91 << 8) | byte92; - final long byte93 = blocks[blocksOffset++] & 0xFF; - final long byte94 = blocks[blocksOffset++] & 0xFF; - final long byte95 = blocks[blocksOffset++] & 0xFF; - final long byte96 = blocks[blocksOffset++] & 0xFF; - final long byte97 = blocks[blocksOffset++] & 0xFF; - final long byte98 = blocks[blocksOffset++] & 0xFF; - final long byte99 = blocks[blocksOffset++] & 0xFF; - final long byte100 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte93 << 54) | (byte94 << 46) | (byte95 << 38) | (byte96 << 30) | (byte97 << 22) | (byte98 << 14) | (byte99 << 6) | (byte100 >>> 2); - final long byte101 = blocks[blocksOffset++] & 0xFF; - final long byte102 = blocks[blocksOffset++] & 0xFF; - final long byte103 = blocks[blocksOffset++] & 0xFF; - final long byte104 = blocks[blocksOffset++] & 0xFF; - final long byte105 = blocks[blocksOffset++] & 0xFF; - final long byte106 = blocks[blocksOffset++] & 0xFF; - final long byte107 = blocks[blocksOffset++] & 0xFF; - final long byte108 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte100 & 3) << 60) | (byte101 << 52) | (byte102 << 44) | (byte103 << 36) | (byte104 << 28) | (byte105 << 20) | (byte106 << 12) | (byte107 << 4) | (byte108 >>> 4); - final long byte109 = blocks[blocksOffset++] & 0xFF; - final long byte110 = blocks[blocksOffset++] & 0xFF; - final long byte111 = blocks[blocksOffset++] & 0xFF; - final long byte112 = blocks[blocksOffset++] & 0xFF; - final long byte113 = blocks[blocksOffset++] & 0xFF; - final long byte114 = blocks[blocksOffset++] & 0xFF; - final long byte115 = blocks[blocksOffset++] & 0xFF; - final long byte116 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte108 & 15) << 58) | (byte109 << 50) | (byte110 << 42) | (byte111 << 34) | (byte112 << 26) | (byte113 << 18) | (byte114 << 10) | (byte115 << 2) | (byte116 >>> 6); - final long byte117 = blocks[blocksOffset++] & 0xFF; - final long byte118 = blocks[blocksOffset++] & 0xFF; - final long byte119 = blocks[blocksOffset++] & 0xFF; - final long byte120 = blocks[blocksOffset++] & 0xFF; - final long byte121 = blocks[blocksOffset++] & 0xFF; - final long byte122 = blocks[blocksOffset++] & 0xFF; - final long byte123 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte116 & 63) << 56) | (byte117 << 48) | (byte118 << 40) | (byte119 << 32) | (byte120 << 24) | (byte121 << 16) | (byte122 << 8) | byte123; - final long byte124 = blocks[blocksOffset++] & 0xFF; - final long byte125 = blocks[blocksOffset++] & 0xFF; - final long byte126 = blocks[blocksOffset++] & 0xFF; - final long byte127 = blocks[blocksOffset++] & 0xFF; - final long byte128 = blocks[blocksOffset++] & 0xFF; - final long byte129 = blocks[blocksOffset++] & 0xFF; - final long byte130 = blocks[blocksOffset++] & 0xFF; - final long byte131 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte124 << 54) | (byte125 << 46) | (byte126 << 38) | (byte127 << 30) | (byte128 << 22) | (byte129 << 14) | (byte130 << 6) | (byte131 >>> 2); - final long byte132 = blocks[blocksOffset++] & 0xFF; - final long byte133 = blocks[blocksOffset++] & 0xFF; - final long byte134 = blocks[blocksOffset++] & 0xFF; - final long byte135 = blocks[blocksOffset++] & 0xFF; - final long byte136 = blocks[blocksOffset++] & 0xFF; - final long byte137 = blocks[blocksOffset++] & 0xFF; - final long byte138 = blocks[blocksOffset++] & 0xFF; - final long byte139 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte131 & 3) << 60) | (byte132 << 52) | (byte133 << 44) | (byte134 << 36) | (byte135 << 28) | (byte136 << 20) | (byte137 << 12) | (byte138 << 4) | (byte139 >>> 4); - final long byte140 = blocks[blocksOffset++] & 0xFF; - final long byte141 = blocks[blocksOffset++] & 0xFF; - final long byte142 = blocks[blocksOffset++] & 0xFF; - final long byte143 = blocks[blocksOffset++] & 0xFF; - final long byte144 = blocks[blocksOffset++] & 0xFF; - final long byte145 = blocks[blocksOffset++] & 0xFF; - final long byte146 = blocks[blocksOffset++] & 0xFF; - final long byte147 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte139 & 15) << 58) | (byte140 << 50) | (byte141 << 42) | (byte142 << 34) | (byte143 << 26) | (byte144 << 18) | (byte145 << 10) | (byte146 << 2) | (byte147 >>> 6); - final long byte148 = blocks[blocksOffset++] & 0xFF; - final long byte149 = blocks[blocksOffset++] & 0xFF; - final long byte150 = blocks[blocksOffset++] & 0xFF; - final long byte151 = blocks[blocksOffset++] & 0xFF; - final long byte152 = blocks[blocksOffset++] & 0xFF; - final long byte153 = blocks[blocksOffset++] & 0xFF; - final long byte154 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte147 & 63) << 56) | (byte148 << 48) | (byte149 << 40) | (byte150 << 32) | (byte151 << 24) | (byte152 << 16) | (byte153 << 8) | byte154; - final long byte155 = blocks[blocksOffset++] & 0xFF; - final long byte156 = blocks[blocksOffset++] & 0xFF; - final long byte157 = blocks[blocksOffset++] & 0xFF; - final long byte158 = blocks[blocksOffset++] & 0xFF; - final long byte159 = blocks[blocksOffset++] & 0xFF; - final long byte160 = blocks[blocksOffset++] & 0xFF; - final long byte161 = blocks[blocksOffset++] & 0xFF; - final long byte162 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte155 << 54) | (byte156 << 46) | (byte157 << 38) | (byte158 << 30) | (byte159 << 22) | (byte160 << 14) | (byte161 << 6) | (byte162 >>> 2); - final long byte163 = blocks[blocksOffset++] & 0xFF; - final long byte164 = blocks[blocksOffset++] & 0xFF; - final long byte165 = blocks[blocksOffset++] & 0xFF; - final long byte166 = blocks[blocksOffset++] & 0xFF; - final long byte167 = blocks[blocksOffset++] & 0xFF; - final long byte168 = blocks[blocksOffset++] & 0xFF; - final long byte169 = blocks[blocksOffset++] & 0xFF; - final long byte170 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte162 & 3) << 60) | (byte163 << 52) | (byte164 << 44) | (byte165 << 36) | (byte166 << 28) | (byte167 << 20) | (byte168 << 12) | (byte169 << 4) | (byte170 >>> 4); - final long byte171 = blocks[blocksOffset++] & 0xFF; - final long byte172 = blocks[blocksOffset++] & 0xFF; - final long byte173 = blocks[blocksOffset++] & 0xFF; - final long byte174 = blocks[blocksOffset++] & 0xFF; - final long byte175 = blocks[blocksOffset++] & 0xFF; - final long byte176 = blocks[blocksOffset++] & 0xFF; - final long byte177 = blocks[blocksOffset++] & 0xFF; - final long byte178 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte170 & 15) << 58) | (byte171 << 50) | (byte172 << 42) | (byte173 << 34) | (byte174 << 26) | (byte175 << 18) | (byte176 << 10) | (byte177 << 2) | (byte178 >>> 6); - final long byte179 = blocks[blocksOffset++] & 0xFF; - final long byte180 = blocks[blocksOffset++] & 0xFF; - final long byte181 = blocks[blocksOffset++] & 0xFF; - final long byte182 = blocks[blocksOffset++] & 0xFF; - final long byte183 = blocks[blocksOffset++] & 0xFF; - final long byte184 = blocks[blocksOffset++] & 0xFF; - final long byte185 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte178 & 63) << 56) | (byte179 << 48) | (byte180 << 40) | (byte181 << 32) | (byte182 << 24) | (byte183 << 16) | (byte184 << 8) | byte185; - final long byte186 = blocks[blocksOffset++] & 0xFF; - final long byte187 = blocks[blocksOffset++] & 0xFF; - final long byte188 = blocks[blocksOffset++] & 0xFF; - final long byte189 = blocks[blocksOffset++] & 0xFF; - final long byte190 = blocks[blocksOffset++] & 0xFF; - final long byte191 = blocks[blocksOffset++] & 0xFF; - final long byte192 = blocks[blocksOffset++] & 0xFF; - final long byte193 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte186 << 54) | (byte187 << 46) | (byte188 << 38) | (byte189 << 30) | (byte190 << 22) | (byte191 << 14) | (byte192 << 6) | (byte193 >>> 2); - final long byte194 = blocks[blocksOffset++] & 0xFF; - final long byte195 = blocks[blocksOffset++] & 0xFF; - final long byte196 = blocks[blocksOffset++] & 0xFF; - final long byte197 = blocks[blocksOffset++] & 0xFF; - final long byte198 = blocks[blocksOffset++] & 0xFF; - final long byte199 = blocks[blocksOffset++] & 0xFF; - final long byte200 = blocks[blocksOffset++] & 0xFF; - final long byte201 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte193 & 3) << 60) | (byte194 << 52) | (byte195 << 44) | (byte196 << 36) | (byte197 << 28) | (byte198 << 20) | (byte199 << 12) | (byte200 << 4) | (byte201 >>> 4); - final long byte202 = blocks[blocksOffset++] & 0xFF; - final long byte203 = blocks[blocksOffset++] & 0xFF; - final long byte204 = blocks[blocksOffset++] & 0xFF; - final long byte205 = blocks[blocksOffset++] & 0xFF; - final long byte206 = blocks[blocksOffset++] & 0xFF; - final long byte207 = blocks[blocksOffset++] & 0xFF; - final long byte208 = blocks[blocksOffset++] & 0xFF; - final long byte209 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte201 & 15) << 58) | (byte202 << 50) | (byte203 << 42) | (byte204 << 34) | (byte205 << 26) | (byte206 << 18) | (byte207 << 10) | (byte208 << 2) | (byte209 >>> 6); - final long byte210 = blocks[blocksOffset++] & 0xFF; - final long byte211 = blocks[blocksOffset++] & 0xFF; - final long byte212 = blocks[blocksOffset++] & 0xFF; - final long byte213 = blocks[blocksOffset++] & 0xFF; - final long byte214 = blocks[blocksOffset++] & 0xFF; - final long byte215 = blocks[blocksOffset++] & 0xFF; - final long byte216 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte209 & 63) << 56) | (byte210 << 48) | (byte211 << 40) | (byte212 << 32) | (byte213 << 24) | (byte214 << 16) | (byte215 << 8) | byte216; - final long byte217 = blocks[blocksOffset++] & 0xFF; - final long byte218 = blocks[blocksOffset++] & 0xFF; - final long byte219 = blocks[blocksOffset++] & 0xFF; - final long byte220 = blocks[blocksOffset++] & 0xFF; - final long byte221 = blocks[blocksOffset++] & 0xFF; - final long byte222 = blocks[blocksOffset++] & 0xFF; - final long byte223 = blocks[blocksOffset++] & 0xFF; - final long byte224 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte217 << 54) | (byte218 << 46) | (byte219 << 38) | (byte220 << 30) | (byte221 << 22) | (byte222 << 14) | (byte223 << 6) | (byte224 >>> 2); - final long byte225 = blocks[blocksOffset++] & 0xFF; - final long byte226 = blocks[blocksOffset++] & 0xFF; - final long byte227 = blocks[blocksOffset++] & 0xFF; - final long byte228 = blocks[blocksOffset++] & 0xFF; - final long byte229 = blocks[blocksOffset++] & 0xFF; - final long byte230 = blocks[blocksOffset++] & 0xFF; - final long byte231 = blocks[blocksOffset++] & 0xFF; - final long byte232 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte224 & 3) << 60) | (byte225 << 52) | (byte226 << 44) | (byte227 << 36) | (byte228 << 28) | (byte229 << 20) | (byte230 << 12) | (byte231 << 4) | (byte232 >>> 4); - final long byte233 = blocks[blocksOffset++] & 0xFF; - final long byte234 = blocks[blocksOffset++] & 0xFF; - final long byte235 = blocks[blocksOffset++] & 0xFF; - final long byte236 = blocks[blocksOffset++] & 0xFF; - final long byte237 = blocks[blocksOffset++] & 0xFF; - final long byte238 = blocks[blocksOffset++] & 0xFF; - final long byte239 = blocks[blocksOffset++] & 0xFF; - final long byte240 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte232 & 15) << 58) | (byte233 << 50) | (byte234 << 42) | (byte235 << 34) | (byte236 << 26) | (byte237 << 18) | (byte238 << 10) | (byte239 << 2) | (byte240 >>> 6); - final long byte241 = blocks[blocksOffset++] & 0xFF; - final long byte242 = blocks[blocksOffset++] & 0xFF; - final long byte243 = blocks[blocksOffset++] & 0xFF; - final long byte244 = blocks[blocksOffset++] & 0xFF; - final long byte245 = blocks[blocksOffset++] & 0xFF; - final long byte246 = blocks[blocksOffset++] & 0xFF; - final long byte247 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte240 & 63) << 56) | (byte241 << 48) | (byte242 << 40) | (byte243 << 32) | (byte244 << 24) | (byte245 << 16) | (byte246 << 8) | byte247; - } - } - - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 2) | ((values[valuesOffset] & 0xffffffffL) >>> 60); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 4) | ((values[valuesOffset] & 0xffffffffL) >>> 58); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 6) | ((values[valuesOffset] & 0xffffffffL) >>> 56); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 8) | ((values[valuesOffset] & 0xffffffffL) >>> 54); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 10) | ((values[valuesOffset] & 0xffffffffL) >>> 52); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 12) | ((values[valuesOffset] & 0xffffffffL) >>> 50); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 14) | ((values[valuesOffset] & 0xffffffffL) >>> 48); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 16) | ((values[valuesOffset] & 0xffffffffL) >>> 46); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 18) | ((values[valuesOffset] & 0xffffffffL) >>> 44); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 20) | ((values[valuesOffset] & 0xffffffffL) >>> 42); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 22) | ((values[valuesOffset] & 0xffffffffL) >>> 40); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 24) | ((values[valuesOffset] & 0xffffffffL) >>> 38); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 26) | ((values[valuesOffset] & 0xffffffffL) >>> 36); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 28) | ((values[valuesOffset] & 0xffffffffL) >>> 34); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 30) | ((values[valuesOffset] & 0xffffffffL) >>> 32); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 32) | ((values[valuesOffset] & 0xffffffffL) >>> 30); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 34) | ((values[valuesOffset] & 0xffffffffL) >>> 28); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 36) | ((values[valuesOffset] & 0xffffffffL) >>> 26); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 38) | ((values[valuesOffset] & 0xffffffffL) >>> 24); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 40) | ((values[valuesOffset] & 0xffffffffL) >>> 22); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 42) | ((values[valuesOffset] & 0xffffffffL) >>> 20); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 44) | ((values[valuesOffset] & 0xffffffffL) >>> 18); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 46) | ((values[valuesOffset] & 0xffffffffL) >>> 16); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 48) | ((values[valuesOffset] & 0xffffffffL) >>> 14); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 50) | ((values[valuesOffset] & 0xffffffffL) >>> 12); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 52) | ((values[valuesOffset] & 0xffffffffL) >>> 10); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 54) | ((values[valuesOffset] & 0xffffffffL) >>> 8); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 56) | ((values[valuesOffset] & 0xffffffffL) >>> 6); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 58) | ((values[valuesOffset] & 0xffffffffL) >>> 4); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 60) | ((values[valuesOffset] & 0xffffffffL) >>> 2); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 62) | (values[valuesOffset++] & 0xffffffffL); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] << 2) | (values[valuesOffset] >>> 60); - blocks[blocksOffset++] = (values[valuesOffset++] << 4) | (values[valuesOffset] >>> 58); - blocks[blocksOffset++] = (values[valuesOffset++] << 6) | (values[valuesOffset] >>> 56); - blocks[blocksOffset++] = (values[valuesOffset++] << 8) | (values[valuesOffset] >>> 54); - blocks[blocksOffset++] = (values[valuesOffset++] << 10) | (values[valuesOffset] >>> 52); - blocks[blocksOffset++] = (values[valuesOffset++] << 12) | (values[valuesOffset] >>> 50); - blocks[blocksOffset++] = (values[valuesOffset++] << 14) | (values[valuesOffset] >>> 48); - blocks[blocksOffset++] = (values[valuesOffset++] << 16) | (values[valuesOffset] >>> 46); - blocks[blocksOffset++] = (values[valuesOffset++] << 18) | (values[valuesOffset] >>> 44); - blocks[blocksOffset++] = (values[valuesOffset++] << 20) | (values[valuesOffset] >>> 42); - blocks[blocksOffset++] = (values[valuesOffset++] << 22) | (values[valuesOffset] >>> 40); - blocks[blocksOffset++] = (values[valuesOffset++] << 24) | (values[valuesOffset] >>> 38); - blocks[blocksOffset++] = (values[valuesOffset++] << 26) | (values[valuesOffset] >>> 36); - blocks[blocksOffset++] = (values[valuesOffset++] << 28) | (values[valuesOffset] >>> 34); - blocks[blocksOffset++] = (values[valuesOffset++] << 30) | (values[valuesOffset] >>> 32); - blocks[blocksOffset++] = (values[valuesOffset++] << 32) | (values[valuesOffset] >>> 30); - blocks[blocksOffset++] = (values[valuesOffset++] << 34) | (values[valuesOffset] >>> 28); - blocks[blocksOffset++] = (values[valuesOffset++] << 36) | (values[valuesOffset] >>> 26); - blocks[blocksOffset++] = (values[valuesOffset++] << 38) | (values[valuesOffset] >>> 24); - blocks[blocksOffset++] = (values[valuesOffset++] << 40) | (values[valuesOffset] >>> 22); - blocks[blocksOffset++] = (values[valuesOffset++] << 42) | (values[valuesOffset] >>> 20); - blocks[blocksOffset++] = (values[valuesOffset++] << 44) | (values[valuesOffset] >>> 18); - blocks[blocksOffset++] = (values[valuesOffset++] << 46) | (values[valuesOffset] >>> 16); - blocks[blocksOffset++] = (values[valuesOffset++] << 48) | (values[valuesOffset] >>> 14); - blocks[blocksOffset++] = (values[valuesOffset++] << 50) | (values[valuesOffset] >>> 12); - blocks[blocksOffset++] = (values[valuesOffset++] << 52) | (values[valuesOffset] >>> 10); - blocks[blocksOffset++] = (values[valuesOffset++] << 54) | (values[valuesOffset] >>> 8); - blocks[blocksOffset++] = (values[valuesOffset++] << 56) | (values[valuesOffset] >>> 6); - blocks[blocksOffset++] = (values[valuesOffset++] << 58) | (values[valuesOffset] >>> 4); - blocks[blocksOffset++] = (values[valuesOffset++] << 60) | (values[valuesOffset] >>> 2); - blocks[blocksOffset++] = (values[valuesOffset++] << 62) | values[valuesOffset++]; - } - } - -} diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked63.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked63.java deleted file mode 100644 index 8736d6301aa..00000000000 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked63.java +++ /dev/null @@ -1,899 +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 BulkOperationPacked63 extends BulkOperation { - @Override - public int blockCount() { - return 63; - } - - @Override - public int valueCount() { - return 64; - } - - @Override - public void decode(long[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) { - throw new UnsupportedOperationException(); - } - - @Override - public void decode(byte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) { - throw new UnsupportedOperationException(); - } - - @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 >>> 1; - final long block1 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block0 & 1L) << 62) | (block1 >>> 2); - final long block2 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block1 & 3L) << 61) | (block2 >>> 3); - final long block3 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block2 & 7L) << 60) | (block3 >>> 4); - final long block4 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block3 & 15L) << 59) | (block4 >>> 5); - final long block5 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block4 & 31L) << 58) | (block5 >>> 6); - final long block6 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block5 & 63L) << 57) | (block6 >>> 7); - final long block7 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block6 & 127L) << 56) | (block7 >>> 8); - final long block8 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block7 & 255L) << 55) | (block8 >>> 9); - final long block9 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block8 & 511L) << 54) | (block9 >>> 10); - final long block10 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block9 & 1023L) << 53) | (block10 >>> 11); - final long block11 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block10 & 2047L) << 52) | (block11 >>> 12); - final long block12 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block11 & 4095L) << 51) | (block12 >>> 13); - final long block13 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block12 & 8191L) << 50) | (block13 >>> 14); - final long block14 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block13 & 16383L) << 49) | (block14 >>> 15); - final long block15 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block14 & 32767L) << 48) | (block15 >>> 16); - final long block16 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block15 & 65535L) << 47) | (block16 >>> 17); - final long block17 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block16 & 131071L) << 46) | (block17 >>> 18); - final long block18 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block17 & 262143L) << 45) | (block18 >>> 19); - final long block19 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block18 & 524287L) << 44) | (block19 >>> 20); - final long block20 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block19 & 1048575L) << 43) | (block20 >>> 21); - final long block21 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block20 & 2097151L) << 42) | (block21 >>> 22); - final long block22 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block21 & 4194303L) << 41) | (block22 >>> 23); - final long block23 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block22 & 8388607L) << 40) | (block23 >>> 24); - final long block24 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block23 & 16777215L) << 39) | (block24 >>> 25); - final long block25 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block24 & 33554431L) << 38) | (block25 >>> 26); - final long block26 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block25 & 67108863L) << 37) | (block26 >>> 27); - final long block27 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block26 & 134217727L) << 36) | (block27 >>> 28); - final long block28 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block27 & 268435455L) << 35) | (block28 >>> 29); - final long block29 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block28 & 536870911L) << 34) | (block29 >>> 30); - final long block30 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block29 & 1073741823L) << 33) | (block30 >>> 31); - final long block31 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block30 & 2147483647L) << 32) | (block31 >>> 32); - final long block32 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block31 & 4294967295L) << 31) | (block32 >>> 33); - final long block33 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block32 & 8589934591L) << 30) | (block33 >>> 34); - final long block34 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block33 & 17179869183L) << 29) | (block34 >>> 35); - final long block35 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block34 & 34359738367L) << 28) | (block35 >>> 36); - final long block36 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block35 & 68719476735L) << 27) | (block36 >>> 37); - final long block37 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block36 & 137438953471L) << 26) | (block37 >>> 38); - final long block38 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block37 & 274877906943L) << 25) | (block38 >>> 39); - final long block39 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block38 & 549755813887L) << 24) | (block39 >>> 40); - final long block40 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block39 & 1099511627775L) << 23) | (block40 >>> 41); - final long block41 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block40 & 2199023255551L) << 22) | (block41 >>> 42); - final long block42 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block41 & 4398046511103L) << 21) | (block42 >>> 43); - final long block43 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block42 & 8796093022207L) << 20) | (block43 >>> 44); - final long block44 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block43 & 17592186044415L) << 19) | (block44 >>> 45); - final long block45 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block44 & 35184372088831L) << 18) | (block45 >>> 46); - final long block46 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block45 & 70368744177663L) << 17) | (block46 >>> 47); - final long block47 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block46 & 140737488355327L) << 16) | (block47 >>> 48); - final long block48 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block47 & 281474976710655L) << 15) | (block48 >>> 49); - final long block49 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block48 & 562949953421311L) << 14) | (block49 >>> 50); - final long block50 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block49 & 1125899906842623L) << 13) | (block50 >>> 51); - final long block51 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block50 & 2251799813685247L) << 12) | (block51 >>> 52); - final long block52 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block51 & 4503599627370495L) << 11) | (block52 >>> 53); - final long block53 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block52 & 9007199254740991L) << 10) | (block53 >>> 54); - final long block54 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block53 & 18014398509481983L) << 9) | (block54 >>> 55); - final long block55 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block54 & 36028797018963967L) << 8) | (block55 >>> 56); - final long block56 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block55 & 72057594037927935L) << 7) | (block56 >>> 57); - final long block57 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block56 & 144115188075855871L) << 6) | (block57 >>> 58); - final long block58 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block57 & 288230376151711743L) << 5) | (block58 >>> 59); - final long block59 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block58 & 576460752303423487L) << 4) | (block59 >>> 60); - final long block60 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block59 & 1152921504606846975L) << 3) | (block60 >>> 61); - final long block61 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block60 & 2305843009213693951L) << 2) | (block61 >>> 62); - final long block62 = blocks[blocksOffset++]; - values[valuesOffset++] = ((block61 & 4611686018427387903L) << 1) | (block62 >>> 63); - values[valuesOffset++] = block62 & 9223372036854775807L; - } - } - - @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; - final long byte3 = blocks[blocksOffset++] & 0xFF; - final long byte4 = blocks[blocksOffset++] & 0xFF; - final long byte5 = blocks[blocksOffset++] & 0xFF; - final long byte6 = blocks[blocksOffset++] & 0xFF; - final long byte7 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte0 << 55) | (byte1 << 47) | (byte2 << 39) | (byte3 << 31) | (byte4 << 23) | (byte5 << 15) | (byte6 << 7) | (byte7 >>> 1); - final long byte8 = blocks[blocksOffset++] & 0xFF; - final long byte9 = blocks[blocksOffset++] & 0xFF; - final long byte10 = blocks[blocksOffset++] & 0xFF; - final long byte11 = blocks[blocksOffset++] & 0xFF; - final long byte12 = blocks[blocksOffset++] & 0xFF; - final long byte13 = blocks[blocksOffset++] & 0xFF; - final long byte14 = blocks[blocksOffset++] & 0xFF; - final long byte15 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte7 & 1) << 62) | (byte8 << 54) | (byte9 << 46) | (byte10 << 38) | (byte11 << 30) | (byte12 << 22) | (byte13 << 14) | (byte14 << 6) | (byte15 >>> 2); - final long byte16 = blocks[blocksOffset++] & 0xFF; - final long byte17 = blocks[blocksOffset++] & 0xFF; - final long byte18 = blocks[blocksOffset++] & 0xFF; - final long byte19 = blocks[blocksOffset++] & 0xFF; - final long byte20 = blocks[blocksOffset++] & 0xFF; - final long byte21 = blocks[blocksOffset++] & 0xFF; - final long byte22 = blocks[blocksOffset++] & 0xFF; - final long byte23 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte15 & 3) << 61) | (byte16 << 53) | (byte17 << 45) | (byte18 << 37) | (byte19 << 29) | (byte20 << 21) | (byte21 << 13) | (byte22 << 5) | (byte23 >>> 3); - final long byte24 = blocks[blocksOffset++] & 0xFF; - final long byte25 = blocks[blocksOffset++] & 0xFF; - final long byte26 = blocks[blocksOffset++] & 0xFF; - final long byte27 = blocks[blocksOffset++] & 0xFF; - final long byte28 = blocks[blocksOffset++] & 0xFF; - final long byte29 = blocks[blocksOffset++] & 0xFF; - final long byte30 = blocks[blocksOffset++] & 0xFF; - final long byte31 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte23 & 7) << 60) | (byte24 << 52) | (byte25 << 44) | (byte26 << 36) | (byte27 << 28) | (byte28 << 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; - final long byte35 = blocks[blocksOffset++] & 0xFF; - final long byte36 = blocks[blocksOffset++] & 0xFF; - final long byte37 = blocks[blocksOffset++] & 0xFF; - final long byte38 = blocks[blocksOffset++] & 0xFF; - final long byte39 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte31 & 15) << 59) | (byte32 << 51) | (byte33 << 43) | (byte34 << 35) | (byte35 << 27) | (byte36 << 19) | (byte37 << 11) | (byte38 << 3) | (byte39 >>> 5); - final long byte40 = blocks[blocksOffset++] & 0xFF; - final long byte41 = blocks[blocksOffset++] & 0xFF; - final long byte42 = blocks[blocksOffset++] & 0xFF; - final long byte43 = blocks[blocksOffset++] & 0xFF; - final long byte44 = blocks[blocksOffset++] & 0xFF; - final long byte45 = blocks[blocksOffset++] & 0xFF; - final long byte46 = blocks[blocksOffset++] & 0xFF; - final long byte47 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte39 & 31) << 58) | (byte40 << 50) | (byte41 << 42) | (byte42 << 34) | (byte43 << 26) | (byte44 << 18) | (byte45 << 10) | (byte46 << 2) | (byte47 >>> 6); - final long byte48 = blocks[blocksOffset++] & 0xFF; - final long byte49 = blocks[blocksOffset++] & 0xFF; - final long byte50 = blocks[blocksOffset++] & 0xFF; - final long byte51 = blocks[blocksOffset++] & 0xFF; - final long byte52 = blocks[blocksOffset++] & 0xFF; - final long byte53 = blocks[blocksOffset++] & 0xFF; - final long byte54 = blocks[blocksOffset++] & 0xFF; - final long byte55 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte47 & 63) << 57) | (byte48 << 49) | (byte49 << 41) | (byte50 << 33) | (byte51 << 25) | (byte52 << 17) | (byte53 << 9) | (byte54 << 1) | (byte55 >>> 7); - final long byte56 = blocks[blocksOffset++] & 0xFF; - final long byte57 = blocks[blocksOffset++] & 0xFF; - final long byte58 = blocks[blocksOffset++] & 0xFF; - final long byte59 = blocks[blocksOffset++] & 0xFF; - final long byte60 = blocks[blocksOffset++] & 0xFF; - final long byte61 = blocks[blocksOffset++] & 0xFF; - final long byte62 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte55 & 127) << 56) | (byte56 << 48) | (byte57 << 40) | (byte58 << 32) | (byte59 << 24) | (byte60 << 16) | (byte61 << 8) | byte62; - final long byte63 = blocks[blocksOffset++] & 0xFF; - final long byte64 = blocks[blocksOffset++] & 0xFF; - final long byte65 = blocks[blocksOffset++] & 0xFF; - final long byte66 = blocks[blocksOffset++] & 0xFF; - final long byte67 = blocks[blocksOffset++] & 0xFF; - final long byte68 = blocks[blocksOffset++] & 0xFF; - final long byte69 = blocks[blocksOffset++] & 0xFF; - final long byte70 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte63 << 55) | (byte64 << 47) | (byte65 << 39) | (byte66 << 31) | (byte67 << 23) | (byte68 << 15) | (byte69 << 7) | (byte70 >>> 1); - final long byte71 = blocks[blocksOffset++] & 0xFF; - final long byte72 = blocks[blocksOffset++] & 0xFF; - final long byte73 = blocks[blocksOffset++] & 0xFF; - final long byte74 = blocks[blocksOffset++] & 0xFF; - final long byte75 = blocks[blocksOffset++] & 0xFF; - final long byte76 = blocks[blocksOffset++] & 0xFF; - final long byte77 = blocks[blocksOffset++] & 0xFF; - final long byte78 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte70 & 1) << 62) | (byte71 << 54) | (byte72 << 46) | (byte73 << 38) | (byte74 << 30) | (byte75 << 22) | (byte76 << 14) | (byte77 << 6) | (byte78 >>> 2); - final long byte79 = blocks[blocksOffset++] & 0xFF; - final long byte80 = blocks[blocksOffset++] & 0xFF; - final long byte81 = blocks[blocksOffset++] & 0xFF; - final long byte82 = blocks[blocksOffset++] & 0xFF; - final long byte83 = blocks[blocksOffset++] & 0xFF; - final long byte84 = blocks[blocksOffset++] & 0xFF; - final long byte85 = blocks[blocksOffset++] & 0xFF; - final long byte86 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte78 & 3) << 61) | (byte79 << 53) | (byte80 << 45) | (byte81 << 37) | (byte82 << 29) | (byte83 << 21) | (byte84 << 13) | (byte85 << 5) | (byte86 >>> 3); - final long byte87 = blocks[blocksOffset++] & 0xFF; - final long byte88 = blocks[blocksOffset++] & 0xFF; - final long byte89 = blocks[blocksOffset++] & 0xFF; - final long byte90 = blocks[blocksOffset++] & 0xFF; - final long byte91 = blocks[blocksOffset++] & 0xFF; - final long byte92 = blocks[blocksOffset++] & 0xFF; - final long byte93 = blocks[blocksOffset++] & 0xFF; - final long byte94 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte86 & 7) << 60) | (byte87 << 52) | (byte88 << 44) | (byte89 << 36) | (byte90 << 28) | (byte91 << 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; - final long byte98 = blocks[blocksOffset++] & 0xFF; - final long byte99 = blocks[blocksOffset++] & 0xFF; - final long byte100 = blocks[blocksOffset++] & 0xFF; - final long byte101 = blocks[blocksOffset++] & 0xFF; - final long byte102 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte94 & 15) << 59) | (byte95 << 51) | (byte96 << 43) | (byte97 << 35) | (byte98 << 27) | (byte99 << 19) | (byte100 << 11) | (byte101 << 3) | (byte102 >>> 5); - final long byte103 = blocks[blocksOffset++] & 0xFF; - final long byte104 = blocks[blocksOffset++] & 0xFF; - final long byte105 = blocks[blocksOffset++] & 0xFF; - final long byte106 = blocks[blocksOffset++] & 0xFF; - final long byte107 = blocks[blocksOffset++] & 0xFF; - final long byte108 = blocks[blocksOffset++] & 0xFF; - final long byte109 = blocks[blocksOffset++] & 0xFF; - final long byte110 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte102 & 31) << 58) | (byte103 << 50) | (byte104 << 42) | (byte105 << 34) | (byte106 << 26) | (byte107 << 18) | (byte108 << 10) | (byte109 << 2) | (byte110 >>> 6); - final long byte111 = blocks[blocksOffset++] & 0xFF; - final long byte112 = blocks[blocksOffset++] & 0xFF; - final long byte113 = blocks[blocksOffset++] & 0xFF; - final long byte114 = blocks[blocksOffset++] & 0xFF; - final long byte115 = blocks[blocksOffset++] & 0xFF; - final long byte116 = blocks[blocksOffset++] & 0xFF; - final long byte117 = blocks[blocksOffset++] & 0xFF; - final long byte118 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte110 & 63) << 57) | (byte111 << 49) | (byte112 << 41) | (byte113 << 33) | (byte114 << 25) | (byte115 << 17) | (byte116 << 9) | (byte117 << 1) | (byte118 >>> 7); - final long byte119 = blocks[blocksOffset++] & 0xFF; - final long byte120 = blocks[blocksOffset++] & 0xFF; - final long byte121 = blocks[blocksOffset++] & 0xFF; - final long byte122 = blocks[blocksOffset++] & 0xFF; - final long byte123 = blocks[blocksOffset++] & 0xFF; - final long byte124 = blocks[blocksOffset++] & 0xFF; - final long byte125 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte118 & 127) << 56) | (byte119 << 48) | (byte120 << 40) | (byte121 << 32) | (byte122 << 24) | (byte123 << 16) | (byte124 << 8) | byte125; - final long byte126 = blocks[blocksOffset++] & 0xFF; - final long byte127 = blocks[blocksOffset++] & 0xFF; - final long byte128 = blocks[blocksOffset++] & 0xFF; - final long byte129 = blocks[blocksOffset++] & 0xFF; - final long byte130 = blocks[blocksOffset++] & 0xFF; - final long byte131 = blocks[blocksOffset++] & 0xFF; - final long byte132 = blocks[blocksOffset++] & 0xFF; - final long byte133 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte126 << 55) | (byte127 << 47) | (byte128 << 39) | (byte129 << 31) | (byte130 << 23) | (byte131 << 15) | (byte132 << 7) | (byte133 >>> 1); - final long byte134 = blocks[blocksOffset++] & 0xFF; - final long byte135 = blocks[blocksOffset++] & 0xFF; - final long byte136 = blocks[blocksOffset++] & 0xFF; - final long byte137 = blocks[blocksOffset++] & 0xFF; - final long byte138 = blocks[blocksOffset++] & 0xFF; - final long byte139 = blocks[blocksOffset++] & 0xFF; - final long byte140 = blocks[blocksOffset++] & 0xFF; - final long byte141 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte133 & 1) << 62) | (byte134 << 54) | (byte135 << 46) | (byte136 << 38) | (byte137 << 30) | (byte138 << 22) | (byte139 << 14) | (byte140 << 6) | (byte141 >>> 2); - final long byte142 = blocks[blocksOffset++] & 0xFF; - final long byte143 = blocks[blocksOffset++] & 0xFF; - final long byte144 = blocks[blocksOffset++] & 0xFF; - final long byte145 = blocks[blocksOffset++] & 0xFF; - final long byte146 = blocks[blocksOffset++] & 0xFF; - final long byte147 = blocks[blocksOffset++] & 0xFF; - final long byte148 = blocks[blocksOffset++] & 0xFF; - final long byte149 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte141 & 3) << 61) | (byte142 << 53) | (byte143 << 45) | (byte144 << 37) | (byte145 << 29) | (byte146 << 21) | (byte147 << 13) | (byte148 << 5) | (byte149 >>> 3); - final long byte150 = blocks[blocksOffset++] & 0xFF; - final long byte151 = blocks[blocksOffset++] & 0xFF; - final long byte152 = blocks[blocksOffset++] & 0xFF; - final long byte153 = blocks[blocksOffset++] & 0xFF; - final long byte154 = blocks[blocksOffset++] & 0xFF; - final long byte155 = blocks[blocksOffset++] & 0xFF; - final long byte156 = blocks[blocksOffset++] & 0xFF; - final long byte157 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte149 & 7) << 60) | (byte150 << 52) | (byte151 << 44) | (byte152 << 36) | (byte153 << 28) | (byte154 << 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; - final long byte161 = blocks[blocksOffset++] & 0xFF; - final long byte162 = blocks[blocksOffset++] & 0xFF; - final long byte163 = blocks[blocksOffset++] & 0xFF; - final long byte164 = blocks[blocksOffset++] & 0xFF; - final long byte165 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte157 & 15) << 59) | (byte158 << 51) | (byte159 << 43) | (byte160 << 35) | (byte161 << 27) | (byte162 << 19) | (byte163 << 11) | (byte164 << 3) | (byte165 >>> 5); - final long byte166 = blocks[blocksOffset++] & 0xFF; - final long byte167 = blocks[blocksOffset++] & 0xFF; - final long byte168 = blocks[blocksOffset++] & 0xFF; - final long byte169 = blocks[blocksOffset++] & 0xFF; - final long byte170 = blocks[blocksOffset++] & 0xFF; - final long byte171 = blocks[blocksOffset++] & 0xFF; - final long byte172 = blocks[blocksOffset++] & 0xFF; - final long byte173 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte165 & 31) << 58) | (byte166 << 50) | (byte167 << 42) | (byte168 << 34) | (byte169 << 26) | (byte170 << 18) | (byte171 << 10) | (byte172 << 2) | (byte173 >>> 6); - final long byte174 = blocks[blocksOffset++] & 0xFF; - final long byte175 = blocks[blocksOffset++] & 0xFF; - final long byte176 = blocks[blocksOffset++] & 0xFF; - final long byte177 = blocks[blocksOffset++] & 0xFF; - final long byte178 = blocks[blocksOffset++] & 0xFF; - final long byte179 = blocks[blocksOffset++] & 0xFF; - final long byte180 = blocks[blocksOffset++] & 0xFF; - final long byte181 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte173 & 63) << 57) | (byte174 << 49) | (byte175 << 41) | (byte176 << 33) | (byte177 << 25) | (byte178 << 17) | (byte179 << 9) | (byte180 << 1) | (byte181 >>> 7); - final long byte182 = blocks[blocksOffset++] & 0xFF; - final long byte183 = blocks[blocksOffset++] & 0xFF; - final long byte184 = blocks[blocksOffset++] & 0xFF; - final long byte185 = blocks[blocksOffset++] & 0xFF; - final long byte186 = blocks[blocksOffset++] & 0xFF; - final long byte187 = blocks[blocksOffset++] & 0xFF; - final long byte188 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte181 & 127) << 56) | (byte182 << 48) | (byte183 << 40) | (byte184 << 32) | (byte185 << 24) | (byte186 << 16) | (byte187 << 8) | byte188; - final long byte189 = blocks[blocksOffset++] & 0xFF; - final long byte190 = blocks[blocksOffset++] & 0xFF; - final long byte191 = blocks[blocksOffset++] & 0xFF; - final long byte192 = blocks[blocksOffset++] & 0xFF; - final long byte193 = blocks[blocksOffset++] & 0xFF; - final long byte194 = blocks[blocksOffset++] & 0xFF; - final long byte195 = blocks[blocksOffset++] & 0xFF; - final long byte196 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte189 << 55) | (byte190 << 47) | (byte191 << 39) | (byte192 << 31) | (byte193 << 23) | (byte194 << 15) | (byte195 << 7) | (byte196 >>> 1); - final long byte197 = blocks[blocksOffset++] & 0xFF; - final long byte198 = blocks[blocksOffset++] & 0xFF; - final long byte199 = blocks[blocksOffset++] & 0xFF; - final long byte200 = blocks[blocksOffset++] & 0xFF; - final long byte201 = blocks[blocksOffset++] & 0xFF; - final long byte202 = blocks[blocksOffset++] & 0xFF; - final long byte203 = blocks[blocksOffset++] & 0xFF; - final long byte204 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte196 & 1) << 62) | (byte197 << 54) | (byte198 << 46) | (byte199 << 38) | (byte200 << 30) | (byte201 << 22) | (byte202 << 14) | (byte203 << 6) | (byte204 >>> 2); - final long byte205 = blocks[blocksOffset++] & 0xFF; - final long byte206 = blocks[blocksOffset++] & 0xFF; - final long byte207 = blocks[blocksOffset++] & 0xFF; - final long byte208 = blocks[blocksOffset++] & 0xFF; - final long byte209 = blocks[blocksOffset++] & 0xFF; - final long byte210 = blocks[blocksOffset++] & 0xFF; - final long byte211 = blocks[blocksOffset++] & 0xFF; - final long byte212 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte204 & 3) << 61) | (byte205 << 53) | (byte206 << 45) | (byte207 << 37) | (byte208 << 29) | (byte209 << 21) | (byte210 << 13) | (byte211 << 5) | (byte212 >>> 3); - final long byte213 = blocks[blocksOffset++] & 0xFF; - final long byte214 = blocks[blocksOffset++] & 0xFF; - final long byte215 = blocks[blocksOffset++] & 0xFF; - final long byte216 = blocks[blocksOffset++] & 0xFF; - final long byte217 = blocks[blocksOffset++] & 0xFF; - final long byte218 = blocks[blocksOffset++] & 0xFF; - final long byte219 = blocks[blocksOffset++] & 0xFF; - final long byte220 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte212 & 7) << 60) | (byte213 << 52) | (byte214 << 44) | (byte215 << 36) | (byte216 << 28) | (byte217 << 20) | (byte218 << 12) | (byte219 << 4) | (byte220 >>> 4); - final long byte221 = blocks[blocksOffset++] & 0xFF; - final long byte222 = blocks[blocksOffset++] & 0xFF; - final long byte223 = blocks[blocksOffset++] & 0xFF; - final long byte224 = blocks[blocksOffset++] & 0xFF; - final long byte225 = blocks[blocksOffset++] & 0xFF; - final long byte226 = blocks[blocksOffset++] & 0xFF; - final long byte227 = blocks[blocksOffset++] & 0xFF; - final long byte228 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte220 & 15) << 59) | (byte221 << 51) | (byte222 << 43) | (byte223 << 35) | (byte224 << 27) | (byte225 << 19) | (byte226 << 11) | (byte227 << 3) | (byte228 >>> 5); - final long byte229 = blocks[blocksOffset++] & 0xFF; - final long byte230 = blocks[blocksOffset++] & 0xFF; - final long byte231 = blocks[blocksOffset++] & 0xFF; - final long byte232 = blocks[blocksOffset++] & 0xFF; - final long byte233 = blocks[blocksOffset++] & 0xFF; - final long byte234 = blocks[blocksOffset++] & 0xFF; - final long byte235 = blocks[blocksOffset++] & 0xFF; - final long byte236 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte228 & 31) << 58) | (byte229 << 50) | (byte230 << 42) | (byte231 << 34) | (byte232 << 26) | (byte233 << 18) | (byte234 << 10) | (byte235 << 2) | (byte236 >>> 6); - final long byte237 = blocks[blocksOffset++] & 0xFF; - final long byte238 = blocks[blocksOffset++] & 0xFF; - final long byte239 = blocks[blocksOffset++] & 0xFF; - final long byte240 = blocks[blocksOffset++] & 0xFF; - final long byte241 = blocks[blocksOffset++] & 0xFF; - final long byte242 = blocks[blocksOffset++] & 0xFF; - final long byte243 = blocks[blocksOffset++] & 0xFF; - final long byte244 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte236 & 63) << 57) | (byte237 << 49) | (byte238 << 41) | (byte239 << 33) | (byte240 << 25) | (byte241 << 17) | (byte242 << 9) | (byte243 << 1) | (byte244 >>> 7); - final long byte245 = blocks[blocksOffset++] & 0xFF; - final long byte246 = blocks[blocksOffset++] & 0xFF; - final long byte247 = blocks[blocksOffset++] & 0xFF; - final long byte248 = blocks[blocksOffset++] & 0xFF; - final long byte249 = blocks[blocksOffset++] & 0xFF; - final long byte250 = blocks[blocksOffset++] & 0xFF; - final long byte251 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte244 & 127) << 56) | (byte245 << 48) | (byte246 << 40) | (byte247 << 32) | (byte248 << 24) | (byte249 << 16) | (byte250 << 8) | byte251; - final long byte252 = blocks[blocksOffset++] & 0xFF; - final long byte253 = blocks[blocksOffset++] & 0xFF; - final long byte254 = blocks[blocksOffset++] & 0xFF; - final long byte255 = blocks[blocksOffset++] & 0xFF; - final long byte256 = blocks[blocksOffset++] & 0xFF; - final long byte257 = blocks[blocksOffset++] & 0xFF; - final long byte258 = blocks[blocksOffset++] & 0xFF; - final long byte259 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte252 << 55) | (byte253 << 47) | (byte254 << 39) | (byte255 << 31) | (byte256 << 23) | (byte257 << 15) | (byte258 << 7) | (byte259 >>> 1); - final long byte260 = blocks[blocksOffset++] & 0xFF; - final long byte261 = blocks[blocksOffset++] & 0xFF; - final long byte262 = blocks[blocksOffset++] & 0xFF; - final long byte263 = blocks[blocksOffset++] & 0xFF; - final long byte264 = blocks[blocksOffset++] & 0xFF; - final long byte265 = blocks[blocksOffset++] & 0xFF; - final long byte266 = blocks[blocksOffset++] & 0xFF; - final long byte267 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte259 & 1) << 62) | (byte260 << 54) | (byte261 << 46) | (byte262 << 38) | (byte263 << 30) | (byte264 << 22) | (byte265 << 14) | (byte266 << 6) | (byte267 >>> 2); - final long byte268 = blocks[blocksOffset++] & 0xFF; - final long byte269 = blocks[blocksOffset++] & 0xFF; - final long byte270 = blocks[blocksOffset++] & 0xFF; - final long byte271 = blocks[blocksOffset++] & 0xFF; - final long byte272 = blocks[blocksOffset++] & 0xFF; - final long byte273 = blocks[blocksOffset++] & 0xFF; - final long byte274 = blocks[blocksOffset++] & 0xFF; - final long byte275 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte267 & 3) << 61) | (byte268 << 53) | (byte269 << 45) | (byte270 << 37) | (byte271 << 29) | (byte272 << 21) | (byte273 << 13) | (byte274 << 5) | (byte275 >>> 3); - final long byte276 = blocks[blocksOffset++] & 0xFF; - final long byte277 = blocks[blocksOffset++] & 0xFF; - final long byte278 = blocks[blocksOffset++] & 0xFF; - final long byte279 = blocks[blocksOffset++] & 0xFF; - final long byte280 = blocks[blocksOffset++] & 0xFF; - final long byte281 = blocks[blocksOffset++] & 0xFF; - final long byte282 = blocks[blocksOffset++] & 0xFF; - final long byte283 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte275 & 7) << 60) | (byte276 << 52) | (byte277 << 44) | (byte278 << 36) | (byte279 << 28) | (byte280 << 20) | (byte281 << 12) | (byte282 << 4) | (byte283 >>> 4); - final long byte284 = blocks[blocksOffset++] & 0xFF; - final long byte285 = blocks[blocksOffset++] & 0xFF; - final long byte286 = blocks[blocksOffset++] & 0xFF; - final long byte287 = blocks[blocksOffset++] & 0xFF; - final long byte288 = blocks[blocksOffset++] & 0xFF; - final long byte289 = blocks[blocksOffset++] & 0xFF; - final long byte290 = blocks[blocksOffset++] & 0xFF; - final long byte291 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte283 & 15) << 59) | (byte284 << 51) | (byte285 << 43) | (byte286 << 35) | (byte287 << 27) | (byte288 << 19) | (byte289 << 11) | (byte290 << 3) | (byte291 >>> 5); - final long byte292 = blocks[blocksOffset++] & 0xFF; - final long byte293 = blocks[blocksOffset++] & 0xFF; - final long byte294 = blocks[blocksOffset++] & 0xFF; - final long byte295 = blocks[blocksOffset++] & 0xFF; - final long byte296 = blocks[blocksOffset++] & 0xFF; - final long byte297 = blocks[blocksOffset++] & 0xFF; - final long byte298 = blocks[blocksOffset++] & 0xFF; - final long byte299 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte291 & 31) << 58) | (byte292 << 50) | (byte293 << 42) | (byte294 << 34) | (byte295 << 26) | (byte296 << 18) | (byte297 << 10) | (byte298 << 2) | (byte299 >>> 6); - final long byte300 = blocks[blocksOffset++] & 0xFF; - final long byte301 = blocks[blocksOffset++] & 0xFF; - final long byte302 = blocks[blocksOffset++] & 0xFF; - final long byte303 = blocks[blocksOffset++] & 0xFF; - final long byte304 = blocks[blocksOffset++] & 0xFF; - final long byte305 = blocks[blocksOffset++] & 0xFF; - final long byte306 = blocks[blocksOffset++] & 0xFF; - final long byte307 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte299 & 63) << 57) | (byte300 << 49) | (byte301 << 41) | (byte302 << 33) | (byte303 << 25) | (byte304 << 17) | (byte305 << 9) | (byte306 << 1) | (byte307 >>> 7); - final long byte308 = blocks[blocksOffset++] & 0xFF; - final long byte309 = blocks[blocksOffset++] & 0xFF; - final long byte310 = blocks[blocksOffset++] & 0xFF; - final long byte311 = blocks[blocksOffset++] & 0xFF; - final long byte312 = blocks[blocksOffset++] & 0xFF; - final long byte313 = blocks[blocksOffset++] & 0xFF; - final long byte314 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte307 & 127) << 56) | (byte308 << 48) | (byte309 << 40) | (byte310 << 32) | (byte311 << 24) | (byte312 << 16) | (byte313 << 8) | byte314; - final long byte315 = blocks[blocksOffset++] & 0xFF; - final long byte316 = blocks[blocksOffset++] & 0xFF; - final long byte317 = blocks[blocksOffset++] & 0xFF; - final long byte318 = blocks[blocksOffset++] & 0xFF; - final long byte319 = blocks[blocksOffset++] & 0xFF; - final long byte320 = blocks[blocksOffset++] & 0xFF; - final long byte321 = blocks[blocksOffset++] & 0xFF; - final long byte322 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte315 << 55) | (byte316 << 47) | (byte317 << 39) | (byte318 << 31) | (byte319 << 23) | (byte320 << 15) | (byte321 << 7) | (byte322 >>> 1); - final long byte323 = blocks[blocksOffset++] & 0xFF; - final long byte324 = blocks[blocksOffset++] & 0xFF; - final long byte325 = blocks[blocksOffset++] & 0xFF; - final long byte326 = blocks[blocksOffset++] & 0xFF; - final long byte327 = blocks[blocksOffset++] & 0xFF; - final long byte328 = blocks[blocksOffset++] & 0xFF; - final long byte329 = blocks[blocksOffset++] & 0xFF; - final long byte330 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte322 & 1) << 62) | (byte323 << 54) | (byte324 << 46) | (byte325 << 38) | (byte326 << 30) | (byte327 << 22) | (byte328 << 14) | (byte329 << 6) | (byte330 >>> 2); - final long byte331 = blocks[blocksOffset++] & 0xFF; - final long byte332 = blocks[blocksOffset++] & 0xFF; - final long byte333 = blocks[blocksOffset++] & 0xFF; - final long byte334 = blocks[blocksOffset++] & 0xFF; - final long byte335 = blocks[blocksOffset++] & 0xFF; - final long byte336 = blocks[blocksOffset++] & 0xFF; - final long byte337 = blocks[blocksOffset++] & 0xFF; - final long byte338 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte330 & 3) << 61) | (byte331 << 53) | (byte332 << 45) | (byte333 << 37) | (byte334 << 29) | (byte335 << 21) | (byte336 << 13) | (byte337 << 5) | (byte338 >>> 3); - final long byte339 = blocks[blocksOffset++] & 0xFF; - final long byte340 = blocks[blocksOffset++] & 0xFF; - final long byte341 = blocks[blocksOffset++] & 0xFF; - final long byte342 = blocks[blocksOffset++] & 0xFF; - final long byte343 = blocks[blocksOffset++] & 0xFF; - final long byte344 = blocks[blocksOffset++] & 0xFF; - final long byte345 = blocks[blocksOffset++] & 0xFF; - final long byte346 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte338 & 7) << 60) | (byte339 << 52) | (byte340 << 44) | (byte341 << 36) | (byte342 << 28) | (byte343 << 20) | (byte344 << 12) | (byte345 << 4) | (byte346 >>> 4); - final long byte347 = blocks[blocksOffset++] & 0xFF; - final long byte348 = blocks[blocksOffset++] & 0xFF; - final long byte349 = blocks[blocksOffset++] & 0xFF; - final long byte350 = blocks[blocksOffset++] & 0xFF; - final long byte351 = blocks[blocksOffset++] & 0xFF; - final long byte352 = blocks[blocksOffset++] & 0xFF; - final long byte353 = blocks[blocksOffset++] & 0xFF; - final long byte354 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte346 & 15) << 59) | (byte347 << 51) | (byte348 << 43) | (byte349 << 35) | (byte350 << 27) | (byte351 << 19) | (byte352 << 11) | (byte353 << 3) | (byte354 >>> 5); - final long byte355 = blocks[blocksOffset++] & 0xFF; - final long byte356 = blocks[blocksOffset++] & 0xFF; - final long byte357 = blocks[blocksOffset++] & 0xFF; - final long byte358 = blocks[blocksOffset++] & 0xFF; - final long byte359 = blocks[blocksOffset++] & 0xFF; - final long byte360 = blocks[blocksOffset++] & 0xFF; - final long byte361 = blocks[blocksOffset++] & 0xFF; - final long byte362 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte354 & 31) << 58) | (byte355 << 50) | (byte356 << 42) | (byte357 << 34) | (byte358 << 26) | (byte359 << 18) | (byte360 << 10) | (byte361 << 2) | (byte362 >>> 6); - final long byte363 = blocks[blocksOffset++] & 0xFF; - final long byte364 = blocks[blocksOffset++] & 0xFF; - final long byte365 = blocks[blocksOffset++] & 0xFF; - final long byte366 = blocks[blocksOffset++] & 0xFF; - final long byte367 = blocks[blocksOffset++] & 0xFF; - final long byte368 = blocks[blocksOffset++] & 0xFF; - final long byte369 = blocks[blocksOffset++] & 0xFF; - final long byte370 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte362 & 63) << 57) | (byte363 << 49) | (byte364 << 41) | (byte365 << 33) | (byte366 << 25) | (byte367 << 17) | (byte368 << 9) | (byte369 << 1) | (byte370 >>> 7); - final long byte371 = blocks[blocksOffset++] & 0xFF; - final long byte372 = blocks[blocksOffset++] & 0xFF; - final long byte373 = blocks[blocksOffset++] & 0xFF; - final long byte374 = blocks[blocksOffset++] & 0xFF; - final long byte375 = blocks[blocksOffset++] & 0xFF; - final long byte376 = blocks[blocksOffset++] & 0xFF; - final long byte377 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte370 & 127) << 56) | (byte371 << 48) | (byte372 << 40) | (byte373 << 32) | (byte374 << 24) | (byte375 << 16) | (byte376 << 8) | byte377; - final long byte378 = blocks[blocksOffset++] & 0xFF; - final long byte379 = blocks[blocksOffset++] & 0xFF; - final long byte380 = blocks[blocksOffset++] & 0xFF; - final long byte381 = blocks[blocksOffset++] & 0xFF; - final long byte382 = blocks[blocksOffset++] & 0xFF; - final long byte383 = blocks[blocksOffset++] & 0xFF; - final long byte384 = blocks[blocksOffset++] & 0xFF; - final long byte385 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte378 << 55) | (byte379 << 47) | (byte380 << 39) | (byte381 << 31) | (byte382 << 23) | (byte383 << 15) | (byte384 << 7) | (byte385 >>> 1); - final long byte386 = blocks[blocksOffset++] & 0xFF; - final long byte387 = blocks[blocksOffset++] & 0xFF; - final long byte388 = blocks[blocksOffset++] & 0xFF; - final long byte389 = blocks[blocksOffset++] & 0xFF; - final long byte390 = blocks[blocksOffset++] & 0xFF; - final long byte391 = blocks[blocksOffset++] & 0xFF; - final long byte392 = blocks[blocksOffset++] & 0xFF; - final long byte393 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte385 & 1) << 62) | (byte386 << 54) | (byte387 << 46) | (byte388 << 38) | (byte389 << 30) | (byte390 << 22) | (byte391 << 14) | (byte392 << 6) | (byte393 >>> 2); - final long byte394 = blocks[blocksOffset++] & 0xFF; - final long byte395 = blocks[blocksOffset++] & 0xFF; - final long byte396 = blocks[blocksOffset++] & 0xFF; - final long byte397 = blocks[blocksOffset++] & 0xFF; - final long byte398 = blocks[blocksOffset++] & 0xFF; - final long byte399 = blocks[blocksOffset++] & 0xFF; - final long byte400 = blocks[blocksOffset++] & 0xFF; - final long byte401 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte393 & 3) << 61) | (byte394 << 53) | (byte395 << 45) | (byte396 << 37) | (byte397 << 29) | (byte398 << 21) | (byte399 << 13) | (byte400 << 5) | (byte401 >>> 3); - final long byte402 = blocks[blocksOffset++] & 0xFF; - final long byte403 = blocks[blocksOffset++] & 0xFF; - final long byte404 = blocks[blocksOffset++] & 0xFF; - final long byte405 = blocks[blocksOffset++] & 0xFF; - final long byte406 = blocks[blocksOffset++] & 0xFF; - final long byte407 = blocks[blocksOffset++] & 0xFF; - final long byte408 = blocks[blocksOffset++] & 0xFF; - final long byte409 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte401 & 7) << 60) | (byte402 << 52) | (byte403 << 44) | (byte404 << 36) | (byte405 << 28) | (byte406 << 20) | (byte407 << 12) | (byte408 << 4) | (byte409 >>> 4); - final long byte410 = blocks[blocksOffset++] & 0xFF; - final long byte411 = blocks[blocksOffset++] & 0xFF; - final long byte412 = blocks[blocksOffset++] & 0xFF; - final long byte413 = blocks[blocksOffset++] & 0xFF; - final long byte414 = blocks[blocksOffset++] & 0xFF; - final long byte415 = blocks[blocksOffset++] & 0xFF; - final long byte416 = blocks[blocksOffset++] & 0xFF; - final long byte417 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte409 & 15) << 59) | (byte410 << 51) | (byte411 << 43) | (byte412 << 35) | (byte413 << 27) | (byte414 << 19) | (byte415 << 11) | (byte416 << 3) | (byte417 >>> 5); - final long byte418 = blocks[blocksOffset++] & 0xFF; - final long byte419 = blocks[blocksOffset++] & 0xFF; - final long byte420 = blocks[blocksOffset++] & 0xFF; - final long byte421 = blocks[blocksOffset++] & 0xFF; - final long byte422 = blocks[blocksOffset++] & 0xFF; - final long byte423 = blocks[blocksOffset++] & 0xFF; - final long byte424 = blocks[blocksOffset++] & 0xFF; - final long byte425 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte417 & 31) << 58) | (byte418 << 50) | (byte419 << 42) | (byte420 << 34) | (byte421 << 26) | (byte422 << 18) | (byte423 << 10) | (byte424 << 2) | (byte425 >>> 6); - final long byte426 = blocks[blocksOffset++] & 0xFF; - final long byte427 = blocks[blocksOffset++] & 0xFF; - final long byte428 = blocks[blocksOffset++] & 0xFF; - final long byte429 = blocks[blocksOffset++] & 0xFF; - final long byte430 = blocks[blocksOffset++] & 0xFF; - final long byte431 = blocks[blocksOffset++] & 0xFF; - final long byte432 = blocks[blocksOffset++] & 0xFF; - final long byte433 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte425 & 63) << 57) | (byte426 << 49) | (byte427 << 41) | (byte428 << 33) | (byte429 << 25) | (byte430 << 17) | (byte431 << 9) | (byte432 << 1) | (byte433 >>> 7); - final long byte434 = blocks[blocksOffset++] & 0xFF; - final long byte435 = blocks[blocksOffset++] & 0xFF; - final long byte436 = blocks[blocksOffset++] & 0xFF; - final long byte437 = blocks[blocksOffset++] & 0xFF; - final long byte438 = blocks[blocksOffset++] & 0xFF; - final long byte439 = blocks[blocksOffset++] & 0xFF; - final long byte440 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte433 & 127) << 56) | (byte434 << 48) | (byte435 << 40) | (byte436 << 32) | (byte437 << 24) | (byte438 << 16) | (byte439 << 8) | byte440; - final long byte441 = blocks[blocksOffset++] & 0xFF; - final long byte442 = blocks[blocksOffset++] & 0xFF; - final long byte443 = blocks[blocksOffset++] & 0xFF; - final long byte444 = blocks[blocksOffset++] & 0xFF; - final long byte445 = blocks[blocksOffset++] & 0xFF; - final long byte446 = blocks[blocksOffset++] & 0xFF; - final long byte447 = blocks[blocksOffset++] & 0xFF; - final long byte448 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = (byte441 << 55) | (byte442 << 47) | (byte443 << 39) | (byte444 << 31) | (byte445 << 23) | (byte446 << 15) | (byte447 << 7) | (byte448 >>> 1); - final long byte449 = blocks[blocksOffset++] & 0xFF; - final long byte450 = blocks[blocksOffset++] & 0xFF; - final long byte451 = blocks[blocksOffset++] & 0xFF; - final long byte452 = blocks[blocksOffset++] & 0xFF; - final long byte453 = blocks[blocksOffset++] & 0xFF; - final long byte454 = blocks[blocksOffset++] & 0xFF; - final long byte455 = blocks[blocksOffset++] & 0xFF; - final long byte456 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte448 & 1) << 62) | (byte449 << 54) | (byte450 << 46) | (byte451 << 38) | (byte452 << 30) | (byte453 << 22) | (byte454 << 14) | (byte455 << 6) | (byte456 >>> 2); - final long byte457 = blocks[blocksOffset++] & 0xFF; - final long byte458 = blocks[blocksOffset++] & 0xFF; - final long byte459 = blocks[blocksOffset++] & 0xFF; - final long byte460 = blocks[blocksOffset++] & 0xFF; - final long byte461 = blocks[blocksOffset++] & 0xFF; - final long byte462 = blocks[blocksOffset++] & 0xFF; - final long byte463 = blocks[blocksOffset++] & 0xFF; - final long byte464 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte456 & 3) << 61) | (byte457 << 53) | (byte458 << 45) | (byte459 << 37) | (byte460 << 29) | (byte461 << 21) | (byte462 << 13) | (byte463 << 5) | (byte464 >>> 3); - final long byte465 = blocks[blocksOffset++] & 0xFF; - final long byte466 = blocks[blocksOffset++] & 0xFF; - final long byte467 = blocks[blocksOffset++] & 0xFF; - final long byte468 = blocks[blocksOffset++] & 0xFF; - final long byte469 = blocks[blocksOffset++] & 0xFF; - final long byte470 = blocks[blocksOffset++] & 0xFF; - final long byte471 = blocks[blocksOffset++] & 0xFF; - final long byte472 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte464 & 7) << 60) | (byte465 << 52) | (byte466 << 44) | (byte467 << 36) | (byte468 << 28) | (byte469 << 20) | (byte470 << 12) | (byte471 << 4) | (byte472 >>> 4); - final long byte473 = blocks[blocksOffset++] & 0xFF; - final long byte474 = blocks[blocksOffset++] & 0xFF; - final long byte475 = blocks[blocksOffset++] & 0xFF; - final long byte476 = blocks[blocksOffset++] & 0xFF; - final long byte477 = blocks[blocksOffset++] & 0xFF; - final long byte478 = blocks[blocksOffset++] & 0xFF; - final long byte479 = blocks[blocksOffset++] & 0xFF; - final long byte480 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte472 & 15) << 59) | (byte473 << 51) | (byte474 << 43) | (byte475 << 35) | (byte476 << 27) | (byte477 << 19) | (byte478 << 11) | (byte479 << 3) | (byte480 >>> 5); - final long byte481 = blocks[blocksOffset++] & 0xFF; - final long byte482 = blocks[blocksOffset++] & 0xFF; - final long byte483 = blocks[blocksOffset++] & 0xFF; - final long byte484 = blocks[blocksOffset++] & 0xFF; - final long byte485 = blocks[blocksOffset++] & 0xFF; - final long byte486 = blocks[blocksOffset++] & 0xFF; - final long byte487 = blocks[blocksOffset++] & 0xFF; - final long byte488 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte480 & 31) << 58) | (byte481 << 50) | (byte482 << 42) | (byte483 << 34) | (byte484 << 26) | (byte485 << 18) | (byte486 << 10) | (byte487 << 2) | (byte488 >>> 6); - final long byte489 = blocks[blocksOffset++] & 0xFF; - final long byte490 = blocks[blocksOffset++] & 0xFF; - final long byte491 = blocks[blocksOffset++] & 0xFF; - final long byte492 = blocks[blocksOffset++] & 0xFF; - final long byte493 = blocks[blocksOffset++] & 0xFF; - final long byte494 = blocks[blocksOffset++] & 0xFF; - final long byte495 = blocks[blocksOffset++] & 0xFF; - final long byte496 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte488 & 63) << 57) | (byte489 << 49) | (byte490 << 41) | (byte491 << 33) | (byte492 << 25) | (byte493 << 17) | (byte494 << 9) | (byte495 << 1) | (byte496 >>> 7); - final long byte497 = blocks[blocksOffset++] & 0xFF; - final long byte498 = blocks[blocksOffset++] & 0xFF; - final long byte499 = blocks[blocksOffset++] & 0xFF; - final long byte500 = blocks[blocksOffset++] & 0xFF; - final long byte501 = blocks[blocksOffset++] & 0xFF; - final long byte502 = blocks[blocksOffset++] & 0xFF; - final long byte503 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = ((byte496 & 127) << 56) | (byte497 << 48) | (byte498 << 40) | (byte499 << 32) | (byte500 << 24) | (byte501 << 16) | (byte502 << 8) | byte503; - } - } - - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 1) | ((values[valuesOffset] & 0xffffffffL) >>> 62); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 2) | ((values[valuesOffset] & 0xffffffffL) >>> 61); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 3) | ((values[valuesOffset] & 0xffffffffL) >>> 60); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 4) | ((values[valuesOffset] & 0xffffffffL) >>> 59); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 5) | ((values[valuesOffset] & 0xffffffffL) >>> 58); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 6) | ((values[valuesOffset] & 0xffffffffL) >>> 57); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 7) | ((values[valuesOffset] & 0xffffffffL) >>> 56); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 8) | ((values[valuesOffset] & 0xffffffffL) >>> 55); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 9) | ((values[valuesOffset] & 0xffffffffL) >>> 54); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 10) | ((values[valuesOffset] & 0xffffffffL) >>> 53); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 11) | ((values[valuesOffset] & 0xffffffffL) >>> 52); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 12) | ((values[valuesOffset] & 0xffffffffL) >>> 51); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 13) | ((values[valuesOffset] & 0xffffffffL) >>> 50); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 14) | ((values[valuesOffset] & 0xffffffffL) >>> 49); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 15) | ((values[valuesOffset] & 0xffffffffL) >>> 48); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 16) | ((values[valuesOffset] & 0xffffffffL) >>> 47); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 17) | ((values[valuesOffset] & 0xffffffffL) >>> 46); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 18) | ((values[valuesOffset] & 0xffffffffL) >>> 45); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 19) | ((values[valuesOffset] & 0xffffffffL) >>> 44); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 20) | ((values[valuesOffset] & 0xffffffffL) >>> 43); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 21) | ((values[valuesOffset] & 0xffffffffL) >>> 42); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 22) | ((values[valuesOffset] & 0xffffffffL) >>> 41); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 23) | ((values[valuesOffset] & 0xffffffffL) >>> 40); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 24) | ((values[valuesOffset] & 0xffffffffL) >>> 39); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 25) | ((values[valuesOffset] & 0xffffffffL) >>> 38); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 26) | ((values[valuesOffset] & 0xffffffffL) >>> 37); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 27) | ((values[valuesOffset] & 0xffffffffL) >>> 36); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 28) | ((values[valuesOffset] & 0xffffffffL) >>> 35); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 29) | ((values[valuesOffset] & 0xffffffffL) >>> 34); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 30) | ((values[valuesOffset] & 0xffffffffL) >>> 33); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 31) | ((values[valuesOffset] & 0xffffffffL) >>> 32); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 32) | ((values[valuesOffset] & 0xffffffffL) >>> 31); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 33) | ((values[valuesOffset] & 0xffffffffL) >>> 30); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 34) | ((values[valuesOffset] & 0xffffffffL) >>> 29); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 35) | ((values[valuesOffset] & 0xffffffffL) >>> 28); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 36) | ((values[valuesOffset] & 0xffffffffL) >>> 27); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 37) | ((values[valuesOffset] & 0xffffffffL) >>> 26); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 38) | ((values[valuesOffset] & 0xffffffffL) >>> 25); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 39) | ((values[valuesOffset] & 0xffffffffL) >>> 24); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 40) | ((values[valuesOffset] & 0xffffffffL) >>> 23); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 41) | ((values[valuesOffset] & 0xffffffffL) >>> 22); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 42) | ((values[valuesOffset] & 0xffffffffL) >>> 21); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 43) | ((values[valuesOffset] & 0xffffffffL) >>> 20); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 44) | ((values[valuesOffset] & 0xffffffffL) >>> 19); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 45) | ((values[valuesOffset] & 0xffffffffL) >>> 18); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 46) | ((values[valuesOffset] & 0xffffffffL) >>> 17); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 47) | ((values[valuesOffset] & 0xffffffffL) >>> 16); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 48) | ((values[valuesOffset] & 0xffffffffL) >>> 15); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 49) | ((values[valuesOffset] & 0xffffffffL) >>> 14); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 50) | ((values[valuesOffset] & 0xffffffffL) >>> 13); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 51) | ((values[valuesOffset] & 0xffffffffL) >>> 12); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 52) | ((values[valuesOffset] & 0xffffffffL) >>> 11); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 53) | ((values[valuesOffset] & 0xffffffffL) >>> 10); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 54) | ((values[valuesOffset] & 0xffffffffL) >>> 9); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 55) | ((values[valuesOffset] & 0xffffffffL) >>> 8); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 56) | ((values[valuesOffset] & 0xffffffffL) >>> 7); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 57) | ((values[valuesOffset] & 0xffffffffL) >>> 6); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 58) | ((values[valuesOffset] & 0xffffffffL) >>> 5); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 59) | ((values[valuesOffset] & 0xffffffffL) >>> 4); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 60) | ((values[valuesOffset] & 0xffffffffL) >>> 3); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 61) | ((values[valuesOffset] & 0xffffffffL) >>> 2); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 62) | ((values[valuesOffset] & 0xffffffffL) >>> 1); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 63) | (values[valuesOffset++] & 0xffffffffL); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] << 1) | (values[valuesOffset] >>> 62); - blocks[blocksOffset++] = (values[valuesOffset++] << 2) | (values[valuesOffset] >>> 61); - blocks[blocksOffset++] = (values[valuesOffset++] << 3) | (values[valuesOffset] >>> 60); - blocks[blocksOffset++] = (values[valuesOffset++] << 4) | (values[valuesOffset] >>> 59); - blocks[blocksOffset++] = (values[valuesOffset++] << 5) | (values[valuesOffset] >>> 58); - blocks[blocksOffset++] = (values[valuesOffset++] << 6) | (values[valuesOffset] >>> 57); - blocks[blocksOffset++] = (values[valuesOffset++] << 7) | (values[valuesOffset] >>> 56); - blocks[blocksOffset++] = (values[valuesOffset++] << 8) | (values[valuesOffset] >>> 55); - blocks[blocksOffset++] = (values[valuesOffset++] << 9) | (values[valuesOffset] >>> 54); - blocks[blocksOffset++] = (values[valuesOffset++] << 10) | (values[valuesOffset] >>> 53); - blocks[blocksOffset++] = (values[valuesOffset++] << 11) | (values[valuesOffset] >>> 52); - blocks[blocksOffset++] = (values[valuesOffset++] << 12) | (values[valuesOffset] >>> 51); - blocks[blocksOffset++] = (values[valuesOffset++] << 13) | (values[valuesOffset] >>> 50); - blocks[blocksOffset++] = (values[valuesOffset++] << 14) | (values[valuesOffset] >>> 49); - blocks[blocksOffset++] = (values[valuesOffset++] << 15) | (values[valuesOffset] >>> 48); - blocks[blocksOffset++] = (values[valuesOffset++] << 16) | (values[valuesOffset] >>> 47); - blocks[blocksOffset++] = (values[valuesOffset++] << 17) | (values[valuesOffset] >>> 46); - blocks[blocksOffset++] = (values[valuesOffset++] << 18) | (values[valuesOffset] >>> 45); - blocks[blocksOffset++] = (values[valuesOffset++] << 19) | (values[valuesOffset] >>> 44); - blocks[blocksOffset++] = (values[valuesOffset++] << 20) | (values[valuesOffset] >>> 43); - blocks[blocksOffset++] = (values[valuesOffset++] << 21) | (values[valuesOffset] >>> 42); - blocks[blocksOffset++] = (values[valuesOffset++] << 22) | (values[valuesOffset] >>> 41); - blocks[blocksOffset++] = (values[valuesOffset++] << 23) | (values[valuesOffset] >>> 40); - blocks[blocksOffset++] = (values[valuesOffset++] << 24) | (values[valuesOffset] >>> 39); - blocks[blocksOffset++] = (values[valuesOffset++] << 25) | (values[valuesOffset] >>> 38); - blocks[blocksOffset++] = (values[valuesOffset++] << 26) | (values[valuesOffset] >>> 37); - blocks[blocksOffset++] = (values[valuesOffset++] << 27) | (values[valuesOffset] >>> 36); - blocks[blocksOffset++] = (values[valuesOffset++] << 28) | (values[valuesOffset] >>> 35); - blocks[blocksOffset++] = (values[valuesOffset++] << 29) | (values[valuesOffset] >>> 34); - blocks[blocksOffset++] = (values[valuesOffset++] << 30) | (values[valuesOffset] >>> 33); - blocks[blocksOffset++] = (values[valuesOffset++] << 31) | (values[valuesOffset] >>> 32); - blocks[blocksOffset++] = (values[valuesOffset++] << 32) | (values[valuesOffset] >>> 31); - blocks[blocksOffset++] = (values[valuesOffset++] << 33) | (values[valuesOffset] >>> 30); - blocks[blocksOffset++] = (values[valuesOffset++] << 34) | (values[valuesOffset] >>> 29); - blocks[blocksOffset++] = (values[valuesOffset++] << 35) | (values[valuesOffset] >>> 28); - blocks[blocksOffset++] = (values[valuesOffset++] << 36) | (values[valuesOffset] >>> 27); - blocks[blocksOffset++] = (values[valuesOffset++] << 37) | (values[valuesOffset] >>> 26); - blocks[blocksOffset++] = (values[valuesOffset++] << 38) | (values[valuesOffset] >>> 25); - blocks[blocksOffset++] = (values[valuesOffset++] << 39) | (values[valuesOffset] >>> 24); - blocks[blocksOffset++] = (values[valuesOffset++] << 40) | (values[valuesOffset] >>> 23); - blocks[blocksOffset++] = (values[valuesOffset++] << 41) | (values[valuesOffset] >>> 22); - blocks[blocksOffset++] = (values[valuesOffset++] << 42) | (values[valuesOffset] >>> 21); - blocks[blocksOffset++] = (values[valuesOffset++] << 43) | (values[valuesOffset] >>> 20); - blocks[blocksOffset++] = (values[valuesOffset++] << 44) | (values[valuesOffset] >>> 19); - blocks[blocksOffset++] = (values[valuesOffset++] << 45) | (values[valuesOffset] >>> 18); - blocks[blocksOffset++] = (values[valuesOffset++] << 46) | (values[valuesOffset] >>> 17); - blocks[blocksOffset++] = (values[valuesOffset++] << 47) | (values[valuesOffset] >>> 16); - blocks[blocksOffset++] = (values[valuesOffset++] << 48) | (values[valuesOffset] >>> 15); - blocks[blocksOffset++] = (values[valuesOffset++] << 49) | (values[valuesOffset] >>> 14); - blocks[blocksOffset++] = (values[valuesOffset++] << 50) | (values[valuesOffset] >>> 13); - blocks[blocksOffset++] = (values[valuesOffset++] << 51) | (values[valuesOffset] >>> 12); - blocks[blocksOffset++] = (values[valuesOffset++] << 52) | (values[valuesOffset] >>> 11); - blocks[blocksOffset++] = (values[valuesOffset++] << 53) | (values[valuesOffset] >>> 10); - blocks[blocksOffset++] = (values[valuesOffset++] << 54) | (values[valuesOffset] >>> 9); - blocks[blocksOffset++] = (values[valuesOffset++] << 55) | (values[valuesOffset] >>> 8); - blocks[blocksOffset++] = (values[valuesOffset++] << 56) | (values[valuesOffset] >>> 7); - blocks[blocksOffset++] = (values[valuesOffset++] << 57) | (values[valuesOffset] >>> 6); - blocks[blocksOffset++] = (values[valuesOffset++] << 58) | (values[valuesOffset] >>> 5); - blocks[blocksOffset++] = (values[valuesOffset++] << 59) | (values[valuesOffset] >>> 4); - blocks[blocksOffset++] = (values[valuesOffset++] << 60) | (values[valuesOffset] >>> 3); - blocks[blocksOffset++] = (values[valuesOffset++] << 61) | (values[valuesOffset] >>> 2); - blocks[blocksOffset++] = (values[valuesOffset++] << 62) | (values[valuesOffset] >>> 1); - blocks[blocksOffset++] = (values[valuesOffset++] << 63) | values[valuesOffset++]; - } - } - -} diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked64.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked64.java deleted file mode 100644 index ae562ae23af..00000000000 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked64.java +++ /dev/null @@ -1,63 +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. - */ - -import java.nio.LongBuffer; -import java.nio.ByteBuffer; - -/** - * Efficient sequential read/write of packed integers. - */ -final class BulkOperationPacked64 extends BulkOperation { - @Override - public int blockCount() { - return 1; - } - - @Override - public int valueCount() { - return 1; - } - - @Override - public void decode(long[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations) { - System.arraycopy(blocks, blocksOffset, values, valuesOffset, valueCount() * iterations); - } - - @Override - public void decode(long[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) { - throw new UnsupportedOperationException(); - } - - @Override - public void decode(byte[] blocks, int blocksOffset, int[] values, int valuesOffset, int iterations) { - throw new UnsupportedOperationException(); - } - - @Override - public void decode(byte[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations) { - LongBuffer.wrap(values, valuesOffset, iterations * valueCount()).put(ByteBuffer.wrap(blocks, blocksOffset, 8 * iterations * blockCount()).asLongBuffer()); - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - System.arraycopy(values, valuesOffset, blocks, blocksOffset, valueCount() * iterations); - } -} diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked7.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked7.java index 2dbd06ba4d2..95de7f8b819 100644 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked7.java +++ b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked7.java @@ -22,15 +22,12 @@ package org.apache.lucene.util.packed; /** * Efficient sequential read/write of packed integers. */ -final class BulkOperationPacked7 extends BulkOperation { - @Override - public int blockCount() { - return 7; - } +final class BulkOperationPacked7 extends BulkOperationPacked { - @Override - public int valueCount() { - return 64; + public BulkOperationPacked7() { + super(7); + assert blockCount() == 7; + assert valueCount() == 64; } @Override @@ -447,34 +444,4 @@ final class BulkOperationPacked7 extends BulkOperation { } } - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 57) | ((values[valuesOffset++] & 0xffffffffL) << 50) | ((values[valuesOffset++] & 0xffffffffL) << 43) | ((values[valuesOffset++] & 0xffffffffL) << 36) | ((values[valuesOffset++] & 0xffffffffL) << 29) | ((values[valuesOffset++] & 0xffffffffL) << 22) | ((values[valuesOffset++] & 0xffffffffL) << 15) | ((values[valuesOffset++] & 0xffffffffL) << 8) | ((values[valuesOffset++] & 0xffffffffL) << 1) | ((values[valuesOffset] & 0xffffffffL) >>> 6); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 58) | ((values[valuesOffset++] & 0xffffffffL) << 51) | ((values[valuesOffset++] & 0xffffffffL) << 44) | ((values[valuesOffset++] & 0xffffffffL) << 37) | ((values[valuesOffset++] & 0xffffffffL) << 30) | ((values[valuesOffset++] & 0xffffffffL) << 23) | ((values[valuesOffset++] & 0xffffffffL) << 16) | ((values[valuesOffset++] & 0xffffffffL) << 9) | ((values[valuesOffset++] & 0xffffffffL) << 2) | ((values[valuesOffset] & 0xffffffffL) >>> 5); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 59) | ((values[valuesOffset++] & 0xffffffffL) << 52) | ((values[valuesOffset++] & 0xffffffffL) << 45) | ((values[valuesOffset++] & 0xffffffffL) << 38) | ((values[valuesOffset++] & 0xffffffffL) << 31) | ((values[valuesOffset++] & 0xffffffffL) << 24) | ((values[valuesOffset++] & 0xffffffffL) << 17) | ((values[valuesOffset++] & 0xffffffffL) << 10) | ((values[valuesOffset++] & 0xffffffffL) << 3) | ((values[valuesOffset] & 0xffffffffL) >>> 4); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 60) | ((values[valuesOffset++] & 0xffffffffL) << 53) | ((values[valuesOffset++] & 0xffffffffL) << 46) | ((values[valuesOffset++] & 0xffffffffL) << 39) | ((values[valuesOffset++] & 0xffffffffL) << 32) | ((values[valuesOffset++] & 0xffffffffL) << 25) | ((values[valuesOffset++] & 0xffffffffL) << 18) | ((values[valuesOffset++] & 0xffffffffL) << 11) | ((values[valuesOffset++] & 0xffffffffL) << 4) | ((values[valuesOffset] & 0xffffffffL) >>> 3); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 61) | ((values[valuesOffset++] & 0xffffffffL) << 54) | ((values[valuesOffset++] & 0xffffffffL) << 47) | ((values[valuesOffset++] & 0xffffffffL) << 40) | ((values[valuesOffset++] & 0xffffffffL) << 33) | ((values[valuesOffset++] & 0xffffffffL) << 26) | ((values[valuesOffset++] & 0xffffffffL) << 19) | ((values[valuesOffset++] & 0xffffffffL) << 12) | ((values[valuesOffset++] & 0xffffffffL) << 5) | ((values[valuesOffset] & 0xffffffffL) >>> 2); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 62) | ((values[valuesOffset++] & 0xffffffffL) << 55) | ((values[valuesOffset++] & 0xffffffffL) << 48) | ((values[valuesOffset++] & 0xffffffffL) << 41) | ((values[valuesOffset++] & 0xffffffffL) << 34) | ((values[valuesOffset++] & 0xffffffffL) << 27) | ((values[valuesOffset++] & 0xffffffffL) << 20) | ((values[valuesOffset++] & 0xffffffffL) << 13) | ((values[valuesOffset++] & 0xffffffffL) << 6) | ((values[valuesOffset] & 0xffffffffL) >>> 1); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 63) | ((values[valuesOffset++] & 0xffffffffL) << 56) | ((values[valuesOffset++] & 0xffffffffL) << 49) | ((values[valuesOffset++] & 0xffffffffL) << 42) | ((values[valuesOffset++] & 0xffffffffL) << 35) | ((values[valuesOffset++] & 0xffffffffL) << 28) | ((values[valuesOffset++] & 0xffffffffL) << 21) | ((values[valuesOffset++] & 0xffffffffL) << 14) | ((values[valuesOffset++] & 0xffffffffL) << 7) | (values[valuesOffset++] & 0xffffffffL); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] << 57) | (values[valuesOffset++] << 50) | (values[valuesOffset++] << 43) | (values[valuesOffset++] << 36) | (values[valuesOffset++] << 29) | (values[valuesOffset++] << 22) | (values[valuesOffset++] << 15) | (values[valuesOffset++] << 8) | (values[valuesOffset++] << 1) | (values[valuesOffset] >>> 6); - blocks[blocksOffset++] = (values[valuesOffset++] << 58) | (values[valuesOffset++] << 51) | (values[valuesOffset++] << 44) | (values[valuesOffset++] << 37) | (values[valuesOffset++] << 30) | (values[valuesOffset++] << 23) | (values[valuesOffset++] << 16) | (values[valuesOffset++] << 9) | (values[valuesOffset++] << 2) | (values[valuesOffset] >>> 5); - blocks[blocksOffset++] = (values[valuesOffset++] << 59) | (values[valuesOffset++] << 52) | (values[valuesOffset++] << 45) | (values[valuesOffset++] << 38) | (values[valuesOffset++] << 31) | (values[valuesOffset++] << 24) | (values[valuesOffset++] << 17) | (values[valuesOffset++] << 10) | (values[valuesOffset++] << 3) | (values[valuesOffset] >>> 4); - blocks[blocksOffset++] = (values[valuesOffset++] << 60) | (values[valuesOffset++] << 53) | (values[valuesOffset++] << 46) | (values[valuesOffset++] << 39) | (values[valuesOffset++] << 32) | (values[valuesOffset++] << 25) | (values[valuesOffset++] << 18) | (values[valuesOffset++] << 11) | (values[valuesOffset++] << 4) | (values[valuesOffset] >>> 3); - blocks[blocksOffset++] = (values[valuesOffset++] << 61) | (values[valuesOffset++] << 54) | (values[valuesOffset++] << 47) | (values[valuesOffset++] << 40) | (values[valuesOffset++] << 33) | (values[valuesOffset++] << 26) | (values[valuesOffset++] << 19) | (values[valuesOffset++] << 12) | (values[valuesOffset++] << 5) | (values[valuesOffset] >>> 2); - blocks[blocksOffset++] = (values[valuesOffset++] << 62) | (values[valuesOffset++] << 55) | (values[valuesOffset++] << 48) | (values[valuesOffset++] << 41) | (values[valuesOffset++] << 34) | (values[valuesOffset++] << 27) | (values[valuesOffset++] << 20) | (values[valuesOffset++] << 13) | (values[valuesOffset++] << 6) | (values[valuesOffset] >>> 1); - blocks[blocksOffset++] = (values[valuesOffset++] << 63) | (values[valuesOffset++] << 56) | (values[valuesOffset++] << 49) | (values[valuesOffset++] << 42) | (values[valuesOffset++] << 35) | (values[valuesOffset++] << 28) | (values[valuesOffset++] << 21) | (values[valuesOffset++] << 14) | (values[valuesOffset++] << 7) | values[valuesOffset++]; - } - } - } diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked8.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked8.java index 074c52fe322..d6bff434a91 100644 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked8.java +++ b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked8.java @@ -22,15 +22,12 @@ package org.apache.lucene.util.packed; /** * Efficient sequential read/write of packed integers. */ -final class BulkOperationPacked8 extends BulkOperation { - @Override - public int blockCount() { - return 1; - } +final class BulkOperationPacked8 extends BulkOperationPacked { - @Override - public int valueCount() { - return 8; + public BulkOperationPacked8() { + super(8); + assert blockCount() == 1; + assert valueCount() == 8; } @Override @@ -115,22 +112,4 @@ final class BulkOperationPacked8 extends BulkOperation { } } - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 56) | ((values[valuesOffset++] & 0xffffffffL) << 48) | ((values[valuesOffset++] & 0xffffffffL) << 40) | ((values[valuesOffset++] & 0xffffffffL) << 32) | ((values[valuesOffset++] & 0xffffffffL) << 24) | ((values[valuesOffset++] & 0xffffffffL) << 16) | ((values[valuesOffset++] & 0xffffffffL) << 8) | (values[valuesOffset++] & 0xffffffffL); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] << 56) | (values[valuesOffset++] << 48) | (values[valuesOffset++] << 40) | (values[valuesOffset++] << 32) | (values[valuesOffset++] << 24) | (values[valuesOffset++] << 16) | (values[valuesOffset++] << 8) | values[valuesOffset++]; - } - } - } diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked9.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked9.java index f994b042077..270bf05c822 100644 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked9.java +++ b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked9.java @@ -22,15 +22,12 @@ package org.apache.lucene.util.packed; /** * Efficient sequential read/write of packed integers. */ -final class BulkOperationPacked9 extends BulkOperation { - @Override - public int blockCount() { - return 9; - } +final class BulkOperationPacked9 extends BulkOperationPacked { - @Override - public int valueCount() { - return 64; + public BulkOperationPacked9() { + super(9); + assert blockCount() == 9; + assert valueCount() == 64; } @Override @@ -483,38 +480,4 @@ final class BulkOperationPacked9 extends BulkOperation { } } - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 55) | ((values[valuesOffset++] & 0xffffffffL) << 46) | ((values[valuesOffset++] & 0xffffffffL) << 37) | ((values[valuesOffset++] & 0xffffffffL) << 28) | ((values[valuesOffset++] & 0xffffffffL) << 19) | ((values[valuesOffset++] & 0xffffffffL) << 10) | ((values[valuesOffset++] & 0xffffffffL) << 1) | ((values[valuesOffset] & 0xffffffffL) >>> 8); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 56) | ((values[valuesOffset++] & 0xffffffffL) << 47) | ((values[valuesOffset++] & 0xffffffffL) << 38) | ((values[valuesOffset++] & 0xffffffffL) << 29) | ((values[valuesOffset++] & 0xffffffffL) << 20) | ((values[valuesOffset++] & 0xffffffffL) << 11) | ((values[valuesOffset++] & 0xffffffffL) << 2) | ((values[valuesOffset] & 0xffffffffL) >>> 7); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 57) | ((values[valuesOffset++] & 0xffffffffL) << 48) | ((values[valuesOffset++] & 0xffffffffL) << 39) | ((values[valuesOffset++] & 0xffffffffL) << 30) | ((values[valuesOffset++] & 0xffffffffL) << 21) | ((values[valuesOffset++] & 0xffffffffL) << 12) | ((values[valuesOffset++] & 0xffffffffL) << 3) | ((values[valuesOffset] & 0xffffffffL) >>> 6); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 58) | ((values[valuesOffset++] & 0xffffffffL) << 49) | ((values[valuesOffset++] & 0xffffffffL) << 40) | ((values[valuesOffset++] & 0xffffffffL) << 31) | ((values[valuesOffset++] & 0xffffffffL) << 22) | ((values[valuesOffset++] & 0xffffffffL) << 13) | ((values[valuesOffset++] & 0xffffffffL) << 4) | ((values[valuesOffset] & 0xffffffffL) >>> 5); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 59) | ((values[valuesOffset++] & 0xffffffffL) << 50) | ((values[valuesOffset++] & 0xffffffffL) << 41) | ((values[valuesOffset++] & 0xffffffffL) << 32) | ((values[valuesOffset++] & 0xffffffffL) << 23) | ((values[valuesOffset++] & 0xffffffffL) << 14) | ((values[valuesOffset++] & 0xffffffffL) << 5) | ((values[valuesOffset] & 0xffffffffL) >>> 4); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 60) | ((values[valuesOffset++] & 0xffffffffL) << 51) | ((values[valuesOffset++] & 0xffffffffL) << 42) | ((values[valuesOffset++] & 0xffffffffL) << 33) | ((values[valuesOffset++] & 0xffffffffL) << 24) | ((values[valuesOffset++] & 0xffffffffL) << 15) | ((values[valuesOffset++] & 0xffffffffL) << 6) | ((values[valuesOffset] & 0xffffffffL) >>> 3); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 61) | ((values[valuesOffset++] & 0xffffffffL) << 52) | ((values[valuesOffset++] & 0xffffffffL) << 43) | ((values[valuesOffset++] & 0xffffffffL) << 34) | ((values[valuesOffset++] & 0xffffffffL) << 25) | ((values[valuesOffset++] & 0xffffffffL) << 16) | ((values[valuesOffset++] & 0xffffffffL) << 7) | ((values[valuesOffset] & 0xffffffffL) >>> 2); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 62) | ((values[valuesOffset++] & 0xffffffffL) << 53) | ((values[valuesOffset++] & 0xffffffffL) << 44) | ((values[valuesOffset++] & 0xffffffffL) << 35) | ((values[valuesOffset++] & 0xffffffffL) << 26) | ((values[valuesOffset++] & 0xffffffffL) << 17) | ((values[valuesOffset++] & 0xffffffffL) << 8) | ((values[valuesOffset] & 0xffffffffL) >>> 1); - blocks[blocksOffset++] = ((values[valuesOffset++] & 0xffffffffL) << 63) | ((values[valuesOffset++] & 0xffffffffL) << 54) | ((values[valuesOffset++] & 0xffffffffL) << 45) | ((values[valuesOffset++] & 0xffffffffL) << 36) | ((values[valuesOffset++] & 0xffffffffL) << 27) | ((values[valuesOffset++] & 0xffffffffL) << 18) | ((values[valuesOffset++] & 0xffffffffL) << 9) | (values[valuesOffset++] & 0xffffffffL); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] << 55) | (values[valuesOffset++] << 46) | (values[valuesOffset++] << 37) | (values[valuesOffset++] << 28) | (values[valuesOffset++] << 19) | (values[valuesOffset++] << 10) | (values[valuesOffset++] << 1) | (values[valuesOffset] >>> 8); - blocks[blocksOffset++] = (values[valuesOffset++] << 56) | (values[valuesOffset++] << 47) | (values[valuesOffset++] << 38) | (values[valuesOffset++] << 29) | (values[valuesOffset++] << 20) | (values[valuesOffset++] << 11) | (values[valuesOffset++] << 2) | (values[valuesOffset] >>> 7); - blocks[blocksOffset++] = (values[valuesOffset++] << 57) | (values[valuesOffset++] << 48) | (values[valuesOffset++] << 39) | (values[valuesOffset++] << 30) | (values[valuesOffset++] << 21) | (values[valuesOffset++] << 12) | (values[valuesOffset++] << 3) | (values[valuesOffset] >>> 6); - blocks[blocksOffset++] = (values[valuesOffset++] << 58) | (values[valuesOffset++] << 49) | (values[valuesOffset++] << 40) | (values[valuesOffset++] << 31) | (values[valuesOffset++] << 22) | (values[valuesOffset++] << 13) | (values[valuesOffset++] << 4) | (values[valuesOffset] >>> 5); - blocks[blocksOffset++] = (values[valuesOffset++] << 59) | (values[valuesOffset++] << 50) | (values[valuesOffset++] << 41) | (values[valuesOffset++] << 32) | (values[valuesOffset++] << 23) | (values[valuesOffset++] << 14) | (values[valuesOffset++] << 5) | (values[valuesOffset] >>> 4); - blocks[blocksOffset++] = (values[valuesOffset++] << 60) | (values[valuesOffset++] << 51) | (values[valuesOffset++] << 42) | (values[valuesOffset++] << 33) | (values[valuesOffset++] << 24) | (values[valuesOffset++] << 15) | (values[valuesOffset++] << 6) | (values[valuesOffset] >>> 3); - blocks[blocksOffset++] = (values[valuesOffset++] << 61) | (values[valuesOffset++] << 52) | (values[valuesOffset++] << 43) | (values[valuesOffset++] << 34) | (values[valuesOffset++] << 25) | (values[valuesOffset++] << 16) | (values[valuesOffset++] << 7) | (values[valuesOffset] >>> 2); - blocks[blocksOffset++] = (values[valuesOffset++] << 62) | (values[valuesOffset++] << 53) | (values[valuesOffset++] << 44) | (values[valuesOffset++] << 35) | (values[valuesOffset++] << 26) | (values[valuesOffset++] << 17) | (values[valuesOffset++] << 8) | (values[valuesOffset] >>> 1); - blocks[blocksOffset++] = (values[valuesOffset++] << 63) | (values[valuesOffset++] << 54) | (values[valuesOffset++] << 45) | (values[valuesOffset++] << 36) | (values[valuesOffset++] << 27) | (values[valuesOffset++] << 18) | (values[valuesOffset++] << 9) | values[valuesOffset++]; - } - } - } diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPackedSingleBlock.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPackedSingleBlock.java new file mode 100644 index 00000000000..1a7ab9290c4 --- /dev/null +++ b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPackedSingleBlock.java @@ -0,0 +1,173 @@ +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. + */ + +/** + * Non-specialized {@link BulkOperation} for {@link PackedInts.Format#PACKED_SINGLE_BLOCK}. + */ +class BulkOperationPackedSingleBlock extends BulkOperation { + + private static final int BLOCK_COUNT = 1; + + private final int bitsPerValue; + private final int valueCount; + private final long mask; + + public BulkOperationPackedSingleBlock(int bitsPerValue) { + this.bitsPerValue = bitsPerValue; + this.valueCount = 64 / bitsPerValue; + this.mask = (1L << bitsPerValue) - 1; + } + + @Override + public final int blockCount() { + return BLOCK_COUNT; + } + + @Override + public int valueCount() { + return valueCount; + } + + private static long readLong(byte[] blocks, int blocksOffset) { + return (blocks[blocksOffset++] & 0xFFL) << 56 + | (blocks[blocksOffset++] & 0xFFL) << 48 + | (blocks[blocksOffset++] & 0xFFL) << 40 + | (blocks[blocksOffset++] & 0xFFL) << 32 + | (blocks[blocksOffset++] & 0xFFL) << 24 + | (blocks[blocksOffset++] & 0xFFL) << 16 + | (blocks[blocksOffset++] & 0xFFL) << 8 + | blocks[blocksOffset++] & 0xFFL; + } + + private int decode(long block, long[] values, int valuesOffset) { + values[valuesOffset++] = block & mask; + for (int j = 1; j < valueCount; ++j) { + block >>>= bitsPerValue; + values[valuesOffset++] = block & mask; + } + return valuesOffset; + } + + private int decode(long block, int[] values, int valuesOffset) { + values[valuesOffset++] = (int) (block & mask); + for (int j = 1; j < valueCount; ++j) { + block >>>= bitsPerValue; + values[valuesOffset++] = (int) (block & mask); + } + return valuesOffset; + } + + private long encode(long[] values, int valuesOffset) { + long block = values[valuesOffset++]; + for (int j = 1; j < valueCount; ++j) { + block |= values[valuesOffset++] << (j * bitsPerValue); + } + return block; + } + + private long encode(int[] values, int valuesOffset) { + long block = values[valuesOffset++] & 0xFFFFFFFFL; + for (int j = 1; j < valueCount; ++j) { + block |= (values[valuesOffset++] & 0xFFFFFFFFL) << (j * bitsPerValue); + } + return block; + } + + @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++]; + valuesOffset = decode(block, values, valuesOffset); + } + } + + @Override + public void decode(byte[] blocks, int blocksOffset, long[] values, + int valuesOffset, int iterations) { + for (int i = 0; i < iterations; ++i) { + final long block = readLong(blocks, blocksOffset); + blocksOffset += 8; + valuesOffset = decode(block, values, valuesOffset); + } + } + + @Override + public void decode(long[] blocks, int blocksOffset, int[] values, + int valuesOffset, int iterations) { + if (bitsPerValue > 32) { + throw new UnsupportedOperationException("Cannot decode " + bitsPerValue + "-bits values into an int[]"); + } + for (int i = 0; i < iterations; ++i) { + final long block = blocks[blocksOffset++]; + valuesOffset = decode(block, values, valuesOffset); + } + } + + @Override + public void decode(byte[] blocks, int blocksOffset, int[] values, + int valuesOffset, int iterations) { + if (bitsPerValue > 32) { + throw new UnsupportedOperationException("Cannot decode " + bitsPerValue + "-bits values into an int[]"); + } + for (int i = 0; i < iterations; ++i) { + final long block = readLong(blocks, blocksOffset); + blocksOffset += 8; + valuesOffset = decode(block, values, valuesOffset); + } + } + + @Override + public void encode(long[] values, int valuesOffset, long[] blocks, + int blocksOffset, int iterations) { + for (int i = 0; i < iterations; ++i) { + blocks[blocksOffset++] = encode(values, valuesOffset); + valuesOffset += valueCount; + } + } + + @Override + public void encode(int[] values, int valuesOffset, long[] blocks, + int blocksOffset, int iterations) { + for (int i = 0; i < iterations; ++i) { + blocks[blocksOffset++] = encode(values, valuesOffset); + valuesOffset += valueCount; + } + } + + @Override + public void encode(long[] values, int valuesOffset, byte[] blocks, int blocksOffset, int iterations) { + for (int i = 0; i < iterations; ++i) { + final long block = encode(values, valuesOffset); + valuesOffset += valueCount; + blocksOffset = writeLong(block, blocks, blocksOffset); + } + } + + @Override + public void encode(int[] values, int valuesOffset, byte[] blocks, + int blocksOffset, int iterations) { + for (int i = 0; i < iterations; ++i) { + final long block = encode(values, valuesOffset); + valuesOffset += valueCount; + blocksOffset = writeLong(block, blocks, blocksOffset); + } + } + +} diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPackedSingleBlock1.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPackedSingleBlock1.java index d2b0f560c54..4151ca38d25 100644 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPackedSingleBlock1.java +++ b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPackedSingleBlock1.java @@ -22,15 +22,10 @@ package org.apache.lucene.util.packed; /** * Efficient sequential read/write of packed integers. */ -final class BulkOperationPackedSingleBlock1 extends BulkOperation { - @Override - public int blockCount() { - return 1; - } +final class BulkOperationPackedSingleBlock1 extends BulkOperationPackedSingleBlock { - @Override - public int valueCount() { - return 64; + public BulkOperationPackedSingleBlock1() { + super(1); } @Override @@ -339,22 +334,4 @@ final class BulkOperationPackedSingleBlock1 extends BulkOperation { } } - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] & 0xffffffffL) | ((values[valuesOffset++] & 0xffffffffL) << 1) | ((values[valuesOffset++] & 0xffffffffL) << 2) | ((values[valuesOffset++] & 0xffffffffL) << 3) | ((values[valuesOffset++] & 0xffffffffL) << 4) | ((values[valuesOffset++] & 0xffffffffL) << 5) | ((values[valuesOffset++] & 0xffffffffL) << 6) | ((values[valuesOffset++] & 0xffffffffL) << 7) | ((values[valuesOffset++] & 0xffffffffL) << 8) | ((values[valuesOffset++] & 0xffffffffL) << 9) | ((values[valuesOffset++] & 0xffffffffL) << 10) | ((values[valuesOffset++] & 0xffffffffL) << 11) | ((values[valuesOffset++] & 0xffffffffL) << 12) | ((values[valuesOffset++] & 0xffffffffL) << 13) | ((values[valuesOffset++] & 0xffffffffL) << 14) | ((values[valuesOffset++] & 0xffffffffL) << 15) | ((values[valuesOffset++] & 0xffffffffL) << 16) | ((values[valuesOffset++] & 0xffffffffL) << 17) | ((values[valuesOffset++] & 0xffffffffL) << 18) | ((values[valuesOffset++] & 0xffffffffL) << 19) | ((values[valuesOffset++] & 0xffffffffL) << 20) | ((values[valuesOffset++] & 0xffffffffL) << 21) | ((values[valuesOffset++] & 0xffffffffL) << 22) | ((values[valuesOffset++] & 0xffffffffL) << 23) | ((values[valuesOffset++] & 0xffffffffL) << 24) | ((values[valuesOffset++] & 0xffffffffL) << 25) | ((values[valuesOffset++] & 0xffffffffL) << 26) | ((values[valuesOffset++] & 0xffffffffL) << 27) | ((values[valuesOffset++] & 0xffffffffL) << 28) | ((values[valuesOffset++] & 0xffffffffL) << 29) | ((values[valuesOffset++] & 0xffffffffL) << 30) | ((values[valuesOffset++] & 0xffffffffL) << 31) | ((values[valuesOffset++] & 0xffffffffL) << 32) | ((values[valuesOffset++] & 0xffffffffL) << 33) | ((values[valuesOffset++] & 0xffffffffL) << 34) | ((values[valuesOffset++] & 0xffffffffL) << 35) | ((values[valuesOffset++] & 0xffffffffL) << 36) | ((values[valuesOffset++] & 0xffffffffL) << 37) | ((values[valuesOffset++] & 0xffffffffL) << 38) | ((values[valuesOffset++] & 0xffffffffL) << 39) | ((values[valuesOffset++] & 0xffffffffL) << 40) | ((values[valuesOffset++] & 0xffffffffL) << 41) | ((values[valuesOffset++] & 0xffffffffL) << 42) | ((values[valuesOffset++] & 0xffffffffL) << 43) | ((values[valuesOffset++] & 0xffffffffL) << 44) | ((values[valuesOffset++] & 0xffffffffL) << 45) | ((values[valuesOffset++] & 0xffffffffL) << 46) | ((values[valuesOffset++] & 0xffffffffL) << 47) | ((values[valuesOffset++] & 0xffffffffL) << 48) | ((values[valuesOffset++] & 0xffffffffL) << 49) | ((values[valuesOffset++] & 0xffffffffL) << 50) | ((values[valuesOffset++] & 0xffffffffL) << 51) | ((values[valuesOffset++] & 0xffffffffL) << 52) | ((values[valuesOffset++] & 0xffffffffL) << 53) | ((values[valuesOffset++] & 0xffffffffL) << 54) | ((values[valuesOffset++] & 0xffffffffL) << 55) | ((values[valuesOffset++] & 0xffffffffL) << 56) | ((values[valuesOffset++] & 0xffffffffL) << 57) | ((values[valuesOffset++] & 0xffffffffL) << 58) | ((values[valuesOffset++] & 0xffffffffL) << 59) | ((values[valuesOffset++] & 0xffffffffL) << 60) | ((values[valuesOffset++] & 0xffffffffL) << 61) | ((values[valuesOffset++] & 0xffffffffL) << 62) | ((values[valuesOffset++] & 0xffffffffL) << 63); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = values[valuesOffset++] | (values[valuesOffset++] << 1) | (values[valuesOffset++] << 2) | (values[valuesOffset++] << 3) | (values[valuesOffset++] << 4) | (values[valuesOffset++] << 5) | (values[valuesOffset++] << 6) | (values[valuesOffset++] << 7) | (values[valuesOffset++] << 8) | (values[valuesOffset++] << 9) | (values[valuesOffset++] << 10) | (values[valuesOffset++] << 11) | (values[valuesOffset++] << 12) | (values[valuesOffset++] << 13) | (values[valuesOffset++] << 14) | (values[valuesOffset++] << 15) | (values[valuesOffset++] << 16) | (values[valuesOffset++] << 17) | (values[valuesOffset++] << 18) | (values[valuesOffset++] << 19) | (values[valuesOffset++] << 20) | (values[valuesOffset++] << 21) | (values[valuesOffset++] << 22) | (values[valuesOffset++] << 23) | (values[valuesOffset++] << 24) | (values[valuesOffset++] << 25) | (values[valuesOffset++] << 26) | (values[valuesOffset++] << 27) | (values[valuesOffset++] << 28) | (values[valuesOffset++] << 29) | (values[valuesOffset++] << 30) | (values[valuesOffset++] << 31) | (values[valuesOffset++] << 32) | (values[valuesOffset++] << 33) | (values[valuesOffset++] << 34) | (values[valuesOffset++] << 35) | (values[valuesOffset++] << 36) | (values[valuesOffset++] << 37) | (values[valuesOffset++] << 38) | (values[valuesOffset++] << 39) | (values[valuesOffset++] << 40) | (values[valuesOffset++] << 41) | (values[valuesOffset++] << 42) | (values[valuesOffset++] << 43) | (values[valuesOffset++] << 44) | (values[valuesOffset++] << 45) | (values[valuesOffset++] << 46) | (values[valuesOffset++] << 47) | (values[valuesOffset++] << 48) | (values[valuesOffset++] << 49) | (values[valuesOffset++] << 50) | (values[valuesOffset++] << 51) | (values[valuesOffset++] << 52) | (values[valuesOffset++] << 53) | (values[valuesOffset++] << 54) | (values[valuesOffset++] << 55) | (values[valuesOffset++] << 56) | (values[valuesOffset++] << 57) | (values[valuesOffset++] << 58) | (values[valuesOffset++] << 59) | (values[valuesOffset++] << 60) | (values[valuesOffset++] << 61) | (values[valuesOffset++] << 62) | (values[valuesOffset++] << 63); - } - } - } diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPackedSingleBlock10.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPackedSingleBlock10.java index 826f78b4191..77f68169cd0 100644 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPackedSingleBlock10.java +++ b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPackedSingleBlock10.java @@ -22,15 +22,10 @@ package org.apache.lucene.util.packed; /** * Efficient sequential read/write of packed integers. */ -final class BulkOperationPackedSingleBlock10 extends BulkOperation { - @Override - public int blockCount() { - return 1; - } +final class BulkOperationPackedSingleBlock10 extends BulkOperationPackedSingleBlock { - @Override - public int valueCount() { - return 6; + public BulkOperationPackedSingleBlock10() { + super(10); } @Override @@ -107,22 +102,4 @@ final class BulkOperationPackedSingleBlock10 extends BulkOperation { } } - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] & 0xffffffffL) | ((values[valuesOffset++] & 0xffffffffL) << 10) | ((values[valuesOffset++] & 0xffffffffL) << 20) | ((values[valuesOffset++] & 0xffffffffL) << 30) | ((values[valuesOffset++] & 0xffffffffL) << 40) | ((values[valuesOffset++] & 0xffffffffL) << 50); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = values[valuesOffset++] | (values[valuesOffset++] << 10) | (values[valuesOffset++] << 20) | (values[valuesOffset++] << 30) | (values[valuesOffset++] << 40) | (values[valuesOffset++] << 50); - } - } - } diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPackedSingleBlock12.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPackedSingleBlock12.java index 1f4af518a9c..71114cd93bd 100644 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPackedSingleBlock12.java +++ b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPackedSingleBlock12.java @@ -22,15 +22,10 @@ package org.apache.lucene.util.packed; /** * Efficient sequential read/write of packed integers. */ -final class BulkOperationPackedSingleBlock12 extends BulkOperation { - @Override - public int blockCount() { - return 1; - } +final class BulkOperationPackedSingleBlock12 extends BulkOperationPackedSingleBlock { - @Override - public int valueCount() { - return 5; + public BulkOperationPackedSingleBlock12() { + super(12); } @Override @@ -103,22 +98,4 @@ final class BulkOperationPackedSingleBlock12 extends BulkOperation { } } - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] & 0xffffffffL) | ((values[valuesOffset++] & 0xffffffffL) << 12) | ((values[valuesOffset++] & 0xffffffffL) << 24) | ((values[valuesOffset++] & 0xffffffffL) << 36) | ((values[valuesOffset++] & 0xffffffffL) << 48); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = values[valuesOffset++] | (values[valuesOffset++] << 12) | (values[valuesOffset++] << 24) | (values[valuesOffset++] << 36) | (values[valuesOffset++] << 48); - } - } - } diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPackedSingleBlock16.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPackedSingleBlock16.java index 46f831a3061..bde3be5cfa2 100644 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPackedSingleBlock16.java +++ b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPackedSingleBlock16.java @@ -22,15 +22,10 @@ package org.apache.lucene.util.packed; /** * Efficient sequential read/write of packed integers. */ -final class BulkOperationPackedSingleBlock16 extends BulkOperation { - @Override - public int blockCount() { - return 1; - } +final class BulkOperationPackedSingleBlock16 extends BulkOperationPackedSingleBlock { - @Override - public int valueCount() { - return 4; + public BulkOperationPackedSingleBlock16() { + super(16); } @Override @@ -99,22 +94,4 @@ final class BulkOperationPackedSingleBlock16 extends BulkOperation { } } - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] & 0xffffffffL) | ((values[valuesOffset++] & 0xffffffffL) << 16) | ((values[valuesOffset++] & 0xffffffffL) << 32) | ((values[valuesOffset++] & 0xffffffffL) << 48); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = values[valuesOffset++] | (values[valuesOffset++] << 16) | (values[valuesOffset++] << 32) | (values[valuesOffset++] << 48); - } - } - } diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPackedSingleBlock2.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPackedSingleBlock2.java index a7de63eb31a..1e1326adff8 100644 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPackedSingleBlock2.java +++ b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPackedSingleBlock2.java @@ -22,15 +22,10 @@ package org.apache.lucene.util.packed; /** * Efficient sequential read/write of packed integers. */ -final class BulkOperationPackedSingleBlock2 extends BulkOperation { - @Override - public int blockCount() { - return 1; - } +final class BulkOperationPackedSingleBlock2 extends BulkOperationPackedSingleBlock { - @Override - public int valueCount() { - return 32; + public BulkOperationPackedSingleBlock2() { + super(2); } @Override @@ -211,22 +206,4 @@ final class BulkOperationPackedSingleBlock2 extends BulkOperation { } } - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] & 0xffffffffL) | ((values[valuesOffset++] & 0xffffffffL) << 2) | ((values[valuesOffset++] & 0xffffffffL) << 4) | ((values[valuesOffset++] & 0xffffffffL) << 6) | ((values[valuesOffset++] & 0xffffffffL) << 8) | ((values[valuesOffset++] & 0xffffffffL) << 10) | ((values[valuesOffset++] & 0xffffffffL) << 12) | ((values[valuesOffset++] & 0xffffffffL) << 14) | ((values[valuesOffset++] & 0xffffffffL) << 16) | ((values[valuesOffset++] & 0xffffffffL) << 18) | ((values[valuesOffset++] & 0xffffffffL) << 20) | ((values[valuesOffset++] & 0xffffffffL) << 22) | ((values[valuesOffset++] & 0xffffffffL) << 24) | ((values[valuesOffset++] & 0xffffffffL) << 26) | ((values[valuesOffset++] & 0xffffffffL) << 28) | ((values[valuesOffset++] & 0xffffffffL) << 30) | ((values[valuesOffset++] & 0xffffffffL) << 32) | ((values[valuesOffset++] & 0xffffffffL) << 34) | ((values[valuesOffset++] & 0xffffffffL) << 36) | ((values[valuesOffset++] & 0xffffffffL) << 38) | ((values[valuesOffset++] & 0xffffffffL) << 40) | ((values[valuesOffset++] & 0xffffffffL) << 42) | ((values[valuesOffset++] & 0xffffffffL) << 44) | ((values[valuesOffset++] & 0xffffffffL) << 46) | ((values[valuesOffset++] & 0xffffffffL) << 48) | ((values[valuesOffset++] & 0xffffffffL) << 50) | ((values[valuesOffset++] & 0xffffffffL) << 52) | ((values[valuesOffset++] & 0xffffffffL) << 54) | ((values[valuesOffset++] & 0xffffffffL) << 56) | ((values[valuesOffset++] & 0xffffffffL) << 58) | ((values[valuesOffset++] & 0xffffffffL) << 60) | ((values[valuesOffset++] & 0xffffffffL) << 62); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = values[valuesOffset++] | (values[valuesOffset++] << 2) | (values[valuesOffset++] << 4) | (values[valuesOffset++] << 6) | (values[valuesOffset++] << 8) | (values[valuesOffset++] << 10) | (values[valuesOffset++] << 12) | (values[valuesOffset++] << 14) | (values[valuesOffset++] << 16) | (values[valuesOffset++] << 18) | (values[valuesOffset++] << 20) | (values[valuesOffset++] << 22) | (values[valuesOffset++] << 24) | (values[valuesOffset++] << 26) | (values[valuesOffset++] << 28) | (values[valuesOffset++] << 30) | (values[valuesOffset++] << 32) | (values[valuesOffset++] << 34) | (values[valuesOffset++] << 36) | (values[valuesOffset++] << 38) | (values[valuesOffset++] << 40) | (values[valuesOffset++] << 42) | (values[valuesOffset++] << 44) | (values[valuesOffset++] << 46) | (values[valuesOffset++] << 48) | (values[valuesOffset++] << 50) | (values[valuesOffset++] << 52) | (values[valuesOffset++] << 54) | (values[valuesOffset++] << 56) | (values[valuesOffset++] << 58) | (values[valuesOffset++] << 60) | (values[valuesOffset++] << 62); - } - } - } diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPackedSingleBlock21.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPackedSingleBlock21.java index 1b85f4bd3c4..e1f80594bcc 100644 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPackedSingleBlock21.java +++ b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPackedSingleBlock21.java @@ -22,15 +22,10 @@ package org.apache.lucene.util.packed; /** * Efficient sequential read/write of packed integers. */ -final class BulkOperationPackedSingleBlock21 extends BulkOperation { - @Override - public int blockCount() { - return 1; - } +final class BulkOperationPackedSingleBlock21 extends BulkOperationPackedSingleBlock { - @Override - public int valueCount() { - return 3; + public BulkOperationPackedSingleBlock21() { + super(21); } @Override @@ -95,22 +90,4 @@ final class BulkOperationPackedSingleBlock21 extends BulkOperation { } } - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] & 0xffffffffL) | ((values[valuesOffset++] & 0xffffffffL) << 21) | ((values[valuesOffset++] & 0xffffffffL) << 42); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = values[valuesOffset++] | (values[valuesOffset++] << 21) | (values[valuesOffset++] << 42); - } - } - } diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPackedSingleBlock3.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPackedSingleBlock3.java index 1ee530d3e7b..3d37957fb7f 100644 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPackedSingleBlock3.java +++ b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPackedSingleBlock3.java @@ -22,15 +22,10 @@ package org.apache.lucene.util.packed; /** * Efficient sequential read/write of packed integers. */ -final class BulkOperationPackedSingleBlock3 extends BulkOperation { - @Override - public int blockCount() { - return 1; - } +final class BulkOperationPackedSingleBlock3 extends BulkOperationPackedSingleBlock { - @Override - public int valueCount() { - return 21; + public BulkOperationPackedSingleBlock3() { + super(3); } @Override @@ -167,22 +162,4 @@ final class BulkOperationPackedSingleBlock3 extends BulkOperation { } } - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] & 0xffffffffL) | ((values[valuesOffset++] & 0xffffffffL) << 3) | ((values[valuesOffset++] & 0xffffffffL) << 6) | ((values[valuesOffset++] & 0xffffffffL) << 9) | ((values[valuesOffset++] & 0xffffffffL) << 12) | ((values[valuesOffset++] & 0xffffffffL) << 15) | ((values[valuesOffset++] & 0xffffffffL) << 18) | ((values[valuesOffset++] & 0xffffffffL) << 21) | ((values[valuesOffset++] & 0xffffffffL) << 24) | ((values[valuesOffset++] & 0xffffffffL) << 27) | ((values[valuesOffset++] & 0xffffffffL) << 30) | ((values[valuesOffset++] & 0xffffffffL) << 33) | ((values[valuesOffset++] & 0xffffffffL) << 36) | ((values[valuesOffset++] & 0xffffffffL) << 39) | ((values[valuesOffset++] & 0xffffffffL) << 42) | ((values[valuesOffset++] & 0xffffffffL) << 45) | ((values[valuesOffset++] & 0xffffffffL) << 48) | ((values[valuesOffset++] & 0xffffffffL) << 51) | ((values[valuesOffset++] & 0xffffffffL) << 54) | ((values[valuesOffset++] & 0xffffffffL) << 57) | ((values[valuesOffset++] & 0xffffffffL) << 60); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = values[valuesOffset++] | (values[valuesOffset++] << 3) | (values[valuesOffset++] << 6) | (values[valuesOffset++] << 9) | (values[valuesOffset++] << 12) | (values[valuesOffset++] << 15) | (values[valuesOffset++] << 18) | (values[valuesOffset++] << 21) | (values[valuesOffset++] << 24) | (values[valuesOffset++] << 27) | (values[valuesOffset++] << 30) | (values[valuesOffset++] << 33) | (values[valuesOffset++] << 36) | (values[valuesOffset++] << 39) | (values[valuesOffset++] << 42) | (values[valuesOffset++] << 45) | (values[valuesOffset++] << 48) | (values[valuesOffset++] << 51) | (values[valuesOffset++] << 54) | (values[valuesOffset++] << 57) | (values[valuesOffset++] << 60); - } - } - } diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPackedSingleBlock32.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPackedSingleBlock32.java deleted file mode 100644 index 0a4f395e46c..00000000000 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPackedSingleBlock32.java +++ /dev/null @@ -1,112 +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 BulkOperationPackedSingleBlock32 extends BulkOperation { - @Override - public int blockCount() { - return 1; - } - - @Override - public int valueCount() { - return 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 & 4294967295L); - values[valuesOffset++] = (int) (block >>> 32); - } - } - - @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 << 16) | (byte3 << 24); - values[valuesOffset++] = byte4 | (byte5 << 8) | (byte6 << 16) | (byte7 << 24); - } - } - - @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 & 4294967295L; - values[valuesOffset++] = block >>> 32; - } - } - - @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 byte7 = blocks[blocksOffset++] & 0xFF; - final long byte6 = blocks[blocksOffset++] & 0xFF; - final long byte5 = blocks[blocksOffset++] & 0xFF; - final long byte4 = blocks[blocksOffset++] & 0xFF; - final long byte3 = blocks[blocksOffset++] & 0xFF; - final long byte2 = blocks[blocksOffset++] & 0xFF; - final long byte1 = blocks[blocksOffset++] & 0xFF; - final long byte0 = blocks[blocksOffset++] & 0xFF; - values[valuesOffset++] = byte0 | (byte1 << 8) | (byte2 << 16) | (byte3 << 24); - values[valuesOffset++] = byte4 | (byte5 << 8) | (byte6 << 16) | (byte7 << 24); - } - } - - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] & 0xffffffffL) | ((values[valuesOffset++] & 0xffffffffL) << 32); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = values[valuesOffset++] | (values[valuesOffset++] << 32); - } - } - -} diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPackedSingleBlock4.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPackedSingleBlock4.java index 0062c3615b6..e0816fe7cce 100644 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPackedSingleBlock4.java +++ b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPackedSingleBlock4.java @@ -22,15 +22,10 @@ package org.apache.lucene.util.packed; /** * Efficient sequential read/write of packed integers. */ -final class BulkOperationPackedSingleBlock4 extends BulkOperation { - @Override - public int blockCount() { - return 1; - } +final class BulkOperationPackedSingleBlock4 extends BulkOperationPackedSingleBlock { - @Override - public int valueCount() { - return 16; + public BulkOperationPackedSingleBlock4() { + super(4); } @Override @@ -147,22 +142,4 @@ final class BulkOperationPackedSingleBlock4 extends BulkOperation { } } - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] & 0xffffffffL) | ((values[valuesOffset++] & 0xffffffffL) << 4) | ((values[valuesOffset++] & 0xffffffffL) << 8) | ((values[valuesOffset++] & 0xffffffffL) << 12) | ((values[valuesOffset++] & 0xffffffffL) << 16) | ((values[valuesOffset++] & 0xffffffffL) << 20) | ((values[valuesOffset++] & 0xffffffffL) << 24) | ((values[valuesOffset++] & 0xffffffffL) << 28) | ((values[valuesOffset++] & 0xffffffffL) << 32) | ((values[valuesOffset++] & 0xffffffffL) << 36) | ((values[valuesOffset++] & 0xffffffffL) << 40) | ((values[valuesOffset++] & 0xffffffffL) << 44) | ((values[valuesOffset++] & 0xffffffffL) << 48) | ((values[valuesOffset++] & 0xffffffffL) << 52) | ((values[valuesOffset++] & 0xffffffffL) << 56) | ((values[valuesOffset++] & 0xffffffffL) << 60); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = values[valuesOffset++] | (values[valuesOffset++] << 4) | (values[valuesOffset++] << 8) | (values[valuesOffset++] << 12) | (values[valuesOffset++] << 16) | (values[valuesOffset++] << 20) | (values[valuesOffset++] << 24) | (values[valuesOffset++] << 28) | (values[valuesOffset++] << 32) | (values[valuesOffset++] << 36) | (values[valuesOffset++] << 40) | (values[valuesOffset++] << 44) | (values[valuesOffset++] << 48) | (values[valuesOffset++] << 52) | (values[valuesOffset++] << 56) | (values[valuesOffset++] << 60); - } - } - } diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPackedSingleBlock5.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPackedSingleBlock5.java index e6e4b6c5b25..be3b9b1e107 100644 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPackedSingleBlock5.java +++ b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPackedSingleBlock5.java @@ -22,15 +22,10 @@ package org.apache.lucene.util.packed; /** * Efficient sequential read/write of packed integers. */ -final class BulkOperationPackedSingleBlock5 extends BulkOperation { - @Override - public int blockCount() { - return 1; - } +final class BulkOperationPackedSingleBlock5 extends BulkOperationPackedSingleBlock { - @Override - public int valueCount() { - return 12; + public BulkOperationPackedSingleBlock5() { + super(5); } @Override @@ -131,22 +126,4 @@ final class BulkOperationPackedSingleBlock5 extends BulkOperation { } } - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] & 0xffffffffL) | ((values[valuesOffset++] & 0xffffffffL) << 5) | ((values[valuesOffset++] & 0xffffffffL) << 10) | ((values[valuesOffset++] & 0xffffffffL) << 15) | ((values[valuesOffset++] & 0xffffffffL) << 20) | ((values[valuesOffset++] & 0xffffffffL) << 25) | ((values[valuesOffset++] & 0xffffffffL) << 30) | ((values[valuesOffset++] & 0xffffffffL) << 35) | ((values[valuesOffset++] & 0xffffffffL) << 40) | ((values[valuesOffset++] & 0xffffffffL) << 45) | ((values[valuesOffset++] & 0xffffffffL) << 50) | ((values[valuesOffset++] & 0xffffffffL) << 55); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = values[valuesOffset++] | (values[valuesOffset++] << 5) | (values[valuesOffset++] << 10) | (values[valuesOffset++] << 15) | (values[valuesOffset++] << 20) | (values[valuesOffset++] << 25) | (values[valuesOffset++] << 30) | (values[valuesOffset++] << 35) | (values[valuesOffset++] << 40) | (values[valuesOffset++] << 45) | (values[valuesOffset++] << 50) | (values[valuesOffset++] << 55); - } - } - } diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPackedSingleBlock6.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPackedSingleBlock6.java index e60e36c5489..53c7a755de5 100644 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPackedSingleBlock6.java +++ b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPackedSingleBlock6.java @@ -22,15 +22,10 @@ package org.apache.lucene.util.packed; /** * Efficient sequential read/write of packed integers. */ -final class BulkOperationPackedSingleBlock6 extends BulkOperation { - @Override - public int blockCount() { - return 1; - } +final class BulkOperationPackedSingleBlock6 extends BulkOperationPackedSingleBlock { - @Override - public int valueCount() { - return 10; + public BulkOperationPackedSingleBlock6() { + super(6); } @Override @@ -123,22 +118,4 @@ final class BulkOperationPackedSingleBlock6 extends BulkOperation { } } - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] & 0xffffffffL) | ((values[valuesOffset++] & 0xffffffffL) << 6) | ((values[valuesOffset++] & 0xffffffffL) << 12) | ((values[valuesOffset++] & 0xffffffffL) << 18) | ((values[valuesOffset++] & 0xffffffffL) << 24) | ((values[valuesOffset++] & 0xffffffffL) << 30) | ((values[valuesOffset++] & 0xffffffffL) << 36) | ((values[valuesOffset++] & 0xffffffffL) << 42) | ((values[valuesOffset++] & 0xffffffffL) << 48) | ((values[valuesOffset++] & 0xffffffffL) << 54); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = values[valuesOffset++] | (values[valuesOffset++] << 6) | (values[valuesOffset++] << 12) | (values[valuesOffset++] << 18) | (values[valuesOffset++] << 24) | (values[valuesOffset++] << 30) | (values[valuesOffset++] << 36) | (values[valuesOffset++] << 42) | (values[valuesOffset++] << 48) | (values[valuesOffset++] << 54); - } - } - } diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPackedSingleBlock7.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPackedSingleBlock7.java index fc90ebca1c5..84a2a59cef9 100644 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPackedSingleBlock7.java +++ b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPackedSingleBlock7.java @@ -22,15 +22,10 @@ package org.apache.lucene.util.packed; /** * Efficient sequential read/write of packed integers. */ -final class BulkOperationPackedSingleBlock7 extends BulkOperation { - @Override - public int blockCount() { - return 1; - } +final class BulkOperationPackedSingleBlock7 extends BulkOperationPackedSingleBlock { - @Override - public int valueCount() { - return 9; + public BulkOperationPackedSingleBlock7() { + super(7); } @Override @@ -119,22 +114,4 @@ final class BulkOperationPackedSingleBlock7 extends BulkOperation { } } - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] & 0xffffffffL) | ((values[valuesOffset++] & 0xffffffffL) << 7) | ((values[valuesOffset++] & 0xffffffffL) << 14) | ((values[valuesOffset++] & 0xffffffffL) << 21) | ((values[valuesOffset++] & 0xffffffffL) << 28) | ((values[valuesOffset++] & 0xffffffffL) << 35) | ((values[valuesOffset++] & 0xffffffffL) << 42) | ((values[valuesOffset++] & 0xffffffffL) << 49) | ((values[valuesOffset++] & 0xffffffffL) << 56); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = values[valuesOffset++] | (values[valuesOffset++] << 7) | (values[valuesOffset++] << 14) | (values[valuesOffset++] << 21) | (values[valuesOffset++] << 28) | (values[valuesOffset++] << 35) | (values[valuesOffset++] << 42) | (values[valuesOffset++] << 49) | (values[valuesOffset++] << 56); - } - } - } diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPackedSingleBlock8.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPackedSingleBlock8.java index bfc6e5f8908..d95b3fccb15 100644 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPackedSingleBlock8.java +++ b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPackedSingleBlock8.java @@ -22,15 +22,10 @@ package org.apache.lucene.util.packed; /** * Efficient sequential read/write of packed integers. */ -final class BulkOperationPackedSingleBlock8 extends BulkOperation { - @Override - public int blockCount() { - return 1; - } +final class BulkOperationPackedSingleBlock8 extends BulkOperationPackedSingleBlock { - @Override - public int valueCount() { - return 8; + public BulkOperationPackedSingleBlock8() { + super(8); } @Override @@ -115,22 +110,4 @@ final class BulkOperationPackedSingleBlock8 extends BulkOperation { } } - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] & 0xffffffffL) | ((values[valuesOffset++] & 0xffffffffL) << 8) | ((values[valuesOffset++] & 0xffffffffL) << 16) | ((values[valuesOffset++] & 0xffffffffL) << 24) | ((values[valuesOffset++] & 0xffffffffL) << 32) | ((values[valuesOffset++] & 0xffffffffL) << 40) | ((values[valuesOffset++] & 0xffffffffL) << 48) | ((values[valuesOffset++] & 0xffffffffL) << 56); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = values[valuesOffset++] | (values[valuesOffset++] << 8) | (values[valuesOffset++] << 16) | (values[valuesOffset++] << 24) | (values[valuesOffset++] << 32) | (values[valuesOffset++] << 40) | (values[valuesOffset++] << 48) | (values[valuesOffset++] << 56); - } - } - } diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPackedSingleBlock9.java b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPackedSingleBlock9.java index 0264413fe70..728342881a2 100644 --- a/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPackedSingleBlock9.java +++ b/lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPackedSingleBlock9.java @@ -22,15 +22,10 @@ package org.apache.lucene.util.packed; /** * Efficient sequential read/write of packed integers. */ -final class BulkOperationPackedSingleBlock9 extends BulkOperation { - @Override - public int blockCount() { - return 1; - } +final class BulkOperationPackedSingleBlock9 extends BulkOperationPackedSingleBlock { - @Override - public int valueCount() { - return 7; + public BulkOperationPackedSingleBlock9() { + super(9); } @Override @@ -111,22 +106,4 @@ final class BulkOperationPackedSingleBlock9 extends BulkOperation { } } - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = (values[valuesOffset++] & 0xffffffffL) | ((values[valuesOffset++] & 0xffffffffL) << 9) | ((values[valuesOffset++] & 0xffffffffL) << 18) | ((values[valuesOffset++] & 0xffffffffL) << 27) | ((values[valuesOffset++] & 0xffffffffL) << 36) | ((values[valuesOffset++] & 0xffffffffL) << 45) | ((values[valuesOffset++] & 0xffffffffL) << 54); - } - } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - assert blocksOffset + iterations * blockCount() <= blocks.length; - assert valuesOffset + iterations * valueCount() <= values.length; - for (int i = 0; i < iterations; ++i) { - blocks[blocksOffset++] = values[valuesOffset++] | (values[valuesOffset++] << 9) | (values[valuesOffset++] << 18) | (values[valuesOffset++] << 27) | (values[valuesOffset++] << 36) | (values[valuesOffset++] << 45) | (values[valuesOffset++] << 54); - } - } - } diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/gen_BulkOperation.py b/lucene/core/src/java/org/apache/lucene/util/packed/gen_BulkOperation.py index 2982edfb8e0..a050f2b6257 100644 --- a/lucene/core/src/java/org/apache/lucene/util/packed/gen_BulkOperation.py +++ b/lucene/core/src/java/org/apache/lucene/util/packed/gen_BulkOperation.py @@ -19,6 +19,7 @@ from fractions import gcd """Code generation for bulk operations""" +MAX_SPECIALIZED_BITS_PER_VALUE = 24; PACKED_64_SINGLE_BLOCK_BPV = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 16, 21, 32] OUTPUT_FILE = "BulkOperation.java" HEADER = """// This file has been automatically generated, DO NOT EDIT @@ -45,32 +46,11 @@ package org.apache.lucene.util.packed; """ FOOTER=""" - - private static long[] toLongArray(int[] ints, int offset, int length) { - long[] arr = new long[length]; - for (int i = 0; i < length; ++i) { - arr[i] = ints[offset + i]; + protected int writeLong(long block, byte[] blocks, int blocksOffset) { + for (int j = 1; j <= 8; ++j) { + blocks[blocksOffset++] = (byte) (block >>> (64 - (j << 3))); } - return arr; - } - - @Override - public void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - encode(toLongArray(values, valuesOffset, iterations * valueCount()), 0, blocks, blocksOffset, iterations); - } - - @Override - public void encode(long[] values, int valuesOffset, byte[] blocks, int blocksOffset, int iterations) { - final long[] longBLocks = new long[blockCount() * iterations]; - encode(values, valuesOffset, longBLocks, 0, iterations); - ByteBuffer.wrap(blocks, blocksOffset, 8 * iterations * blockCount()).asLongBuffer().put(longBLocks); - } - - @Override - public void encode(int[] values, int valuesOffset, byte[] blocks, int blocksOffset, int iterations) { - final long[] longBLocks = new long[blockCount() * iterations]; - encode(values, valuesOffset, longBLocks, 0, iterations); - ByteBuffer.wrap(blocks, blocksOffset, 8 * iterations * blockCount()).asLongBuffer().put(longBLocks); + return blocksOffset; } /** @@ -140,18 +120,12 @@ def get_type(bits): def packed64singleblock(bpv, f): values = 64 / bpv - f.write(" @Override\n") - f.write(" public int blockCount() {\n") - f.write(" return 1;\n") - f.write(" }\n\n") - f.write(" @Override\n") - f.write(" public int valueCount() {\n") - f.write(" return %d;\n" %values) + 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) - p64sb_encode(bpv, f, 32) - p64sb_encode(bpv, f, 64) def p64sb_decode(bpv, f, bits): values = 64 / bpv @@ -227,31 +201,6 @@ def p64sb_decode(bpv, f, bits): f.write(" }\n") f.write(" }\n\n") -def p64sb_encode(bpv, f, bits): - values = 64 / bpv - typ = get_type(bits) - mask_start, mask_end = masks(bits) - f.write(" @Override\n") - f.write(" public void encode(%s[] values, int valuesOffset, long[] blocks, int blocksOffset, 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") - for i in xrange(values): - block_offset = i / values - offset_in_block = i % values - if i == 0: - f.write(" blocks[blocksOffset++] = %svalues[valuesOffset++]%s" %(mask_start, mask_end)) - else: - f.write(" | (%svalues[valuesOffset++]%s << %d)" %(mask_start, mask_end, i * bpv)) - if i == values - 1: - f.write(";\n") - f.write(" }\n") - f.write(" }\n\n") - def packed64(bpv, f): blocks = bpv values = blocks * 64 / bpv @@ -260,13 +209,12 @@ def packed64(bpv, f): values /= 2 assert values * bpv == 64 * blocks, "%d values, %d blocks, %d bits per value" %(values, blocks, bpv) mask = (1 << bpv) - 1 - f.write(" @Override\n") - f.write(" public int blockCount() {\n") - f.write(" return %d;\n" %blocks) - f.write(" }\n\n") - f.write(" @Override\n") - f.write(" public int valueCount() {\n") - f.write(" return %d;\n" %values) + + 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") if bpv == 64: @@ -289,17 +237,10 @@ def packed64(bpv, f): public void decode(byte[] blocks, int blocksOffset, long[] values, int valuesOffset, int iterations) { LongBuffer.wrap(values, valuesOffset, iterations * valueCount()).put(ByteBuffer.wrap(blocks, blocksOffset, 8 * iterations * blockCount()).asLongBuffer()); } - - @Override - public void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) { - System.arraycopy(values, valuesOffset, blocks, blocksOffset, valueCount() * iterations); - } """) else: p64_decode(bpv, f, 32, values) p64_decode(bpv, f, 64, values) - p64_encode(bpv, f, 32, values) - p64_encode(bpv, f, 64, values) def p64_decode(bpv, f, bits, values): typ = get_type(bits) @@ -383,41 +324,11 @@ def p64_decode(bpv, f, bits, values): f.write(" }\n") f.write(" }\n\n") -def p64_encode(bpv, f, bits, values): - typ = get_type(bits) - mask_start, mask_end = masks(bits) - f.write(" @Override\n") - f.write(" public void encode(%s[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations) {\n" %typ) - 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") - 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(" blocks[blocksOffset++] = (%svalues[valuesOffset++]%s << %d)" %(mask_start, mask_end, 64 - bpv)) - elif bit_offset + bpv == 64: - # end of block - f.write(" | %svalues[valuesOffset++]%s;\n" %(mask_start, mask_end)) - elif bit_offset + bpv < 64: - # inside a block - f.write(" | (%svalues[valuesOffset++]%s << %d)" %(mask_start, mask_end, 64 - bit_offset - bpv)) - else: - # value spans across 2 blocks - right_bits = bit_offset + bpv - 64 - f.write(" | (%svalues[valuesOffset]%s >>> %d);\n" %(mask_start, mask_end, right_bits)) - f.write(" blocks[blocksOffset++] = (%svalues[valuesOffset++]%s << %d)" %(mask_start, mask_end, 64 - right_bits)) - 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('import java.nio.ByteBuffer;\n') f.write('\n') f.write('''/** * Efficient sequential read/write of packed integers. @@ -427,6 +338,9 @@ if __name__ == '__main__': f.write(' private static final BulkOperation[] packedBulkOps = new BulkOperation[] {\n') for bpv in xrange(1, 65): + if bpv > MAX_SPECIALIZED_BITS_PER_VALUE: + f.write(' new BulkOperationPacked(%d),\n' % bpv) + continue f2 = open('BulkOperationPacked%d.java' % bpv, 'w') f2.write(HEADER) if bpv == 64: @@ -436,7 +350,7 @@ if __name__ == '__main__': f2.write('''/** * Efficient sequential read/write of packed integers. */\n''') - f2.write('final class BulkOperationPacked%d extends BulkOperation {\n' % bpv) + f2.write('final class BulkOperationPacked%d extends BulkOperationPacked {\n' % bpv) packed64(bpv, f2) f2.write('}\n') f2.close() @@ -449,12 +363,15 @@ 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 BulkOperation {\n' % bpv) + f2.write('final class BulkOperationPackedSingleBlock%d extends BulkOperationPackedSingleBlock {\n' % bpv) packed64singleblock(bpv,f2) f2.write('}\n') f2.close() From 61385c2817a5b9349253da6098f6368808cdf43a Mon Sep 17 00:00:00 2001 From: Michael McCandless Date: Wed, 29 Aug 2012 10:24:09 +0000 Subject: [PATCH 54/81] don't assert forceMerge works since this test uses NoMergePolicy git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1378493 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/lucene/search/grouping/GroupFacetCollectorTest.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lucene/grouping/src/test/org/apache/lucene/search/grouping/GroupFacetCollectorTest.java b/lucene/grouping/src/test/org/apache/lucene/search/grouping/GroupFacetCollectorTest.java index b6ef3862fa6..7af03569906 100644 --- a/lucene/grouping/src/test/org/apache/lucene/search/grouping/GroupFacetCollectorTest.java +++ b/lucene/grouping/src/test/org/apache/lucene/search/grouping/GroupFacetCollectorTest.java @@ -231,6 +231,9 @@ public class GroupFacetCollectorTest extends AbstractGroupingTestCase { new MockAnalyzer(random())).setMergePolicy(NoMergePolicy.COMPOUND_FILES)); boolean useDv = false; + // Cannot assert this since we use NoMergePolicy: + w.setDoRandomForceMergeAssert(false); + // 0 Document doc = new Document(); addField(doc, "x", "x", useDv); From ae43103d15d327fc449ee96c079c3e85750de33a Mon Sep 17 00:00:00 2001 From: Sami Siren Date: Wed, 29 Aug 2012 12:06:03 +0000 Subject: [PATCH 55/81] reuse existing code, baseUrl and coreName can no longer be null git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1378512 13f79535-47bb-0310-9956-ffa450edef68 --- solr/core/src/java/org/apache/solr/cloud/Overseer.java | 9 ++------- .../org/apache/solr/common/cloud/ZkCoreNodeProps.java | 6 +----- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/solr/core/src/java/org/apache/solr/cloud/Overseer.java b/solr/core/src/java/org/apache/solr/cloud/Overseer.java index 0163af9e2e7..37278e9dd84 100644 --- a/solr/core/src/java/org/apache/solr/cloud/Overseer.java +++ b/solr/core/src/java/org/apache/solr/cloud/Overseer.java @@ -166,17 +166,12 @@ public class Overseer { } else if (DELETECORE.equals(operation)) { clusterState = removeCore(clusterState, message); } else if (ZkStateReader.LEADER_PROP.equals(operation)) { - StringBuilder sb = new StringBuilder(); String baseUrl = message.get(ZkStateReader.BASE_URL_PROP); String coreName = message.get(ZkStateReader.CORE_NAME_PROP); - sb.append(baseUrl); - if (!baseUrl.endsWith("/")) sb.append("/"); - sb.append(coreName == null ? "" : coreName); - if (!(sb.substring(sb.length() - 1).equals("/"))) sb - .append("/"); + final String leaderUrl = ZkCoreNodeProps.getCoreUrl(baseUrl, coreName); clusterState = setShardLeader(clusterState, message.get(ZkStateReader.COLLECTION_PROP), - message.get(ZkStateReader.SHARD_ID_PROP), sb.toString()); + message.get(ZkStateReader.SHARD_ID_PROP), leaderUrl); } else { throw new RuntimeException("unknown operation:" + operation + " contents:" + message.getProperties()); diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/ZkCoreNodeProps.java b/solr/solrj/src/java/org/apache/solr/common/cloud/ZkCoreNodeProps.java index ee6b9301bce..facb216bcfb 100644 --- a/solr/solrj/src/java/org/apache/solr/common/cloud/ZkCoreNodeProps.java +++ b/solr/solrj/src/java/org/apache/solr/common/cloud/ZkCoreNodeProps.java @@ -24,7 +24,6 @@ public class ZkCoreNodeProps { this.nodeProps = nodeProps; } - // may return null public String getCoreUrl() { return getCoreUrl(nodeProps.get(ZkStateReader.BASE_URL_PROP), nodeProps.get(ZkStateReader.CORE_NAME_PROP)); } @@ -51,13 +50,10 @@ public class ZkCoreNodeProps { public static String getCoreUrl(String baseUrl, String coreName) { StringBuilder sb = new StringBuilder(); - if (baseUrl == null) return null; - if (coreName == null) return null; sb.append(baseUrl); if (!baseUrl.endsWith("/")) sb.append("/"); - sb.append(coreName == null ? "" : coreName); + sb.append(coreName); if (!(sb.substring(sb.length() - 1).equals("/"))) sb.append("/"); - return sb.toString(); } From 45d6f0edc06c3132b60052f6399044652bcdf5a0 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Wed, 29 Aug 2012 13:29:48 +0000 Subject: [PATCH 56/81] LUCENE-4324: enable broken html detection git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1378541 13f79535-47bb-0310-9956-ffa450edef68 --- dev-tools/scripts/checkJavaDocs.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/dev-tools/scripts/checkJavaDocs.py b/dev-tools/scripts/checkJavaDocs.py index 2dc40a6e1c4..7c9244cc427 100644 --- a/dev-tools/scripts/checkJavaDocs.py +++ b/dev-tools/scripts/checkJavaDocs.py @@ -134,6 +134,9 @@ def checkClassDetails(fullPath): print(fullPath) for cat, item, message in errors: print(' broken details HTML: %s: %s: %s' % (cat, item, message)) + return True + else: + return False def checkClassSummaries(fullPath): @@ -328,14 +331,15 @@ def checkPackageSummaries(root, level='class'): if 'package-summary.html' in fileNames: if level != 'package' and checkSummary('%s/package-summary.html' % dirPath): anyMissing = True - if level == 'method': - for fileName in fileNames: - fullPath = '%s/%s' % (dirPath, fileName) - if not fileName.startswith('package-') and fileName.endswith('.html') and os.path.isfile(fullPath): + for fileName in fileNames: + fullPath = '%s/%s' % (dirPath, fileName) + if not fileName.startswith('package-') and fileName.endswith('.html') and os.path.isfile(fullPath): + if level == 'method': if checkClassSummaries(fullPath): anyMissing = True - if checkClassDetails(fullPath): - anyMissing = True + # always look for broken html, regardless of level supplied + if checkClassDetails(fullPath): + anyMissing = True if 'overview-summary.html' in fileNames: if checkSummary('%s/overview-summary.html' % dirPath): From 660e880347e76f48d61db197cf15fcd32022f522 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Wed, 29 Aug 2012 13:51:43 +0000 Subject: [PATCH 57/81] add information about Payload->BytesRef git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1378555 13f79535-47bb-0310-9956-ffa450edef68 --- lucene/MIGRATE.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lucene/MIGRATE.txt b/lucene/MIGRATE.txt index 291d586dc28..baf61a89048 100644 --- a/lucene/MIGRATE.txt +++ b/lucene/MIGRATE.txt @@ -626,3 +626,8 @@ you can now do this: method, StoredFieldVisitor has a needsField method: if that method returns true then the field will be loaded and the appropriate type-specific method will be invoked with that fields's value. + +* LUCENE-4122: Removed the Payload class and replaced with BytesRef. + PayloadAttribute's name is unchanged, it just uses the BytesRef + class to refer to the payload bytes/start offset/end offset + (or null if there is no payload). From d447b1ae51442695f9043a696343a3f4ca75011a Mon Sep 17 00:00:00 2001 From: Martijn van Groningen Date: Wed, 29 Aug 2012 14:07:31 +0000 Subject: [PATCH 58/81] LUCENE-4333: Fixed bug caused by previous commit. git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1378568 13f79535-47bb-0310-9956-ffa450edef68 --- .../term/TermGroupFacetCollector.java | 3 -- .../grouping/GroupFacetCollectorTest.java | 37 +++++++++++-------- 2 files changed, 22 insertions(+), 18 deletions(-) diff --git a/lucene/grouping/src/java/org/apache/lucene/search/grouping/term/TermGroupFacetCollector.java b/lucene/grouping/src/java/org/apache/lucene/search/grouping/term/TermGroupFacetCollector.java index 80a8bf24652..00e5ce81656 100644 --- a/lucene/grouping/src/java/org/apache/lucene/search/grouping/term/TermGroupFacetCollector.java +++ b/lucene/grouping/src/java/org/apache/lucene/search/grouping/term/TermGroupFacetCollector.java @@ -244,9 +244,6 @@ public abstract class TermGroupFacetCollector extends AbstractGroupFacetCollecto segmentTotalCount = 0; segmentGroupedFacetHits.clear(); - if (facetFieldDocTermOrds.isEmpty()) { - return; - } for (GroupedFacetHit groupedFacetHit : groupedFacetHits) { int groupOrd = groupFieldTermsIndex.binarySearchLookup(groupedFacetHit.groupValue, spare); if (groupOrd < 0) { diff --git a/lucene/grouping/src/test/org/apache/lucene/search/grouping/GroupFacetCollectorTest.java b/lucene/grouping/src/test/org/apache/lucene/search/grouping/GroupFacetCollectorTest.java index 7af03569906..aa87303a32c 100644 --- a/lucene/grouping/src/test/org/apache/lucene/search/grouping/GroupFacetCollectorTest.java +++ b/lucene/grouping/src/test/org/apache/lucene/search/grouping/GroupFacetCollectorTest.java @@ -239,6 +239,7 @@ public class GroupFacetCollectorTest extends AbstractGroupingTestCase { addField(doc, "x", "x", useDv); w.addDocument(doc); + // 1 doc = new Document(); addField(doc, groupField, "a", useDv); addField(doc, "airport", "ams", useDv); @@ -247,28 +248,16 @@ public class GroupFacetCollectorTest extends AbstractGroupingTestCase { w.commit(); w.deleteDocuments(new TermQuery(new Term("airport", "ams"))); - // 0 - doc = new Document(); - addField(doc, groupField, "a", useDv); - addField(doc, "airport", "ams", useDv); - w.addDocument(doc); - - // 1 - doc = new Document(); - addField(doc, groupField, "a", useDv); - addField(doc, "airport", "dus", useDv); - w.addDocument(doc); - // 2 doc = new Document(); - addField(doc, groupField, "b", useDv); + addField(doc, groupField, "a", useDv); addField(doc, "airport", "ams", useDv); w.addDocument(doc); // 3 doc = new Document(); - addField(doc, groupField, "b", useDv); - addField(doc, "airport", "ams", useDv); + addField(doc, groupField, "a", useDv); + addField(doc, "airport", "dus", useDv); w.addDocument(doc); // 4 @@ -277,7 +266,25 @@ public class GroupFacetCollectorTest extends AbstractGroupingTestCase { addField(doc, "airport", "ams", useDv); w.addDocument(doc); + // 5 + doc = new Document(); + addField(doc, groupField, "b", useDv); + addField(doc, "airport", "ams", useDv); + w.addDocument(doc); + + // 6 + doc = new Document(); + addField(doc, groupField, "b", useDv); + addField(doc, "airport", "ams", useDv); + w.addDocument(doc); w.commit(); + + // 7 + doc = new Document(); + addField(doc, "x", "x", useDv); + w.addDocument(doc); + w.commit(); + w.close(); IndexSearcher indexSearcher = new IndexSearcher(DirectoryReader.open(dir)); AbstractGroupFacetCollector groupedAirportFacetCollector = createRandomCollector(groupField, "airport", null, true, useDv); From 71dd31de24c22442767b614b960b5984fadc9f87 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Wed, 29 Aug 2012 14:56:28 +0000 Subject: [PATCH 59/81] Add an example that builds a CharFilter chain in Analyzer git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1378593 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/lucene/analysis/CharFilter.java | 3 +++ .../org/apache/lucene/analysis/package.html | 25 +++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/lucene/core/src/java/org/apache/lucene/analysis/CharFilter.java b/lucene/core/src/java/org/apache/lucene/analysis/CharFilter.java index 37cad99854e..60c62bf745a 100644 --- a/lucene/core/src/java/org/apache/lucene/analysis/CharFilter.java +++ b/lucene/core/src/java/org/apache/lucene/analysis/CharFilter.java @@ -33,6 +33,9 @@ import java.io.Reader; * You can optionally provide more efficient implementations of additional methods * like {@link #read()}, {@link #read(char[])}, {@link #read(java.nio.CharBuffer)}, * but this is not required. + *

      + * For examples and integration with {@link Analyzer}, see the + * {@link org.apache.lucene.analysis Analysis package documentation}. */ // the way java.io.FilterReader should work! public abstract class CharFilter extends Reader { diff --git a/lucene/core/src/java/org/apache/lucene/analysis/package.html b/lucene/core/src/java/org/apache/lucene/analysis/package.html index 0495e488486..b298263dd7f 100644 --- a/lucene/core/src/java/org/apache/lucene/analysis/package.html +++ b/lucene/core/src/java/org/apache/lucene/analysis/package.html @@ -817,5 +817,30 @@ As a small hint, this is how the new Attribute class could begin: ...

+

Adding a CharFilter chain

+Analyzers take Java {@link java.io.Reader}s as input. Of course you can wrap your Readers with {@link java.io.FilterReader}s +to manipulate content, but this would have the big disadvantage that character offsets might be inconsistent with your original +text. +

+{@link org.apache.lucene.analysis.CharFilter} is designed to allow you to pre-process input like a FilterReader would, but also +preserve the original offsets associated with those characters. This way mechanisms like highlighting still work correctly. +CharFilters can be chained. +

+Example: +

+public class MyAnalyzer extends Analyzer {
+
+  {@literal @Override}
+  protected TokenStreamComponents createComponents(String fieldName, Reader reader) {
+    return new TokenStreamComponents(new MyTokenizer(reader));
+  }
+  
+  {@literal @Override}
+  protected Reader initReader(String fieldName, Reader reader) {
+    // wrap the Reader in a CharFilter chain.
+    return new SecondCharFilter(new FirstCharFilter(reader));
+  }
+}
+
From d359353970af13ef86c9eff9007efd1ef3c77075 Mon Sep 17 00:00:00 2001 From: Steven Rowe Date: Wed, 29 Aug 2012 17:23:29 +0000 Subject: [PATCH 60/81] SOLR-2747: fix changes2html.pl invocation from ant target package-src-tgz git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1378654 13f79535-47bb-0310-9956-ffa450edef68 --- solr/build.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/solr/build.xml b/solr/build.xml index 86527863fa2..6fab138d640 100644 --- a/solr/build.xml +++ b/solr/build.xml @@ -320,8 +320,8 @@ - + Date: Wed, 29 Aug 2012 18:53:30 +0000 Subject: [PATCH 61/81] fix javadocs git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1378682 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/java/org/apache/lucene/store/ChecksumIndexInput.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lucene/core/src/java/org/apache/lucene/store/ChecksumIndexInput.java b/lucene/core/src/java/org/apache/lucene/store/ChecksumIndexInput.java index 224ca0dcd84..13975783735 100644 --- a/lucene/core/src/java/org/apache/lucene/store/ChecksumIndexInput.java +++ b/lucene/core/src/java/org/apache/lucene/store/ChecksumIndexInput.java @@ -21,7 +21,7 @@ import java.io.IOException; import java.util.zip.CRC32; import java.util.zip.Checksum; -/** Writes bytes through to a primary IndexOutput, computing +/** Reads bytes through to a primary IndexInput, computing * checksum as it goes. Note that you cannot use seek(). * * @lucene.internal From b2ca2895b75bd6c011583603cdd6fd13b6afa216 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Thu, 30 Aug 2012 03:59:32 +0000 Subject: [PATCH 62/81] full javadocs for .analysis, give Analyzer its Closeable back, remove duplicate javadocs that are inherited anyway git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1378797 13f79535-47bb-0310-9956-ffa450edef68 --- lucene/build.xml | 3 + .../org/apache/lucene/analysis/Analyzer.java | 50 +++++-- .../apache/lucene/analysis/CharFilter.java | 4 + .../lucene/analysis/NumericTokenStream.java | 6 + .../org/apache/lucene/analysis/Token.java | 138 ++++++++---------- .../apache/lucene/analysis/TokenFilter.java | 26 +++- .../org/apache/lucene/analysis/Tokenizer.java | 8 +- .../tokenattributes/CharTermAttribute.java | 6 +- .../CharTermAttributeImpl.java | 7 +- .../tokenattributes/FlagsAttribute.java | 15 +- .../tokenattributes/FlagsAttributeImpl.java | 21 +-- .../tokenattributes/KeywordAttribute.java | 14 +- .../tokenattributes/KeywordAttributeImpl.java | 26 +--- .../tokenattributes/OffsetAttribute.java | 34 +++-- .../tokenattributes/OffsetAttributeImpl.java | 20 +-- .../tokenattributes/PayloadAttribute.java | 16 +- .../tokenattributes/PayloadAttributeImpl.java | 10 +- .../PositionIncrementAttribute.java | 5 +- .../PositionIncrementAttributeImpl.java | 36 +---- .../PositionLengthAttribute.java | 15 +- .../PositionLengthAttributeImpl.java | 11 +- .../TermToBytesRefAttribute.java | 2 +- .../tokenattributes/TypeAttribute.java | 11 +- .../tokenattributes/TypeAttributeImpl.java | 9 +- .../java/org/apache/lucene/search/Scorer.java | 15 +- 25 files changed, 268 insertions(+), 240 deletions(-) diff --git a/lucene/build.xml b/lucene/build.xml index 3bf20953157..e4f2b9b189e 100644 --- a/lucene/build.xml +++ b/lucene/build.xml @@ -248,6 +248,9 @@ + + + diff --git a/lucene/core/src/java/org/apache/lucene/analysis/Analyzer.java b/lucene/core/src/java/org/apache/lucene/analysis/Analyzer.java index 4b7fd2e336b..613d77f9d1d 100644 --- a/lucene/core/src/java/org/apache/lucene/analysis/Analyzer.java +++ b/lucene/core/src/java/org/apache/lucene/analysis/Analyzer.java @@ -20,6 +20,7 @@ package org.apache.lucene.analysis; import org.apache.lucene.store.AlreadyClosedException; import org.apache.lucene.util.CloseableThreadLocal; +import java.io.Closeable; import java.io.IOException; import java.io.Reader; import java.util.HashMap; @@ -67,7 +68,7 @@ import java.util.Map; * Analysis integration with Apache UIMA. * */ -public abstract class Analyzer { +public abstract class Analyzer implements Closeable { private final ReuseStrategy reuseStrategy; @@ -105,20 +106,25 @@ public abstract class Analyzer { Reader reader); /** - * Creates a TokenStream that is allowed to be re-use from the previous time - * that the same thread called this method. Callers that do not need to use - * more than one TokenStream at the same time from this analyzer should use - * this method for better performance. + * Returns a TokenStream suitable for fieldName, tokenizing + * the contents of reader. *

* This method uses {@link #createComponents(String, Reader)} to obtain an * instance of {@link TokenStreamComponents}. It returns the sink of the * components and stores the components internally. Subsequent calls to this * method will reuse the previously stored components after resetting them * through {@link TokenStreamComponents#setReader(Reader)}. - *

+ *

+ * NOTE: After calling this method, the consumer must follow the + * workflow described in {@link TokenStream} to properly consume its contents. + * See the {@link org.apache.lucene.analysis Analysis package documentation} for + * some examples demonstrating this. * * @param fieldName the name of the field the created TokenStream is used for * @param reader the reader the streams source reads from + * @return TokenStream for iterating the analyzed content of reader + * @throws AlreadyClosedException if the Analyzer is closed. + * @throws IOException if an i/o error occurs. */ public final TokenStream tokenStream(final String fieldName, final Reader reader) throws IOException { @@ -135,6 +141,13 @@ public abstract class Analyzer { /** * Override this if you want to add a CharFilter chain. + *

+ * The default implementation returns reader + * unchanged. + * + * @param fieldName IndexableField name being indexed + * @param reader original Reader + * @return reader, optionally decorated with CharFilter(s) */ protected Reader initReader(String fieldName, Reader reader) { return reader; @@ -151,7 +164,8 @@ public abstract class Analyzer { * exact PhraseQuery matches, for instance, across IndexableField instance boundaries. * * @param fieldName IndexableField name being indexed. - * @return position increment gap, added to the next token emitted from {@link #tokenStream(String,Reader)} + * @return position increment gap, added to the next token emitted from {@link #tokenStream(String,Reader)}. + * This value must be {@code >= 0}. */ public int getPositionIncrementGap(String fieldName) { return 0; @@ -164,7 +178,8 @@ public abstract class Analyzer { * produced at least one token for indexing. * * @param fieldName the field just indexed - * @return offset gap, added to the next token emitted from {@link #tokenStream(String,Reader)} + * @return offset gap, added to the next token emitted from {@link #tokenStream(String,Reader)}. + * This value must be {@code >= 0}. */ public int getOffsetGap(String fieldName) { return 1; @@ -254,10 +269,13 @@ public abstract class Analyzer { * Strategy defining how TokenStreamComponents are reused per call to * {@link Analyzer#tokenStream(String, java.io.Reader)}. */ - public static abstract class ReuseStrategy { + public static abstract class ReuseStrategy implements Closeable { private CloseableThreadLocal storedValue = new CloseableThreadLocal(); + /** Sole constructor. (For invocation by subclass constructors, typically implicit.) */ + public ReuseStrategy() {} + /** * Gets the reusable TokenStreamComponents for the field with the given name * @@ -281,6 +299,7 @@ public abstract class Analyzer { * Returns the currently stored value * * @return Currently stored value or {@code null} if no value is stored + * @throws AlreadyClosedException if the ReuseStrategy is closed. */ protected final Object getStoredValue() { try { @@ -298,6 +317,7 @@ public abstract class Analyzer { * Sets the stored value * * @param storedValue Value to store + * @throws AlreadyClosedException if the ReuseStrategy is closed. */ protected final void setStoredValue(Object storedValue) { try { @@ -315,8 +335,10 @@ public abstract class Analyzer { * Closes the ReuseStrategy, freeing any resources */ public void close() { - storedValue.close(); - storedValue = null; + if (storedValue != null) { + storedValue.close(); + storedValue = null; + } } } @@ -325,6 +347,9 @@ public abstract class Analyzer { * every field. */ public final static class GlobalReuseStrategy extends ReuseStrategy { + + /** Creates a new instance, with empty per-thread values */ + public GlobalReuseStrategy() {} @Override public TokenStreamComponents getReusableComponents(String fieldName) { @@ -343,6 +368,9 @@ public abstract class Analyzer { */ public static class PerFieldReuseStrategy extends ReuseStrategy { + /** Creates a new instance, with empty per-thread-per-field values */ + public PerFieldReuseStrategy() {} + @SuppressWarnings("unchecked") @Override public TokenStreamComponents getReusableComponents(String fieldName) { diff --git a/lucene/core/src/java/org/apache/lucene/analysis/CharFilter.java b/lucene/core/src/java/org/apache/lucene/analysis/CharFilter.java index 60c62bf745a..e6658af1b36 100644 --- a/lucene/core/src/java/org/apache/lucene/analysis/CharFilter.java +++ b/lucene/core/src/java/org/apache/lucene/analysis/CharFilter.java @@ -55,6 +55,10 @@ public abstract class CharFilter extends Reader { /** * Closes the underlying input stream. + *

+ * NOTE: + * The default implementation closes the input Reader, so + * be sure to call super.close() when overriding this method. */ @Override public void close() throws IOException { diff --git a/lucene/core/src/java/org/apache/lucene/analysis/NumericTokenStream.java b/lucene/core/src/java/org/apache/lucene/analysis/NumericTokenStream.java index d347027ab53..e5ee6d0c3a1 100644 --- a/lucene/core/src/java/org/apache/lucene/analysis/NumericTokenStream.java +++ b/lucene/core/src/java/org/apache/lucene/analysis/NumericTokenStream.java @@ -144,6 +144,12 @@ public final class NumericTokenStream extends TokenStream { private long value = 0L; private int valueSize = 0, shift = 0, precisionStep = 0; private BytesRef bytes = new BytesRef(); + + /** + * Creates, but does not yet initialize this attribute instance + * @see #init(long, int, int, int) + */ + public NumericTermAttributeImpl() {} public BytesRef getBytesRef() { return bytes; diff --git a/lucene/core/src/java/org/apache/lucene/analysis/Token.java b/lucene/core/src/java/org/apache/lucene/analysis/Token.java index 7d33509beb0..e1b9f3c4553 100644 --- a/lucene/core/src/java/org/apache/lucene/analysis/Token.java +++ b/lucene/core/src/java/org/apache/lucene/analysis/Token.java @@ -176,8 +176,8 @@ public class Token extends CharTermAttributeImpl * instead use the char[] termBuffer methods to set the * term text. * @param text term text - * @param start start offset - * @param end end offset + * @param start start offset in the source text + * @param end end offset in the source text */ public Token(String text, int start, int end) { checkOffsets(start, end); @@ -191,8 +191,8 @@ public class Token extends CharTermAttributeImpl * speed you should instead use the char[] termBuffer * methods to set the term text. * @param text term text - * @param start start offset - * @param end end offset + * @param start start offset in the source text + * @param end end offset in the source text * @param typ token type */ public Token(String text, int start, int end, String typ) { @@ -208,9 +208,9 @@ public class Token extends CharTermAttributeImpl * offsets, & type. NOTE: for better indexing * speed you should instead use the char[] termBuffer * methods to set the term text. - * @param text - * @param start - * @param end + * @param text term text + * @param start start offset in the source text + * @param end end offset in the source text * @param flags token type bits */ public Token(String text, int start, int end, int flags) { @@ -225,11 +225,11 @@ public class Token extends CharTermAttributeImpl * Constructs a Token with the given term buffer (offset * & length), start and end * offsets - * @param startTermBuffer - * @param termBufferOffset - * @param termBufferLength - * @param start - * @param end + * @param startTermBuffer buffer containing term text + * @param termBufferOffset the index in the buffer of the first character + * @param termBufferLength number of valid characters in the buffer + * @param start start offset in the source text + * @param end end offset in the source text */ public Token(char[] startTermBuffer, int termBufferOffset, int termBufferLength, int start, int end) { checkOffsets(start, end); @@ -238,31 +238,9 @@ public class Token extends CharTermAttributeImpl endOffset = end; } - /** Set the position increment. This determines the position of this token - * relative to the previous Token in a {@link TokenStream}, used in phrase - * searching. - * - *

The default value is one. - * - *

Some common uses for this are:

    - * - *
  • Set it to zero to put multiple terms in the same position. This is - * useful if, e.g., a word has multiple stems. Searches for phrases - * including either stem will match. In this case, all but the first stem's - * increment should be set to zero: the increment of the first instance - * should be one. Repeating a token with an increment of zero can also be - * used to boost the scores of matches on that token. - * - *
  • Set it to values greater than one to inhibit exact phrase matches. - * If, for example, one does not want phrases to match across removed stop - * words, then one could build a stop word filter that removes stop words and - * also sets the increment to the number of stop words removed before each - * non-stop word. Then exact phrase queries will only match when the terms - * occur with no intervening stop words. - * - *
- * @param positionIncrement the distance from the prior term - * @see org.apache.lucene.index.DocsAndPositionsEnum + /** + * {@inheritDoc} + * @see PositionIncrementAttribute */ public void setPositionIncrement(int positionIncrement) { if (positionIncrement < 0) @@ -271,93 +249,101 @@ public class Token extends CharTermAttributeImpl this.positionIncrement = positionIncrement; } - /** Returns the position increment of this Token. - * @see #setPositionIncrement + /** + * {@inheritDoc} + * @see PositionIncrementAttribute */ public int getPositionIncrement() { return positionIncrement; } - /** Set the position length. - * @see PositionLengthAttribute */ + /** + * {@inheritDoc} + * @see PositionLengthAttribute + */ @Override public void setPositionLength(int positionLength) { this.positionLength = positionLength; } - /** Get the position length. - * @see PositionLengthAttribute */ + /** + * {@inheritDoc} + * @see PositionLengthAttribute + */ @Override public int getPositionLength() { return positionLength; } - /** Returns this Token's starting offset, the position of the first character - corresponding to this token in the source text. - - Note that the difference between endOffset() and startOffset() may not be - equal to {@link #length}, as the term text may have been altered by a - stemmer or some other filter. */ + /** + * {@inheritDoc} + * @see OffsetAttribute + */ public final int startOffset() { return startOffset; } - /** Returns this Token's ending offset, one greater than the position of the - last character corresponding to this token in the source text. The length - of the token in the source text is (endOffset - startOffset). */ + /** + * {@inheritDoc} + * @see OffsetAttribute + */ public final int endOffset() { return endOffset; } - /** Set the starting and ending offset. - @see #startOffset() and #endOffset()*/ + /** + * {@inheritDoc} + * @see OffsetAttribute + */ public void setOffset(int startOffset, int endOffset) { checkOffsets(startOffset, endOffset); this.startOffset = startOffset; this.endOffset = endOffset; } - /** Returns this Token's lexical type. Defaults to "word". */ + /** + * {@inheritDoc} + * @see TypeAttribute + */ public final String type() { return type; } - /** Set the lexical type. - @see #type() */ + /** + * {@inheritDoc} + * @see TypeAttribute + */ public final void setType(String type) { this.type = type; } /** - *

- * - * Get the bitset for any bits that have been set. This is completely distinct from {@link #type()}, although they do share similar purposes. - * The flags can be used to encode information about the token for use by other {@link org.apache.lucene.analysis.TokenFilter}s. - * - * - * @return The bits - * @lucene.experimental While we think this is here to stay, we may want to change it to be a long. + * {@inheritDoc} + * @see FlagsAttribute */ public int getFlags() { return flags; } /** - * @see #getFlags() + * {@inheritDoc} + * @see FlagsAttribute */ public void setFlags(int flags) { this.flags = flags; } /** - * Returns this Token's payload. - */ + * {@inheritDoc} + * @see PayloadAttribute + */ public BytesRef getPayload() { return this.payload; } - /** - * Sets this Token's payload. + /** + * {@inheritDoc} + * @see PayloadAttribute */ public void setPayload(BytesRef payload) { this.payload = payload; @@ -551,8 +537,8 @@ public class Token extends CharTermAttributeImpl /** * Copy the prototype token's fields into this one, with a different term. Note: Payloads are shared. - * @param prototype - * @param newTerm + * @param prototype existing Token + * @param newTerm new term text */ public void reinit(Token prototype, String newTerm) { setEmpty().append(newTerm); @@ -566,10 +552,10 @@ public class Token extends CharTermAttributeImpl /** * Copy the prototype token's fields into this one, with a different term. Note: Payloads are shared. - * @param prototype - * @param newTermBuffer - * @param offset - * @param length + * @param prototype existing Token + * @param newTermBuffer buffer containing new term text + * @param offset the index in the buffer of the first character + * @param length number of valid characters in the buffer */ public void reinit(Token prototype, char[] newTermBuffer, int offset, int length) { copyBuffer(newTermBuffer, offset, length); diff --git a/lucene/core/src/java/org/apache/lucene/analysis/TokenFilter.java b/lucene/core/src/java/org/apache/lucene/analysis/TokenFilter.java index 00ab0d16bf3..29612831549 100644 --- a/lucene/core/src/java/org/apache/lucene/analysis/TokenFilter.java +++ b/lucene/core/src/java/org/apache/lucene/analysis/TokenFilter.java @@ -34,21 +34,37 @@ public abstract class TokenFilter extends TokenStream { this.input = input; } - /** Performs end-of-stream operations, if any, and calls then end() on the - * input TokenStream.

- * NOTE: Be sure to call super.end() first when overriding this method.*/ + /** + * {@inheritDoc} + *

+ * NOTE: + * The default implementation chains the call to the input TokenStream, so + * be sure to call super.end() first when overriding this method. + */ @Override public void end() throws IOException { input.end(); } - /** Close the input TokenStream. */ + /** + * {@inheritDoc} + *

+ * NOTE: + * The default implementation chains the call to the input TokenStream, so + * be sure to call super.close() when overriding this method. + */ @Override public void close() throws IOException { input.close(); } - /** Reset the filter as well as the input TokenStream. */ + /** + * {@inheritDoc} + *

+ * NOTE: + * The default implementation chains the call to the input TokenStream, so + * be sure to call super.reset() when overriding this method. + */ @Override public void reset() throws IOException { input.reset(); diff --git a/lucene/core/src/java/org/apache/lucene/analysis/Tokenizer.java b/lucene/core/src/java/org/apache/lucene/analysis/Tokenizer.java index 1b39489afc0..696ba048f0d 100644 --- a/lucene/core/src/java/org/apache/lucene/analysis/Tokenizer.java +++ b/lucene/core/src/java/org/apache/lucene/analysis/Tokenizer.java @@ -54,7 +54,13 @@ public abstract class Tokenizer extends TokenStream { this.input = input; } - /** By default, closes the input Reader. */ + /** + * {@inheritDoc} + *

+ * NOTE: + * The default implementation closes the input Reader, so + * be sure to call super.close() when overriding this method. + */ @Override public void close() throws IOException { if (input != null) { diff --git a/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/CharTermAttribute.java b/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/CharTermAttribute.java index 2db0f588775..3c4b9ff9e39 100644 --- a/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/CharTermAttribute.java +++ b/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/CharTermAttribute.java @@ -38,7 +38,11 @@ public interface CharTermAttribute extends Attribute, CharSequence, Appendable { * #resizeBuffer(int)} to increase it. After * altering the buffer be sure to call {@link * #setLength} to record the number of valid - * characters that were placed into the termBuffer. */ + * characters that were placed into the termBuffer. + *

+ * NOTE: The returned buffer may be larger than + * the valid {@link #length()}. + */ public char[] buffer(); /** Grows the termBuffer to at least size newSize, preserving the diff --git a/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/CharTermAttributeImpl.java b/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/CharTermAttributeImpl.java index afcf15a1153..8cab9865de1 100644 --- a/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/CharTermAttributeImpl.java +++ b/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/CharTermAttributeImpl.java @@ -26,14 +26,15 @@ import org.apache.lucene.util.AttributeReflector; import org.apache.lucene.util.RamUsageEstimator; import org.apache.lucene.util.UnicodeUtil; -/** - * The term text of a Token. - */ +/** Default implementation of {@link CharTermAttribute}. */ public class CharTermAttributeImpl extends AttributeImpl implements CharTermAttribute, TermToBytesRefAttribute, Cloneable { private static int MIN_BUFFER_SIZE = 10; private char[] termBuffer = new char[ArrayUtil.oversize(MIN_BUFFER_SIZE, RamUsageEstimator.NUM_BYTES_CHAR)]; private int termLength = 0; + + /** Initialize this attribute with empty term text */ + public CharTermAttributeImpl() {} public final void copyBuffer(char[] buffer, int offset, int length) { growTermBuffer(length); diff --git a/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/FlagsAttribute.java b/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/FlagsAttribute.java index 63116e3eae7..8e05ef50c86 100644 --- a/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/FlagsAttribute.java +++ b/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/FlagsAttribute.java @@ -22,22 +22,23 @@ import org.apache.lucene.util.Attribute; /** * This attribute can be used to pass different flags down the {@link Tokenizer} chain, - * eg from one TokenFilter to another one. + * e.g. from one TokenFilter to another one. + *

+ * This is completely distinct from {@link TypeAttribute}, although they do share similar purposes. + * The flags can be used to encode information about the token for use by other + * {@link org.apache.lucene.analysis.TokenFilter}s. * @lucene.experimental While we think this is here to stay, we may want to change it to be a long. */ public interface FlagsAttribute extends Attribute { /** - *

- * - * Get the bitset for any bits that have been set. This is completely distinct from {@link TypeAttribute#type()}, although they do share similar purposes. - * The flags can be used to encode information about the token for use by other {@link org.apache.lucene.analysis.TokenFilter}s. - * - * + * Get the bitset for any bits that have been set. * @return The bits + * @see #getFlags() */ public int getFlags(); /** + * Set the flags to a new bitset. * @see #getFlags() */ public void setFlags(int flags); diff --git a/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/FlagsAttributeImpl.java b/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/FlagsAttributeImpl.java index c1ad9289edc..337cd021263 100644 --- a/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/FlagsAttributeImpl.java +++ b/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/FlagsAttributeImpl.java @@ -19,30 +19,17 @@ package org.apache.lucene.analysis.tokenattributes; import org.apache.lucene.util.AttributeImpl; -/** - * This attribute can be used to pass different flags down the tokenizer chain, - * eg from one TokenFilter to another one. - * @lucene.experimental While we think this is here to stay, we may want to change it to be a long. - */ +/** Default implementation of {@link FlagsAttribute}. */ public class FlagsAttributeImpl extends AttributeImpl implements FlagsAttribute, Cloneable { private int flags = 0; - /** - *

- * - * Get the bitset for any bits that have been set. This is completely distinct from {@link TypeAttribute#type()}, although they do share similar purposes. - * The flags can be used to encode information about the token for use by other {@link org.apache.lucene.analysis.TokenFilter}s. - * - * - * @return The bits - */ + /** Initialize this attribute with no bits set */ + public FlagsAttributeImpl() {} + public int getFlags() { return flags; } - /** - * @see #getFlags() - */ public void setFlags(int flags) { this.flags = flags; } diff --git a/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/KeywordAttribute.java b/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/KeywordAttribute.java index 7e80d2a893c..d3906ab073b 100644 --- a/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/KeywordAttribute.java +++ b/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/KeywordAttribute.java @@ -30,20 +30,22 @@ import org.apache.lucene.util.Attribute; public interface KeywordAttribute extends Attribute { /** - * Returns true iff the current token is a keyword, otherwise - * false/ + * Returns true if the current token is a keyword, otherwise + * false * - * @return true iff the current token is a keyword, otherwise - * false/ + * @return true if the current token is a keyword, otherwise + * false + * @see #setKeyword(boolean) */ public boolean isKeyword(); /** - * Marks the current token as keyword iff set to true. + * Marks the current token as keyword if set to true. * * @param isKeyword - * true iff the current token is a keyword, otherwise + * true if the current token is a keyword, otherwise * false. + * @see #isKeyword() */ public void setKeyword(boolean isKeyword); } diff --git a/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/KeywordAttributeImpl.java b/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/KeywordAttributeImpl.java index 7f2b2f4ce88..0deaa4ba20b 100644 --- a/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/KeywordAttributeImpl.java +++ b/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/KeywordAttributeImpl.java @@ -17,19 +17,15 @@ package org.apache.lucene.analysis.tokenattributes; * limitations under the License. */ -import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.util.AttributeImpl; -/** - *This attribute can be used to mark a token as a keyword. Keyword aware - * {@link TokenStream}s can decide to modify a token based on the return value - * of {@link #isKeyword()} if the token is modified. Stemming filters for - * instance can use this attribute to conditionally skip a term if - * {@link #isKeyword()} returns true. - */ +/** Default implementation of {@link KeywordAttribute}. */ public final class KeywordAttributeImpl extends AttributeImpl implements KeywordAttribute { private boolean keyword; + + /** Initialize this attribute with the keyword value as false. */ + public KeywordAttributeImpl() {} @Override public void clear() { @@ -57,24 +53,10 @@ public final class KeywordAttributeImpl extends AttributeImpl implements return keyword == other.keyword; } - /** - * Returns true iff the current token is a keyword, otherwise - * false/ - * - * @return true iff the current token is a keyword, otherwise - * false/ - */ public boolean isKeyword() { return keyword; } - /** - * Marks the current token as keyword iff set to true. - * - * @param isKeyword - * true iff the current token is a keyword, otherwise - * false. - */ public void setKeyword(boolean isKeyword) { keyword = isKeyword; } diff --git a/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/OffsetAttribute.java b/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/OffsetAttribute.java index 67612e8a092..a0f87d5ad63 100644 --- a/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/OffsetAttribute.java +++ b/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/OffsetAttribute.java @@ -23,22 +23,34 @@ import org.apache.lucene.util.Attribute; * The start and end character offset of a Token. */ public interface OffsetAttribute extends Attribute { - /** Returns this Token's starting offset, the position of the first character - corresponding to this token in the source text. - - Note that the difference between endOffset() and startOffset() may not be - equal to termText.length(), as the term text may have been altered by a - stemmer or some other filter. */ + /** + * Returns this Token's starting offset, the position of the first character + * corresponding to this token in the source text. + *

+ * Note that the difference between {@link #endOffset()} and startOffset() + * may not be equal to termText.length(), as the term text may have been altered by a + * stemmer or some other filter. + * @see #setOffset(int, int) + */ public int startOffset(); - /** Set the starting and ending offset. - @see #startOffset() and #endOffset()*/ + /** + * Set the starting and ending offset. + * @throws IllegalArgumentException If startOffset or endOffset + * are negative, or if startOffset is greater than + * endOffset + * @see #startOffset() + * @see #endOffset() + */ public void setOffset(int startOffset, int endOffset); - /** Returns this Token's ending offset, one greater than the position of the - last character corresponding to this token in the source text. The length - of the token in the source text is (endOffset - startOffset). */ + /** + * Returns this Token's ending offset, one greater than the position of the + * last character corresponding to this token in the source text. The length + * of the token in the source text is (endOffset() - {@link #startOffset()}). + * @see #setOffset(int, int) + */ public int endOffset(); } diff --git a/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/OffsetAttributeImpl.java b/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/OffsetAttributeImpl.java index c2ffbf876e9..54f4d28b15a 100644 --- a/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/OffsetAttributeImpl.java +++ b/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/OffsetAttributeImpl.java @@ -19,26 +19,18 @@ package org.apache.lucene.analysis.tokenattributes; import org.apache.lucene.util.AttributeImpl; -/** - * The start and end character offset of a Token. - */ +/** Default implementation of {@link OffsetAttribute}. */ public class OffsetAttributeImpl extends AttributeImpl implements OffsetAttribute, Cloneable { private int startOffset; private int endOffset; + + /** Initialize this attribute with startOffset and endOffset of 0. */ + public OffsetAttributeImpl() {} - /** Returns this Token's starting offset, the position of the first character - corresponding to this token in the source text. - - Note that the difference between endOffset() and startOffset() may not be - equal to termText.length(), as the term text may have been altered by a - stemmer or some other filter. */ public int startOffset() { return startOffset; } - - /** Set the starting and ending offset. - @see #startOffset() and #endOffset()*/ public void setOffset(int startOffset, int endOffset) { // TODO: we could assert that this is set-once, ie, @@ -56,10 +48,6 @@ public class OffsetAttributeImpl extends AttributeImpl implements OffsetAttribut this.endOffset = endOffset; } - - /** Returns this Token's ending offset, one greater than the position of the - last character corresponding to this token in the source text. The length - of the token in the source text is (endOffset - startOffset). */ public int endOffset() { return endOffset; } diff --git a/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/PayloadAttribute.java b/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/PayloadAttribute.java index 658bc829e4f..8793c9402e6 100644 --- a/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/PayloadAttribute.java +++ b/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/PayloadAttribute.java @@ -17,20 +17,34 @@ package org.apache.lucene.analysis.tokenattributes; * limitations under the License. */ +import org.apache.lucene.index.DocsAndPositionsEnum; // javadocs import org.apache.lucene.util.Attribute; import org.apache.lucene.util.BytesRef; /** - * The payload of a Token. + * The payload of a Token. + *

+ * The payload is stored in the index at each position, and can + * be used to influence scoring when using Payload-based queries + * in the {@link org.apache.lucene.search.payloads} and + * {@link org.apache.lucene.search.spans} packages. + *

+ * NOTE: because the payload will be stored at each position, its usually + * best to use the minimum number of bytes necessary. Some codec implementations + * may optimize payload storage when all payloads have the same length. + * + * @see DocsAndPositionsEnum */ public interface PayloadAttribute extends Attribute { /** * Returns this Token's payload. + * @see #setPayload(BytesRef) */ public BytesRef getPayload(); /** * Sets this Token's payload. + * @see #getPayload() */ public void setPayload(BytesRef payload); } diff --git a/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/PayloadAttributeImpl.java b/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/PayloadAttributeImpl.java index 6053e58ad0a..5a9118fa336 100644 --- a/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/PayloadAttributeImpl.java +++ b/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/PayloadAttributeImpl.java @@ -20,9 +20,7 @@ package org.apache.lucene.analysis.tokenattributes; import org.apache.lucene.util.AttributeImpl; import org.apache.lucene.util.BytesRef; -/** - * The payload of a Token. - */ +/** Default implementation of {@link PayloadAttribute}. */ public class PayloadAttributeImpl extends AttributeImpl implements PayloadAttribute, Cloneable { private BytesRef payload; @@ -38,16 +36,10 @@ public class PayloadAttributeImpl extends AttributeImpl implements PayloadAttrib this.payload = payload; } - /** - * Returns this Token's payload. - */ public BytesRef getPayload() { return this.payload; } - /** - * Sets this Token's payload. - */ public void setPayload(BytesRef payload) { this.payload = payload; } diff --git a/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/PositionIncrementAttribute.java b/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/PositionIncrementAttribute.java index fba07508701..9afd2f9b838 100644 --- a/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/PositionIncrementAttribute.java +++ b/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/PositionIncrementAttribute.java @@ -49,11 +49,14 @@ public interface PositionIncrementAttribute extends Attribute { /** Set the position increment. The default value is one. * * @param positionIncrement the distance from the prior term + * @throws IllegalArgumentException if positionIncrement + * is negative. + * @see #getPositionIncrement() */ public void setPositionIncrement(int positionIncrement); /** Returns the position increment of this Token. - * @see #setPositionIncrement + * @see #setPositionIncrement(int) */ public int getPositionIncrement(); } diff --git a/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/PositionIncrementAttributeImpl.java b/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/PositionIncrementAttributeImpl.java index 7cf47b16ae6..ff0c4d45063 100644 --- a/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/PositionIncrementAttributeImpl.java +++ b/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/PositionIncrementAttributeImpl.java @@ -17,40 +17,15 @@ package org.apache.lucene.analysis.tokenattributes; * limitations under the License. */ -import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.util.AttributeImpl; -/** Determines the position of this token - * relative to the previous Token in a {@link TokenStream}, used in phrase - * searching. - * - *

The default value is one. - * - *

Some common uses for this are:

    - * - *
  • Set it to zero to put multiple terms in the same position. This is - * useful if, e.g., a word has multiple stems. Searches for phrases - * including either stem will match. In this case, all but the first stem's - * increment should be set to zero: the increment of the first instance - * should be one. Repeating a token with an increment of zero can also be - * used to boost the scores of matches on that token. - * - *
  • Set it to values greater than one to inhibit exact phrase matches. - * If, for example, one does not want phrases to match across removed stop - * words, then one could build a stop word filter that removes stop words and - * also sets the increment to the number of stop words removed before each - * non-stop word. Then exact phrase queries will only match when the terms - * occur with no intervening stop words. - * - *
- */ +/** Default implementation of {@link PositionIncrementAttribute}. */ public class PositionIncrementAttributeImpl extends AttributeImpl implements PositionIncrementAttribute, Cloneable { private int positionIncrement = 1; - /** Set the position increment. The default value is one. - * - * @param positionIncrement the distance from the prior term - */ + /** Initialize this attribute with position increment of 1 */ + public PositionIncrementAttributeImpl() {} + public void setPositionIncrement(int positionIncrement) { if (positionIncrement < 0) { throw new IllegalArgumentException @@ -59,9 +34,6 @@ public class PositionIncrementAttributeImpl extends AttributeImpl implements Pos this.positionIncrement = positionIncrement; } - /** Returns the position increment of this Token. - * @see #setPositionIncrement - */ public int getPositionIncrement() { return positionIncrement; } diff --git a/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/PositionLengthAttribute.java b/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/PositionLengthAttribute.java index 6facfec4c72..b402ead8f25 100644 --- a/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/PositionLengthAttribute.java +++ b/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/PositionLengthAttribute.java @@ -26,11 +26,20 @@ import org.apache.lucene.util.Attribute; * produced by decompounding, word splitting/joining, * synonym filtering, etc. * - *

The default value is one. */ + *

NOTE: this is optional, and most analyzers + * don't change the default value (1). */ public interface PositionLengthAttribute extends Attribute { - /** @param positionLength how many positions this token - * spans. */ + /** + * Set the position length of this Token. + *

+ * The default value is one. + * @param positionLength how many positions this token + * spans. + * @throws IllegalArgumentException if positionLength + * is zero or negative. + * @see #getPositionLength() + */ public void setPositionLength(int positionLength); /** Returns the position length of this Token. diff --git a/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/PositionLengthAttributeImpl.java b/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/PositionLengthAttributeImpl.java index 995261dea22..30d68193205 100644 --- a/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/PositionLengthAttributeImpl.java +++ b/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/PositionLengthAttributeImpl.java @@ -19,13 +19,13 @@ package org.apache.lucene.analysis.tokenattributes; import org.apache.lucene.util.AttributeImpl; -/** See {@link PositionLengthAttribute}. */ +/** Default implementation of {@link PositionLengthAttribute}. */ public class PositionLengthAttributeImpl extends AttributeImpl implements PositionLengthAttribute, Cloneable { private int positionLength = 1; - /** @param positionLength how many positions this token - * spans. NOTE: this is optional, and most analyzers - * don't change the default value (1). */ + /** Initializes this attribute with position length of 1. */ + public PositionLengthAttributeImpl() {} + public void setPositionLength(int positionLength) { if (positionLength < 1) { throw new IllegalArgumentException @@ -34,9 +34,6 @@ public class PositionLengthAttributeImpl extends AttributeImpl implements Positi this.positionLength = positionLength; } - /** Returns the position length of this Token. - * @see #setPositionLength - */ public int getPositionLength() { return positionLength; } diff --git a/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/TermToBytesRefAttribute.java b/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/TermToBytesRefAttribute.java index 61f82aded44..06018621aa0 100644 --- a/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/TermToBytesRefAttribute.java +++ b/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/TermToBytesRefAttribute.java @@ -56,7 +56,7 @@ public interface TermToBytesRefAttribute extends Attribute { * Updates the bytes {@link #getBytesRef()} to contain this term's * final encoding, and returns its hashcode. * @return the hashcode as defined by {@link BytesRef#hashCode}: - *

+   * 
    *  int hash = 0;
    *  for (int i = termBytes.offset; i < termBytes.offset+termBytes.length; i++) {
    *    hash = 31*hash + termBytes.bytes[i];
diff --git a/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/TypeAttribute.java b/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/TypeAttribute.java
index 5013c60a3f3..00ee0d409dc 100644
--- a/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/TypeAttribute.java
+++ b/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/TypeAttribute.java
@@ -27,10 +27,15 @@ public interface TypeAttribute extends Attribute {
   /** the default type */
   public static final String DEFAULT_TYPE = "word";
 
-  /** Returns this Token's lexical type.  Defaults to "word". */
+  /** 
+   * Returns this Token's lexical type.  Defaults to "word". 
+   * @see #setType(String)
+   */
   public String type();
 
-  /** Set the lexical type.
-      @see #type() */
+  /** 
+   * Set the lexical type.
+   * @see #type() 
+   */
   public void setType(String type);
 }
diff --git a/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/TypeAttributeImpl.java b/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/TypeAttributeImpl.java
index 098d78d5c26..238c82cf568 100644
--- a/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/TypeAttributeImpl.java
+++ b/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/TypeAttributeImpl.java
@@ -19,27 +19,24 @@ package org.apache.lucene.analysis.tokenattributes;
 
 import org.apache.lucene.util.AttributeImpl;
 
-/**
- * A Token's lexical type. The Default value is "word". 
- */
+/** Default implementation of {@link TypeAttribute}. */
 public class TypeAttributeImpl extends AttributeImpl implements TypeAttribute, Cloneable {
   private String type;
   
+  /** Initialize this attribute with {@link TypeAttribute#DEFAULT_TYPE} */
   public TypeAttributeImpl() {
     this(DEFAULT_TYPE); 
   }
   
+  /** Initialize this attribute with type */
   public TypeAttributeImpl(String type) {
     this.type = type;
   }
   
-  /** Returns this Token's lexical type.  Defaults to "word". */
   public String type() {
     return type;
   }
 
-  /** Set the lexical type.
-      @see #type() */
   public void setType(String type) {
     this.type = type;
   }
diff --git a/lucene/core/src/java/org/apache/lucene/search/Scorer.java b/lucene/core/src/java/org/apache/lucene/search/Scorer.java
index f654d74e5fb..98b7ddcd0ad 100644
--- a/lucene/core/src/java/org/apache/lucene/search/Scorer.java
+++ b/lucene/core/src/java/org/apache/lucene/search/Scorer.java
@@ -113,13 +113,26 @@ public abstract class Scorer extends DocIdSetIterator {
     return Collections.emptyList();
   }
   
-  /** a child Scorer and its relationship to its parent.
+  /** A child Scorer and its relationship to its parent.
    * the meaning of the relationship depends upon the parent query. 
    * @lucene.experimental */
   public static class ChildScorer {
+    /**
+     * Child Scorer. (note this is typically a direct child, and may
+     * itself also have children).
+     */
     public final Scorer child;
+    /**
+     * An arbitrary string relating this scorer to the parent.
+     */
     public final String relationship;
     
+    /**
+     * Creates a new ChildScorer node with the specified relationship.
+     * 

+ * The relationship can be any be any string that makes sense to + * the parent Scorer. + */ public ChildScorer(Scorer child, String relationship) { this.child = child; this.relationship = relationship; From 288926a15ff264015debeeaab0e93b704e3b8563 Mon Sep 17 00:00:00 2001 From: Sami Siren Date: Thu, 30 Aug 2012 11:24:17 +0000 Subject: [PATCH 63/81] SOLR-3731: use same wait time as is used in ZkController git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1378889 13f79535-47bb-0310-9956-ffa450edef68 --- solr/core/src/test/org/apache/solr/cloud/OverseerTest.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/solr/core/src/test/org/apache/solr/cloud/OverseerTest.java b/solr/core/src/test/org/apache/solr/cloud/OverseerTest.java index 74f9f8bafaf..3d9e651b1b9 100644 --- a/solr/core/src/test/org/apache/solr/cloud/OverseerTest.java +++ b/solr/core/src/test/org/apache/solr/cloud/OverseerTest.java @@ -23,7 +23,6 @@ import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.Map; -import java.util.Random; import java.util.Set; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; @@ -125,7 +124,7 @@ public class OverseerTest extends SolrTestCaseJ4 { q.offer(ZkStateReader.toJSON(m)); } - for (int i = 0; i < 30; i++) { + for (int i = 0; i < 120; i++) { String shardId = getShardId(coreName); if (shardId != null) { try { @@ -143,7 +142,7 @@ public class OverseerTest extends SolrTestCaseJ4 { elector.joinElection(ctx); return shardId; } - Thread.sleep(400); + Thread.sleep(500); } return null; } @@ -574,7 +573,6 @@ public class OverseerTest extends SolrTestCaseJ4 { public void run() { try { overseerClient = electNewOverseer(zkAddress); - Random rnd = random(); while (run) { if (killCounter.get()>0) { try { From 883323f166d09fd35dd9e4a275b4668d67a5f833 Mon Sep 17 00:00:00 2001 From: Sami Siren Date: Thu, 30 Aug 2012 11:48:02 +0000 Subject: [PATCH 64/81] fix for SOLR-3770: Overseer may lose updates to cluster state git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1378892 13f79535-47bb-0310-9956-ffa450edef68 --- solr/CHANGES.txt | 1 + solr/core/src/java/org/apache/solr/cloud/Overseer.java | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index 572ae2e774f..134374951db 100644 --- a/solr/CHANGES.txt +++ b/solr/CHANGES.txt @@ -88,6 +88,7 @@ Bug Fixes * SOLR-3745: Proper error reporting if SolrCloud mode is used w/o necessary "_version_" field in schema.xml (hossman) +* SOLR-3770: Overseer may lose updates to cluster state (siren) Other Changes ---------------------- diff --git a/solr/core/src/java/org/apache/solr/cloud/Overseer.java b/solr/core/src/java/org/apache/solr/cloud/Overseer.java index 37278e9dd84..10c745358b3 100644 --- a/solr/core/src/java/org/apache/solr/cloud/Overseer.java +++ b/solr/core/src/java/org/apache/solr/cloud/Overseer.java @@ -126,8 +126,8 @@ public class Overseer { final String operation = message.get(QUEUE_OPERATION); clusterState = processMessage(clusterState, message, operation); - byte[] processed = stateUpdateQueue.remove(); - workQueue.offer(processed); + workQueue.offer(head); + stateUpdateQueue.remove(); head = stateUpdateQueue.peek(); } zkClient.setData(ZkStateReader.CLUSTER_STATE, From 48ae88128766a602a5c233eacb7f6e3195323d7d Mon Sep 17 00:00:00 2001 From: Mark Robert Miller Date: Thu, 30 Aug 2012 12:19:10 +0000 Subject: [PATCH 65/81] SOLR-3721: Fix bug that could allow multiple recoveries to run briefly at the same time if the recovery thread join call was interrupted. git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1378904 13f79535-47bb-0310-9956-ffa450edef68 --- solr/CHANGES.txt | 4 ++++ .../org/apache/solr/update/DefaultSolrCoreState.java | 12 ++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index 134374951db..5e3939f4388 100644 --- a/solr/CHANGES.txt +++ b/solr/CHANGES.txt @@ -90,6 +90,10 @@ Bug Fixes * SOLR-3770: Overseer may lose updates to cluster state (siren) +* SOLR-3721: Fix bug that could allow multiple recoveries to run briefly at + the same time if the recovery thread join call was interrupted. + (Per Steffensen, Mark Miller) + Other Changes ---------------------- diff --git a/solr/core/src/java/org/apache/solr/update/DefaultSolrCoreState.java b/solr/core/src/java/org/apache/solr/update/DefaultSolrCoreState.java index 6a53ed5e763..174e0d34114 100644 --- a/solr/core/src/java/org/apache/solr/update/DefaultSolrCoreState.java +++ b/solr/core/src/java/org/apache/solr/update/DefaultSolrCoreState.java @@ -242,10 +242,14 @@ public final class DefaultSolrCoreState extends SolrCoreState { synchronized (recoveryLock) { if (recoveryStrat != null) { recoveryStrat.close(); - try { - recoveryStrat.join(); - } catch (InterruptedException e) { - + while (true) { + try { + recoveryStrat.join(); + } catch (InterruptedException e) { + // not interruptible - keep waiting + continue; + } + break; } recoveryRunning = false; From 1e573d0ea6a55737b561c67bb3e630dae7b21e42 Mon Sep 17 00:00:00 2001 From: Uwe Schindler Date: Thu, 30 Aug 2012 12:54:06 +0000 Subject: [PATCH 66/81] LUCENE-4337: Add a SecurityManager to run tests using a custom policy file, disallowing write/delete access outside ${build.dir} and listening network sockets on any other address than 127.0.0.1:1024-. This also fixes failing Solr tests because of creating index in example folder or listening on 0.0.0.0 (JMX) git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1378914 13f79535-47bb-0310-9956-ffa450edef68 --- lucene/common-build.xml | 5 ++ lucene/tools/junit4/tests.policy | 46 +++++++++++++ .../org/apache/solr/core/JmxMonitoredMap.java | 9 ++- .../cloud/TestMultiCoreConfBootstrap.java | 34 +++++----- .../apache/solr/core/TestJmxMonitoredMap.java | 64 +++++++++++-------- 5 files changed, 111 insertions(+), 47 deletions(-) create mode 100644 lucene/tools/junit4/tests.policy diff --git a/lucene/common-build.xml b/lucene/common-build.xml index 91401d8a778..3d497f2fc68 100644 --- a/lucene/common-build.xml +++ b/lucene/common-build.xml @@ -796,6 +796,11 @@ + + + + + diff --git a/lucene/tools/junit4/tests.policy b/lucene/tools/junit4/tests.policy new file mode 100644 index 00000000000..8874f7fd262 --- /dev/null +++ b/lucene/tools/junit4/tests.policy @@ -0,0 +1,46 @@ +/* + * 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. + */ + +// Policy file to prevent tests from writing outside the test sandbox directory +// (must be given as a sysprop: tests.sandbox.dir) +// This policy also disallows stuff like listening on network ports of interfaces +// different than 127.0.0.1. + +// PLEASE NOTE: You may need to enable other permissions when new tests are added, +// everything not allowed here is forbidden! + +grant { + permission java.io.FilePermission "<>", "read,execute"; + permission java.io.FilePermission "${tests.sandbox.dir}${/}-", "read,execute,write,delete"; + permission java.net.SocketPermission "127.0.0.1:1024-", "accept,listen"; + permission java.net.SocketPermission "*", "connect,resolve"; + permission java.util.PropertyPermission "*", "read,write"; + permission java.lang.reflect.ReflectPermission "*"; + permission java.lang.RuntimePermission "*"; + + // Solr needs those: + permission java.net.NetPermission "*"; + permission java.util.logging.LoggingPermission "control"; + permission java.lang.management.ManagementPermission "monitor"; + permission javax.management.MBeanPermission "*", "*"; + permission javax.management.MBeanServerPermission "*"; + permission javax.management.MBeanTrustPermission "*"; + + // TIKA uses BouncyCastle and that registers new provider for PDF parsing + MSOffice parsing. Maybe report as bug! + permission java.security.SecurityPermission "putProviderProperty.BC"; + permission java.security.SecurityPermission "insertProvider.BC"; +}; diff --git a/solr/core/src/java/org/apache/solr/core/JmxMonitoredMap.java b/solr/core/src/java/org/apache/solr/core/JmxMonitoredMap.java index abd84c3a861..4271f220d5f 100644 --- a/solr/core/src/java/org/apache/solr/core/JmxMonitoredMap.java +++ b/solr/core/src/java/org/apache/solr/core/JmxMonitoredMap.java @@ -61,6 +61,13 @@ public class JmxMonitoredMap extends public JmxMonitoredMap(String coreName, String coreHashCode, final JmxConfiguration jmxConfig) { + this(coreName, coreHashCode, jmxConfig, null); + } + + // TODO: Make public? Move Map env to environment? + // Currently the map is needed to bind to localhost + JmxMonitoredMap(String coreName, String coreHashCode, + final JmxConfiguration jmxConfig, Map env) { this.coreHashCode = coreHashCode; jmxRootName = (null != jmxConfig.rootName ? jmxConfig.rootName @@ -94,7 +101,7 @@ public class JmxMonitoredMap extends server = MBeanServerFactory.newMBeanServer(); JMXConnectorServer connector = JMXConnectorServerFactory .newJMXConnectorServer(new JMXServiceURL(jmxConfig.serviceUrl), - null, server); + env, server); connector.start(); LOG.info("JMX monitoring is enabled at " + jmxConfig.serviceUrl); } catch (Exception e) { diff --git a/solr/core/src/test/org/apache/solr/cloud/TestMultiCoreConfBootstrap.java b/solr/core/src/test/org/apache/solr/cloud/TestMultiCoreConfBootstrap.java index 8effb26940e..0d9b467eca0 100644 --- a/solr/core/src/test/org/apache/solr/cloud/TestMultiCoreConfBootstrap.java +++ b/solr/core/src/test/org/apache/solr/cloud/TestMultiCoreConfBootstrap.java @@ -25,9 +25,7 @@ import org.apache.solr.core.CoreContainer; import org.apache.solr.util.AbstractSolrTestCase; import org.apache.solr.util.ExternalPaths; import org.junit.After; -import org.junit.AfterClass; import org.junit.Before; -import org.junit.BeforeClass; import org.junit.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -36,27 +34,25 @@ public class TestMultiCoreConfBootstrap extends SolrTestCaseJ4 { protected static Logger log = LoggerFactory.getLogger(TestMultiCoreConfBootstrap.class); protected CoreContainer cores = null; private String home; - - protected static ZkTestServer zkServer; - protected static String zkDir; - @BeforeClass - public static void beforeClass() { - createTempDir(); - } - - @AfterClass - public static void afterClass() { - zkServer = null; - zkDir = null; - } + protected File dataDir2; + protected ZkTestServer zkServer; + protected String zkDir; @Override @Before public void setUp() throws Exception { super.setUp(); + + createTempDir(); + dataDir2 = new File(TEMP_DIR, getSimpleClassName() + "-core1-" + + System.currentTimeMillis()); + dataDir2.mkdirs(); + home = ExternalPaths.EXAMPLE_MULTICORE_HOME; System.setProperty("solr.solr.home", home); + System.setProperty( "solr.core0.data.dir", dataDir.getCanonicalPath() ); + System.setProperty( "solr.core1.data.dir", dataDir2.getCanonicalPath() ); zkDir = dataDir.getAbsolutePath() + File.separator + "zookeeper/server1/data"; @@ -82,14 +78,11 @@ public class TestMultiCoreConfBootstrap extends SolrTestCaseJ4 { zkServer.shutdown(); - File dataDir1 = new File(home + File.separator + "core0","data"); - File dataDir2 = new File(home + File.separator + "core1","data"); - String skip = System.getProperty("solr.test.leavedatadir"); if (null != skip && 0 != skip.trim().length()) { log.info("NOTE: per solr.test.leavedatadir, dataDir will not be removed: " + dataDir.getAbsolutePath()); } else { - if (!AbstractSolrTestCase.recurseDelete(dataDir1)) { + if (!AbstractSolrTestCase.recurseDelete(dataDir)) { log.warn("!!!! WARNING: best effort to remove " + dataDir.getAbsolutePath() + " FAILED !!!!!"); } if (!AbstractSolrTestCase.recurseDelete(dataDir2)) { @@ -97,6 +90,9 @@ public class TestMultiCoreConfBootstrap extends SolrTestCaseJ4 { } } + zkServer = null; + zkDir = null; + super.tearDown(); } diff --git a/solr/core/src/test/org/apache/solr/core/TestJmxMonitoredMap.java b/solr/core/src/test/org/apache/solr/core/TestJmxMonitoredMap.java index 24c4666b661..568b5519a88 100644 --- a/solr/core/src/test/org/apache/solr/core/TestJmxMonitoredMap.java +++ b/solr/core/src/test/org/apache/solr/core/TestJmxMonitoredMap.java @@ -30,10 +30,15 @@ import javax.management.Query; import javax.management.remote.JMXConnector; import javax.management.remote.JMXConnectorFactory; import javax.management.remote.JMXServiceURL; +import javax.management.remote.rmi.RMIConnectorServer; +import java.io.IOException; +import java.net.InetSocketAddress; +import java.net.Socket; import java.net.ServerSocket; import java.net.URL; -import java.rmi.RemoteException; import java.rmi.registry.LocateRegistry; +import java.rmi.server.RMIServerSocketFactory; +import java.util.Collections; import java.util.Set; import static org.hamcrest.CoreMatchers.allOf; @@ -61,33 +66,38 @@ public class TestJmxMonitoredMap extends LuceneTestCase { public void setUp() throws Exception { super.setUp(); - - int retries = 5; - for (int i = 0; i < retries; i++) { - try { - ServerSocket server = new ServerSocket(0); - try { - port = server.getLocalPort(); - } finally { - server.close(); - } - // System.out.println("Using port: " + port); - try { - LocateRegistry.createRegistry(port); - } catch (RemoteException e) { - throw e; - } - String url = "service:jmx:rmi:///jndi/rmi://:" + port + "/solrjmx"; - JmxConfiguration config = new JmxConfiguration(true, null, url, null); - monitoredMap = new JmxMonitoredMap("", "", config); - JMXServiceURL u = new JMXServiceURL(url); - connector = JMXConnectorFactory.connect(u); - mbeanServer = connector.getMBeanServerConnection(); - break; - } catch (Exception e) { - if(retries == (i + 1)) { - throw e; + String oldHost = System.getProperty("java.rmi.server.hostname"); + try { + // this stupid sysprop thing is needed, because remote stubs use the + // hostname to connect, which does not work with server bound to 127.0.0.1 + // See: http://weblogs.java.net/blog/emcmanus/archive/2006/12/multihomed_comp.html + System.setProperty("java.rmi.server.hostname", "127.0.0.1"); + class LocalhostRMIServerSocketFactory implements RMIServerSocketFactory { + ServerSocket socket; + + @Override + public ServerSocket createServerSocket(int port) throws IOException { + socket = new ServerSocket(); + socket.bind(new InetSocketAddress("127.0.0.1", port)); + return socket; } + }; + LocalhostRMIServerSocketFactory factory = new LocalhostRMIServerSocketFactory(); + LocateRegistry.createRegistry(0, null, factory); + port = factory.socket.getLocalPort(); + //System.out.println("Using port: " + port); + String url = "service:jmx:rmi://127.0.0.1:"+port+"/jndi/rmi://127.0.0.1:"+port+"/solrjmx"; + JmxConfiguration config = new JmxConfiguration(true, null, url, null); + monitoredMap = new JmxMonitoredMap("", "", config, + Collections.singletonMap(RMIConnectorServer.RMI_SERVER_SOCKET_FACTORY_ATTRIBUTE, factory)); + JMXServiceURL u = new JMXServiceURL(url); + connector = JMXConnectorFactory.connect(u); + mbeanServer = connector.getMBeanServerConnection(); + } finally { + if (oldHost == null) { + System.clearProperty("java.rmi.server.hostname"); + } else { + System.setProperty("java.rmi.server.hostname", oldHost); } } } From e31ddf3554665bf0a7e37b0e98724281ac5808b8 Mon Sep 17 00:00:00 2001 From: Mark Robert Miller Date: Thu, 30 Aug 2012 13:18:29 +0000 Subject: [PATCH 67/81] use sendToLeaders rather than replicas != null to determine if we add repicas to end of the list git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1378922 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/solr/client/solrj/impl/CloudSolrServer.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrServer.java b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrServer.java index 1bfdf74d79f..79bfb1f0b71 100644 --- a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrServer.java +++ b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrServer.java @@ -242,14 +242,16 @@ public class CloudSolrServer extends SolrServer { theUrlList.addAll(urlList); } Collections.shuffle(theUrlList, rand); - if (replicas != null) { + if (sendToLeaders) { ArrayList theReplicas = new ArrayList(replicasList.size()); theReplicas.addAll(replicasList); Collections.shuffle(theReplicas, rand); - + // System.out.println("leaders:" + theUrlList); + // System.out.println("replicas:" + theReplicas); theUrlList.addAll(theReplicas); } - //System.out.println("########################## MAKING REQUEST TO " + theUrlList); + + // System.out.println("########################## MAKING REQUEST TO " + theUrlList); LBHttpSolrServer.Req req = new LBHttpSolrServer.Req(request, theUrlList); LBHttpSolrServer.Rsp rsp = lbServer.request(req); From 72d18af4a0a90088171bdc66ae853a6fc69a7771 Mon Sep 17 00:00:00 2001 From: Uwe Schindler Date: Thu, 30 Aug 2012 13:38:29 +0000 Subject: [PATCH 68/81] LUCENE-4337: Add missing EOL-Style git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1378936 13f79535-47bb-0310-9956-ffa450edef68 --- lucene/tools/junit4/tests.policy | 92 ++++++++++++++++---------------- 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/lucene/tools/junit4/tests.policy b/lucene/tools/junit4/tests.policy index 8874f7fd262..ea75fc8a7e9 100644 --- a/lucene/tools/junit4/tests.policy +++ b/lucene/tools/junit4/tests.policy @@ -1,46 +1,46 @@ -/* - * 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. - */ - -// Policy file to prevent tests from writing outside the test sandbox directory -// (must be given as a sysprop: tests.sandbox.dir) -// This policy also disallows stuff like listening on network ports of interfaces -// different than 127.0.0.1. - -// PLEASE NOTE: You may need to enable other permissions when new tests are added, -// everything not allowed here is forbidden! - -grant { - permission java.io.FilePermission "<>", "read,execute"; - permission java.io.FilePermission "${tests.sandbox.dir}${/}-", "read,execute,write,delete"; - permission java.net.SocketPermission "127.0.0.1:1024-", "accept,listen"; - permission java.net.SocketPermission "*", "connect,resolve"; - permission java.util.PropertyPermission "*", "read,write"; - permission java.lang.reflect.ReflectPermission "*"; - permission java.lang.RuntimePermission "*"; - - // Solr needs those: - permission java.net.NetPermission "*"; - permission java.util.logging.LoggingPermission "control"; - permission java.lang.management.ManagementPermission "monitor"; - permission javax.management.MBeanPermission "*", "*"; - permission javax.management.MBeanServerPermission "*"; - permission javax.management.MBeanTrustPermission "*"; - - // TIKA uses BouncyCastle and that registers new provider for PDF parsing + MSOffice parsing. Maybe report as bug! - permission java.security.SecurityPermission "putProviderProperty.BC"; - permission java.security.SecurityPermission "insertProvider.BC"; -}; +/* + * 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. + */ + +// Policy file to prevent tests from writing outside the test sandbox directory +// (must be given as a sysprop: tests.sandbox.dir) +// This policy also disallows stuff like listening on network ports of interfaces +// different than 127.0.0.1. + +// PLEASE NOTE: You may need to enable other permissions when new tests are added, +// everything not allowed here is forbidden! + +grant { + permission java.io.FilePermission "<>", "read,execute"; + permission java.io.FilePermission "${tests.sandbox.dir}${/}-", "read,execute,write,delete"; + permission java.net.SocketPermission "127.0.0.1:1024-", "accept,listen"; + permission java.net.SocketPermission "*", "connect,resolve"; + permission java.util.PropertyPermission "*", "read,write"; + permission java.lang.reflect.ReflectPermission "*"; + permission java.lang.RuntimePermission "*"; + + // Solr needs those: + permission java.net.NetPermission "*"; + permission java.util.logging.LoggingPermission "control"; + permission java.lang.management.ManagementPermission "monitor"; + permission javax.management.MBeanPermission "*", "*"; + permission javax.management.MBeanServerPermission "*"; + permission javax.management.MBeanTrustPermission "*"; + + // TIKA uses BouncyCastle and that registers new provider for PDF parsing + MSOffice parsing. Maybe report as bug! + permission java.security.SecurityPermission "putProviderProperty.BC"; + permission java.security.SecurityPermission "insertProvider.BC"; +}; From d72c9dddba7aadb80969d356186bc8f34f8e3dd2 Mon Sep 17 00:00:00 2001 From: Mark Robert Miller Date: Thu, 30 Aug 2012 14:16:15 +0000 Subject: [PATCH 69/81] work harder to shutdown jetty for cases where jetty was started but could not bind to the port - not perfect yet, but works better than a std stop git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1378948 13f79535-47bb-0310-9956-ffa450edef68 --- .../solrj/embedded/JettySolrRunner.java | 40 ++++++++++++------- 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/solr/core/src/java/org/apache/solr/client/solrj/embedded/JettySolrRunner.java b/solr/core/src/java/org/apache/solr/client/solrj/embedded/JettySolrRunner.java index 2f31cb58624..b5f4050f6a4 100644 --- a/solr/core/src/java/org/apache/solr/client/solrj/embedded/JettySolrRunner.java +++ b/solr/core/src/java/org/apache/solr/client/solrj/embedded/JettySolrRunner.java @@ -25,6 +25,7 @@ import java.util.Map; import java.util.Random; import javax.servlet.DispatcherType; +import javax.servlet.Filter; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @@ -40,6 +41,7 @@ import org.eclipse.jetty.servlet.ServletContextHandler; import org.eclipse.jetty.util.component.LifeCycle; import org.eclipse.jetty.util.log.Logger; import org.eclipse.jetty.util.thread.QueuedThreadPool; +import org.eclipse.jetty.util.thread.ThreadPool; /** * Run solr using jetty @@ -47,8 +49,6 @@ import org.eclipse.jetty.util.thread.QueuedThreadPool; * @since solr 1.3 */ public class JettySolrRunner { - static Map RUNNING_JETTIES = new HashMap(); - Server server; FilterHolder dispatchFilter; @@ -208,7 +208,6 @@ public class JettySolrRunner { if (!server.isRunning()) { server.start(); - RUNNING_JETTIES.put(this, new RuntimeException()); } synchronized (JettySolrRunner.this) { int cnt = 0; @@ -225,21 +224,32 @@ public class JettySolrRunner { } public void stop() throws Exception { - if (!server.isStopped() && !server.isStopping()) { - server.stop(); - RUNNING_JETTIES.remove(this); + // we try and do a bunch of extra stop stuff because + // jetty doesn't like to stop if it started + // and ended up in a failure state (like when it cannot get the port) + if (server.getState().equals(Server.FAILED)) { + Connector[] connectors = server.getConnectors(); + for (Connector connector : connectors) { + connector.stop(); + } } + Filter filter = dispatchFilter.getFilter(); + ThreadPool threadPool = server.getThreadPool(); + server.getServer().stop(); + server.stop(); + if (threadPool instanceof QueuedThreadPool) { + ((QueuedThreadPool) threadPool).setMaxStopTimeMs(15000); + ((QueuedThreadPool) threadPool).stop(); + ((QueuedThreadPool) threadPool).stop(); + ((QueuedThreadPool) threadPool).stop(); + } + //server.destroy(); + if (server.getState().equals(Server.FAILED)) { + filter.destroy(); + } + server.join(); } - - public static void assertStoppedJetties() { - if (RUNNING_JETTIES.size() > 0) { - Iterator stacktraces = RUNNING_JETTIES.values().iterator(); - Exception cause = null; - cause = stacktraces.next(); - throw new RuntimeException("Found a bad one!", cause); - } - } /** * Returns the Local Port of the jetty Server. From 574d859d2bc09f14e3f9f021cfe09443c2a1fac0 Mon Sep 17 00:00:00 2001 From: Mark Robert Miller Date: Thu, 30 Aug 2012 14:20:45 +0000 Subject: [PATCH 70/81] work harder to shutdown jetty for cases where jetty was started but could not bind to the port - not perfect yet, but works better than a std stop - missed this class git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1378951 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/solr/cloud/AbstractDistribZkTestBase.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/solr/test-framework/src/java/org/apache/solr/cloud/AbstractDistribZkTestBase.java b/solr/test-framework/src/java/org/apache/solr/cloud/AbstractDistribZkTestBase.java index bc85b099a75..6c1a683a2b6 100644 --- a/solr/test-framework/src/java/org/apache/solr/cloud/AbstractDistribZkTestBase.java +++ b/solr/test-framework/src/java/org/apache/solr/cloud/AbstractDistribZkTestBase.java @@ -203,8 +203,6 @@ public abstract class AbstractDistribZkTestBase extends BaseDistributedSearchTes System.clearProperty("solr.test.sys.prop2"); resetExceptionIgnores(); super.tearDown(); - - JettySolrRunner.assertStoppedJetties(); } protected void printLayout() throws Exception { From a4702d3711e8ad2ac5ef455e4182f2da80011c86 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Thu, 30 Aug 2012 14:33:44 +0000 Subject: [PATCH 71/81] javadocs git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1378959 13f79535-47bb-0310-9956-ffa450edef68 --- lucene/build.xml | 1 + .../lucene/document/ByteDocValuesField.java | 9 +++ .../lucene/document/CompressionTools.java | 8 +++ .../org/apache/lucene/document/DateTools.java | 15 ++++- .../document/DerefBytesDocValuesField.java | 26 ++++++++ .../document/DocumentStoredFieldVisitor.java | 7 +++ .../lucene/document/DoubleDocValuesField.java | 9 +++ .../apache/lucene/document/DoubleField.java | 24 +++++++- .../org/apache/lucene/document/Field.java | 55 ++++++++++++++++- .../org/apache/lucene/document/FieldType.java | 48 ++++++++++++++- .../lucene/document/FloatDocValuesField.java | 9 +++ .../apache/lucene/document/FloatField.java | 24 +++++++- .../lucene/document/IntDocValuesField.java | 9 +++ .../org/apache/lucene/document/IntField.java | 24 +++++++- .../lucene/document/LongDocValuesField.java | 9 +++ .../org/apache/lucene/document/LongField.java | 24 +++++++- .../document/PackedLongDocValuesField.java | 9 +++ .../lucene/document/ShortDocValuesField.java | 9 +++ .../document/SortedBytesDocValuesField.java | 25 ++++++++ .../apache/lucene/document/StoredField.java | 59 +++++++++++++++++++ .../document/StraightBytesDocValuesField.java | 26 ++++++++ .../apache/lucene/document/StringField.java | 7 ++- .../org/apache/lucene/document/TextField.java | 21 ++++++- 23 files changed, 442 insertions(+), 15 deletions(-) diff --git a/lucene/build.xml b/lucene/build.xml index e4f2b9b189e..7f394e3eefb 100644 --- a/lucene/build.xml +++ b/lucene/build.xml @@ -251,6 +251,7 @@ + diff --git a/lucene/core/src/java/org/apache/lucene/document/ByteDocValuesField.java b/lucene/core/src/java/org/apache/lucene/document/ByteDocValuesField.java index 915f5f15c4e..076af30f530 100644 --- a/lucene/core/src/java/org/apache/lucene/document/ByteDocValuesField.java +++ b/lucene/core/src/java/org/apache/lucene/document/ByteDocValuesField.java @@ -38,12 +38,21 @@ import org.apache.lucene.index.DocValues; public class ByteDocValuesField extends Field { + /** + * Type for 8-bit byte DocValues. + */ public static final FieldType TYPE = new FieldType(); static { TYPE.setDocValueType(DocValues.Type.FIXED_INTS_8); TYPE.freeze(); } + /** + * Creates a new DocValues field with the specified 8-bit byte value + * @param name field name + * @param value 8-bit byte value + * @throws IllegalArgumentException if the field name is null. + */ public ByteDocValuesField(String name, byte value) { super(name, TYPE); fieldsData = Byte.valueOf(value); diff --git a/lucene/core/src/java/org/apache/lucene/document/CompressionTools.java b/lucene/core/src/java/org/apache/lucene/document/CompressionTools.java index 5fcee267cf0..09dc91faf12 100644 --- a/lucene/core/src/java/org/apache/lucene/document/CompressionTools.java +++ b/lucene/core/src/java/org/apache/lucene/document/CompressionTools.java @@ -92,10 +92,14 @@ public class CompressionTools { return compress(result.bytes, 0, result.length, compressionLevel); } + /** Decompress the byte array previously returned by + * compress (referenced by the provided BytesRef) */ public static byte[] decompress(BytesRef bytes) throws DataFormatException { return decompress(bytes.bytes, bytes.offset, bytes.length); } + /** Decompress the byte array previously returned by + * compress */ public static byte[] decompress(byte[] value) throws DataFormatException { return decompress(value, 0, value.length); } @@ -130,6 +134,8 @@ public class CompressionTools { return decompressString(value, 0, value.length); } + /** Decompress the byte array previously returned by + * compressString back into a String */ public static String decompressString(byte[] value, int offset, int length) throws DataFormatException { final byte[] bytes = decompress(value, offset, length); CharsRef result = new CharsRef(bytes.length); @@ -137,6 +143,8 @@ public class CompressionTools { return new String(result.chars, 0, result.length); } + /** Decompress the byte array (referenced by the provided BytesRef) + * previously returned by compressString back into a String */ public static String decompressString(BytesRef bytes) throws DataFormatException { return decompressString(bytes.bytes, bytes.offset, bytes.length); } diff --git a/lucene/core/src/java/org/apache/lucene/document/DateTools.java b/lucene/core/src/java/org/apache/lucene/document/DateTools.java index 1cc3a4d8589..89f6ccff789 100644 --- a/lucene/core/src/java/org/apache/lucene/document/DateTools.java +++ b/lucene/core/src/java/org/apache/lucene/document/DateTools.java @@ -185,7 +185,20 @@ public class DateTools { /** Specifies the time granularity. */ public static enum Resolution { - YEAR(4), MONTH(6), DAY(8), HOUR(10), MINUTE(12), SECOND(14), MILLISECOND(17); + /** Limit a date's resolution to year granularity. */ + YEAR(4), + /** Limit a date's resolution to month granularity. */ + MONTH(6), + /** Limit a date's resolution to day granularity. */ + DAY(8), + /** Limit a date's resolution to hour granularity. */ + HOUR(10), + /** Limit a date's resolution to minute granularity. */ + MINUTE(12), + /** Limit a date's resolution to second granularity. */ + SECOND(14), + /** Limit a date's resolution to millisecond granularity. */ + MILLISECOND(17); final int formatLen; final SimpleDateFormat format;//should be cloned before use, since it's not threadsafe diff --git a/lucene/core/src/java/org/apache/lucene/document/DerefBytesDocValuesField.java b/lucene/core/src/java/org/apache/lucene/document/DerefBytesDocValuesField.java index 99d68291463..bc846a443fe 100644 --- a/lucene/core/src/java/org/apache/lucene/document/DerefBytesDocValuesField.java +++ b/lucene/core/src/java/org/apache/lucene/document/DerefBytesDocValuesField.java @@ -44,23 +44,49 @@ import org.apache.lucene.util.BytesRef; public class DerefBytesDocValuesField extends Field { // TODO: ideally indexer figures out var vs fixed on its own!? + /** + * Type for indirect bytes DocValues: all with the same length + */ public static final FieldType TYPE_FIXED_LEN = new FieldType(); static { TYPE_FIXED_LEN.setDocValueType(DocValues.Type.BYTES_FIXED_DEREF); TYPE_FIXED_LEN.freeze(); } + /** + * Type for indirect bytes DocValues: can have variable lengths + */ public static final FieldType TYPE_VAR_LEN = new FieldType(); static { TYPE_VAR_LEN.setDocValueType(DocValues.Type.BYTES_VAR_DEREF); TYPE_VAR_LEN.freeze(); } + /** + * Create a new variable-length indirect DocValues field. + *

+ * This calls + * {@link DerefBytesDocValuesField#DerefBytesDocValuesField(String, BytesRef, boolean) + * DerefBytesDocValuesField(name, bytes, false}, meaning by default + * it allows for values of different lengths. If your values are all + * the same length, use that constructor instead. + * @param name field name + * @param bytes binary content + * @throws IllegalArgumentException if the field name is null + */ public DerefBytesDocValuesField(String name, BytesRef bytes) { super(name, TYPE_VAR_LEN); fieldsData = bytes; } + /** + * Create a new fixed or variable length indirect DocValues field. + *

+ * @param name field name + * @param bytes binary content + * @param isFixedLength true if all values have the same length. + * @throws IllegalArgumentException if the field name is null + */ public DerefBytesDocValuesField(String name, BytesRef bytes, boolean isFixedLength) { super(name, isFixedLength ? TYPE_FIXED_LEN : TYPE_VAR_LEN); fieldsData = bytes; diff --git a/lucene/core/src/java/org/apache/lucene/document/DocumentStoredFieldVisitor.java b/lucene/core/src/java/org/apache/lucene/document/DocumentStoredFieldVisitor.java index 5a8f4d2c25a..2f79c411f1f 100644 --- a/lucene/core/src/java/org/apache/lucene/document/DocumentStoredFieldVisitor.java +++ b/lucene/core/src/java/org/apache/lucene/document/DocumentStoredFieldVisitor.java @@ -96,6 +96,13 @@ public class DocumentStoredFieldVisitor extends StoredFieldVisitor { return fieldsToAdd == null || fieldsToAdd.contains(fieldInfo.name) ? Status.YES : Status.NO; } + /** + * Retrieve the visited document. + * @return Document populated with stored fields. Note that only + * the stored information in the field instances is valid, + * data such as boosts, indexing options, term vector options, + * etc is not set. + */ public Document getDocument() { return doc; } diff --git a/lucene/core/src/java/org/apache/lucene/document/DoubleDocValuesField.java b/lucene/core/src/java/org/apache/lucene/document/DoubleDocValuesField.java index 1a0c225ee38..bb4d1f57187 100644 --- a/lucene/core/src/java/org/apache/lucene/document/DoubleDocValuesField.java +++ b/lucene/core/src/java/org/apache/lucene/document/DoubleDocValuesField.java @@ -38,12 +38,21 @@ import org.apache.lucene.index.DocValues; public class DoubleDocValuesField extends Field { + /** + * Type for 64-bit double DocValues. + */ public static final FieldType TYPE = new FieldType(); static { TYPE.setDocValueType(DocValues.Type.FLOAT_64); TYPE.freeze(); } + /** + * Creates a new DocValues field with the specified 64-bit double value + * @param name field name + * @param value 64-bit double value + * @throws IllegalArgumentException if the field name is null + */ public DoubleDocValuesField(String name, double value) { super(name, TYPE); fieldsData = Double.valueOf(value); diff --git a/lucene/core/src/java/org/apache/lucene/document/DoubleField.java b/lucene/core/src/java/org/apache/lucene/document/DoubleField.java index 32a01460d38..77ebdd511a2 100644 --- a/lucene/core/src/java/org/apache/lucene/document/DoubleField.java +++ b/lucene/core/src/java/org/apache/lucene/document/DoubleField.java @@ -114,6 +114,10 @@ import org.apache.lucene.util.NumericUtils; public final class DoubleField extends Field { + /** + * Type for a DoubleField that is not stored: + * normalization factors, frequencies, and positions are omitted. + */ public static final FieldType TYPE_NOT_STORED = new FieldType(); static { TYPE_NOT_STORED.setIndexed(true); @@ -124,6 +128,10 @@ public final class DoubleField extends Field { TYPE_NOT_STORED.freeze(); } + /** + * Type for a stored DoubleField: + * normalization factors, frequencies, and positions are omitted. + */ public static final FieldType TYPE_STORED = new FieldType(); static { TYPE_STORED.setIndexed(true); @@ -137,14 +145,26 @@ public final class DoubleField extends Field { /** Creates a stored or un-stored DoubleField with the provided value * and default precisionStep {@link - * NumericUtils#PRECISION_STEP_DEFAULT} (4). */ + * NumericUtils#PRECISION_STEP_DEFAULT} (4). + * @param name field name + * @param value 64-bit double value + * @param stored Store.YES if the content should also be stored + * @throws IllegalArgumentException if the field name is null. + */ public DoubleField(String name, double value, Store stored) { super(name, stored == Store.YES ? TYPE_STORED : TYPE_NOT_STORED); fieldsData = Double.valueOf(value); } /** Expert: allows you to customize the {@link - * FieldType}. */ + * FieldType}. + * @param name field name + * @param value 64-bit double value + * @param type customized field type: must have {@link FieldType#numericType()} + * of {@link FieldType.NumericType#DOUBLE}. + * @throws IllegalArgumentException if the field name or type is null, or + * if the field type does not have a DOUBLE numericType() + */ public DoubleField(String name, double value, FieldType type) { super(name, type); if (type.numericType() != FieldType.NumericType.DOUBLE) { diff --git a/lucene/core/src/java/org/apache/lucene/document/Field.java b/lucene/core/src/java/org/apache/lucene/document/Field.java index 0f0a8cc8c7f..8328e0719f8 100644 --- a/lucene/core/src/java/org/apache/lucene/document/Field.java +++ b/lucene/core/src/java/org/apache/lucene/document/Field.java @@ -90,6 +90,10 @@ public class Field implements IndexableField { /** * Expert: creates a field with no initial value. * Intended only for custom Field subclasses. + * @param name field name + * @param type field type + * @throws IllegalArgumentException if either the name or type + * is null. */ protected Field(String name, FieldType type) { if (name == null) { @@ -104,6 +108,13 @@ public class Field implements IndexableField { /** * Create field with Reader value. + * @param name field name + * @param reader reader value + * @param type field type + * @throws IllegalArgumentException if either the name or type + * is null, or if the field's type is stored(), or + * if tokenized() is false. + * @throws NullPointerException if the reader is null */ public Field(String name, Reader reader, FieldType type) { if (name == null) { @@ -129,6 +140,13 @@ public class Field implements IndexableField { /** * Create field with TokenStream value. + * @param name field name + * @param tokenStream TokenStream value + * @param type field type + * @throws IllegalArgumentException if either the name or type + * is null, or if the field's type is stored(), or + * if tokenized() is false, or if indexed() is false. + * @throws NullPointerException if the tokenStream is null */ public Field(String name, TokenStream tokenStream, FieldType type) { if (name == null) { @@ -152,6 +170,15 @@ public class Field implements IndexableField { /** * Create field with binary value. + * + *

NOTE: the provided byte[] is not copied so be sure + * not to change it until you're done with this field. + * @param name field name + * @param value byte array pointing to binary content (not copied) + * @param type field type + * @throws IllegalArgumentException if the field name is null, + * or the field's type is indexed() + * @throws NullPointerException if the type is null */ public Field(String name, byte[] value, FieldType type) { this(name, value, 0, value.length, type); @@ -159,6 +186,17 @@ public class Field implements IndexableField { /** * Create field with binary value. + * + *

NOTE: the provided byte[] is not copied so be sure + * not to change it until you're done with this field. + * @param name field name + * @param value byte array pointing to binary content (not copied) + * @param offset starting position of the byte array + * @param length valid length of the byte array + * @param type field type + * @throws IllegalArgumentException if the field name is null, + * or the field's type is indexed() + * @throws NullPointerException if the type is null */ public Field(String name, byte[] value, int offset, int length, FieldType type) { this(name, new BytesRef(value, offset, length), type); @@ -169,6 +207,12 @@ public class Field implements IndexableField { * *

NOTE: the provided BytesRef is not copied so be sure * not to change it until you're done with this field. + * @param name field name + * @param bytes BytesRef pointing to binary content (not copied) + * @param type field type + * @throws IllegalArgumentException if the field name is null, + * or the field's type is indexed() + * @throws NullPointerException if the type is null */ public Field(String name, BytesRef bytes, FieldType type) { if (name == null) { @@ -186,6 +230,13 @@ public class Field implements IndexableField { /** * Create field with String value. + * @param name field name + * @param value string value + * @param type field type + * @throws IllegalArgumentException if either the name or value + * is null, or if the field's type is neither indexed() nor stored(), + * or if indexed() is false but storeTermVectors() is true. + * @throws NullPointerException if the type is null */ public Field(String name, String value, FieldType type) { if (name == null) { @@ -389,7 +440,9 @@ public class Field implements IndexableField { } /** - * Sets the boost factor on this field. + * Sets the boost factor on this field. + * @throws IllegalArgumentException if this field is not indexed, + * or if it omits norms. * @see #boost() */ public void setBoost(float boost) { diff --git a/lucene/core/src/java/org/apache/lucene/document/FieldType.java b/lucene/core/src/java/org/apache/lucene/document/FieldType.java index 6a46995c7ce..a47641116b1 100644 --- a/lucene/core/src/java/org/apache/lucene/document/FieldType.java +++ b/lucene/core/src/java/org/apache/lucene/document/FieldType.java @@ -32,7 +32,16 @@ public class FieldType implements IndexableFieldType { /** Data type of the numeric value * @since 3.2 */ - public static enum NumericType {INT, LONG, FLOAT, DOUBLE} + public static enum NumericType { + /** 32-bit integer numeric type */ + INT, + /** 64-bit long numeric type */ + LONG, + /** 32-bit float numeric type */ + FLOAT, + /** 64-bit double numeric type */ + DOUBLE + } private boolean indexed; private boolean stored; @@ -99,6 +108,9 @@ public class FieldType implements IndexableFieldType { /** * Set to true to index (invert) this field. + * @param value true if this field should be indexed. + * @throws IllegalStateException if this FieldType is frozen against + * future modifications. * @see #indexed() */ public void setIndexed(boolean value) { @@ -118,6 +130,9 @@ public class FieldType implements IndexableFieldType { /** * Set to true to store this field. + * @param value true if this field should be stored. + * @throws IllegalStateException if this FieldType is frozen against + * future modifications. * @see #stored() */ public void setStored(boolean value) { @@ -138,6 +153,9 @@ public class FieldType implements IndexableFieldType { /** * Set to true to tokenize this field's contents via the * configured {@link Analyzer}. + * @param value true if this field should be tokenized. + * @throws IllegalStateException if this FieldType is frozen against + * future modifications. * @see #tokenized() */ public void setTokenized(boolean value) { @@ -158,6 +176,9 @@ public class FieldType implements IndexableFieldType { /** * Set to true if this field's indexed form should be also stored * into term vectors. + * @param value true if this field should store term vectors. + * @throws IllegalStateException if this FieldType is frozen against + * future modifications. * @see #storeTermVectors() */ public void setStoreTermVectors(boolean value) { @@ -178,6 +199,9 @@ public class FieldType implements IndexableFieldType { /** * Set to true to also store token character offsets into the term * vector for this field. + * @param value true if this field should store term vector offsets. + * @throws IllegalStateException if this FieldType is frozen against + * future modifications. * @see #storeTermVectorOffsets() */ public void setStoreTermVectorOffsets(boolean value) { @@ -198,6 +222,9 @@ public class FieldType implements IndexableFieldType { /** * Set to true to also store token positions into the term * vector for this field. + * @param value true if this field should store term vector positions. + * @throws IllegalStateException if this FieldType is frozen against + * future modifications. * @see #storeTermVectorPositions() */ public void setStoreTermVectorPositions(boolean value) { @@ -218,6 +245,9 @@ public class FieldType implements IndexableFieldType { /** * Set to true to also store token payloads into the term * vector for this field. + * @param value true if this field should store term vector payloads. + * @throws IllegalStateException if this FieldType is frozen against + * future modifications. * @see #storeTermVectorPayloads() */ public void setStoreTermVectorPayloads(boolean value) { @@ -237,6 +267,9 @@ public class FieldType implements IndexableFieldType { /** * Set to true to omit normalization values for the field. + * @param value true if this field should omit norms. + * @throws IllegalStateException if this FieldType is frozen against + * future modifications. * @see #omitNorms() */ public void setOmitNorms(boolean value) { @@ -256,6 +289,9 @@ public class FieldType implements IndexableFieldType { /** * Sets the indexing options for the field: + * @param value indexing options + * @throws IllegalStateException if this FieldType is frozen against + * future modifications. * @see #indexOptions() */ public void setIndexOptions(IndexOptions value) { @@ -265,6 +301,9 @@ public class FieldType implements IndexableFieldType { /** * Set's the field's DocValues.Type + * @param type DocValues type, or null if no DocValues should be stored. + * @throws IllegalStateException if this FieldType is frozen against + * future modifications. * @see #docValueType() */ public void setDocValueType(DocValues.Type type) { @@ -285,6 +324,9 @@ public class FieldType implements IndexableFieldType { /** * Specifies the field's numeric type. + * @param type numeric type, or null if the field has no numeric type. + * @throws IllegalStateException if this FieldType is frozen against + * future modifications. * @see #numericType() */ public void setNumericType(NumericType type) { @@ -306,6 +348,10 @@ public class FieldType implements IndexableFieldType { /** * Sets the numeric precision step for the field. + * @param precisionStep numeric precision step for the field + * @throws IllegalArgumentException if precisionStep is less than 1. + * @throws IllegalStateException if this FieldType is frozen against + * future modifications. * @see #numericPrecisionStep() */ public void setNumericPrecisionStep(int precisionStep) { diff --git a/lucene/core/src/java/org/apache/lucene/document/FloatDocValuesField.java b/lucene/core/src/java/org/apache/lucene/document/FloatDocValuesField.java index 6add5e56866..dd4f1c20d6a 100644 --- a/lucene/core/src/java/org/apache/lucene/document/FloatDocValuesField.java +++ b/lucene/core/src/java/org/apache/lucene/document/FloatDocValuesField.java @@ -37,12 +37,21 @@ import org.apache.lucene.index.DocValues; public class FloatDocValuesField extends Field { + /** + * Type for 32-bit float DocValues. + */ public static final FieldType TYPE = new FieldType(); static { TYPE.setDocValueType(DocValues.Type.FLOAT_32); TYPE.freeze(); } + /** + * Creates a new DocValues field with the specified 32-bit float value + * @param name field name + * @param value 32-bit float value + * @throws IllegalArgumentException if the field name is null + */ public FloatDocValuesField(String name, float value) { super(name, TYPE); fieldsData = Float.valueOf(value); diff --git a/lucene/core/src/java/org/apache/lucene/document/FloatField.java b/lucene/core/src/java/org/apache/lucene/document/FloatField.java index dcb5ea76cfc..c32394808b1 100644 --- a/lucene/core/src/java/org/apache/lucene/document/FloatField.java +++ b/lucene/core/src/java/org/apache/lucene/document/FloatField.java @@ -114,6 +114,10 @@ import org.apache.lucene.util.NumericUtils; public final class FloatField extends Field { + /** + * Type for a FloatField that is not stored: + * normalization factors, frequencies, and positions are omitted. + */ public static final FieldType TYPE_NOT_STORED = new FieldType(); static { TYPE_NOT_STORED.setIndexed(true); @@ -124,6 +128,10 @@ public final class FloatField extends Field { TYPE_NOT_STORED.freeze(); } + /** + * Type for a stored FloatField: + * normalization factors, frequencies, and positions are omitted. + */ public static final FieldType TYPE_STORED = new FieldType(); static { TYPE_STORED.setIndexed(true); @@ -137,14 +145,26 @@ public final class FloatField extends Field { /** Creates a stored or un-stored FloatField with the provided value * and default precisionStep {@link - * NumericUtils#PRECISION_STEP_DEFAULT} (4). */ + * NumericUtils#PRECISION_STEP_DEFAULT} (4). + * @param name field name + * @param value 32-bit double value + * @param stored Store.YES if the content should also be stored + * @throws IllegalArgumentException if the field name is null. + */ public FloatField(String name, float value, Store stored) { super(name, stored == Store.YES ? TYPE_STORED : TYPE_NOT_STORED); fieldsData = Float.valueOf(value); } /** Expert: allows you to customize the {@link - * FieldType}. */ + * FieldType}. + * @param name field name + * @param value 32-bit float value + * @param type customized field type: must have {@link FieldType#numericType()} + * of {@link FieldType.NumericType#FLOAT}. + * @throws IllegalArgumentException if the field name or type is null, or + * if the field type does not have a FLOAT numericType() + */ public FloatField(String name, float value, FieldType type) { super(name, type); if (type.numericType() != FieldType.NumericType.FLOAT) { diff --git a/lucene/core/src/java/org/apache/lucene/document/IntDocValuesField.java b/lucene/core/src/java/org/apache/lucene/document/IntDocValuesField.java index 7b10662a7e3..28914bce434 100644 --- a/lucene/core/src/java/org/apache/lucene/document/IntDocValuesField.java +++ b/lucene/core/src/java/org/apache/lucene/document/IntDocValuesField.java @@ -37,12 +37,21 @@ import org.apache.lucene.index.DocValues; public class IntDocValuesField extends Field { + /** + * Type for 32-bit integer DocValues. + */ public static final FieldType TYPE = new FieldType(); static { TYPE.setDocValueType(DocValues.Type.FIXED_INTS_32); TYPE.freeze(); } + /** + * Creates a new DocValues field with the specified 32-bit integer value + * @param name field name + * @param value 32-bit integer value + * @throws IllegalArgumentException if the field name is null + */ public IntDocValuesField(String name, int value) { super(name, TYPE); fieldsData = Integer.valueOf(value); diff --git a/lucene/core/src/java/org/apache/lucene/document/IntField.java b/lucene/core/src/java/org/apache/lucene/document/IntField.java index 648da431b78..ac348f46805 100644 --- a/lucene/core/src/java/org/apache/lucene/document/IntField.java +++ b/lucene/core/src/java/org/apache/lucene/document/IntField.java @@ -114,6 +114,10 @@ import org.apache.lucene.util.NumericUtils; public final class IntField extends Field { + /** + * Type for an IntField that is not stored: + * normalization factors, frequencies, and positions are omitted. + */ public static final FieldType TYPE_NOT_STORED = new FieldType(); static { TYPE_NOT_STORED.setIndexed(true); @@ -124,6 +128,10 @@ public final class IntField extends Field { TYPE_NOT_STORED.freeze(); } + /** + * Type for a stored IntField: + * normalization factors, frequencies, and positions are omitted. + */ public static final FieldType TYPE_STORED = new FieldType(); static { TYPE_STORED.setIndexed(true); @@ -137,14 +145,26 @@ public final class IntField extends Field { /** Creates a stored or un-stored IntField with the provided value * and default precisionStep {@link - * NumericUtils#PRECISION_STEP_DEFAULT} (4). */ + * NumericUtils#PRECISION_STEP_DEFAULT} (4). + * @param name field name + * @param value 32-bit integer value + * @param stored Store.YES if the content should also be stored + * @throws IllegalArgumentException if the field name is null. + */ public IntField(String name, int value, Store stored) { super(name, stored == Store.YES ? TYPE_STORED : TYPE_NOT_STORED); fieldsData = Integer.valueOf(value); } /** Expert: allows you to customize the {@link - * FieldType}. */ + * FieldType}. + * @param name field name + * @param value 32-bit integer value + * @param type customized field type: must have {@link FieldType#numericType()} + * of {@link FieldType.NumericType#INT}. + * @throws IllegalArgumentException if the field name or type is null, or + * if the field type does not have a INT numericType() + */ public IntField(String name, int value, FieldType type) { super(name, type); if (type.numericType() != FieldType.NumericType.INT) { diff --git a/lucene/core/src/java/org/apache/lucene/document/LongDocValuesField.java b/lucene/core/src/java/org/apache/lucene/document/LongDocValuesField.java index 0b78eb93c4a..e3484bd60a7 100644 --- a/lucene/core/src/java/org/apache/lucene/document/LongDocValuesField.java +++ b/lucene/core/src/java/org/apache/lucene/document/LongDocValuesField.java @@ -37,12 +37,21 @@ import org.apache.lucene.index.DocValues; public class LongDocValuesField extends Field { + /** + * Type for 64-bit long DocValues. + */ public static final FieldType TYPE = new FieldType(); static { TYPE.setDocValueType(DocValues.Type.FIXED_INTS_64); TYPE.freeze(); } + /** + * Creates a new DocValues field with the specified 64-bit long value + * @param name field name + * @param value 64-bit long value + * @throws IllegalArgumentException if the field name is null + */ public LongDocValuesField(String name, long value) { super(name, TYPE); fieldsData = Long.valueOf(value); diff --git a/lucene/core/src/java/org/apache/lucene/document/LongField.java b/lucene/core/src/java/org/apache/lucene/document/LongField.java index fb41558f66b..7535a53b94b 100644 --- a/lucene/core/src/java/org/apache/lucene/document/LongField.java +++ b/lucene/core/src/java/org/apache/lucene/document/LongField.java @@ -124,6 +124,10 @@ import org.apache.lucene.util.NumericUtils; public final class LongField extends Field { + /** + * Type for a LongField that is not stored: + * normalization factors, frequencies, and positions are omitted. + */ public static final FieldType TYPE_NOT_STORED = new FieldType(); static { TYPE_NOT_STORED.setIndexed(true); @@ -134,6 +138,10 @@ public final class LongField extends Field { TYPE_NOT_STORED.freeze(); } + /** + * Type for a stored LongField: + * normalization factors, frequencies, and positions are omitted. + */ public static final FieldType TYPE_STORED = new FieldType(); static { TYPE_STORED.setIndexed(true); @@ -147,14 +155,26 @@ public final class LongField extends Field { /** Creates a stored or un-stored LongField with the provided value * and default precisionStep {@link - * NumericUtils#PRECISION_STEP_DEFAULT} (4). */ + * NumericUtils#PRECISION_STEP_DEFAULT} (4). + * @param name field name + * @param value 64-bit long value + * @param stored Store.YES if the content should also be stored + * @throws IllegalArgumentException if the field name is null. + */ public LongField(String name, long value, Store stored) { super(name, stored == Store.YES ? TYPE_STORED : TYPE_NOT_STORED); fieldsData = Long.valueOf(value); } /** Expert: allows you to customize the {@link - * FieldType}. */ + * FieldType}. + * @param name field name + * @param value 64-bit long value + * @param type customized field type: must have {@link FieldType#numericType()} + * of {@link FieldType.NumericType#LONG}. + * @throws IllegalArgumentException if the field name or type is null, or + * if the field type does not have a LONG numericType() + */ public LongField(String name, long value, FieldType type) { super(name, type); if (type.numericType() != FieldType.NumericType.LONG) { diff --git a/lucene/core/src/java/org/apache/lucene/document/PackedLongDocValuesField.java b/lucene/core/src/java/org/apache/lucene/document/PackedLongDocValuesField.java index eceff093ab5..8d3f2ba652f 100644 --- a/lucene/core/src/java/org/apache/lucene/document/PackedLongDocValuesField.java +++ b/lucene/core/src/java/org/apache/lucene/document/PackedLongDocValuesField.java @@ -41,12 +41,21 @@ import org.apache.lucene.index.AtomicReader; // javadocs public class PackedLongDocValuesField extends Field { + /** + * Type for packed long DocValues. + */ public static final FieldType TYPE = new FieldType(); static { TYPE.setDocValueType(DocValues.Type.VAR_INTS); TYPE.freeze(); } + /** + * Creates a new DocValues field with the specified long value + * @param name field name + * @param value 64-bit long value + * @throws IllegalArgumentException if the field name is null + */ public PackedLongDocValuesField(String name, long value) { super(name, TYPE); fieldsData = Long.valueOf(value); diff --git a/lucene/core/src/java/org/apache/lucene/document/ShortDocValuesField.java b/lucene/core/src/java/org/apache/lucene/document/ShortDocValuesField.java index 2b08803197e..45dafc99664 100644 --- a/lucene/core/src/java/org/apache/lucene/document/ShortDocValuesField.java +++ b/lucene/core/src/java/org/apache/lucene/document/ShortDocValuesField.java @@ -38,12 +38,21 @@ import org.apache.lucene.index.DocValues; public class ShortDocValuesField extends Field { + /** + * Type for 16-bit short DocValues. + */ public static final FieldType TYPE = new FieldType(); static { TYPE.setDocValueType(DocValues.Type.FIXED_INTS_16); TYPE.freeze(); } + /** + * Creates a new DocValues field with the specified 16-bit short value + * @param name field name + * @param value 16-bit short value + * @throws IllegalArgumentException if the field name is null + */ public ShortDocValuesField(String name, short value) { super(name, TYPE); fieldsData = Short.valueOf(value); diff --git a/lucene/core/src/java/org/apache/lucene/document/SortedBytesDocValuesField.java b/lucene/core/src/java/org/apache/lucene/document/SortedBytesDocValuesField.java index 07892ced7c6..594e26da733 100644 --- a/lucene/core/src/java/org/apache/lucene/document/SortedBytesDocValuesField.java +++ b/lucene/core/src/java/org/apache/lucene/document/SortedBytesDocValuesField.java @@ -40,22 +40,47 @@ import org.apache.lucene.util.BytesRef; public class SortedBytesDocValuesField extends Field { // TODO: ideally indexer figures out var vs fixed on its own!? + /** + * Type for sorted bytes DocValues: all with the same length + */ public static final FieldType TYPE_FIXED_LEN = new FieldType(); static { TYPE_FIXED_LEN.setDocValueType(DocValues.Type.BYTES_FIXED_SORTED); TYPE_FIXED_LEN.freeze(); } + /** + * Type for sorted bytes DocValues: can have variable lengths + */ public static final FieldType TYPE_VAR_LEN = new FieldType(); static { TYPE_VAR_LEN.setDocValueType(DocValues.Type.BYTES_VAR_SORTED); TYPE_VAR_LEN.freeze(); } + /** + * Create a new variable-length sorted DocValues field. + *

+ * This calls + * {@link SortedBytesDocValuesField#SortedBytesDocValuesField(String, BytesRef, boolean) + * SortedBytesDocValuesField(name, bytes, false}, meaning by default + * it allows for values of different lengths. If your values are all + * the same length, use that constructor instead. + * @param name field name + * @param bytes binary content + * @throws IllegalArgumentException if the field name is null + */ public SortedBytesDocValuesField(String name, BytesRef bytes) { this(name, bytes, false); } + /** + * Create a new fixed or variable length sorted DocValues field. + * @param name field name + * @param bytes binary content + * @param isFixedLength true if all values have the same length. + * @throws IllegalArgumentException if the field name is null + */ public SortedBytesDocValuesField(String name, BytesRef bytes, boolean isFixedLength) { super(name, isFixedLength ? TYPE_FIXED_LEN : TYPE_VAR_LEN); fieldsData = bytes; diff --git a/lucene/core/src/java/org/apache/lucene/document/StoredField.java b/lucene/core/src/java/org/apache/lucene/document/StoredField.java index ccfa540cf41..6ffa81a8cce 100644 --- a/lucene/core/src/java/org/apache/lucene/document/StoredField.java +++ b/lucene/core/src/java/org/apache/lucene/document/StoredField.java @@ -26,6 +26,9 @@ import org.apache.lucene.util.BytesRef; * return the field and its value. */ public final class StoredField extends Field { + /** + * Type for a stored-only field. + */ public final static FieldType TYPE; static { TYPE = new FieldType(); @@ -33,38 +36,94 @@ public final class StoredField extends Field { TYPE.freeze(); } + /** + * Create a stored-only field with the given binary value. + *

NOTE: the provided byte[] is not copied so be sure + * not to change it until you're done with this field. + * @param name field name + * @param value byte array pointing to binary content (not copied) + * @throws IllegalArgumentException if the field name is null. + */ public StoredField(String name, byte[] value) { super(name, value, TYPE); } + /** + * Create a stored-only field with the given binary value. + *

NOTE: the provided byte[] is not copied so be sure + * not to change it until you're done with this field. + * @param name field name + * @param value byte array pointing to binary content (not copied) + * @param offset starting position of the byte array + * @param length valid length of the byte array + * @throws IllegalArgumentException if the field name is null. + */ public StoredField(String name, byte[] value, int offset, int length) { super(name, value, offset, length, TYPE); } + /** + * Create a stored-only field with the given binary value. + *

NOTE: the provided BytesRef is not copied so be sure + * not to change it until you're done with this field. + * @param name field name + * @param value BytesRef pointing to binary content (not copied) + * @throws IllegalArgumentException if the field name is null. + */ public StoredField(String name, BytesRef value) { super(name, value, TYPE); } + /** + * Create a stored-only field with the given string value. + * @param name field name + * @param value string value + * @throws IllegalArgumentException if the field name or value is null. + */ public StoredField(String name, String value) { super(name, value, TYPE); } // TODO: not great but maybe not a big problem? + /** + * Create a stored-only field with the given integer value. + * @param name field name + * @param value integer value + * @throws IllegalArgumentException if the field name is null. + */ public StoredField(String name, int value) { super(name, TYPE); fieldsData = value; } + /** + * Create a stored-only field with the given float value. + * @param name field name + * @param value float value + * @throws IllegalArgumentException if the field name is null. + */ public StoredField(String name, float value) { super(name, TYPE); fieldsData = value; } + /** + * Create a stored-only field with the given long value. + * @param name field name + * @param value long value + * @throws IllegalArgumentException if the field name is null. + */ public StoredField(String name, long value) { super(name, TYPE); fieldsData = value; } + /** + * Create a stored-only field with the given double value. + * @param name field name + * @param value double value + * @throws IllegalArgumentException if the field name is null. + */ public StoredField(String name, double value) { super(name, TYPE); fieldsData = value; diff --git a/lucene/core/src/java/org/apache/lucene/document/StraightBytesDocValuesField.java b/lucene/core/src/java/org/apache/lucene/document/StraightBytesDocValuesField.java index a59dd47f188..cdca59b1c9e 100644 --- a/lucene/core/src/java/org/apache/lucene/document/StraightBytesDocValuesField.java +++ b/lucene/core/src/java/org/apache/lucene/document/StraightBytesDocValuesField.java @@ -43,23 +43,49 @@ import org.apache.lucene.util.BytesRef; public class StraightBytesDocValuesField extends Field { // TODO: ideally indexer figures out var vs fixed on its own!? + /** + * Type for direct bytes DocValues: all with the same length + */ public static final FieldType TYPE_FIXED_LEN = new FieldType(); static { TYPE_FIXED_LEN.setDocValueType(DocValues.Type.BYTES_FIXED_STRAIGHT); TYPE_FIXED_LEN.freeze(); } + /** + * Type for direct bytes DocValues: can have variable lengths + */ public static final FieldType TYPE_VAR_LEN = new FieldType(); static { TYPE_VAR_LEN.setDocValueType(DocValues.Type.BYTES_VAR_STRAIGHT); TYPE_VAR_LEN.freeze(); } + /** + * Create a new variable-length direct DocValues field. + *

+ * This calls + * {@link StraightBytesDocValuesField#StraightBytesDocValuesField(String, BytesRef, boolean) + * StraightBytesDocValuesField(name, bytes, false}, meaning by default + * it allows for values of different lengths. If your values are all + * the same length, use that constructor instead. + * @param name field name + * @param bytes binary content + * @throws IllegalArgumentException if the field name is null + */ public StraightBytesDocValuesField(String name, BytesRef bytes) { super(name, TYPE_VAR_LEN); fieldsData = bytes; } + /** + * Create a new fixed or variable length direct DocValues field. + *

+ * @param name field name + * @param bytes binary content + * @param isFixedLength true if all values have the same length. + * @throws IllegalArgumentException if the field name is null + */ public StraightBytesDocValuesField(String name, BytesRef bytes, boolean isFixedLength) { super(name, isFixedLength ? TYPE_FIXED_LEN : TYPE_VAR_LEN); fieldsData = bytes; diff --git a/lucene/core/src/java/org/apache/lucene/document/StringField.java b/lucene/core/src/java/org/apache/lucene/document/StringField.java index 372b34b4ace..ad96298006c 100644 --- a/lucene/core/src/java/org/apache/lucene/document/StringField.java +++ b/lucene/core/src/java/org/apache/lucene/document/StringField.java @@ -50,7 +50,12 @@ public final class StringField extends Field { TYPE_STORED.freeze(); } - /** Creates a new StringField. */ + /** Creates a new StringField. + * @param name field name + * @param value String value + * @param stored Store.YES if the content should also be stored + * @throws IllegalArgumentException if the field name or value is null. + */ public StringField(String name, String value, Store stored) { super(name, value, stored == Store.YES ? TYPE_STORED : TYPE_NOT_STORED); } diff --git a/lucene/core/src/java/org/apache/lucene/document/TextField.java b/lucene/core/src/java/org/apache/lucene/document/TextField.java index d8c66956f62..80e5f39c18e 100644 --- a/lucene/core/src/java/org/apache/lucene/document/TextField.java +++ b/lucene/core/src/java/org/apache/lucene/document/TextField.java @@ -46,17 +46,32 @@ public final class TextField extends Field { // TODO: add sugar for term vectors...? - /** Creates a new un-stored TextField with Reader value. */ + /** Creates a new un-stored TextField with Reader value. + * @param name field name + * @param reader reader value + * @throws IllegalArgumentException if the field name is null + * @throws NullPointerException if the reader is null + */ public TextField(String name, Reader reader) { super(name, reader, TYPE_NOT_STORED); } - /** Creates a new TextField with String value. */ + /** Creates a new TextField with String value. + * @param name field name + * @param value string value + * @param store Store.YES if the content should also be stored + * @throws IllegalArgumentException if the field name or value is null. + */ public TextField(String name, String value, Store store) { super(name, value, store == Store.YES ? TYPE_STORED : TYPE_NOT_STORED); } - /** Creates a new un-stored TextField with TokenStream value. */ + /** Creates a new un-stored TextField with TokenStream value. + * @param name field name + * @param stream TokenStream value + * @throws IllegalArgumentException if the field name is null. + * @throws NullPointerException if the tokenStream is null + */ public TextField(String name, TokenStream stream) { super(name, stream, TYPE_NOT_STORED); } From 9b31cfe6ad5044dec04cff76d1b12c203530f711 Mon Sep 17 00:00:00 2001 From: Uwe Schindler Date: Thu, 30 Aug 2012 15:39:27 +0000 Subject: [PATCH 72/81] LUCENE-4337: For now (hopefully) fix problem on FreeBSD. The whole listen to 127.0.0.1 does not work alltogether, because Java allows binding to every port, just not accepting! See issue for details. git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1378991 13f79535-47bb-0310-9956-ffa450edef68 --- lucene/tools/junit4/tests.policy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lucene/tools/junit4/tests.policy b/lucene/tools/junit4/tests.policy index ea75fc8a7e9..8264f31a589 100644 --- a/lucene/tools/junit4/tests.policy +++ b/lucene/tools/junit4/tests.policy @@ -26,7 +26,7 @@ grant { permission java.io.FilePermission "<>", "read,execute"; permission java.io.FilePermission "${tests.sandbox.dir}${/}-", "read,execute,write,delete"; - permission java.net.SocketPermission "127.0.0.1:1024-", "accept,listen"; + permission java.net.SocketPermission "localhost:1024-", "accept,listen"; permission java.net.SocketPermission "*", "connect,resolve"; permission java.util.PropertyPermission "*", "read,write"; permission java.lang.reflect.ReflectPermission "*"; From 2fdd58398aaa028b4e8cf81b57e63aca472556bf Mon Sep 17 00:00:00 2001 From: Mark Robert Miller Date: Thu, 30 Aug 2012 16:23:16 +0000 Subject: [PATCH 73/81] SOLR-3750: On session expiration, we should explicitly wait some time before running the leader sync process so that we are sure every node participates. SOLR-3772: On cluster startup, we should wait until we see all registered replicas before running the leader process or if they all do not come up, N amount of time. SOLR-3752: When a leader goes down, have the Overseer clear the leader state in cluster.json SOLR-3751: Add defensive checks for SolrCloud updates and requests that ensure the local state matches what we can tell the request expected. git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1379002 13f79535-47bb-0310-9956-ffa450edef68 --- solr/CHANGES.txt | 14 + .../apache/solr/cloud/CloudDescriptor.java | 6 + .../apache/solr/cloud/ElectionContext.java | 280 +++++++++++++----- .../org/apache/solr/cloud/LeaderElector.java | 8 + .../java/org/apache/solr/cloud/Overseer.java | 11 +- .../apache/solr/cloud/RecoveryStrategy.java | 13 +- .../org/apache/solr/cloud/SyncStrategy.java | 9 +- .../org/apache/solr/cloud/ZkController.java | 139 +++++++-- .../org/apache/solr/core/CoreContainer.java | 7 +- .../solr/handler/admin/CoreAdminHandler.java | 24 ++ .../solr/update/SolrCmdDistributor.java | 5 +- .../processor/DistributedUpdateProcessor.java | 53 +++- .../cloud/ChaosMonkeyNothingIsSafeTest.java | 20 +- .../solr/cloud/ChaosMonkeySafeLeaderTest.java | 5 - .../solrj/request/CoreAdminRequest.java | 14 + .../solr/common/cloud/ConnectionManager.java | 29 +- .../solr/common/cloud/SolrZkClient.java | 21 +- .../cloud/ZkClientConnectionStrategy.java | 47 +++ .../cloud/AbstractFullDistribZkTestBase.java | 9 +- .../org/apache/solr/cloud/ChaosMonkey.java | 14 +- 20 files changed, 544 insertions(+), 184 deletions(-) diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index 5e3939f4388..13cab07de10 100644 --- a/solr/CHANGES.txt +++ b/solr/CHANGES.txt @@ -93,6 +93,14 @@ Bug Fixes * SOLR-3721: Fix bug that could allow multiple recoveries to run briefly at the same time if the recovery thread join call was interrupted. (Per Steffensen, Mark Miller) + +* SOLR-3750: On session expiration, we should explicitly wait some time before + running the leader sync process so that we are sure every node participates. + (Per Steffensen, Mark Miller) + +* SOLR-3772: On cluster startup, we should wait until we see all registered + replicas before running the leader process - or if they all do not come up, + N amount of time. (Jan Høydahl, Per Steffensen, Mark Miller) Other Changes ---------------------- @@ -111,6 +119,12 @@ Other Changes * SOLR-2747: Updated changes2html.pl to handle Solr's CHANGES.txt; added target 'changes-to-html' to solr/build.xml. (Steve Rowe, Robert Muir) + +* SOLR-3752: When a leader goes down, have the Overseer clear the leader state + in cluster.json (Mark Miller) + +* 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) ================== 4.0.0-BETA =================== diff --git a/solr/core/src/java/org/apache/solr/cloud/CloudDescriptor.java b/solr/core/src/java/org/apache/solr/cloud/CloudDescriptor.java index 041439d8e87..d35ec3206e7 100644 --- a/solr/core/src/java/org/apache/solr/cloud/CloudDescriptor.java +++ b/solr/core/src/java/org/apache/solr/cloud/CloudDescriptor.java @@ -26,6 +26,12 @@ public class CloudDescriptor { private String roles = null; private Integer numShards; + volatile boolean isLeader = false; + + public boolean isLeader() { + return isLeader; + } + public void setShardId(String shardId) { this.shardId = shardId; } diff --git a/solr/core/src/java/org/apache/solr/cloud/ElectionContext.java b/solr/core/src/java/org/apache/solr/cloud/ElectionContext.java index 82607333cbc..a233b8f0969 100644 --- a/solr/core/src/java/org/apache/solr/cloud/ElectionContext.java +++ b/solr/core/src/java/org/apache/solr/cloud/ElectionContext.java @@ -2,6 +2,8 @@ package org.apache.solr.cloud; import java.io.IOException; import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; import org.apache.solr.common.SolrException; import org.apache.solr.common.SolrException.ErrorCode; @@ -15,7 +17,6 @@ import org.apache.solr.core.CoreContainer; import org.apache.solr.core.SolrCore; import org.apache.zookeeper.CreateMode; import org.apache.zookeeper.KeeperException; -import org.apache.zookeeper.KeeperException.NodeExistsException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -82,31 +83,26 @@ class ShardLeaderElectionContextBase extends ElectionContext { } @Override - void runLeaderProcess(boolean weAreReplacement) - throws KeeperException, InterruptedException, IOException { - - try { - zkClient.makePath(leaderPath, - leaderProps == null ? null : ZkStateReader.toJSON(leaderProps), - CreateMode.EPHEMERAL, true); - } catch (NodeExistsException e) { - // if a previous leader ephemeral still exists for some reason, try and - // remove it - zkClient.delete(leaderPath, -1, true); - zkClient.makePath(leaderPath, - leaderProps == null ? null : ZkStateReader.toJSON(leaderProps), - CreateMode.EPHEMERAL, true); - } + void runLeaderProcess(boolean weAreReplacement) throws KeeperException, + InterruptedException, IOException { + // this pause is important (and seems to work also at 100ms to 1 second in + // many cases), + // but I don't know why yet :*( - it must come before this publish call + // and can happen at the start of leader election process even + Thread.sleep(500); - // TODO: above we make it looks like leaderProps could be true, but here - // you would get an NPE if it was. - ZkNodeProps m = new ZkNodeProps(Overseer.QUEUE_OPERATION, - "leader", ZkStateReader.SHARD_ID_PROP, shardId, - ZkStateReader.COLLECTION_PROP, collection, ZkStateReader.BASE_URL_PROP, - leaderProps.getProperties().get(ZkStateReader.BASE_URL_PROP), - ZkStateReader.CORE_NAME_PROP, leaderProps.getProperties().get(ZkStateReader.CORE_NAME_PROP)); + zkClient.makePath(leaderPath, ZkStateReader.toJSON(leaderProps), + CreateMode.EPHEMERAL, true); + + ZkNodeProps m = new ZkNodeProps(Overseer.QUEUE_OPERATION, "leader", + ZkStateReader.SHARD_ID_PROP, shardId, ZkStateReader.COLLECTION_PROP, + collection, ZkStateReader.BASE_URL_PROP, leaderProps.getProperties() + .get(ZkStateReader.BASE_URL_PROP), ZkStateReader.CORE_NAME_PROP, + leaderProps.getProperties().get(ZkStateReader.CORE_NAME_PROP), + ZkStateReader.STATE_PROP, ZkStateReader.ACTIVE); Overseer.getInQueue(zkClient).offer(ZkStateReader.toJSON(m)); - } + + } } @@ -117,66 +113,182 @@ final class ShardLeaderElectionContext extends ShardLeaderElectionContextBase { private ZkController zkController; private CoreContainer cc; private SyncStrategy syncStrategy = new SyncStrategy(); + + private boolean afterExpiration; public ShardLeaderElectionContext(LeaderElector leaderElector, final String shardId, final String collection, - final String shardZkNodeName, ZkNodeProps props, ZkController zkController, CoreContainer cc) { + final String shardZkNodeName, ZkNodeProps props, ZkController zkController, CoreContainer cc, boolean afterExpiration) { super(leaderElector, shardId, collection, shardZkNodeName, props, zkController.getZkStateReader()); this.zkController = zkController; this.cc = cc; + this.afterExpiration = afterExpiration; } @Override - void runLeaderProcess(boolean weAreReplacement) - throws KeeperException, InterruptedException, IOException { - if (cc != null) { - String coreName = leaderProps.get(ZkStateReader.CORE_NAME_PROP); - SolrCore core = null; - try { - - core = cc.getCore(coreName); - - if (core == null) { - cancelElection(); - throw new SolrException(ErrorCode.SERVER_ERROR, "Fatal Error, SolrCore not found:" + coreName + " in " + cc.getCoreNames()); - } - // should I be leader? - if (weAreReplacement && !shouldIBeLeader(leaderProps)) { - // System.out.println("there is a better leader candidate it appears"); + void runLeaderProcess(boolean weAreReplacement) throws KeeperException, + InterruptedException, IOException { + String coreName = leaderProps.get(ZkStateReader.CORE_NAME_PROP); + + // clear the leader in clusterstate + ZkNodeProps m = new ZkNodeProps(Overseer.QUEUE_OPERATION, "leader", + ZkStateReader.SHARD_ID_PROP, shardId, ZkStateReader.COLLECTION_PROP, + collection); + Overseer.getInQueue(zkClient).offer(ZkStateReader.toJSON(m)); + + waitForReplicasToComeUp(weAreReplacement); + + // wait for local leader state to clear... + // int tries = 0; + // while (zkController.getClusterState().getLeader(collection, shardId) != + // null) { + // System.out.println("leader still shown " + tries + " " + + // zkController.getClusterState().getLeader(collection, shardId)); + // Thread.sleep(1000); + // tries++; + // if (tries == 30) { + // break; + // } + // } + // Thread.sleep(1000); + + SolrCore core = null; + try { + + core = cc.getCore(coreName); + + if (core == null) { + cancelElection(); + throw new SolrException(ErrorCode.SERVER_ERROR, + "Fatal Error, SolrCore not found:" + coreName + " in " + + cc.getCoreNames()); + } + + // should I be leader? + if (weAreReplacement && !shouldIBeLeader(leaderProps, core)) { + // System.out.println("there is a better leader candidate it appears"); + rejoinLeaderElection(leaderSeqPath, core); + return; + } + + if (weAreReplacement) { + log.info("I may be the new leader - try and sync"); + // we are going to attempt to be the leader + // first cancel any current recovery + core.getUpdateHandler().getSolrCoreState().cancelRecovery(); + boolean success = syncStrategy.sync(zkController, core, leaderProps); + // solrcloud_debug + // try { + // RefCounted searchHolder = + // core.getNewestSearcher(false); + // SolrIndexSearcher searcher = searchHolder.get(); + // try { + // System.out.println(core.getCoreDescriptor().getCoreContainer().getZkController().getNodeName() + // + " synched " + // + searcher.search(new MatchAllDocsQuery(), 1).totalHits); + // } finally { + // searchHolder.decref(); + // } + // } catch (Exception e) { + // + // } + if (!success && anyoneElseActive()) { rejoinLeaderElection(leaderSeqPath, core); return; } - - if (weAreReplacement) { - if (zkClient.exists(leaderPath, true)) { - zkClient.delete(leaderPath, -1, true); - } - log.info("I may be the new leader - try and sync"); - // we are going to attempt to be the leader - // first cancel any current recovery - core.getUpdateHandler().getSolrCoreState().cancelRecovery(); - boolean success = syncStrategy.sync(zkController, core, leaderProps); - if (!success && anyoneElseActive()) { - rejoinLeaderElection(leaderSeqPath, core); - return; - } + } + + log.info("I am the new leader: " + + ZkCoreNodeProps.getCoreUrl(leaderProps)); + + } finally { + if (core != null) { + core.close(); + } + } + + try { + super.runLeaderProcess(weAreReplacement); + } catch (Throwable t) { + cancelElection(); + try { + core = cc.getCore(coreName); + core.getCoreDescriptor().getCloudDescriptor().isLeader = false; + if (!cc.isShutDown()) { + // we could not publish ourselves as leader - rejoin election + rejoinLeaderElection(coreName, core); } - log.info("I am the new leader: " + ZkCoreNodeProps.getCoreUrl(leaderProps)); - - // If I am going to be the leader I have to be active - core.getUpdateHandler().getSolrCoreState().cancelRecovery(); - zkController.publish(core.getCoreDescriptor(), ZkStateReader.ACTIVE); - } finally { - if (core != null ) { + if (core != null) { core.close(); } } } - super.runLeaderProcess(weAreReplacement); + try { + core = cc.getCore(coreName); + // we do this after the above super. call so that we don't + // briefly think we are the leader and then end up not being + // able to publish that we are the leader. + core.getCoreDescriptor().getCloudDescriptor().isLeader = true; + } finally { + if (core != null) { + core.close(); + } + } + + } + + private void waitForReplicasToComeUp(boolean weAreReplacement) + throws InterruptedException { + int retries = 300; // ~ 5 min + boolean tryAgain = true; + Slice slices = zkController.getClusterState().getSlice(collection, shardId); + log.info("Running the leader process. afterExperiation=" + afterExpiration); + while (tryAgain || slices == null) { + + // wait for everyone to be up + if (slices != null) { + Map shards = slices.getShards(); + Set> entrySet = shards.entrySet(); + int found = 0; + tryAgain = false; + for (Entry entry : entrySet) { + ZkCoreNodeProps props = new ZkCoreNodeProps(entry.getValue()); + if (props.getState().equals(ZkStateReader.ACTIVE) + && zkController.getClusterState().liveNodesContain( + props.getNodeName())) { + found++; + } + } + + // on startup and after connection timeout, wait for all known shards + if ((afterExpiration || !weAreReplacement) + && found >= slices.getShards().size()) { + log.info("Enough replicas found to continue."); + tryAgain = false; + } else if (!afterExpiration && found >= slices.getShards().size() - 1) { + // a previous leader went down - wait for one less than the total + // known shards + log.info("Enough replicas found to continue."); + tryAgain = false; + } else { + log.info("Waiting until we see more replicas up"); + } + + retries--; + if (retries == 0) { + log.info("Was waiting for replicas to come up, but they are taking too long - assuming they won't come back till later"); + break; + } + } + if (tryAgain) { + Thread.sleep(1000); + slices = zkController.getClusterState().getSlice(collection, shardId); + } + } } private void rejoinLeaderElection(String leaderSeqPath, SolrCore core) @@ -195,7 +307,8 @@ final class ShardLeaderElectionContext extends ShardLeaderElectionContextBase { leaderElector.joinElection(this); } - private boolean shouldIBeLeader(ZkNodeProps leaderProps) { + private boolean shouldIBeLeader(ZkNodeProps leaderProps, SolrCore core) { + log.info("Checking if I should try and be the leader."); ClusterState clusterState = zkController.getZkStateReader().getClusterState(); Map slices = clusterState.getSlices(this.collection); Slice slice = slices.get(shardId); @@ -210,6 +323,7 @@ final class ShardLeaderElectionContext extends ShardLeaderElectionContextBase { && clusterState.liveNodesContain(shard.getValue().get( ZkStateReader.NODE_NAME_PROP))) { // we are alive + log.info("I am Active and live, it's okay to be the leader."); return true; } } @@ -222,7 +336,19 @@ final class ShardLeaderElectionContext extends ShardLeaderElectionContextBase { foundSomeoneElseActive = true; } } - + if (!foundSomeoneElseActive) { + log.info("I am not Active but no one else is either, it's okay to be the leader"); + try { + zkController.publish(core.getCoreDescriptor(), ZkStateReader.ACTIVE); + } catch (KeeperException e) { + throw new RuntimeException(e); + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new RuntimeException(e); + } + } else { + log.info("I am not Active and someone else appears to be a better leader candidate."); + } return !foundSomeoneElseActive; } @@ -261,24 +387,16 @@ final class OverseerElectionContext extends ElectionContext { } @Override - void runLeaderProcess(boolean weAreReplacement) throws KeeperException, InterruptedException { + void runLeaderProcess(boolean weAreReplacement) throws KeeperException, + InterruptedException { - final String id = leaderSeqPath.substring(leaderSeqPath.lastIndexOf("/")+1); + final String id = leaderSeqPath + .substring(leaderSeqPath.lastIndexOf("/") + 1); ZkNodeProps myProps = new ZkNodeProps("id", id); - - try { - zkClient.makePath(leaderPath, - ZkStateReader.toJSON(myProps), - CreateMode.EPHEMERAL, true); - } catch (NodeExistsException e) { - // if a previous leader ephemeral still exists for some reason, try and - // remove it - zkClient.delete(leaderPath, -1, true); - zkClient.makePath(leaderPath, - ZkStateReader.toJSON(myProps), - CreateMode.EPHEMERAL, true); - } - + + zkClient.makePath(leaderPath, ZkStateReader.toJSON(myProps), + CreateMode.EPHEMERAL, true); + overseer.start(id); } diff --git a/solr/core/src/java/org/apache/solr/cloud/LeaderElector.java b/solr/core/src/java/org/apache/solr/cloud/LeaderElector.java index 12dd86fbe38..4d1c7294890 100644 --- a/solr/core/src/java/org/apache/solr/cloud/LeaderElector.java +++ b/solr/core/src/java/org/apache/solr/cloud/LeaderElector.java @@ -93,6 +93,13 @@ public class LeaderElector { sortSeqs(seqs); List intSeqs = getSeqs(seqs); if (seq <= intSeqs.get(0)) { + // first we delete the node advertising the old leader in case the ephem is still there + try { + zkClient.delete(context.leaderPath, -1, true); + } catch(Exception e) { + // fine + } + runIamLeaderProcess(context, replacement); } else { // I am not the leader - watch the node below me @@ -138,6 +145,7 @@ public class LeaderElector { } catch (KeeperException.SessionExpiredException e) { throw e; } catch (KeeperException e) { + SolrException.log(log, "Failed setting watch", e); // we couldn't set our watch - the node before us may already be down? // we need to check if we are the leader again checkIfIamLeader(seq, context, true); diff --git a/solr/core/src/java/org/apache/solr/cloud/Overseer.java b/solr/core/src/java/org/apache/solr/cloud/Overseer.java index 10c745358b3..b8b3654511a 100644 --- a/solr/core/src/java/org/apache/solr/cloud/Overseer.java +++ b/solr/core/src/java/org/apache/solr/cloud/Overseer.java @@ -166,12 +166,19 @@ public class Overseer { } else if (DELETECORE.equals(operation)) { clusterState = removeCore(clusterState, message); } else if (ZkStateReader.LEADER_PROP.equals(operation)) { + + StringBuilder sb = new StringBuilder(); String baseUrl = message.get(ZkStateReader.BASE_URL_PROP); String coreName = message.get(ZkStateReader.CORE_NAME_PROP); - final String leaderUrl = ZkCoreNodeProps.getCoreUrl(baseUrl, coreName); + sb.append(baseUrl); + if (baseUrl != null && !baseUrl.endsWith("/")) sb.append("/"); + sb.append(coreName == null ? "" : coreName); + if (!(sb.substring(sb.length() - 1).equals("/"))) sb.append("/"); clusterState = setShardLeader(clusterState, message.get(ZkStateReader.COLLECTION_PROP), - message.get(ZkStateReader.SHARD_ID_PROP), leaderUrl); + message.get(ZkStateReader.SHARD_ID_PROP), + sb.length() > 0 ? sb.toString() : null); + } else { throw new RuntimeException("unknown operation:" + operation + " contents:" + message.getProperties()); diff --git a/solr/core/src/java/org/apache/solr/cloud/RecoveryStrategy.java b/solr/core/src/java/org/apache/solr/cloud/RecoveryStrategy.java index cb33b9f4d46..7b09abb1afe 100644 --- a/solr/core/src/java/org/apache/solr/cloud/RecoveryStrategy.java +++ b/solr/core/src/java/org/apache/solr/cloud/RecoveryStrategy.java @@ -185,6 +185,7 @@ public class RecoveryStrategy extends Thread implements ClosableThread { prepCmd.setCoreNodeName(coreZkNodeName); prepCmd.setState(ZkStateReader.RECOVERING); prepCmd.setCheckLive(true); + prepCmd.setOnlyIfLeader(true); prepCmd.setPauseFor(6000); server.request(prepCmd); @@ -239,6 +240,7 @@ public class RecoveryStrategy extends Thread implements ClosableThread { return; } + boolean firstTime = true; List recentVersions; UpdateLog.RecentUpdates recentUpdates = null; @@ -273,9 +275,6 @@ public class RecoveryStrategy extends Thread implements ClosableThread { log.info("###### startupVersions=" + startingVersions); } - - boolean firstTime = true; - if (recoveringAfterStartup) { // if we're recovering after startup (i.e. we have been down), then we need to know what the last versions were // when we went down. We may have received updates since then. @@ -305,7 +304,10 @@ public class RecoveryStrategy extends Thread implements ClosableThread { String ourUrl = ZkCoreNodeProps.getCoreUrl(baseUrl, coreName); boolean isLeader = leaderUrl.equals(ourUrl); - if (isLeader) { + if (isLeader && !cloudDesc.isLeader) { + throw new SolrException(ErrorCode.SERVER_ERROR, "Cloud state still says we are leader."); + } + if (cloudDesc.isLeader) { // we are now the leader - no one else must have been suitable log.warn("We have not yet recovered - but we are now the leader! core=" + coreName); log.info("Finished recovery process. core=" + coreName); @@ -333,9 +335,6 @@ public class RecoveryStrategy extends Thread implements ClosableThread { new ModifiableSolrParams()); core.getUpdateHandler().commit(new CommitUpdateCommand(req, false)); log.info("PeerSync Recovery was successful - registering as Active. core=" + coreName); - // System.out - // .println("Sync Recovery was successful - registering as Active " - // + zkController.getNodeName()); // solrcloud_debug // try { diff --git a/solr/core/src/java/org/apache/solr/cloud/SyncStrategy.java b/solr/core/src/java/org/apache/solr/cloud/SyncStrategy.java index ccf1b4395f5..36ce890c064 100644 --- a/solr/core/src/java/org/apache/solr/cloud/SyncStrategy.java +++ b/solr/core/src/java/org/apache/solr/cloud/SyncStrategy.java @@ -108,7 +108,8 @@ public class SyncStrategy { if (!success && !areAnyOtherReplicasActive(zkController, leaderProps, collection, shardId)) { - log.info("Sync was not a success but no on else i active! I am the leader"); + log.info("Sync was not a success but no one else is active! I am the leader"); + zkController.publish(core.getCoreDescriptor(), ZkStateReader.ACTIVE); success = true; } @@ -224,14 +225,14 @@ public class SyncStrategy { requestRecovery(((ShardCoreRequest)srsp.getShardRequest()).baseUrl, ((ShardCoreRequest)srsp.getShardRequest()).coreName); - } catch (Exception e) { - SolrException.log(log, ZkCoreNodeProps.getCoreUrl(leaderProps) + ": Could not tell a replica to recover", e); + } catch (Throwable t) { + SolrException.log(log, ZkCoreNodeProps.getCoreUrl(leaderProps) + ": Could not tell a replica to recover", t); } } else { log.info(ZkCoreNodeProps.getCoreUrl(leaderProps) + ": " + " sync completed with " + srsp.getShardAddress()); } + } - } diff --git a/solr/core/src/java/org/apache/solr/cloud/ZkController.java b/solr/core/src/java/org/apache/solr/cloud/ZkController.java index 495a62e8bbd..04df6259a4a 100644 --- a/solr/core/src/java/org/apache/solr/cloud/ZkController.java +++ b/solr/core/src/java/org/apache/solr/cloud/ZkController.java @@ -41,6 +41,7 @@ import org.apache.solr.common.SolrException.ErrorCode; import org.apache.solr.common.cloud.ClusterState; import org.apache.solr.common.cloud.OnReconnect; import org.apache.solr.common.cloud.SolrZkClient; +import org.apache.solr.common.cloud.ZkClientConnectionStrategy; import org.apache.solr.common.cloud.ZkCmdExecutor; import org.apache.solr.common.cloud.ZkCoreNodeProps; import org.apache.solr.common.cloud.ZkNodeProps; @@ -112,8 +113,12 @@ public final class ZkController { private final String nodeName; // example: 127.0.0.1:54065_solr private final String baseURL; // example: http://127.0.0.1:54065/solr - private LeaderElector overseerElector; + private LeaderElector overseerElector; + + + // for now, this can be null in tests, in which case recovery will be inactive, and other features + // may accept defaults or use mocks rather than pulling things from a CoreContainer private CoreContainer cc; protected volatile Overseer overseer; @@ -181,7 +186,11 @@ public final class ZkController { // TODO: we need to think carefully about what happens when it was // a leader that was expired - as well as what to do about leaders/overseers // with connection loss - register(descriptor.getName(), descriptor, true); + try { + register(descriptor.getName(), descriptor, true, true); + } catch (Throwable t) { + SolrException.log(log, "Error registering SolrCore", t); + } } } @@ -200,6 +209,45 @@ public final class ZkController { }); + + zkClient.getZkClientConnectionStrategy().addDisconnectedListener(new ZkClientConnectionStrategy.DisconnectedListener() { + + @Override + public void disconnected() { + List descriptors = registerOnReconnect.getCurrentDescriptors(); + // re register all descriptors + if (descriptors != null) { + for (CoreDescriptor descriptor : descriptors) { + descriptor.getCloudDescriptor().isLeader = false; + } + } + } + }); + + zkClient.getZkClientConnectionStrategy().addConnectedListener(new ZkClientConnectionStrategy.ConnectedListener() { + + @Override + public void connected() { + List descriptors = registerOnReconnect.getCurrentDescriptors(); + if (descriptors != null) { + for (CoreDescriptor descriptor : descriptors) { + CloudDescriptor cloudDesc = descriptor.getCloudDescriptor(); + String leaderUrl; + try { + leaderUrl = getLeaderProps(cloudDesc.getCollectionName(), cloudDesc.getShardId()) + .getCoreUrl(); + } catch (InterruptedException e) { + throw new RuntimeException(); + } + String ourUrl = ZkCoreNodeProps.getCoreUrl(getBaseUrl(), descriptor.getName()); + boolean isLeader = leaderUrl.equals(ourUrl); + log.info("SolrCore connected to ZooKeeper - we are " + ourUrl + " and leader is " + leaderUrl); + cloudDesc.isLeader = isLeader; + } + } + } + }); + this.overseerJobQueue = Overseer.getInQueue(zkClient); this.overseerCollectionQueue = Overseer.getCollectionQueue(zkClient); cmdExecutor = new ZkCmdExecutor(); @@ -468,7 +516,7 @@ public final class ZkController { * @throws Exception */ public String register(String coreName, final CoreDescriptor desc) throws Exception { - return register(coreName, desc, false); + return register(coreName, desc, false, false); } @@ -478,10 +526,11 @@ public final class ZkController { * @param coreName * @param desc * @param recoverReloadedCores + * @param afterExpiration * @return the shardId for the SolrCore * @throws Exception */ - public String register(String coreName, final CoreDescriptor desc, boolean recoverReloadedCores) throws Exception { + public String register(String coreName, final CoreDescriptor desc, boolean recoverReloadedCores, boolean afterExpiration) throws Exception { final String baseUrl = getBaseUrl(); final CloudDescriptor cloudDesc = desc.getCloudDescriptor(); @@ -506,7 +555,7 @@ public final class ZkController { ZkNodeProps leaderProps = new ZkNodeProps(props); try { - joinElection(desc); + joinElection(desc, afterExpiration); } catch (InterruptedException e) { // Restore the interrupted status Thread.currentThread().interrupt(); @@ -517,25 +566,7 @@ public final class ZkController { throw new ZooKeeperException(SolrException.ErrorCode.SERVER_ERROR, "", e); } - // rather than look in the cluster state file, we go straight to the zknodes - // here, because on cluster restart there could be stale leader info in the - // cluster state node that won't be updated for a moment - String leaderUrl = getLeaderProps(collection, cloudDesc.getShardId()).getCoreUrl(); - - // now wait until our currently cloud state contains the latest leader - String clusterStateLeader = zkStateReader.getLeaderUrl(collection, shardId, 30000); - int tries = 0; - while (!leaderUrl.equals(clusterStateLeader)) { - if (tries == 60) { - throw new SolrException(ErrorCode.SERVER_ERROR, - "There is conflicting information about the leader of shard: " - + cloudDesc.getShardId() + " our state says:" + clusterStateLeader + " but zookeeper says:" + leaderUrl); - } - Thread.sleep(1000); - tries++; - clusterStateLeader = zkStateReader.getLeaderUrl(collection, shardId, 30000); - leaderUrl = getLeaderProps(collection, cloudDesc.getShardId()).getCoreUrl(); - } + String leaderUrl = getLeader(cloudDesc); String ourUrl = ZkCoreNodeProps.getCoreUrl(baseUrl, coreName); log.info("We are " + ourUrl + " and leader is " + leaderUrl); @@ -568,8 +599,7 @@ public final class ZkController { } else { log.info("No LogReplay needed for core="+core.getName() + " baseURL=" + baseUrl); } - } - + } boolean didRecovery = checkRecovery(coreName, desc, recoverReloadedCores, isLeader, cloudDesc, collection, coreZkNodeName, shardId, leaderProps, core, cc); if (!didRecovery) { @@ -580,12 +610,52 @@ public final class ZkController { core.close(); } } + // make sure we have an update cluster state right away zkStateReader.updateClusterState(true); return shardId; } + + private String getLeader(final CloudDescriptor cloudDesc) { + + String collection = cloudDesc.getCollectionName(); + String shardId = cloudDesc.getShardId(); + // rather than look in the cluster state file, we go straight to the zknodes + // here, because on cluster restart there could be stale leader info in the + // cluster state node that won't be updated for a moment + String leaderUrl; + try { + leaderUrl = getLeaderProps(collection, cloudDesc.getShardId()) + .getCoreUrl(); + + // now wait until our currently cloud state contains the latest leader + String clusterStateLeader = zkStateReader.getLeaderUrl(collection, + shardId, 30000); + int tries = 0; + while (!leaderUrl.equals(clusterStateLeader)) { + if (tries == 60) { + throw new SolrException(ErrorCode.SERVER_ERROR, + "There is conflicting information about the leader of shard: " + + cloudDesc.getShardId() + " our state says:" + + clusterStateLeader + " but zookeeper says:" + leaderUrl); + } + Thread.sleep(1000); + tries++; + clusterStateLeader = zkStateReader.getLeaderUrl(collection, shardId, + 30000); + leaderUrl = getLeaderProps(collection, cloudDesc.getShardId()) + .getCoreUrl(); + } + + } catch (Exception e) { + log.error("Error getting leader from zk", e); + throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, + "Error getting leader from zk", e); + } + return leaderUrl; + } /** * Get leader props directly from zk nodes. @@ -597,8 +667,9 @@ public final class ZkController { * @throws InterruptedException */ private ZkCoreNodeProps getLeaderProps(final String collection, - final String slice) throws KeeperException, InterruptedException { + final String slice) throws InterruptedException { int iterCount = 60; + Exception exp = null; while (iterCount-- > 0) { try { byte[] data = zkClient.getData( @@ -607,15 +678,21 @@ public final class ZkController { ZkCoreNodeProps leaderProps = new ZkCoreNodeProps( ZkNodeProps.load(data)); return leaderProps; - } catch (NoNodeException e) { + } catch (InterruptedException e) { + throw e; + } catch (Exception e) { + exp = e; Thread.sleep(500); } + if (cc.isShutDown()) { + throw new RuntimeException("CoreContainer is shutdown"); + } } - throw new RuntimeException("Could not get leader props"); + throw new RuntimeException("Could not get leader props", exp); } - private void joinElection(CoreDescriptor cd) throws InterruptedException, KeeperException, IOException { + private void joinElection(CoreDescriptor cd, boolean afterExpiration) throws InterruptedException, KeeperException, IOException { String shardId = cd.getCloudDescriptor().getShardId(); @@ -631,7 +708,7 @@ public final class ZkController { .getCollectionName(); ElectionContext context = new ShardLeaderElectionContext(leaderElector, shardId, - collection, coreZkNodeName, ourProps, this, cc); + collection, coreZkNodeName, ourProps, this, cc, afterExpiration); leaderElector.setup(context); electionContexts.put(coreZkNodeName, context); diff --git a/solr/core/src/java/org/apache/solr/core/CoreContainer.java b/solr/core/src/java/org/apache/solr/core/CoreContainer.java index 6f97a9b416b..4b3f469f57e 100644 --- a/solr/core/src/java/org/apache/solr/core/CoreContainer.java +++ b/solr/core/src/java/org/apache/solr/core/CoreContainer.java @@ -598,15 +598,16 @@ public class CoreContainer } cores.clear(); } finally { + if (shardHandlerFactory != null) { + shardHandlerFactory.close(); + } + // we want to close zk stuff last if(zkController != null) { zkController.close(); } if (zkServer != null) { zkServer.stop(); } - if (shardHandlerFactory != null) { - shardHandlerFactory.close(); - } } } } diff --git a/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java b/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java index aa05e840310..ec8ecb01832 100644 --- a/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java +++ b/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java @@ -721,6 +721,21 @@ public class CoreAdminHandler extends RequestHandlerBase { props.put(ZkStateReader.NODE_NAME_PROP, zkController.getNodeName()); boolean success = syncStrategy.sync(zkController, core, new ZkNodeProps(props)); + // solrcloud_debug +// try { +// RefCounted searchHolder = +// core.getNewestSearcher(false); +// SolrIndexSearcher searcher = searchHolder.get(); +// try { +// System.out.println(core.getCoreDescriptor().getCoreContainer().getZkController().getNodeName() +// + " synched " +// + searcher.search(new MatchAllDocsQuery(), 1).totalHits); +// } finally { +// searchHolder.decref(); +// } +// } catch (Exception e) { +// +// } if (!success) { throw new SolrException(ErrorCode.SERVER_ERROR, "Sync Failed"); } @@ -750,8 +765,11 @@ public class CoreAdminHandler extends RequestHandlerBase { String coreNodeName = params.get("coreNodeName"); String waitForState = params.get("state"); Boolean checkLive = params.getBool("checkLive"); + Boolean onlyIfLeader = params.getBool("onlyIfLeader"); int pauseFor = params.getInt("pauseFor", 0); + + String state = null; boolean live = false; int retry = 0; @@ -764,6 +782,12 @@ public class CoreAdminHandler extends RequestHandlerBase { + cname); } if (core != null) { + if (onlyIfLeader != null && onlyIfLeader) { + if (!core.getCoreDescriptor().getCloudDescriptor().isLeader()) { + throw new SolrException(ErrorCode.BAD_REQUEST, "We are not the leader"); + } + } + // wait until we are sure the recovering node is ready // to accept updates CloudDescriptor cloudDescriptor = core.getCoreDescriptor() diff --git a/solr/core/src/java/org/apache/solr/update/SolrCmdDistributor.java b/solr/core/src/java/org/apache/solr/update/SolrCmdDistributor.java index 38d96cefda9..4cd89ee9011 100644 --- a/solr/core/src/java/org/apache/solr/update/SolrCmdDistributor.java +++ b/solr/core/src/java/org/apache/solr/update/SolrCmdDistributor.java @@ -166,6 +166,8 @@ public class SolrCmdDistributor { addCommit(ureq, cmd); + log.info("Distrib commit to:" + nodes); + for (Node node : nodes) { submit(ureq, node); } @@ -345,7 +347,8 @@ public class SolrCmdDistributor { try { semaphore.acquire(); } catch (InterruptedException e) { - throw new RuntimeException(); + Thread.currentThread().interrupt(); + throw new RuntimeException("Update thread interrupted"); } pending.add(completionService.submit(task)); diff --git a/solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java b/solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java index 3ffff9dc76b..9661e295459 100644 --- a/solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java +++ b/solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java @@ -183,15 +183,9 @@ public class DistributedUpdateProcessor extends UpdateRequestProcessor { // set num nodes numNodes = zkController.getClusterState().getLiveNodes().size(); - // the leader is... - // TODO: if there is no leader, wait and look again - // TODO: we are reading the leader from zk every time - we should cache - // this and watch for changes?? Just pull it from ZkController cluster state probably? String shardId = getShard(hash, collection, zkController.getClusterState()); // get the right shard based on the hash... try { - // TODO: if we find out we cannot talk to zk anymore, we should probably realize we are not - // a leader anymore - we shouldn't accept updates at all?? ZkCoreNodeProps leaderProps = new ZkCoreNodeProps(zkController.getZkStateReader().getLeaderProps( collection, shardId)); @@ -201,7 +195,10 @@ public class DistributedUpdateProcessor extends UpdateRequestProcessor { isLeader = coreNodeName.equals(leaderNodeName); DistribPhase phase = - DistribPhase.parseParam(req.getParams().get(DISTRIB_UPDATE_PARAM)); + DistribPhase.parseParam(req.getParams().get(DISTRIB_UPDATE_PARAM)); + + doDefensiveChecks(shardId, phase); + if (DistribPhase.FROMLEADER == phase) { // we are coming from the leader, just go local - add no urls @@ -251,6 +248,36 @@ public class DistributedUpdateProcessor extends UpdateRequestProcessor { return nodes; } + private void doDefensiveChecks(String shardId, DistribPhase phase) { + String from = req.getParams().get("distrib.from"); + boolean localIsLeader = req.getCore().getCoreDescriptor().getCloudDescriptor().isLeader(); + if (DistribPhase.FROMLEADER == phase && localIsLeader && from != null) { // from will be null on log replay + log.error("Request says it is coming from leader, but we are the leader: " + req.getParamString()); + throw new SolrException(ErrorCode.BAD_REQUEST, "Request says it is coming from leader, but we are the leader"); + } + + if (DistribPhase.FROMLEADER == phase && from != null) { // from will be null on log replay + + ZkCoreNodeProps clusterStateLeader = new ZkCoreNodeProps(zkController + .getClusterState().getLeader(collection, shardId)); + + if (clusterStateLeader.getNodeProps() == null + || !clusterStateLeader.getCoreUrl().equals(from)) { + String coreUrl = null; + if (clusterStateLeader.getNodeProps() != null) { + coreUrl = clusterStateLeader.getCoreUrl(); + } + log.error("We got a request from the leader, but it's not who our cluster state says is the leader :" + + req.getParamString() + + " : " + + coreUrl); + + new SolrException(ErrorCode.BAD_REQUEST, "We got a request from the leader, but it's not who our cluster state says is the leader."); + } + + } + } + private String getShard(int hash, String collection, ClusterState clusterState) { // ranges should be part of the cloud state and eventually gotten from zk @@ -329,6 +356,8 @@ public class DistributedUpdateProcessor extends UpdateRequestProcessor { DistribPhase.FROMLEADER.toString() : DistribPhase.TOLEADER.toString())); params.remove("commit"); // this will be distributed from the local commit + params.set("distrib.from", ZkCoreNodeProps.getCoreUrl( + zkController.getBaseUrl(), req.getCore().getName())); cmdDistrib.distribAdd(cmd, nodes, params); } @@ -378,9 +407,11 @@ public class DistributedUpdateProcessor extends UpdateRequestProcessor { // TODO: we should do this in the background it would seem for (SolrCmdDistributor.Error error : response.errors) { - if (error.node instanceof RetryNode) { + if (error.node instanceof RetryNode || error.e instanceof SolrException) { // we don't try to force a leader to recover // when we cannot forward to it + // and we assume SolrException means + // the node went down continue; } // TODO: we should force their state to recovering ?? @@ -658,6 +689,10 @@ public class DistributedUpdateProcessor extends UpdateRequestProcessor { (isLeader ? DistribPhase.FROMLEADER.toString() : DistribPhase.TOLEADER.toString())); + if (isLeader) { + params.set("distrib.from", ZkCoreNodeProps.getCoreUrl( + zkController.getBaseUrl(), req.getCore().getName())); + } params.remove("commit"); // we already will have forwarded this from our local commit cmdDistrib.distribDelete(cmd, nodes, params); } @@ -819,6 +854,8 @@ public class DistributedUpdateProcessor extends UpdateRequestProcessor { ModifiableSolrParams params = new ModifiableSolrParams(req.getParams()); params.set(VERSION_FIELD, Long.toString(cmd.getVersion())); params.set(DISTRIB_UPDATE_PARAM, DistribPhase.FROMLEADER.toString()); + params.set("update.from", ZkCoreNodeProps.getCoreUrl( + zkController.getBaseUrl(), req.getCore().getName())); cmdDistrib.distribDelete(cmd, replicas, params); cmdDistrib.finish(); } diff --git a/solr/core/src/test/org/apache/solr/cloud/ChaosMonkeyNothingIsSafeTest.java b/solr/core/src/test/org/apache/solr/cloud/ChaosMonkeyNothingIsSafeTest.java index c53198d0be8..83e5415fc46 100644 --- a/solr/core/src/test/org/apache/solr/cloud/ChaosMonkeyNothingIsSafeTest.java +++ b/solr/core/src/test/org/apache/solr/cloud/ChaosMonkeyNothingIsSafeTest.java @@ -42,7 +42,7 @@ import org.slf4j.LoggerFactory; public class ChaosMonkeyNothingIsSafeTest extends AbstractFullDistribZkTestBase { public static Logger log = LoggerFactory.getLogger(ChaosMonkeyNothingIsSafeTest.class); - private static final int BASE_RUN_LENGTH = 45000; + private static final int BASE_RUN_LENGTH = 20000; @BeforeClass public static void beforeSuperClass() { @@ -56,8 +56,8 @@ public class ChaosMonkeyNothingIsSafeTest extends AbstractFullDistribZkTestBase @Override public void setUp() throws Exception { super.setUp(); - // TODO use @Noisy annotation as we expect lots of exceptions - //ignoreException(".*"); + // can help to hide this when testing and looking at logs + //ignoreException("shard update error"); System.setProperty("numShards", Integer.toString(sliceCount)); } @@ -71,8 +71,8 @@ public class ChaosMonkeyNothingIsSafeTest extends AbstractFullDistribZkTestBase public ChaosMonkeyNothingIsSafeTest() { super(); - sliceCount = 3; - shardCount = 12; + sliceCount = 1; + shardCount = 7; } @Override @@ -83,9 +83,16 @@ public class ChaosMonkeyNothingIsSafeTest extends AbstractFullDistribZkTestBase handle.put("QTime", SKIPVAL); handle.put("timestamp", SKIPVAL); + // make sure we have leaders for each shard + for (int j = 1; j < sliceCount; j++) { + zkStateReader.getLeaderProps(DEFAULT_COLLECTION, "shard" + j, 10000); + } // make sure we again have leaders for each shard + + waitForRecoveriesToFinish(false); + // we cannot do delete by query // as it's not supported for recovery - // del("*:*"); + del("*:*"); List threads = new ArrayList(); int threadCount = 1; @@ -152,6 +159,7 @@ public class ChaosMonkeyNothingIsSafeTest extends AbstractFullDistribZkTestBase zkStateReader.updateClusterState(true); assertTrue(zkStateReader.getClusterState().getLiveNodes().size() > 0); + // we dont't current check vs control because the full throttle thread can // have request fails checkShardConsistency(false, true); diff --git a/solr/core/src/test/org/apache/solr/cloud/ChaosMonkeySafeLeaderTest.java b/solr/core/src/test/org/apache/solr/cloud/ChaosMonkeySafeLeaderTest.java index 0dec1724fae..956fdc27dff 100644 --- a/solr/core/src/test/org/apache/solr/cloud/ChaosMonkeySafeLeaderTest.java +++ b/solr/core/src/test/org/apache/solr/cloud/ChaosMonkeySafeLeaderTest.java @@ -50,11 +50,6 @@ public class ChaosMonkeySafeLeaderTest extends AbstractFullDistribZkTestBase { @Override public void setUp() throws Exception { super.setUp(); - // we expect this time of exception as shards go up and down... - //ignoreException(".*"); - - // sometimes we cannot get the same port - ignoreException("java\\.net\\.BindException: Address already in use"); System.setProperty("numShards", Integer.toString(sliceCount)); } diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/request/CoreAdminRequest.java b/solr/solrj/src/java/org/apache/solr/client/solrj/request/CoreAdminRequest.java index ca3290a30bf..832e52d6c1d 100644 --- a/solr/solrj/src/java/org/apache/solr/client/solrj/request/CoreAdminRequest.java +++ b/solr/solrj/src/java/org/apache/solr/client/solrj/request/CoreAdminRequest.java @@ -121,7 +121,9 @@ public class CoreAdminRequest extends SolrRequest protected String state; protected Boolean checkLive; protected Integer pauseFor; + protected Boolean onlyIfLeader; + public WaitForState() { action = CoreAdminAction.PREPRECOVERY; } @@ -166,6 +168,14 @@ public class CoreAdminRequest extends SolrRequest this.pauseFor = pauseFor; } + public boolean isOnlyIfLeader() { + return onlyIfLeader; + } + + public void setOnlyIfLeader(boolean onlyIfLeader) { + this.onlyIfLeader = onlyIfLeader; + } + @Override public SolrParams getParams() { if( action == null ) { @@ -195,6 +205,10 @@ public class CoreAdminRequest extends SolrRequest if (pauseFor != null) { params.set( "pauseFor", pauseFor); } + + if (onlyIfLeader != null) { + params.set( "onlyIfLeader", onlyIfLeader); + } return params; } diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/ConnectionManager.java b/solr/solrj/src/java/org/apache/solr/common/cloud/ConnectionManager.java index d9eefc69ac8..b1425358487 100644 --- a/solr/solrj/src/java/org/apache/solr/common/cloud/ConnectionManager.java +++ b/solr/solrj/src/java/org/apache/solr/common/cloud/ConnectionManager.java @@ -38,6 +38,8 @@ class ConnectionManager implements Watcher { private boolean connected; private final ZkClientConnectionStrategy connectionStrategy; + + private Object connectionUpdateLock = new Object(); private String zkServerAddress; @@ -72,6 +74,7 @@ class ConnectionManager implements Watcher { } if (isClosed) { + log.info("Client->ZooKeeper status change trigger but we are already closed"); return; } @@ -79,28 +82,25 @@ class ConnectionManager implements Watcher { if (state == KeeperState.SyncConnected) { connected = true; clientConnected.countDown(); + connectionStrategy.connected(); } else if (state == KeeperState.Expired) { connected = false; - log.info("Attempting to reconnect to recover relationship with ZooKeeper..."); - + log.info("Our previous ZooKeeper session was expired. Attempting to reconnect to recover relationship with ZooKeeper..."); + try { connectionStrategy.reconnect(zkServerAddress, zkClientTimeout, this, new ZkClientConnectionStrategy.ZkUpdate() { @Override public void update(SolrZooKeeper keeper) { // if keeper does not replace oldKeeper we must be sure to close it - synchronized (connectionStrategy) { + synchronized (connectionUpdateLock) { try { waitForConnected(SolrZkClient.DEFAULT_CLIENT_CONNECT_TIMEOUT); - } catch (InterruptedException e1) { - closeKeeper(keeper); - Thread.currentThread().interrupt(); - throw new RuntimeException("Giving up on connecting - we were interrupted", e1); } catch (Exception e1) { closeKeeper(keeper); throw new RuntimeException(e1); } - + log.info("Connection with ZooKeeper reestablished."); try { client.updateKeeper(keeper); } catch (InterruptedException e) { @@ -129,7 +129,9 @@ class ConnectionManager implements Watcher { } log.info("Connected:" + connected); } else if (state == KeeperState.Disconnected) { + log.info("zkClient has disconnected"); connected = false; + connectionStrategy.disconnected(); } else { connected = false; } @@ -151,19 +153,26 @@ class ConnectionManager implements Watcher { } public synchronized void waitForConnected(long waitForConnection) - throws InterruptedException, TimeoutException { + throws TimeoutException { + log.info("Waiting for client to connect to ZooKeeper"); long expire = System.currentTimeMillis() + waitForConnection; long left = 1; while (!connected && left > 0) { if (isClosed) { break; } - wait(500); + try { + wait(500); + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new RuntimeException(e); + } left = expire - System.currentTimeMillis(); } if (!connected) { throw new TimeoutException("Could not connect to ZooKeeper " + zkServerAddress + " within " + waitForConnection + " ms"); } + log.info("Client is connected to ZooKeeper"); } public synchronized void waitForDisconnected(long timeout) diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/SolrZkClient.java b/solr/solrj/src/java/org/apache/solr/common/cloud/SolrZkClient.java index 730de649ddc..4c3fcf30c15 100644 --- a/solr/solrj/src/java/org/apache/solr/common/cloud/SolrZkClient.java +++ b/solr/solrj/src/java/org/apache/solr/common/cloud/SolrZkClient.java @@ -74,6 +74,7 @@ public class SolrZkClient { private ZkCmdExecutor zkCmdExecutor = new ZkCmdExecutor(); private volatile boolean isClosed = false; + private ZkClientConnectionStrategy zkClientConnectionStrategy; /** * @param zkServerAddress @@ -116,6 +117,7 @@ public class SolrZkClient { */ public SolrZkClient(String zkServerAddress, int zkClientTimeout, ZkClientConnectionStrategy strat, final OnReconnect onReconnect, int clientConnectTimeout) { + this.zkClientConnectionStrategy = strat; connManager = new ConnectionManager("ZooKeeperConnection Watcher:" + zkServerAddress, this, zkServerAddress, zkClientTimeout, strat, onReconnect); try { @@ -135,29 +137,24 @@ public class SolrZkClient { } } }); - } catch (IOException e) { - connManager.close(); - throw new RuntimeException(); - } catch (InterruptedException e) { - connManager.close(); - throw new RuntimeException(); - } catch (TimeoutException e) { + } catch (Throwable e) { connManager.close(); throw new RuntimeException(); } + try { connManager.waitForConnected(clientConnectTimeout); - } catch (InterruptedException e) { - Thread.currentThread().interrupt(); - connManager.close(); - throw new RuntimeException(); - } catch (TimeoutException e) { + } catch (Throwable e) { connManager.close(); throw new RuntimeException(); } numOpens.incrementAndGet(); } + public ZkClientConnectionStrategy getZkClientConnectionStrategy() { + return zkClientConnectionStrategy; + } + /** * @return true if client is connected */ diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/ZkClientConnectionStrategy.java b/solr/solrj/src/java/org/apache/solr/common/cloud/ZkClientConnectionStrategy.java index d608d890a65..f6e1ec8ef35 100644 --- a/solr/solrj/src/java/org/apache/solr/common/cloud/ZkClientConnectionStrategy.java +++ b/solr/solrj/src/java/org/apache/solr/common/cloud/ZkClientConnectionStrategy.java @@ -18,18 +18,65 @@ package org.apache.solr.common.cloud; */ import java.io.IOException; +import java.util.ArrayList; +import java.util.List; import java.util.concurrent.TimeoutException; +import org.apache.solr.common.SolrException; import org.apache.zookeeper.SolrZooKeeper; import org.apache.zookeeper.Watcher; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * */ public abstract class ZkClientConnectionStrategy { + private static Logger log = LoggerFactory.getLogger(ZkClientConnectionStrategy.class); + + private List disconnectedListeners = new ArrayList(); + private List connectedListeners = new ArrayList(); + public abstract void connect(String zkServerAddress, int zkClientTimeout, Watcher watcher, ZkUpdate updater) throws IOException, InterruptedException, TimeoutException; public abstract void reconnect(String serverAddress, int zkClientTimeout, Watcher watcher, ZkUpdate updater) throws IOException, InterruptedException, TimeoutException; + public synchronized void disconnected() { + for (DisconnectedListener listener : disconnectedListeners) { + try { + listener.disconnected(); + } catch (Throwable t) { + SolrException.log(log, "", t); + } + } + } + + public synchronized void connected() { + for (ConnectedListener listener : connectedListeners) { + try { + listener.connected(); + } catch (Throwable t) { + SolrException.log(log, "", t); + } + } + } + + public interface DisconnectedListener { + public void disconnected(); + }; + + public interface ConnectedListener { + public void connected(); + }; + + + public synchronized void addDisconnectedListener(DisconnectedListener listener) { + disconnectedListeners.add(listener); + } + + public synchronized void addConnectedListener(ConnectedListener listener) { + connectedListeners.add(listener); + } + public static abstract class ZkUpdate { public abstract void update(SolrZooKeeper zooKeeper) throws InterruptedException, TimeoutException, IOException; } diff --git a/solr/test-framework/src/java/org/apache/solr/cloud/AbstractFullDistribZkTestBase.java b/solr/test-framework/src/java/org/apache/solr/cloud/AbstractFullDistribZkTestBase.java index 5f18adfaa13..02759ef5ed0 100644 --- a/solr/test-framework/src/java/org/apache/solr/cloud/AbstractFullDistribZkTestBase.java +++ b/solr/test-framework/src/java/org/apache/solr/cloud/AbstractFullDistribZkTestBase.java @@ -801,7 +801,7 @@ public abstract class AbstractFullDistribZkTestBase extends AbstractDistribZkTes SolrDocumentList lst1 = lastJetty.client.solrClient.query(query).getResults(); SolrDocumentList lst2 = cjetty.client.solrClient.query(query).getResults(); - showDiff(lst1, lst2, lastJetty.toString(), cjetty.client.solrClient.toString()); + showDiff(lst1, lst2, lastJetty.url, cjetty.url); } } @@ -1130,7 +1130,8 @@ public abstract class AbstractFullDistribZkTestBase extends AbstractDistribZkTes try { commit(); - } catch (Exception e) { + } catch (Throwable t) { + t.printStackTrace(); // we don't care if this commit fails on some nodes } @@ -1146,8 +1147,8 @@ public abstract class AbstractFullDistribZkTestBase extends AbstractDistribZkTes retry = true; } cnt++; - if (cnt > 2) break; - Thread.sleep(4000); + if (cnt > 4) break; + Thread.sleep(2000); } while (retry); } diff --git a/solr/test-framework/src/java/org/apache/solr/cloud/ChaosMonkey.java b/solr/test-framework/src/java/org/apache/solr/cloud/ChaosMonkey.java index 3bd76327f3d..8bf3a0e8bce 100644 --- a/solr/test-framework/src/java/org/apache/solr/cloud/ChaosMonkey.java +++ b/solr/test-framework/src/java/org/apache/solr/cloud/ChaosMonkey.java @@ -17,7 +17,6 @@ package org.apache.solr.cloud; * limitations under the License. */ -import java.net.BindException; import java.util.ArrayList; import java.util.List; import java.util.Map; @@ -174,16 +173,10 @@ public class ChaosMonkey { public static void kill(CloudJettyRunner cjetty) throws Exception { JettySolrRunner jetty = cjetty.jetty; monkeyLog("kill shard! " + jetty.getLocalPort()); - FilterHolder fh = jetty.getDispatchFilter(); - SolrDispatchFilter sdf = null; - if (fh != null) { - sdf = (SolrDispatchFilter) fh.getFilter(); - } + jetty.stop(); - if (sdf != null) { - sdf.destroy(); - } + stop(jetty); if (!jetty.isStopped()) { throw new RuntimeException("could not kill jetty"); @@ -441,6 +434,7 @@ public class ChaosMonkey { } public static boolean start(JettySolrRunner jetty) throws Exception { + try { jetty.start(); } catch (Exception e) { @@ -454,7 +448,7 @@ public class ChaosMonkey { try { jetty.start(); } catch (Exception e3) { - log.error("", e3); + log.error("Could not get the port to start jetty again", e3); // we coud not get the port jetty.stop(); return false; From 72c1b74d5cedbf0c32b5676341feb1548a14dfe5 Mon Sep 17 00:00:00 2001 From: Uwe Schindler Date: Thu, 30 Aug 2012 16:32:00 +0000 Subject: [PATCH 74/81] LUCENE-4337: Revert JMX code, was not needed in that complexity. git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1379006 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/solr/core/JmxMonitoredMap.java | 9 +-------- .../apache/solr/core/TestJmxMonitoredMap.java | 20 +++++++------------ 2 files changed, 8 insertions(+), 21 deletions(-) diff --git a/solr/core/src/java/org/apache/solr/core/JmxMonitoredMap.java b/solr/core/src/java/org/apache/solr/core/JmxMonitoredMap.java index 4271f220d5f..abd84c3a861 100644 --- a/solr/core/src/java/org/apache/solr/core/JmxMonitoredMap.java +++ b/solr/core/src/java/org/apache/solr/core/JmxMonitoredMap.java @@ -61,13 +61,6 @@ public class JmxMonitoredMap extends public JmxMonitoredMap(String coreName, String coreHashCode, final JmxConfiguration jmxConfig) { - this(coreName, coreHashCode, jmxConfig, null); - } - - // TODO: Make public? Move Map env to environment? - // Currently the map is needed to bind to localhost - JmxMonitoredMap(String coreName, String coreHashCode, - final JmxConfiguration jmxConfig, Map env) { this.coreHashCode = coreHashCode; jmxRootName = (null != jmxConfig.rootName ? jmxConfig.rootName @@ -101,7 +94,7 @@ public class JmxMonitoredMap extends server = MBeanServerFactory.newMBeanServer(); JMXConnectorServer connector = JMXConnectorServerFactory .newJMXConnectorServer(new JMXServiceURL(jmxConfig.serviceUrl), - env, server); + null, server); connector.start(); LOG.info("JMX monitoring is enabled at " + jmxConfig.serviceUrl); } catch (Exception e) { diff --git a/solr/core/src/test/org/apache/solr/core/TestJmxMonitoredMap.java b/solr/core/src/test/org/apache/solr/core/TestJmxMonitoredMap.java index 568b5519a88..a1a987033e4 100644 --- a/solr/core/src/test/org/apache/solr/core/TestJmxMonitoredMap.java +++ b/solr/core/src/test/org/apache/solr/core/TestJmxMonitoredMap.java @@ -17,6 +17,7 @@ package org.apache.solr.core; import org.apache.lucene.util.LuceneTestCase; +import org.apache.solr.util.AbstractSolrTestCase; import org.apache.solr.common.util.NamedList; import org.apache.solr.core.SolrConfig.JmxConfiguration; import org.junit.After; @@ -32,13 +33,10 @@ import javax.management.remote.JMXConnectorFactory; import javax.management.remote.JMXServiceURL; import javax.management.remote.rmi.RMIConnectorServer; import java.io.IOException; -import java.net.InetSocketAddress; -import java.net.Socket; import java.net.ServerSocket; import java.net.URL; import java.rmi.registry.LocateRegistry; import java.rmi.server.RMIServerSocketFactory; -import java.util.Collections; import java.util.Set; import static org.hamcrest.CoreMatchers.allOf; @@ -64,12 +62,11 @@ public class TestJmxMonitoredMap extends LuceneTestCase { @Override @Before public void setUp() throws Exception { - super.setUp(); String oldHost = System.getProperty("java.rmi.server.hostname"); try { - // this stupid sysprop thing is needed, because remote stubs use the - // hostname to connect, which does not work with server bound to 127.0.0.1 + // this stupid sysprop thing is needed, because remote stubs use an + // arbitrary local ip to connect // See: http://weblogs.java.net/blog/emcmanus/archive/2006/12/multihomed_comp.html System.setProperty("java.rmi.server.hostname", "127.0.0.1"); class LocalhostRMIServerSocketFactory implements RMIServerSocketFactory { @@ -77,19 +74,16 @@ public class TestJmxMonitoredMap extends LuceneTestCase { @Override public ServerSocket createServerSocket(int port) throws IOException { - socket = new ServerSocket(); - socket.bind(new InetSocketAddress("127.0.0.1", port)); - return socket; + return socket = new ServerSocket(port); } }; LocalhostRMIServerSocketFactory factory = new LocalhostRMIServerSocketFactory(); LocateRegistry.createRegistry(0, null, factory); port = factory.socket.getLocalPort(); - //System.out.println("Using port: " + port); - String url = "service:jmx:rmi://127.0.0.1:"+port+"/jndi/rmi://127.0.0.1:"+port+"/solrjmx"; + AbstractSolrTestCase.log.info("Using port: " + port); + String url = "service:jmx:rmi:///jndi/rmi://127.0.0.1:"+port+"/solrjmx"; JmxConfiguration config = new JmxConfiguration(true, null, url, null); - monitoredMap = new JmxMonitoredMap("", "", config, - Collections.singletonMap(RMIConnectorServer.RMI_SERVER_SOCKET_FACTORY_ATTRIBUTE, factory)); + monitoredMap = new JmxMonitoredMap("", "", config); JMXServiceURL u = new JMXServiceURL(url); connector = JMXConnectorFactory.connect(u); mbeanServer = connector.getMBeanServerConnection(); From 06fdfe6f32075841c8f001d85664408edf051752 Mon Sep 17 00:00:00 2001 From: "Chris M. Hostetter" Date: Thu, 30 Aug 2012 16:48:55 +0000 Subject: [PATCH 75/81] SOLR-3768: add some prelim assertions to OverseerTest git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1379014 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/solr/cloud/OverseerTest.java | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/solr/core/src/test/org/apache/solr/cloud/OverseerTest.java b/solr/core/src/test/org/apache/solr/cloud/OverseerTest.java index 3d9e651b1b9..6f954c1e76a 100644 --- a/solr/core/src/test/org/apache/solr/cloud/OverseerTest.java +++ b/solr/core/src/test/org/apache/solr/cloud/OverseerTest.java @@ -296,21 +296,25 @@ public class OverseerTest extends SolrTestCaseJ4 { } // make sure all cores have been assigned a id in cloudstate + int cloudStateSliceCount = 0; for (int i = 0; i < 40; i++) { + cloudStateSliceCount = 0; reader.updateClusterState(true); ClusterState state = reader.getClusterState(); Map slices = state.getSlices("collection1"); - int count = 0; for (String name : slices.keySet()) { - count += slices.get(name).getShards().size(); + cloudStateSliceCount += slices.get(name).getShards().size(); } - if (coreCount == count) break; + if (coreCount == cloudStateSliceCount) break; Thread.sleep(200); } + assertEquals("Unable to verify all cores have been assigned an id in cloudstate", + coreCount, cloudStateSliceCount); - // make sure all cores have been returned a id + // make sure all cores have been returned an id + int assignedCount = 0; for (int i = 0; i < 90; i++) { - int assignedCount = 0; + assignedCount = 0; for (int j = 0; j < coreCount; j++) { if (ids[j] != null) { assignedCount++; @@ -321,6 +325,8 @@ public class OverseerTest extends SolrTestCaseJ4 { } Thread.sleep(500); } + assertEquals("Unable to verify all cores have been returned an id", + coreCount, assignedCount); final HashMap counters = new HashMap(); for (int i = 1; i < sliceCount+1; i++) { @@ -874,4 +880,4 @@ public class OverseerTest extends SolrTestCaseJ4 { return zkClient; } -} \ No newline at end of file +} From d7120c7e43654f12bf1186bc7392587e1d422629 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Thu, 30 Aug 2012 17:50:18 +0000 Subject: [PATCH 76/81] LUCENE-4343: clear up more Tokenizer.setReader/TokenStream.reset issues git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1379036 13f79535-47bb-0310-9956-ffa450edef68 --- lucene/CHANGES.txt | 4 ++ .../analysis/core/KeywordTokenizer.java | 3 +- .../analysis/pattern/PatternTokenizer.java | 6 +-- .../analysis/standard/ClassicTokenizer.java | 5 +- .../analysis/standard/StandardTokenizer.java | 5 +- .../standard/UAX29URLEmailTokenizer.java | 5 +- .../lucene/analysis/util/CharTokenizer.java | 6 +-- .../wikipedia/WikipediaTokenizer.java | 8 +--- .../commongrams/CommonGramsFilterTest.java | 2 + .../compound/TestCompoundWordTokenFilter.java | 2 + .../lucene/analysis/core/TestAnalyzers.java | 1 + .../analysis/core/TestStopAnalyzer.java | 2 + .../pattern/TestPatternTokenizer.java | 1 + .../icu/segmentation/ICUTokenizer.java | 9 +--- .../lucene/analysis/ja/JapaneseTokenizer.java | 8 +--- .../analysis/cn/smart/SentenceTokenizer.java | 7 --- .../analysis/uima/BaseUIMATokenizer.java | 3 +- .../apache/lucene/analysis/TokenStream.java | 8 +--- .../org/apache/lucene/analysis/Tokenizer.java | 10 +++- .../apache/lucene/index/TestIndexWriter.java | 2 +- .../lucene/search/TestTermRangeQuery.java | 3 +- .../vectorhighlight/AbstractTestCase.java | 8 +--- .../classic/TestMultiPhraseQueryParsing.java | 3 +- .../spatial/prefix/PrefixCellsTokenizer.java | 10 ---- .../apache/lucene/analysis/MockTokenizer.java | 4 +- .../solr/analysis/TrieTokenizerFactory.java | 13 +---- .../org/apache/solr/schema/BoolField.java | 3 +- .../apache/solr/schema/PreAnalyzedField.java | 48 ++++++++++--------- 28 files changed, 73 insertions(+), 116 deletions(-) diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt index 71057583205..80b2052c010 100644 --- a/lucene/CHANGES.txt +++ b/lucene/CHANGES.txt @@ -77,6 +77,10 @@ API Changes fields in a stored document, has been replaced with the simpler StoredFieldVisitor API. (Mike McCandless) +* LUCENE-4343: Made Tokenizer.setReader final. This is a setter that should + not be overriden by subclasses: per-stream initialization should happen + in reset(). (Robert Muir) + Bug Fixes * LUCENE-4297: BooleanScorer2 would multiply the coord() factor diff --git a/lucene/analysis/common/src/java/org/apache/lucene/analysis/core/KeywordTokenizer.java b/lucene/analysis/common/src/java/org/apache/lucene/analysis/core/KeywordTokenizer.java index a95bcb154bb..40da5d1a91f 100644 --- a/lucene/analysis/common/src/java/org/apache/lucene/analysis/core/KeywordTokenizer.java +++ b/lucene/analysis/common/src/java/org/apache/lucene/analysis/core/KeywordTokenizer.java @@ -94,8 +94,7 @@ public final class KeywordTokenizer extends Tokenizer { } @Override - public void setReader(Reader input) throws IOException { - super.setReader(input); + public void reset() throws IOException { this.done = false; } } diff --git a/lucene/analysis/common/src/java/org/apache/lucene/analysis/pattern/PatternTokenizer.java b/lucene/analysis/common/src/java/org/apache/lucene/analysis/pattern/PatternTokenizer.java index 586ec94072a..4176acc5ff3 100644 --- a/lucene/analysis/common/src/java/org/apache/lucene/analysis/pattern/PatternTokenizer.java +++ b/lucene/analysis/common/src/java/org/apache/lucene/analysis/pattern/PatternTokenizer.java @@ -78,9 +78,6 @@ public final class PatternTokenizer extends Tokenizer { if (group >= 0 && group > matcher.groupCount()) { throw new IllegalArgumentException("invalid group specified: pattern only has: " + matcher.groupCount() + " capturing groups"); } - fillBuffer(str, input); - matcher.reset(str); - index = 0; } @Override @@ -136,8 +133,7 @@ public final class PatternTokenizer extends Tokenizer { } @Override - public void setReader(Reader input) throws IOException { - super.setReader(input); + public void reset() throws IOException { fillBuffer(str, input); matcher.reset(str); index = 0; diff --git a/lucene/analysis/common/src/java/org/apache/lucene/analysis/standard/ClassicTokenizer.java b/lucene/analysis/common/src/java/org/apache/lucene/analysis/standard/ClassicTokenizer.java index d2209d2a6da..93192d9e2b4 100644 --- a/lucene/analysis/common/src/java/org/apache/lucene/analysis/standard/ClassicTokenizer.java +++ b/lucene/analysis/common/src/java/org/apache/lucene/analysis/standard/ClassicTokenizer.java @@ -175,8 +175,7 @@ public final class ClassicTokenizer extends Tokenizer { } @Override - public void setReader(Reader reader) throws IOException { - super.setReader(reader); - scanner.yyreset(reader); + public void reset() throws IOException { + scanner.yyreset(input); } } diff --git a/lucene/analysis/common/src/java/org/apache/lucene/analysis/standard/StandardTokenizer.java b/lucene/analysis/common/src/java/org/apache/lucene/analysis/standard/StandardTokenizer.java index d917f8d74d4..97e512d1c8e 100644 --- a/lucene/analysis/common/src/java/org/apache/lucene/analysis/standard/StandardTokenizer.java +++ b/lucene/analysis/common/src/java/org/apache/lucene/analysis/standard/StandardTokenizer.java @@ -183,8 +183,7 @@ public final class StandardTokenizer extends Tokenizer { } @Override - public void setReader(Reader reader) throws IOException { - super.setReader(reader); - scanner.yyreset(reader); + public void reset() throws IOException { + scanner.yyreset(input); } } diff --git a/lucene/analysis/common/src/java/org/apache/lucene/analysis/standard/UAX29URLEmailTokenizer.java b/lucene/analysis/common/src/java/org/apache/lucene/analysis/standard/UAX29URLEmailTokenizer.java index a442a3abc8d..d5442534fa8 100644 --- a/lucene/analysis/common/src/java/org/apache/lucene/analysis/standard/UAX29URLEmailTokenizer.java +++ b/lucene/analysis/common/src/java/org/apache/lucene/analysis/standard/UAX29URLEmailTokenizer.java @@ -162,8 +162,7 @@ public final class UAX29URLEmailTokenizer extends Tokenizer { } @Override - public void setReader(Reader reader) throws IOException { - super.setReader(reader); - scanner.yyreset(reader); + public void reset() throws IOException { + scanner.yyreset(input); } } diff --git a/lucene/analysis/common/src/java/org/apache/lucene/analysis/util/CharTokenizer.java b/lucene/analysis/common/src/java/org/apache/lucene/analysis/util/CharTokenizer.java index cfff1eeeacb..4bdef52d157 100644 --- a/lucene/analysis/common/src/java/org/apache/lucene/analysis/util/CharTokenizer.java +++ b/lucene/analysis/common/src/java/org/apache/lucene/analysis/util/CharTokenizer.java @@ -78,7 +78,8 @@ public abstract class CharTokenizer extends Tokenizer { charUtils = CharacterUtils.getInstance(matchVersion); } - private int offset = 0, bufferIndex = 0, dataLen = 0, finalOffset = 0; + // note: bufferIndex is -1 here to best-effort AIOOBE consumers that don't call reset() + private int offset = 0, bufferIndex = -1, dataLen = 0, finalOffset = 0; private static final int MAX_WORD_LEN = 255; private static final int IO_BUFFER_SIZE = 4096; @@ -162,8 +163,7 @@ public abstract class CharTokenizer extends Tokenizer { } @Override - public void setReader(Reader input) throws IOException { - super.setReader(input); + public void reset() throws IOException { bufferIndex = 0; offset = 0; dataLen = 0; diff --git a/lucene/analysis/common/src/java/org/apache/lucene/analysis/wikipedia/WikipediaTokenizer.java b/lucene/analysis/common/src/java/org/apache/lucene/analysis/wikipedia/WikipediaTokenizer.java index fca8b43f529..474e62a0b21 100644 --- a/lucene/analysis/common/src/java/org/apache/lucene/analysis/wikipedia/WikipediaTokenizer.java +++ b/lucene/analysis/common/src/java/org/apache/lucene/analysis/wikipedia/WikipediaTokenizer.java @@ -318,18 +318,12 @@ public final class WikipediaTokenizer extends Tokenizer { */ @Override public void reset() throws IOException { - super.reset(); + scanner.yyreset(input); tokens = null; scanner.reset(); first = true; } - @Override - public void setReader(Reader reader) throws IOException { - super.setReader(reader); - scanner.yyreset(input); - } - @Override public void end() { // set final offset diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/commongrams/CommonGramsFilterTest.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/commongrams/CommonGramsFilterTest.java index d2f62578a95..b9be9d60feb 100644 --- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/commongrams/CommonGramsFilterTest.java +++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/commongrams/CommonGramsFilterTest.java @@ -39,6 +39,7 @@ public class CommonGramsFilterTest extends BaseTokenStreamTestCase { CommonGramsFilter cgf = new CommonGramsFilter(TEST_VERSION_CURRENT, wt, commonWords); CharTermAttribute term = cgf.addAttribute(CharTermAttribute.class); + cgf.reset(); assertTrue(cgf.incrementToken()); assertEquals("How", term.toString()); assertTrue(cgf.incrementToken()); @@ -61,6 +62,7 @@ public class CommonGramsFilterTest extends BaseTokenStreamTestCase { CommonGramsQueryFilter nsf = new CommonGramsQueryFilter(cgf); CharTermAttribute term = wt.addAttribute(CharTermAttribute.class); + nsf.reset(); assertTrue(nsf.incrementToken()); assertEquals("How_the", term.toString()); assertTrue(nsf.incrementToken()); diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/compound/TestCompoundWordTokenFilter.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/compound/TestCompoundWordTokenFilter.java index fa06c3db296..dd4429b66ae 100644 --- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/compound/TestCompoundWordTokenFilter.java +++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/compound/TestCompoundWordTokenFilter.java @@ -235,6 +235,7 @@ public class TestCompoundWordTokenFilter extends BaseTokenStreamTestCase { CompoundWordTokenFilterBase.DEFAULT_MAX_SUBWORD_SIZE, false); CharTermAttribute termAtt = tf.getAttribute(CharTermAttribute.class); + tf.reset(); assertTrue(tf.incrementToken()); assertEquals("Rindfleischüberwachungsgesetz", termAtt.toString()); assertTrue(tf.incrementToken()); @@ -256,6 +257,7 @@ public class TestCompoundWordTokenFilter extends BaseTokenStreamTestCase { CompoundWordTokenFilterBase.DEFAULT_MIN_SUBWORD_SIZE, CompoundWordTokenFilterBase.DEFAULT_MAX_SUBWORD_SIZE, false); MockRetainAttribute retAtt = stream.addAttribute(MockRetainAttribute.class); + stream.reset(); while (stream.incrementToken()) { assertTrue("Custom attribute value was lost", retAtt.getRetain()); } diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/core/TestAnalyzers.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/core/TestAnalyzers.java index 2463f8caf32..ce50297b1f5 100644 --- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/core/TestAnalyzers.java +++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/core/TestAnalyzers.java @@ -80,6 +80,7 @@ public class TestAnalyzers extends BaseTokenStreamTestCase { void verifyPayload(TokenStream ts) throws IOException { PayloadAttribute payloadAtt = ts.getAttribute(PayloadAttribute.class); + ts.reset(); for(byte b=1;;b++) { boolean hasNext = ts.incrementToken(); if (!hasNext) break; diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/core/TestStopAnalyzer.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/core/TestStopAnalyzer.java index 37437fb21cd..0c4fd19fb46 100644 --- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/core/TestStopAnalyzer.java +++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/core/TestStopAnalyzer.java @@ -66,6 +66,7 @@ public class TestStopAnalyzer extends BaseTokenStreamTestCase { assertNotNull(stream); CharTermAttribute termAtt = stream.getAttribute(CharTermAttribute.class); + stream.reset(); while (stream.incrementToken()) { String text = termAtt.toString(); assertFalse(stopWordsSet.contains(text)); @@ -83,6 +84,7 @@ public class TestStopAnalyzer extends BaseTokenStreamTestCase { CharTermAttribute termAtt = stream.getAttribute(CharTermAttribute.class); PositionIncrementAttribute posIncrAtt = stream.addAttribute(PositionIncrementAttribute.class); + stream.reset(); while (stream.incrementToken()) { String text = termAtt.toString(); assertFalse(stopWordsSet.contains(text)); diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/pattern/TestPatternTokenizer.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/pattern/TestPatternTokenizer.java index 1d88f0cc4cd..5e000bedd76 100644 --- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/pattern/TestPatternTokenizer.java +++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/pattern/TestPatternTokenizer.java @@ -111,6 +111,7 @@ public class TestPatternTokenizer extends BaseTokenStreamTestCase // assign bogus values in.clearAttributes(); termAtt.setEmpty().append("bogusTerm"); + in.reset(); while (in.incrementToken()) { if (out.length() > 0) out.append(' '); diff --git a/lucene/analysis/icu/src/java/org/apache/lucene/analysis/icu/segmentation/ICUTokenizer.java b/lucene/analysis/icu/src/java/org/apache/lucene/analysis/icu/segmentation/ICUTokenizer.java index 8ac07512603..d1aad04e947 100644 --- a/lucene/analysis/icu/src/java/org/apache/lucene/analysis/icu/segmentation/ICUTokenizer.java +++ b/lucene/analysis/icu/src/java/org/apache/lucene/analysis/icu/segmentation/ICUTokenizer.java @@ -45,7 +45,8 @@ public final class ICUTokenizer extends Tokenizer { /** true length of text in the buffer */ private int length = 0; /** length in buffer that can be evaluated safely, up to a safe end point */ - private int usableLength = 0; + // note: usableLength is -1 here to best-effort AIOOBE consumers that don't call reset() + private int usableLength = -1; /** accumulated offset of previous buffers for this reader, for offsetAtt */ private int offset = 0; @@ -101,12 +102,6 @@ public final class ICUTokenizer extends Tokenizer { breaker.setText(buffer, 0, 0); length = usableLength = offset = 0; } - - @Override - public void setReader(Reader input) throws IOException { - super.setReader(input); - reset(); - } @Override public void end() { diff --git a/lucene/analysis/kuromoji/src/java/org/apache/lucene/analysis/ja/JapaneseTokenizer.java b/lucene/analysis/kuromoji/src/java/org/apache/lucene/analysis/ja/JapaneseTokenizer.java index 66c53671cc5..a2c2be53e8a 100644 --- a/lucene/analysis/kuromoji/src/java/org/apache/lucene/analysis/ja/JapaneseTokenizer.java +++ b/lucene/analysis/kuromoji/src/java/org/apache/lucene/analysis/ja/JapaneseTokenizer.java @@ -244,15 +244,9 @@ public final class JapaneseTokenizer extends Tokenizer { this.dotOut = dotOut; } - @Override - public void setReader(Reader input) throws IOException { - super.setReader(input); - buffer.reset(input); - } - @Override public void reset() throws IOException { - super.reset(); + buffer.reset(input); resetState(); } diff --git a/lucene/analysis/smartcn/src/java/org/apache/lucene/analysis/cn/smart/SentenceTokenizer.java b/lucene/analysis/smartcn/src/java/org/apache/lucene/analysis/cn/smart/SentenceTokenizer.java index 5a7859763f0..da98907d9f2 100644 --- a/lucene/analysis/smartcn/src/java/org/apache/lucene/analysis/cn/smart/SentenceTokenizer.java +++ b/lucene/analysis/smartcn/src/java/org/apache/lucene/analysis/cn/smart/SentenceTokenizer.java @@ -112,16 +112,9 @@ public final class SentenceTokenizer extends Tokenizer { @Override public void reset() throws IOException { - super.reset(); tokenStart = tokenEnd = 0; } - @Override - public void setReader(Reader input) throws IOException { - super.setReader(input); - reset(); - } - @Override public void end() { // set final offset diff --git a/lucene/analysis/uima/src/java/org/apache/lucene/analysis/uima/BaseUIMATokenizer.java b/lucene/analysis/uima/src/java/org/apache/lucene/analysis/uima/BaseUIMATokenizer.java index 6de0907ebfe..c6001c86102 100644 --- a/lucene/analysis/uima/src/java/org/apache/lucene/analysis/uima/BaseUIMATokenizer.java +++ b/lucene/analysis/uima/src/java/org/apache/lucene/analysis/uima/BaseUIMATokenizer.java @@ -80,8 +80,7 @@ public abstract class BaseUIMATokenizer extends Tokenizer { } @Override - public void setReader(Reader input) throws IOException { - super.setReader(input); + public void reset() throws IOException { iterator = null; } diff --git a/lucene/core/src/java/org/apache/lucene/analysis/TokenStream.java b/lucene/core/src/java/org/apache/lucene/analysis/TokenStream.java index 605b3cf5989..14370ff5d74 100644 --- a/lucene/core/src/java/org/apache/lucene/analysis/TokenStream.java +++ b/lucene/core/src/java/org/apache/lucene/analysis/TokenStream.java @@ -170,12 +170,8 @@ public abstract class TokenStream extends AttributeSource implements Closeable { * This method is called by a consumer before it begins consumption using * {@link #incrementToken()}. *

- * Resets this stream to the beginning. As all TokenStreams must be reusable, - * any implementations which have state that needs to be reset between usages - * of the TokenStream, must implement this method. Note that if your TokenStream - * caches tokens and feeds them back again after a reset, it is imperative - * that you clone the tokens when you store them away (on the first pass) as - * well as when you return them (on future passes after {@link #reset()}). + * Resets this stream to a clean state. Stateful implementations must implement + * this method so that they can be reused, just as if they had been created fresh. */ public void reset() throws IOException {} diff --git a/lucene/core/src/java/org/apache/lucene/analysis/Tokenizer.java b/lucene/core/src/java/org/apache/lucene/analysis/Tokenizer.java index 696ba048f0d..a0900bc9771 100644 --- a/lucene/core/src/java/org/apache/lucene/analysis/Tokenizer.java +++ b/lucene/core/src/java/org/apache/lucene/analysis/Tokenizer.java @@ -82,12 +82,18 @@ public abstract class Tokenizer extends TokenStream { return (input instanceof CharFilter) ? ((CharFilter) input).correctOffset(currentOff) : currentOff; } - /** Expert: Reset the tokenizer to a new reader. Typically, an + /** Expert: Set a new reader on the Tokenizer. Typically, an * analyzer (in its tokenStream method) will use * this to re-use a previously created tokenizer. */ - public void setReader(Reader input) throws IOException { + public final void setReader(Reader input) throws IOException { assert input != null: "input must not be null"; this.input = input; + assert setReaderTestPoint(); + } + + // only used by assert, for testing + boolean setReaderTestPoint() { + return true; } } diff --git a/lucene/core/src/test/org/apache/lucene/index/TestIndexWriter.java b/lucene/core/src/test/org/apache/lucene/index/TestIndexWriter.java index 8f968afb0ed..e0533b9585f 100644 --- a/lucene/core/src/test/org/apache/lucene/index/TestIndexWriter.java +++ b/lucene/core/src/test/org/apache/lucene/index/TestIndexWriter.java @@ -1545,7 +1545,7 @@ public class TestIndexWriter extends LuceneTestCase { } @Override - public void setReader(Reader input) throws IOException { + public void reset() throws IOException { this.upto = 0; final StringBuilder b = new StringBuilder(); final char[] buffer = new char[1024]; diff --git a/lucene/core/src/test/org/apache/lucene/search/TestTermRangeQuery.java b/lucene/core/src/test/org/apache/lucene/search/TestTermRangeQuery.java index 7dcf940feab..8c245f2d05b 100644 --- a/lucene/core/src/test/org/apache/lucene/search/TestTermRangeQuery.java +++ b/lucene/core/src/test/org/apache/lucene/search/TestTermRangeQuery.java @@ -227,8 +227,7 @@ public class TestTermRangeQuery extends LuceneTestCase { } @Override - public final void setReader(Reader reader) throws IOException { - super.setReader(reader); + public void reset() throws IOException {; done = false; } } diff --git a/lucene/highlighter/src/test/org/apache/lucene/search/vectorhighlight/AbstractTestCase.java b/lucene/highlighter/src/test/org/apache/lucene/search/vectorhighlight/AbstractTestCase.java index 9e3b347deb5..87273812afe 100644 --- a/lucene/highlighter/src/test/org/apache/lucene/search/vectorhighlight/AbstractTestCase.java +++ b/lucene/highlighter/src/test/org/apache/lucene/search/vectorhighlight/AbstractTestCase.java @@ -176,6 +176,8 @@ public abstract class AbstractTestCase extends LuceneTestCase { BytesRef bytesRef = termAttribute.getBytesRef(); + tokenStream.reset(); + while (tokenStream.incrementToken()) { termAttribute.fillBytesRef(); bytesRefs.add(BytesRef.deepCopyOf(bytesRef)); @@ -316,12 +318,6 @@ public abstract class AbstractTestCase extends LuceneTestCase { return delimiters.indexOf( c ) >= 0; } - @Override - public void setReader( Reader input ) throws IOException { - super.setReader( input ); - reset(); - } - @Override public void reset() { startTerm = 0; diff --git a/lucene/queryparser/src/test/org/apache/lucene/queryparser/classic/TestMultiPhraseQueryParsing.java b/lucene/queryparser/src/test/org/apache/lucene/queryparser/classic/TestMultiPhraseQueryParsing.java index c1130546192..bd22e75ccc8 100644 --- a/lucene/queryparser/src/test/org/apache/lucene/queryparser/classic/TestMultiPhraseQueryParsing.java +++ b/lucene/queryparser/src/test/org/apache/lucene/queryparser/classic/TestMultiPhraseQueryParsing.java @@ -81,8 +81,7 @@ public class TestMultiPhraseQueryParsing extends LuceneTestCase { } @Override - public void setReader(Reader reader) throws IOException { - super.setReader(reader); + public void reset() throws IOException { this.upto = 0; this.lastPos = 0; } diff --git a/lucene/spatial/src/java/org/apache/lucene/spatial/prefix/PrefixCellsTokenizer.java b/lucene/spatial/src/java/org/apache/lucene/spatial/prefix/PrefixCellsTokenizer.java index ad656f231e1..54617b9c9b0 100644 --- a/lucene/spatial/src/java/org/apache/lucene/spatial/prefix/PrefixCellsTokenizer.java +++ b/lucene/spatial/src/java/org/apache/lucene/spatial/prefix/PrefixCellsTokenizer.java @@ -76,14 +76,4 @@ class PrefixCellsTokenizer extends Tokenizer { termAtt.setLength(length); return length > 0; // should only happen at the end } - - @Override - public final void end() { - - } - - @Override - public void setReader(Reader input) throws IOException { - super.setReader(input); - } } \ No newline at end of file diff --git a/lucene/test-framework/src/java/org/apache/lucene/analysis/MockTokenizer.java b/lucene/test-framework/src/java/org/apache/lucene/analysis/MockTokenizer.java index 864cb8cb9d1..d244f17edf2 100644 --- a/lucene/test-framework/src/java/org/apache/lucene/analysis/MockTokenizer.java +++ b/lucene/test-framework/src/java/org/apache/lucene/analysis/MockTokenizer.java @@ -227,10 +227,10 @@ public class MockTokenizer extends Tokenizer { } @Override - public void setReader(Reader input) throws IOException { - super.setReader(input); + boolean setReaderTestPoint() { assert !enableChecks || streamState == State.CLOSE : "setReader() called in wrong state: " + streamState; streamState = State.SETREADER; + return true; } @Override diff --git a/solr/core/src/java/org/apache/solr/analysis/TrieTokenizerFactory.java b/solr/core/src/java/org/apache/solr/analysis/TrieTokenizerFactory.java index fe15b8db09f..571e13eeab6 100644 --- a/solr/core/src/java/org/apache/solr/analysis/TrieTokenizerFactory.java +++ b/solr/core/src/java/org/apache/solr/analysis/TrieTokenizerFactory.java @@ -72,15 +72,11 @@ final class TrieTokenizer extends Tokenizer { this.type = type; this.precisionStep = precisionStep; this.ts = ts; - - setReader(input); } @Override - public void setReader(Reader input) { + public void reset() { try { - super.setReader(input); - input = super.input; char[] buf = new char[32]; int len = input.read(buf); this.startOfs = correctOffset(0); @@ -113,6 +109,7 @@ final class TrieTokenizer extends Tokenizer { } catch (IOException e) { throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, "Unable to create TrieIndexTokenizer", e); } + ts.reset(); } @Override @@ -120,12 +117,6 @@ final class TrieTokenizer extends Tokenizer { super.close(); ts.close(); } - - @Override - public void reset() throws IOException { - super.reset(); - ts.reset(); - } @Override public boolean incrementToken() { diff --git a/solr/core/src/java/org/apache/solr/schema/BoolField.java b/solr/core/src/java/org/apache/solr/schema/BoolField.java index acc528b5706..04353b56217 100644 --- a/solr/core/src/java/org/apache/solr/schema/BoolField.java +++ b/solr/core/src/java/org/apache/solr/schema/BoolField.java @@ -71,9 +71,8 @@ public class BoolField extends PrimitiveFieldType { boolean done = false; @Override - public void setReader(Reader input) throws IOException { + public void reset() throws IOException { done = false; - super.setReader(input); } @Override diff --git a/solr/core/src/java/org/apache/solr/schema/PreAnalyzedField.java b/solr/core/src/java/org/apache/solr/schema/PreAnalyzedField.java index 189a3e14d00..24cdc4f6940 100644 --- a/solr/core/src/java/org/apache/solr/schema/PreAnalyzedField.java +++ b/solr/core/src/java/org/apache/solr/schema/PreAnalyzedField.java @@ -81,13 +81,8 @@ public class PreAnalyzedField extends FieldType { return new SolrAnalyzer() { @Override - protected TokenStreamComponents createComponents(String fieldName, - Reader reader) { - try { - return new TokenStreamComponents(new PreAnalyzedTokenizer(reader, parser)); - } catch (IOException e) { - return null; - } + protected TokenStreamComponents createComponents(String fieldName, Reader reader) { + return new TokenStreamComponents(new PreAnalyzedTokenizer(reader, parser)); } }; @@ -169,6 +164,7 @@ public class PreAnalyzedField extends FieldType { return null; } PreAnalyzedTokenizer parse = new PreAnalyzedTokenizer(new StringReader(val), parser); + parse.reset(); // consume Field f = (Field)super.createField(field, val, boost); if (parse.getStringValue() != null) { f.setStringValue(parse.getStringValue()); @@ -195,11 +191,11 @@ public class PreAnalyzedField extends FieldType { private String stringValue = null; private byte[] binaryValue = null; private PreAnalyzedParser parser; + private Reader lastReader; - public PreAnalyzedTokenizer(Reader reader, PreAnalyzedParser parser) throws IOException { + public PreAnalyzedTokenizer(Reader reader, PreAnalyzedParser parser) { super(reader); this.parser = parser; - setReader(reader); } public boolean hasTokenStream() { @@ -229,24 +225,30 @@ public class PreAnalyzedField extends FieldType { return true; } - public final void reset() { + @Override + public final void reset() throws IOException { + // NOTE: this acts like rewind if you call it again + if (input != lastReader) { + lastReader = input; + cachedStates.clear(); + stringValue = null; + binaryValue = null; + ParseResult res = parser.parse(input, this); + if (res != null) { + stringValue = res.str; + binaryValue = res.bin; + if (res.states != null) { + cachedStates.addAll(res.states); + } + } + } it = cachedStates.iterator(); } @Override - public void setReader(Reader input) throws IOException { - super.setReader(input); - cachedStates.clear(); - stringValue = null; - binaryValue = null; - ParseResult res = parser.parse(input, this); - if (res != null) { - stringValue = res.str; - binaryValue = res.bin; - if (res.states != null) { - cachedStates.addAll(res.states); - } - } + public void close() throws IOException { + super.close(); + lastReader = null; // just a ref, null for gc } } From 4b3df5d6619b313119b8ffe179690318bf432918 Mon Sep 17 00:00:00 2001 From: Uwe Schindler Date: Thu, 30 Aug 2012 17:56:15 +0000 Subject: [PATCH 77/81] LUCENE-4337: Add a workaround for lucene.zones.apache.org's broken network configuration, also fix other possible misconfigurations of /etc/hosts: Solr sometimes connects to localhost, sometimes to 127.0.0.1, which may be different addresses. git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1379039 13f79535-47bb-0310-9956-ffa450edef68 --- lucene/tools/junit4/tests.policy | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/lucene/tools/junit4/tests.policy b/lucene/tools/junit4/tests.policy index 8264f31a589..f22126474d3 100644 --- a/lucene/tools/junit4/tests.policy +++ b/lucene/tools/junit4/tests.policy @@ -23,11 +23,23 @@ // PLEASE NOTE: You may need to enable other permissions when new tests are added, // everything not allowed here is forbidden! -grant { +grant { + // permissions for file access, write access only to sandbox: permission java.io.FilePermission "<>", "read,execute"; permission java.io.FilePermission "${tests.sandbox.dir}${/}-", "read,execute,write,delete"; + + // all possibilities of accepting/binding connections on localhost with ports >=1024: permission java.net.SocketPermission "localhost:1024-", "accept,listen"; + permission java.net.SocketPermission "127.0.0.1:1024-", "accept,listen"; + permission java.net.SocketPermission "[::1]:1024-", "accept,listen"; + + // This is a special case, because the network config of the Jenkins server is broken (INFRA-issue): + permission java.net.SocketPermission "lucene.zones.apache.org:1024-", "accept,listen"; + + // Allow connecting to the internet anywhere permission java.net.SocketPermission "*", "connect,resolve"; + + // Basic permissions needed for Lucene to work: permission java.util.PropertyPermission "*", "read,write"; permission java.lang.reflect.ReflectPermission "*"; permission java.lang.RuntimePermission "*"; From 1b85d60d02e2928e0de0b6f9ee88832300ff04b7 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Thu, 30 Aug 2012 20:25:26 +0000 Subject: [PATCH 78/81] allow tests to write to clover db git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1379118 13f79535-47bb-0310-9956-ffa450edef68 --- lucene/common-build.xml | 1 + lucene/tools/junit4/tests.policy | 1 + 2 files changed, 2 insertions(+) diff --git a/lucene/common-build.xml b/lucene/common-build.xml index 3d497f2fc68..01a95a0537f 100644 --- a/lucene/common-build.xml +++ b/lucene/common-build.xml @@ -798,6 +798,7 @@ + diff --git a/lucene/tools/junit4/tests.policy b/lucene/tools/junit4/tests.policy index f22126474d3..2b12d776fec 100644 --- a/lucene/tools/junit4/tests.policy +++ b/lucene/tools/junit4/tests.policy @@ -27,6 +27,7 @@ grant { // permissions for file access, write access only to sandbox: permission java.io.FilePermission "<>", "read,execute"; permission java.io.FilePermission "${tests.sandbox.dir}${/}-", "read,execute,write,delete"; + permission java.io.FilePermission "${clover.db.dir}${/}-", "read,execute,write,delete"; // all possibilities of accepting/binding connections on localhost with ports >=1024: permission java.net.SocketPermission "localhost:1024-", "accept,listen"; From 856974ca399f38d143caa8abc4a4fac26b7e5b47 Mon Sep 17 00:00:00 2001 From: Uwe Schindler Date: Thu, 30 Aug 2012 20:55:30 +0000 Subject: [PATCH 79/81] Add some link to the explanation of the FreeBSD Jail issue workaround git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1379141 13f79535-47bb-0310-9956-ffa450edef68 --- lucene/tools/junit4/tests.policy | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lucene/tools/junit4/tests.policy b/lucene/tools/junit4/tests.policy index 2b12d776fec..c0a69c02281 100644 --- a/lucene/tools/junit4/tests.policy +++ b/lucene/tools/junit4/tests.policy @@ -34,7 +34,8 @@ grant { permission java.net.SocketPermission "127.0.0.1:1024-", "accept,listen"; permission java.net.SocketPermission "[::1]:1024-", "accept,listen"; - // This is a special case, because the network config of the Jenkins server is broken (INFRA-issue): + // This is a special case, because the network config of the ASF Jenkins server is broken, + // see: http://freebsd.1045724.n5.nabble.com/jail-external-and-localhost-distinction-td3967320.html permission java.net.SocketPermission "lucene.zones.apache.org:1024-", "accept,listen"; // Allow connecting to the internet anywhere From cfef80af55e388cb8d1dd5e6ad428a2a01cbce88 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Thu, 30 Aug 2012 21:52:20 +0000 Subject: [PATCH 80/81] LUCENE-4339: merge changes entry git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1379176 13f79535-47bb-0310-9956-ffa450edef68 --- lucene/CHANGES.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt index 80b2052c010..bc1f4a7d189 100644 --- a/lucene/CHANGES.txt +++ b/lucene/CHANGES.txt @@ -23,6 +23,11 @@ New Features * LUCENE-4323: Added support for an absolute maximum CFS segment size (in MiB) to LogMergePolicy and TieredMergePolicy. (Alexey Lef via Uwe Schindler) + +* LUCENE-4339: Allow deletes against 3.x segments for easier upgrading. + Lucene3x Codec is still otherwise read-only, you should not set it + as the default Codec on IndexWriter, because it cannot write new segments. + (Mike McCandless, Robert Muir) API Changes From 7754d1d10516550b205ff60c65b4e6bd863437df Mon Sep 17 00:00:00 2001 From: Yonik Seeley Date: Thu, 30 Aug 2012 22:31:56 +0000 Subject: [PATCH 81/81] SOLR-3755: basic shard splitting code git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1379195 13f79535-47bb-0310-9956-ffa450edef68 --- .../solr/handler/admin/CoreAdminHandler.java | 66 +++++++ .../solr/update/DirectUpdateHandler2.java | 7 + .../apache/solr/update/SolrIndexSplitter.java | 183 ++++++++++++++++++ .../apache/solr/update/SplitIndexCommand.java | 56 ++++++ .../org/apache/solr/update/UpdateHandler.java | 2 + .../solr/cloud/TestHashPartitioner.java | 23 ++- .../solr/common/cloud/ClusterState.java | 4 +- .../solr/common/cloud/HashPartitioner.java | 54 ++++-- .../solr/common/params/CoreAdminParams.java | 3 +- 9 files changed, 372 insertions(+), 26 deletions(-) create mode 100644 solr/core/src/java/org/apache/solr/update/SolrIndexSplitter.java create mode 100644 solr/core/src/java/org/apache/solr/update/SplitIndexCommand.java diff --git a/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java b/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java index ec8ecb01832..9862db8fea9 100644 --- a/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java +++ b/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java @@ -19,10 +19,13 @@ package org.apache.solr.handler.admin; import java.io.File; import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; import java.util.Collections; import java.util.Date; import java.util.HashMap; import java.util.Iterator; +import java.util.List; import java.util.Map; import java.util.Properties; @@ -36,6 +39,7 @@ import org.apache.solr.cloud.ZkController; import org.apache.solr.common.SolrException; import org.apache.solr.common.SolrException.ErrorCode; import org.apache.solr.common.cloud.ClusterState; +import org.apache.solr.common.cloud.HashPartitioner; import org.apache.solr.common.cloud.Slice; import org.apache.solr.common.cloud.ZkNodeProps; import org.apache.solr.common.cloud.ZkStateReader; @@ -57,6 +61,7 @@ import org.apache.solr.request.SolrQueryRequest; import org.apache.solr.response.SolrQueryResponse; import org.apache.solr.search.SolrIndexSearcher; import org.apache.solr.update.MergeIndexesCommand; +import org.apache.solr.update.SplitIndexCommand; import org.apache.solr.update.processor.UpdateRequestProcessor; import org.apache.solr.update.processor.UpdateRequestProcessorChain; import org.apache.solr.util.NumberUtils; @@ -171,6 +176,11 @@ public class CoreAdminHandler extends RequestHandlerBase { break; } + case SPLIT: { + doPersist = this.handleSplitAction(req, rsp); + break; + } + case PREPRECOVERY: { this.handleWaitForStateAction(req, rsp); break; @@ -202,6 +212,62 @@ public class CoreAdminHandler extends RequestHandlerBase { rsp.setHttpCaching(false); } + + protected boolean handleSplitAction(SolrQueryRequest adminReq, SolrQueryResponse rsp) throws IOException { + SolrParams params = adminReq.getParams(); + // partitions=N (split into N partitions, leaving it up to solr what the ranges are and where to put them) + // path - multiValued param, or comma separated param? Only creates indexes, not cores + + List ranges = null; + // boolean closeDirectories = true; + // DirectoryFactory dirFactory = null; + + + String cname = params.get(CoreAdminParams.CORE, ""); + SolrCore core = coreContainer.getCore(cname); + SolrQueryRequest req = new LocalSolrQueryRequest(core, params); + try { + + String[] pathsArr = params.getParams("path"); + List paths = null; + + String rangesStr = params.get("ranges"); // ranges=a-b,c-d,e-f + + + // dirFactory = core.getDirectoryFactory(); + + + if (pathsArr != null) { + + paths = Arrays.asList(pathsArr); + + if (rangesStr == null) { + HashPartitioner hp = new HashPartitioner(); + // should this be static? + // TODO: use real range if we know it. If we don't know it, we should prob + // split on every other doc rather than on a hash? + ranges = hp.partitionRange(pathsArr.length, Integer.MIN_VALUE, Integer.MAX_VALUE); + } + + } + + + SplitIndexCommand cmd = new SplitIndexCommand(req, paths, ranges); + core.getUpdateHandler().split(cmd); + + } catch (Exception e) { + log.error("ERROR executing split:", e); + throw new RuntimeException(e); + + } finally { + if (req != null) req.close(); + if (core != null) core.close(); + } + + return false; + } + + protected boolean handleMergeAction(SolrQueryRequest req, SolrQueryResponse rsp) throws IOException { SolrParams params = req.getParams(); String cname = params.required().get(CoreAdminParams.CORE); diff --git a/solr/core/src/java/org/apache/solr/update/DirectUpdateHandler2.java b/solr/core/src/java/org/apache/solr/update/DirectUpdateHandler2.java index 4b1120b0ffc..5719d38330a 100644 --- a/solr/core/src/java/org/apache/solr/update/DirectUpdateHandler2.java +++ b/solr/core/src/java/org/apache/solr/update/DirectUpdateHandler2.java @@ -738,6 +738,13 @@ public class DirectUpdateHandler2 extends UpdateHandler implements SolrCoreState } } + @Override + public void split(SplitIndexCommand cmd) throws IOException { + // TODO: do a commit first? + SolrIndexSplitter splitter = new SolrIndexSplitter(cmd); + splitter.split(); + } + ///////////////////////////////////////////////////////////////////// // SolrInfoMBean stuff: Statistics and Module Info ///////////////////////////////////////////////////////////////////// diff --git a/solr/core/src/java/org/apache/solr/update/SolrIndexSplitter.java b/solr/core/src/java/org/apache/solr/update/SolrIndexSplitter.java new file mode 100644 index 00000000000..78422f294eb --- /dev/null +++ b/solr/core/src/java/org/apache/solr/update/SolrIndexSplitter.java @@ -0,0 +1,183 @@ +/* + * 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. + */ + +package org.apache.solr.update; + +import org.apache.lucene.index.AtomicReader; +import org.apache.lucene.index.AtomicReaderContext; +import org.apache.lucene.index.DocsEnum; +import org.apache.lucene.index.Fields; +import org.apache.lucene.index.FilterAtomicReader; +import org.apache.lucene.index.IndexReader; +import org.apache.lucene.index.IndexWriter; +import org.apache.lucene.index.Terms; +import org.apache.lucene.index.TermsEnum; +import org.apache.lucene.util.Bits; +import org.apache.lucene.util.BytesRef; +import org.apache.lucene.util.IOUtils; +import org.apache.lucene.util.OpenBitSet; +import org.apache.solr.common.cloud.HashPartitioner; +import org.apache.solr.common.util.Hash; +import org.apache.solr.core.SolrCore; +import org.apache.solr.schema.SchemaField; +import org.apache.solr.search.SolrIndexSearcher; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +public class SolrIndexSplitter { + public static Logger log = LoggerFactory.getLogger(SolrIndexSplitter.class); + + SolrIndexSearcher searcher; + SchemaField field; + List ranges; + HashPartitioner.Range[] rangesArr; // same as ranges list, but an array for extra speed in inner loops + List paths; + + public SolrIndexSplitter(SplitIndexCommand cmd) { + field = cmd.getReq().getSchema().getUniqueKeyField(); + searcher = cmd.getReq().getSearcher(); + ranges = cmd.ranges; + rangesArr = ranges.toArray(new HashPartitioner.Range[ranges.size()]); + paths = cmd.paths; + } + + public void split() throws IOException { + + List leaves = searcher.getTopReaderContext().leaves(); + List segmentDocSets = new ArrayList(leaves.size()); + + log.info("SolrIndexSplitter: partitions=" + ranges.size() + " segments="+leaves.size()); + + for (AtomicReaderContext readerContext : leaves) { + assert readerContext.ordInParent == segmentDocSets.size(); // make sure we're going in order + OpenBitSet[] docSets = split(readerContext); + segmentDocSets.add( docSets ); + } + + + // would it be more efficient to write segment-at-a-time to each new index? + // - need to worry about number of open descriptors + // - need to worry about if IW.addIndexes does a sync or not... + + IndexReader[] subReaders = new IndexReader[leaves.size()]; + for (int partitionNumber=0; partitionNumber dirs; + public List paths; + public List ranges; + // TODO: allow specification of custom hash function + + public SplitIndexCommand(SolrQueryRequest req, List paths, List ranges) { + super(req); + this.paths = paths; + this.ranges = ranges; + } + + @Override + public String name() { + return "split"; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(super.toString()); + sb.append(",paths=" + paths); + sb.append(",ranges=" + ranges); + sb.append('}'); + return sb.toString(); + } +} diff --git a/solr/core/src/java/org/apache/solr/update/UpdateHandler.java b/solr/core/src/java/org/apache/solr/update/UpdateHandler.java index abd21d0738c..2f7dc1c437f 100644 --- a/solr/core/src/java/org/apache/solr/update/UpdateHandler.java +++ b/solr/core/src/java/org/apache/solr/update/UpdateHandler.java @@ -179,4 +179,6 @@ public abstract class UpdateHandler implements SolrInfoMBean { { optimizeCallbacks.add( listener ); } + + public abstract void split(SplitIndexCommand cmd) throws IOException; } diff --git a/solr/core/src/test/org/apache/solr/cloud/TestHashPartitioner.java b/solr/core/src/test/org/apache/solr/cloud/TestHashPartitioner.java index 71a5e113e13..5ff8d19ffab 100644 --- a/solr/core/src/test/org/apache/solr/cloud/TestHashPartitioner.java +++ b/solr/core/src/test/org/apache/solr/cloud/TestHashPartitioner.java @@ -27,12 +27,25 @@ public class TestHashPartitioner extends SolrTestCaseJ4 { public void testMapHashes() throws Exception { HashPartitioner hp = new HashPartitioner(); - - for (int i = 1; i <= 30000; i++) { - List ranges = hp.partitionRange(i); - + List ranges; + + // make sure the partitioner uses the "natural" boundaries and doesn't suffer from an off-by-one + ranges = hp.partitionRange(2, Integer.MIN_VALUE, Integer.MAX_VALUE); + assertEquals(Integer.MIN_VALUE, ranges.get(0).min); + assertEquals(0x80000000, ranges.get(0).min); + assertEquals(0xffffffff, ranges.get(0).max); + assertEquals(0x00000000, ranges.get(1).min); + assertEquals(0x7fffffff, ranges.get(1).max); + + ranges = hp.partitionRange(2, 0, 0x7fffffff); + assertEquals(0x00000000, ranges.get(0).min); + assertEquals(0x3fffffff, ranges.get(0).max); + assertEquals(0x40000000, ranges.get(1).min); + assertEquals(0x7fffffff, ranges.get(1).max); + + for (int i = 1; i <= 30000; i += 13) { + ranges = hp.partitionRange(i, Integer.MIN_VALUE, Integer.MAX_VALUE); assertEquals(i, ranges.size()); - assertTrue("First range does not start before " + Integer.MIN_VALUE + " it is:" + ranges.get(0).min, ranges.get(0).min <= Integer.MIN_VALUE); diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/ClusterState.java b/solr/solrj/src/java/org/apache/solr/common/cloud/ClusterState.java index 82f3b804c14..cf23d1c6d97 100644 --- a/solr/solrj/src/java/org/apache/solr/common/cloud/ClusterState.java +++ b/solr/solrj/src/java/org/apache/solr/common/cloud/ClusterState.java @@ -226,7 +226,7 @@ public class ClusterState implements JSONWriter.Writable { shardList.addAll(shards); Collections.sort(shardList); - ranges = hp.partitionRange(shards.size()); + ranges = hp.partitionRange(shards.size(), Integer.MIN_VALUE, Integer.MAX_VALUE); rangeInfo.ranges = ranges; rangeInfo.shardList = shardList; @@ -243,7 +243,7 @@ public class ClusterState implements JSONWriter.Writable { int cnt = 0; for (Range range : rangInfo.ranges) { - if (hash < range.max) { + if (range.includes(hash)) { return rangInfo.shardList.get(cnt); } cnt++; diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/HashPartitioner.java b/solr/solrj/src/java/org/apache/solr/common/cloud/HashPartitioner.java index 484b23bc6de..389a8fe8102 100644 --- a/solr/solrj/src/java/org/apache/solr/common/cloud/HashPartitioner.java +++ b/solr/solrj/src/java/org/apache/solr/common/cloud/HashPartitioner.java @@ -25,39 +25,57 @@ import java.util.List; * */ public class HashPartitioner { - + + // Hash ranges can't currently "wrap" - i.e. max must be greater or equal to min. public static class Range { - public long min; - public long max; + public int min; // inclusive + public int max; // inclusive - public Range(long min, long max) { + public Range(int min, int max) { this.min = min; this.max = max; } + + public boolean includes(int hash) { + return hash >= min && hash <= max; + } + + public String toString() { + return Integer.toHexString(min) + '-' + Integer.toHexString(max); + } + + public static Range fromString(String range) { + return null; // TODO + } } + /** - * works up to 65537 before requested num of ranges is one short - * + * * @param partitions * @return Range for each partition */ - public List partitionRange(int partitions) { - // some hokey code to partition the int space - long range = Integer.MAX_VALUE + (Math.abs((long) Integer.MIN_VALUE)); - long srange = range / partitions; - + public List partitionRange(int partitions, int min, int max) { + assert max >= min; + long range = (long)max - (long)min; + long srange = Math.max(1, range / partitions); + List ranges = new ArrayList(partitions); - - long end = 0; - long start = Integer.MIN_VALUE; - - while (end < Integer.MAX_VALUE) { + + long start = min; + long end = start; + + while (end < max) { end = start + srange; - ranges.add(new Range(start, end)); + // make last range always end exactly on MAX_VALUE + if (ranges.size() == partitions - 1) { + end = max; + } + ranges.add(new Range((int)start, (int)end)); start = end + 1L; } - + return ranges; } + } diff --git a/solr/solrj/src/java/org/apache/solr/common/params/CoreAdminParams.java b/solr/solrj/src/java/org/apache/solr/common/params/CoreAdminParams.java index f4148ca7c40..2c529eac319 100644 --- a/solr/solrj/src/java/org/apache/solr/common/params/CoreAdminParams.java +++ b/solr/solrj/src/java/org/apache/solr/common/params/CoreAdminParams.java @@ -92,7 +92,8 @@ public interface CoreAdminParams SWAP, RENAME, MERGEINDEXES, - PREPRECOVERY, + SPLIT, + PREPRECOVERY, REQUESTRECOVERY, REQUESTSYNCSHARD;