diff --git a/.github/workflows/basic.yml b/.github/workflows/basic.yml
index cb3e3e8..4688fa2 100644
--- a/.github/workflows/basic.yml
+++ b/.github/workflows/basic.yml
@@ -8,11 +8,11 @@ jobs:
strategy:
fail-fast: false
matrix:
- java: [ 11, 16 ]
+ java: [ 17, 21 ]
steps:
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v4.1.1
- name: Set up JDK
- uses: actions/setup-java@v2.5.0
+ uses: actions/setup-java@v4.1.0
with:
java-version: ${{ matrix.java }}
distribution: 'adopt'
@@ -21,4 +21,4 @@ jobs:
- name: Build example
run: javac -cp target/classes/:. example.java
- name: Run example
- run: java -cp target/classes/:. example
\ No newline at end of file
+ run: java -cp target/classes/:. example
diff --git a/README.md b/README.md
index 84f07cb..5d3fc30 100644
--- a/README.md
+++ b/README.md
@@ -83,7 +83,7 @@ the following code in your pom.xml file:
me.lemire.integercompression
JavaFastPFOR
- [0.1,)
+ [0.2,)
```
diff --git a/benchmarkresults/benchmarkresults_haswell_18sept2014.txt b/benchmarkresults/benchmarkresults_haswell_18sept2014.txt
index 43fa98b..a501d5d 100644
--- a/benchmarkresults/benchmarkresults_haswell_18sept2014.txt
+++ b/benchmarkresults/benchmarkresults_haswell_18sept2014.txt
@@ -1,7 +1,7 @@
# benchmark based on the ClusterData model from:
-# Vo Ngoc Anh and Alistair Moffat.
-# Index compression using 64-bit words.
-# Softw. Pract. Exper.40, 2 (February 2010), 131-147.
+# Vo Ngoc Anh and Alistair Moffat.
+# Index compression using 64-bit words.
+# Softw. Pract. Exper.40, 2 (February 2010), 131-147.
# Results will be written into a CSV file: benchmark-20140918T011257.csv
@@ -10,852 +10,852 @@
# generating random data... ok.
# FastPFOR + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 2.56 246 1061
+ 2.56 246 1061
# kamikaze PForDelta
# bits per int, compress speed (mis), decompression speed (mis)
- 3.21 66 275
+ 3.21 66 275
# IntegratedBinaryPacking + IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 2.96 838 1679
+ 2.96 838 1679
# JustCopy
# bits per int, compress speed (mis), decompression speed (mis)
- 32.00 1276 1805
+ 32.00 1276 1805
# VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.00 490 509
+ 8.00 490 509
# IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.00 582 774
+ 8.00 582 774
# BinaryPacking + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 2.96 765 1193
+ 2.96 765 1193
# NewPFD + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 2.88 139 896
+ 2.88 139 896
# NewPFDS9 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 2.90 166 905
+ 2.90 166 905
# NewPFDS16 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 2.88 139 898
+ 2.88 139 898
# OptPFD + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 2.87 25 938
+ 2.87 25 938
# OptPFDS9 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 2.90 29 960
+ 2.90 29 960
# OptPFDS16 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 2.87 25 882
+ 2.87 25 882
# IntegratedFastPFOR + IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 2.63 274 1015
+ 2.63 274 1015
# Simple9
# bits per int, compress speed (mis), decompression speed (mis)
- 2.83 280 771
+ 2.83 280 771
# XorBinaryPacking + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 2.84 444 837
+ 2.84 444 837
# DeltaZigzagBinaryPacking + DeltaZigzagVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 3.27 498 652
+ 3.27 498 652
# sparsity 2
# generating random data...
# generating random data... ok.
# FastPFOR + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 3.51 244 1048
+ 3.51 244 1048
# kamikaze PForDelta
# bits per int, compress speed (mis), decompression speed (mis)
- 4.18 55 247
+ 4.18 55 247
# IntegratedBinaryPacking + IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 3.93 862 1611
+ 3.93 862 1611
# JustCopy
# bits per int, compress speed (mis), decompression speed (mis)
- 32.00 1286 1816
+ 32.00 1286 1816
# VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.01 486 508
+ 8.01 486 508
# IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.01 575 763
+ 8.01 575 763
# BinaryPacking + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 3.93 774 1159
+ 3.93 774 1159
# NewPFD + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 3.83 118 865
+ 3.83 118 865
# NewPFDS9 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 3.86 141 875
+ 3.86 141 875
# NewPFDS16 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 3.83 118 867
+ 3.83 118 867
# OptPFD + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 3.82 18 881
+ 3.82 18 881
# OptPFDS9 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 3.85 22 887
+ 3.85 22 887
# OptPFDS16 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 3.82 18 838
+ 3.82 18 838
# IntegratedFastPFOR + IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 3.58 273 990
+ 3.58 273 990
# Simple9
# bits per int, compress speed (mis), decompression speed (mis)
- 3.82 201 656
+ 3.82 201 656
# XorBinaryPacking + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 3.90 442 819
+ 3.90 442 819
# DeltaZigzagBinaryPacking + DeltaZigzagVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 4.50 494 640
+ 4.50 494 640
# sparsity 3
# generating random data...
# generating random data... ok.
# FastPFOR + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 4.28 244 1030
+ 4.28 244 1030
# kamikaze PForDelta
# bits per int, compress speed (mis), decompression speed (mis)
- 4.95 51 247
+ 4.95 51 247
# IntegratedBinaryPacking + IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 4.71 850 1577
+ 4.71 850 1577
# JustCopy
# bits per int, compress speed (mis), decompression speed (mis)
- 32.00 1252 1769
+ 32.00 1252 1769
# VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.02 478 504
+ 8.02 478 504
# IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.02 573 762
+ 8.02 573 762
# BinaryPacking + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 4.71 770 1139
+ 4.71 770 1139
# NewPFD + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 4.60 107 850
+ 4.60 107 850
# NewPFDS9 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 4.63 127 863
+ 4.63 127 863
# NewPFDS16 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 4.60 107 853
+ 4.60 107 853
# OptPFD + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 4.59 14 865
+ 4.59 14 865
# OptPFDS9 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 4.62 18 882
+ 4.62 18 882
# OptPFDS16 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 4.59 14 844
+ 4.59 14 844
# IntegratedFastPFOR + IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 4.34 268 969
+ 4.34 268 969
# Simple9
# bits per int, compress speed (mis), decompression speed (mis)
- 4.72 170 610
+ 4.72 170 610
# XorBinaryPacking + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 4.68 434 783
+ 4.68 434 783
# DeltaZigzagBinaryPacking + DeltaZigzagVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 5.33 472 624
+ 5.33 472 624
# sparsity 4
# generating random data...
# generating random data... ok.
# FastPFOR + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 5.03 239 1004
+ 5.03 239 1004
# kamikaze PForDelta
# bits per int, compress speed (mis), decompression speed (mis)
- 5.73 47 251
+ 5.73 47 251
# IntegratedBinaryPacking + IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 5.48 846 1556
+ 5.48 846 1556
# JustCopy
# bits per int, compress speed (mis), decompression speed (mis)
- 32.00 1274 1799
+ 32.00 1274 1799
# VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.12 439 486
+ 8.12 439 486
# IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.12 537 715
+ 8.12 537 715
# BinaryPacking + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 5.48 769 1134
+ 5.48 769 1134
# NewPFD + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 5.36 95 817
+ 5.36 95 817
# NewPFDS9 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 5.39 115 838
+ 5.39 115 838
# NewPFDS16 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 5.36 96 827
+ 5.36 96 827
# OptPFD + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 5.34 12 842
+ 5.34 12 842
# OptPFDS9 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 5.37 16 871
+ 5.37 16 871
# OptPFDS16 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 5.34 12 803
+ 5.34 12 803
# IntegratedFastPFOR + IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 5.09 268 963
+ 5.09 268 963
# Simple9
# bits per int, compress speed (mis), decompression speed (mis)
- 5.57 150 587
+ 5.57 150 587
# XorBinaryPacking + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 5.47 432 800
+ 5.47 432 800
# DeltaZigzagBinaryPacking + DeltaZigzagVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 6.16 491 635
+ 6.16 491 635
# sparsity 5
# generating random data...
# generating random data... ok.
# FastPFOR + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 6.00 236 999
+ 6.00 236 999
# kamikaze PForDelta
# bits per int, compress speed (mis), decompression speed (mis)
- 6.70 43 242
+ 6.70 43 242
# IntegratedBinaryPacking + IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 6.45 863 1584
+ 6.45 863 1584
# JustCopy
# bits per int, compress speed (mis), decompression speed (mis)
- 32.00 1236 1792
+ 32.00 1236 1792
# VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.40 369 452
+ 8.40 369 452
# IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.40 486 617
+ 8.40 486 617
# BinaryPacking + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 6.45 777 1132
+ 6.45 777 1132
# NewPFD + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 6.33 86 808
+ 6.33 86 808
# NewPFDS9 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 6.36 103 828
+ 6.36 103 828
# NewPFDS16 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 6.33 86 813
+ 6.33 86 813
# OptPFD + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 6.31 9 825
+ 6.31 9 825
# OptPFDS9 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 6.34 13 858
+ 6.34 13 858
# OptPFDS16 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 6.31 9 819
+ 6.31 9 819
# IntegratedFastPFOR + IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 6.06 265 945
+ 6.06 265 945
# Simple9
# bits per int, compress speed (mis), decompression speed (mis)
- 6.65 139 546
+ 6.65 139 546
# XorBinaryPacking + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 6.45 442 804
+ 6.45 442 804
# DeltaZigzagBinaryPacking + DeltaZigzagVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 7.18 493 635
+ 7.18 493 635
# sparsity 6
# generating random data...
# generating random data... ok.
# FastPFOR + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 6.76 238 998
+ 6.76 238 998
# kamikaze PForDelta
# bits per int, compress speed (mis), decompression speed (mis)
- 7.45 42 251
+ 7.45 42 251
# IntegratedBinaryPacking + IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 7.20 854 1525
+ 7.20 854 1525
# JustCopy
# bits per int, compress speed (mis), decompression speed (mis)
- 32.00 1177 1663
+ 32.00 1177 1663
# VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 9.10 259 362
+ 9.10 259 362
# IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 9.10 380 450
+ 9.10 380 450
# BinaryPacking + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 7.20 718 1098
+ 7.20 718 1098
# NewPFD + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 7.08 79 786
+ 7.08 79 786
# NewPFDS9 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 7.11 95 821
+ 7.11 95 821
# NewPFDS16 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 7.08 81 814
+ 7.08 81 814
# OptPFD + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 7.06 8 836
+ 7.06 8 836
# OptPFDS9 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 7.09 11 860
+ 7.09 11 860
# OptPFDS16 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 7.06 8 822
+ 7.06 8 822
# IntegratedFastPFOR + IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 6.81 268 962
+ 6.81 268 962
# Simple9
# bits per int, compress speed (mis), decompression speed (mis)
- 7.56 129 509
+ 7.56 129 509
# XorBinaryPacking + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 7.19 433 789
+ 7.19 433 789
# DeltaZigzagBinaryPacking + DeltaZigzagVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 7.93 491 632
+ 7.93 491 632
# sparsity 7
# generating random data...
# generating random data... ok.
# FastPFOR + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.05 236 985
+ 8.05 236 985
# kamikaze PForDelta
# bits per int, compress speed (mis), decompression speed (mis)
- 8.75 39 247
+ 8.75 39 247
# IntegratedBinaryPacking + IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.50 861 1526
+ 8.50 861 1526
# JustCopy
# bits per int, compress speed (mis), decompression speed (mis)
- 32.00 1279 1788
+ 32.00 1279 1788
# VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 10.11 190 305
+ 10.11 190 305
# IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 10.11 311 355
+ 10.11 311 355
# BinaryPacking + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.50 753 1092
+ 8.50 753 1092
# NewPFD + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.37 71 792
+ 8.37 71 792
# NewPFDS9 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.40 83 804
+ 8.40 83 804
# NewPFDS16 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.37 72 805
+ 8.37 72 805
# OptPFD + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.35 7 808
+ 8.35 7 808
# OptPFDS9 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.38 10 835
+ 8.38 10 835
# OptPFDS16 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.35 7 796
+ 8.35 7 796
# IntegratedFastPFOR + IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.10 259 920
+ 8.10 259 920
# Simple9
# bits per int, compress speed (mis), decompression speed (mis)
- 9.16 111 447
+ 9.16 111 447
# XorBinaryPacking + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.52 435 784
+ 8.52 435 784
# DeltaZigzagBinaryPacking + DeltaZigzagVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 9.32 485 622
+ 9.32 485 622
# sparsity 8
# generating random data...
# generating random data... ok.
# FastPFOR + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.73 234 972
+ 8.73 234 972
# kamikaze PForDelta
# bits per int, compress speed (mis), decompression speed (mis)
- 9.44 37 250
+ 9.44 37 250
# IntegratedBinaryPacking + IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 9.19 848 1493
+ 9.19 848 1493
# JustCopy
# bits per int, compress speed (mis), decompression speed (mis)
- 32.00 1279 1858
+ 32.00 1279 1858
# VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 11.04 167 307
+ 11.04 167 307
# IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 11.04 309 353
+ 11.04 309 353
# BinaryPacking + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 9.19 751 1095
+ 9.19 751 1095
# NewPFD + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 9.06 67 770
+ 9.06 67 770
# NewPFDS9 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 9.09 78 781
+ 9.09 78 781
# NewPFDS16 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 9.06 68 792
+ 9.06 68 792
# OptPFD + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 9.03 6 795
+ 9.03 6 795
# OptPFDS9 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 9.07 9 824
+ 9.07 9 824
# OptPFDS16 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 9.03 6 787
+ 9.03 6 787
# IntegratedFastPFOR + IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.78 266 936
+ 8.78 266 936
# Simple9
# bits per int, compress speed (mis), decompression speed (mis)
- 10.34 101 427
+ 10.34 101 427
# XorBinaryPacking + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 9.21 437 794
+ 9.21 437 794
# DeltaZigzagBinaryPacking + DeltaZigzagVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 10.01 488 626
+ 10.01 488 626
# sparsity 9
# generating random data...
# generating random data... ok.
# FastPFOR + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 9.75 234 980
+ 9.75 234 980
# kamikaze PForDelta
# bits per int, compress speed (mis), decompression speed (mis)
- 10.48 36 242
+ 10.48 36 242
# IntegratedBinaryPacking + IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 10.21 844 1474
+ 10.21 844 1474
# JustCopy
# bits per int, compress speed (mis), decompression speed (mis)
- 32.00 1262 1795
+ 32.00 1262 1795
# VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 12.18 145 300
+ 12.18 145 300
# IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 12.18 302 340
+ 12.18 302 340
# BinaryPacking + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 10.21 761 1096
+ 10.21 761 1096
# NewPFD + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 10.08 63 786
+ 10.08 63 786
# NewPFDS9 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 10.12 72 752
+ 10.12 72 752
# NewPFDS16 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 10.08 63 783
+ 10.08 63 783
# OptPFD + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 10.05 6 787
+ 10.05 6 787
# OptPFDS9 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 10.09 8 798
+ 10.09 8 798
# OptPFDS16 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 10.05 6 779
+ 10.05 6 779
# IntegratedFastPFOR + IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 9.80 264 930
+ 9.80 264 930
# Simple9
# bits per int, compress speed (mis), decompression speed (mis)
- 11.77 92 410
+ 11.77 92 410
# XorBinaryPacking + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 10.23 438 789
+ 10.23 438 789
# DeltaZigzagBinaryPacking + DeltaZigzagVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 11.05 486 624
+ 11.05 486 624
# sparsity 10
# generating random data...
# generating random data... ok.
# FastPFOR + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 10.73 235 979
+ 10.73 235 979
# kamikaze PForDelta
# bits per int, compress speed (mis), decompression speed (mis)
- 11.46 35 239
+ 11.46 35 239
# IntegratedBinaryPacking + IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 11.18 840 1456
+ 11.18 840 1456
# JustCopy
# bits per int, compress speed (mis), decompression speed (mis)
- 32.00 1248 1746
+ 32.00 1248 1746
# VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 13.14 135 312
+ 13.14 135 312
# IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 13.14 309 354
+ 13.14 309 354
# BinaryPacking + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 11.18 761 1097
+ 11.18 761 1097
# NewPFD + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 11.09 59 802
+ 11.09 59 802
# NewPFDS9 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 11.13 69 814
+ 11.13 69 814
# NewPFDS16 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 11.09 59 771
+ 11.09 59 771
# OptPFD + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 11.04 5 783
+ 11.04 5 783
# OptPFDS9 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 11.08 8 816
+ 11.08 8 816
# OptPFDS16 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 11.04 5 776
+ 11.04 5 776
# IntegratedFastPFOR + IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 10.78 265 934
+ 10.78 265 934
# Simple9
# bits per int, compress speed (mis), decompression speed (mis)
- 12.98 89 415
+ 12.98 89 415
# XorBinaryPacking + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 11.20 436 787
+ 11.20 436 787
# DeltaZigzagBinaryPacking + DeltaZigzagVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 12.02 483 620
+ 12.02 483 620
# sparsity 11
# generating random data...
# generating random data... ok.
# FastPFOR + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 11.79 232 950
+ 11.79 232 950
# kamikaze PForDelta
# bits per int, compress speed (mis), decompression speed (mis)
- 12.68 34 256
+ 12.68 34 256
# IntegratedBinaryPacking + IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 12.23 842 1450
+ 12.23 842 1450
# JustCopy
# bits per int, compress speed (mis), decompression speed (mis)
- 32.00 1292 1826
+ 32.00 1292 1826
# VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 14.00 127 324
+ 14.00 127 324
# IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 14.00 308 369
+ 14.00 308 369
# BinaryPacking + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 12.23 760 1092
+ 12.23 760 1092
# NewPFD + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 12.35 56 795
+ 12.35 56 795
# NewPFDS9 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 12.38 65 829
+ 12.38 65 829
# NewPFDS16 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 12.35 57 822
+ 12.35 57 822
# OptPFD + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 12.13 5 706
+ 12.13 5 706
# OptPFDS9 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 12.17 7 750
+ 12.17 7 750
# OptPFDS16 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 12.13 5 712
+ 12.13 5 712
# IntegratedFastPFOR + IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 11.83 261 919
+ 11.83 261 919
# Simple9
# bits per int, compress speed (mis), decompression speed (mis)
- 14.17 85 401
+ 14.17 85 401
# XorBinaryPacking + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 12.25 436 781
+ 12.25 436 781
# DeltaZigzagBinaryPacking + DeltaZigzagVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 13.08 489 623
+ 13.08 489 623
# sparsity 12
# generating random data...
# generating random data... ok.
# FastPFOR + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 12.70 226 932
+ 12.70 226 932
# kamikaze PForDelta
# bits per int, compress speed (mis), decompression speed (mis)
- 13.76 34 261
+ 13.76 34 261
# IntegratedBinaryPacking + IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 13.16 849 1453
+ 13.16 849 1453
# JustCopy
# bits per int, compress speed (mis), decompression speed (mis)
- 32.00 1208 1804
+ 32.00 1208 1804
# VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 14.84 117 307
+ 14.84 117 307
# IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 14.84 260 352
+ 14.84 260 352
# BinaryPacking + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 13.16 762 1095
+ 13.16 762 1095
# NewPFD + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 13.46 56 899
+ 13.46 56 899
# NewPFDS9 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 13.48 63 915
+ 13.48 63 915
# NewPFDS16 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 13.46 56 897
+ 13.46 56 897
# OptPFD + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 13.20 5 681
+ 13.20 5 681
# OptPFDS9 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 13.24 7 735
+ 13.24 7 735
# OptPFDS16 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 13.20 5 699
+ 13.20 5 699
# IntegratedFastPFOR + IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 12.75 260 914
+ 12.75 260 914
# Simple9
# bits per int, compress speed (mis), decompression speed (mis)
- 15.51 80 359
+ 15.51 80 359
# XorBinaryPacking + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 13.18 435 781
+ 13.18 435 781
# DeltaZigzagBinaryPacking + DeltaZigzagVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 14.00 489 626
+ 14.00 489 626
Results were written into a CSV file: benchmark-20140918T011257.csv
diff --git a/benchmarkresults/benchmarkresults_icore7_10may2013.txt b/benchmarkresults/benchmarkresults_icore7_10may2013.txt
index 5b776fb..d10579e 100644
--- a/benchmarkresults/benchmarkresults_icore7_10may2013.txt
+++ b/benchmarkresults/benchmarkresults_icore7_10may2013.txt
@@ -3,610 +3,610 @@
# generating random data... ok.
# kamikaze PForDelta
# bits per int, compress speed (mis), decompression speed (mis)
- 3.34 51 262
+ 3.34 51 262
# me.lemire.integercompression.IntegratedBinaryPacking+me.lemire.integercompression.IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 3.09 639 1183
+ 3.09 639 1183
# me.lemire.integercompression.JustCopy
# bits per int, compress speed (mis), decompression speed (mis)
- 32.00 1151 1468
+ 32.00 1151 1468
# me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.00 199 299
+ 8.00 199 299
# me.lemire.integercompression.IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.00 148 339
+ 8.00 148 339
# me.lemire.integercompression.BinaryPacking+me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 3.09 613 920
+ 3.09 613 920
# me.lemire.integercompression.NewPFD+me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 3.02 143 721
+ 3.02 143 721
# me.lemire.integercompression.NewPFDS9+me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 3.05 164 705
+ 3.05 164 705
# me.lemire.integercompression.OptPFD+me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 3.01 26 790
+ 3.01 26 790
# me.lemire.integercompression.OptPFDS9+me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 3.03 30 816
+ 3.03 30 816
# me.lemire.integercompression.FastPFOR+me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 2.78 226 811
+ 2.78 226 811
# me.lemire.integercompression.Simple9
# bits per int, compress speed (mis), decompression speed (mis)
- 2.97 236 604
+ 2.97 236 604
# sparsity 2
# generating random data...
# generating random data... ok.
# kamikaze PForDelta
# bits per int, compress speed (mis), decompression speed (mis)
- 4.17 47 266
+ 4.17 47 266
# me.lemire.integercompression.IntegratedBinaryPacking+me.lemire.integercompression.IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 3.92 672 1261
+ 3.92 672 1261
# me.lemire.integercompression.JustCopy
# bits per int, compress speed (mis), decompression speed (mis)
- 32.00 1218 1562
+ 32.00 1218 1562
# me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.00 204 290
+ 8.00 204 290
# me.lemire.integercompression.IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.00 236 343
+ 8.00 236 343
# me.lemire.integercompression.BinaryPacking+me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 3.92 505 917
+ 3.92 505 917
# me.lemire.integercompression.NewPFD+me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 3.82 127 698
+ 3.82 127 698
# me.lemire.integercompression.NewPFDS9+me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 3.85 151 726
+ 3.85 151 726
# me.lemire.integercompression.OptPFD+me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 3.81 18 752
+ 3.81 18 752
# me.lemire.integercompression.OptPFDS9+me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 3.84 23 779
+ 3.84 23 779
# me.lemire.integercompression.FastPFOR+me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 3.56 228 828
+ 3.56 228 828
# me.lemire.integercompression.Simple9
# bits per int, compress speed (mis), decompression speed (mis)
- 3.82 182 562
+ 3.82 182 562
# sparsity 3
# generating random data...
# generating random data... ok.
# kamikaze PForDelta
# bits per int, compress speed (mis), decompression speed (mis)
- 4.96 43 276
+ 4.96 43 276
# me.lemire.integercompression.IntegratedBinaryPacking+me.lemire.integercompression.IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 4.72 662 1187
+ 4.72 662 1187
# me.lemire.integercompression.JustCopy
# bits per int, compress speed (mis), decompression speed (mis)
- 32.00 1215 1566
+ 32.00 1215 1566
# me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.02 198 286
+ 8.02 198 286
# me.lemire.integercompression.IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.02 254 340
+ 8.02 254 340
# me.lemire.integercompression.BinaryPacking+me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 4.72 576 848
+ 4.72 576 848
# me.lemire.integercompression.NewPFD+me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 4.61 111 654
+ 4.61 111 654
# me.lemire.integercompression.NewPFDS9+me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 4.64 129 699
+ 4.64 129 699
# me.lemire.integercompression.OptPFD+me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 4.60 14 732
+ 4.60 14 732
# me.lemire.integercompression.OptPFDS9+me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 4.63 18 761
+ 4.63 18 761
# me.lemire.integercompression.FastPFOR+me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 4.36 226 813
+ 4.36 226 813
# me.lemire.integercompression.Simple9
# bits per int, compress speed (mis), decompression speed (mis)
- 4.76 148 511
+ 4.76 148 511
# sparsity 4
# generating random data...
# generating random data... ok.
# kamikaze PForDelta
# bits per int, compress speed (mis), decompression speed (mis)
- 5.97 39 270
+ 5.97 39 270
# me.lemire.integercompression.IntegratedBinaryPacking+me.lemire.integercompression.IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 5.72 656 1148
+ 5.72 656 1148
# me.lemire.integercompression.JustCopy
# bits per int, compress speed (mis), decompression speed (mis)
- 32.00 1212 1555
+ 32.00 1212 1555
# me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.09 206 287
+ 8.09 206 287
# me.lemire.integercompression.IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.09 213 334
+ 8.09 213 334
# me.lemire.integercompression.BinaryPacking+me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 5.72 626 891
+ 5.72 626 891
# me.lemire.integercompression.NewPFD+me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 5.60 105 672
+ 5.60 105 672
# me.lemire.integercompression.NewPFDS9+me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 5.63 121 701
+ 5.63 121 701
# me.lemire.integercompression.OptPFD+me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 5.58 10 667
+ 5.58 10 667
# me.lemire.integercompression.OptPFDS9+me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 5.62 14 736
+ 5.62 14 736
# me.lemire.integercompression.FastPFOR+me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 5.33 226 805
+ 5.33 226 805
# me.lemire.integercompression.Simple9
# bits per int, compress speed (mis), decompression speed (mis)
- 5.86 123 464
+ 5.86 123 464
# sparsity 5
# generating random data...
# generating random data... ok.
# kamikaze PForDelta
# bits per int, compress speed (mis), decompression speed (mis)
- 6.49 39 262
+ 6.49 39 262
# me.lemire.integercompression.IntegratedBinaryPacking+me.lemire.integercompression.IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 6.25 659 1121
+ 6.25 659 1121
# me.lemire.integercompression.JustCopy
# bits per int, compress speed (mis), decompression speed (mis)
- 32.00 1154 1168
+ 32.00 1154 1168
# me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.44 192 265
+ 8.44 192 265
# me.lemire.integercompression.IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.44 240 297
+ 8.44 240 297
# me.lemire.integercompression.BinaryPacking+me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 6.25 631 907
+ 6.25 631 907
# me.lemire.integercompression.NewPFD+me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 6.13 101 685
+ 6.13 101 685
# me.lemire.integercompression.NewPFDS9+me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 6.16 116 714
+ 6.16 116 714
# me.lemire.integercompression.OptPFD+me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 6.11 9 708
+ 6.11 9 708
# me.lemire.integercompression.OptPFDS9+me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 6.14 13 741
+ 6.14 13 741
# me.lemire.integercompression.FastPFOR+me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 5.86 225 806
+ 5.86 225 806
# me.lemire.integercompression.Simple9
# bits per int, compress speed (mis), decompression speed (mis)
- 6.44 120 442
+ 6.44 120 442
# sparsity 6
# generating random data...
# generating random data... ok.
# kamikaze PForDelta
# bits per int, compress speed (mis), decompression speed (mis)
- 7.64 35 269
+ 7.64 35 269
# me.lemire.integercompression.IntegratedBinaryPacking+me.lemire.integercompression.IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 7.39 654 1111
+ 7.39 654 1111
# me.lemire.integercompression.JustCopy
# bits per int, compress speed (mis), decompression speed (mis)
- 32.00 1207 1553
+ 32.00 1207 1553
# me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 9.06 185 225
+ 9.06 185 225
# me.lemire.integercompression.IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 9.06 166 248
+ 9.06 166 248
# me.lemire.integercompression.BinaryPacking+me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 7.39 620 888
+ 7.39 620 888
# me.lemire.integercompression.NewPFD+me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 7.26 91 679
+ 7.26 91 679
# me.lemire.integercompression.NewPFDS9+me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 7.30 104 704
+ 7.30 104 704
# me.lemire.integercompression.OptPFD+me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 7.24 7 704
+ 7.24 7 704
# me.lemire.integercompression.OptPFDS9+me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 7.28 10 735
+ 7.28 10 735
# me.lemire.integercompression.FastPFOR+me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 7.00 221 792
+ 7.00 221 792
# me.lemire.integercompression.Simple9
# bits per int, compress speed (mis), decompression speed (mis)
- 7.76 106 393
+ 7.76 106 393
# sparsity 7
# generating random data...
# generating random data... ok.
# kamikaze PForDelta
# bits per int, compress speed (mis), decompression speed (mis)
- 8.66 33 266
+ 8.66 33 266
# me.lemire.integercompression.IntegratedBinaryPacking+me.lemire.integercompression.IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.41 675 1165
+ 8.41 675 1165
# me.lemire.integercompression.JustCopy
# bits per int, compress speed (mis), decompression speed (mis)
- 32.00 1210 1553
+ 32.00 1210 1553
# me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 10.10 154 194
+ 10.10 154 194
# me.lemire.integercompression.IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 10.10 176 207
+ 10.10 176 207
# me.lemire.integercompression.BinaryPacking+me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.41 628 896
+ 8.41 628 896
# me.lemire.integercompression.NewPFD+me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.27 84 643
+ 8.27 84 643
# me.lemire.integercompression.NewPFDS9+me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.31 95 685
+ 8.31 95 685
# me.lemire.integercompression.OptPFD+me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.25 6 693
+ 8.25 6 693
# me.lemire.integercompression.OptPFDS9+me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.29 9 723
+ 8.29 9 723
# me.lemire.integercompression.FastPFOR+me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.00 215 773
+ 8.00 215 773
# me.lemire.integercompression.Simple9
# bits per int, compress speed (mis), decompression speed (mis)
- 9.10 94 357
+ 9.10 94 357
# sparsity 8
# generating random data...
# generating random data... ok.
# kamikaze PForDelta
# bits per int, compress speed (mis), decompression speed (mis)
- 9.52 32 241
+ 9.52 32 241
# me.lemire.integercompression.IntegratedBinaryPacking+me.lemire.integercompression.IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 9.26 692 1194
+ 9.26 692 1194
# me.lemire.integercompression.JustCopy
# bits per int, compress speed (mis), decompression speed (mis)
- 32.00 1208 1525
+ 32.00 1208 1525
# me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 11.14 138 178
+ 11.14 138 178
# me.lemire.integercompression.IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 11.14 187 190
+ 11.14 187 190
# me.lemire.integercompression.BinaryPacking+me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 9.26 647 893
+ 9.26 647 893
# me.lemire.integercompression.NewPFD+me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 9.14 79 655
+ 9.14 79 655
# me.lemire.integercompression.NewPFDS9+me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 9.18 88 684
+ 9.18 88 684
# me.lemire.integercompression.OptPFD+me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 9.11 6 680
+ 9.11 6 680
# me.lemire.integercompression.OptPFDS9+me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 9.15 8 712
+ 9.15 8 712
# me.lemire.integercompression.FastPFOR+me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.86 220 778
+ 8.86 220 778
# me.lemire.integercompression.Simple9
# bits per int, compress speed (mis), decompression speed (mis)
- 10.39 86 330
+ 10.39 86 330
# sparsity 9
# generating random data...
# generating random data... ok.
# kamikaze PForDelta
# bits per int, compress speed (mis), decompression speed (mis)
- 10.46 31 253
+ 10.46 31 253
# me.lemire.integercompression.IntegratedBinaryPacking+me.lemire.integercompression.IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 10.19 661 1122
+ 10.19 661 1122
# me.lemire.integercompression.JustCopy
# bits per int, compress speed (mis), decompression speed (mis)
- 32.00 1210 1546
+ 32.00 1210 1546
# me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 12.27 126 173
+ 12.27 126 173
# me.lemire.integercompression.IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 12.27 155 181
+ 12.27 155 181
# me.lemire.integercompression.BinaryPacking+me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 10.19 617 886
+ 10.19 617 886
# me.lemire.integercompression.NewPFD+me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 10.07 73 634
+ 10.07 73 634
# me.lemire.integercompression.NewPFDS9+me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 10.11 82 669
+ 10.11 82 669
# me.lemire.integercompression.OptPFD+me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 10.04 5 663
+ 10.04 5 663
# me.lemire.integercompression.OptPFDS9+me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 10.08 7 700
+ 10.08 7 700
# me.lemire.integercompression.FastPFOR+me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 9.79 215 757
+ 9.79 215 757
# me.lemire.integercompression.Simple9
# bits per int, compress speed (mis), decompression speed (mis)
- 11.79 78 325
+ 11.79 78 325
# sparsity 10
# generating random data...
# generating random data... ok.
# kamikaze PForDelta
# bits per int, compress speed (mis), decompression speed (mis)
- 11.13 30 243
+ 11.13 30 243
# me.lemire.integercompression.IntegratedBinaryPacking+me.lemire.integercompression.IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 10.83 628 1028
+ 10.83 628 1028
# me.lemire.integercompression.JustCopy
# bits per int, compress speed (mis), decompression speed (mis)
- 32.00 1167 1498
+ 32.00 1167 1498
# me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 12.71 152 179
+ 12.71 152 179
# me.lemire.integercompression.IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 12.71 151 187
+ 12.71 151 187
# me.lemire.integercompression.BinaryPacking+me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 10.83 389 820
+ 10.83 389 820
# me.lemire.integercompression.NewPFD+me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 10.76 72 638
+ 10.76 72 638
# me.lemire.integercompression.NewPFDS9+me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 10.79 79 683
+ 10.79 79 683
# me.lemire.integercompression.OptPFD+me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 10.69 5 655
+ 10.69 5 655
# me.lemire.integercompression.OptPFDS9+me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 10.73 7 682
+ 10.73 7 682
# me.lemire.integercompression.FastPFOR+me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 10.42 219 767
+ 10.42 219 767
# me.lemire.integercompression.Simple9
# bits per int, compress speed (mis), decompression speed (mis)
- 12.49 77 332
+ 12.49 77 332
# sparsity 11
# generating random data...
# generating random data... ok.
# kamikaze PForDelta
# bits per int, compress speed (mis), decompression speed (mis)
- 12.38 29 254
+ 12.38 29 254
# me.lemire.integercompression.IntegratedBinaryPacking+me.lemire.integercompression.IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 12.01 660 1112
+ 12.01 660 1112
# me.lemire.integercompression.JustCopy
# bits per int, compress speed (mis), decompression speed (mis)
- 32.00 1142 1445
+ 32.00 1142 1445
# me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 13.87 143 172
+ 13.87 143 172
# me.lemire.integercompression.IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 13.87 144 178
+ 13.87 144 178
# me.lemire.integercompression.BinaryPacking+me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 12.01 582 830
+ 12.01 582 830
# me.lemire.integercompression.NewPFD+me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 12.04 64 647
+ 12.04 64 647
# me.lemire.integercompression.NewPFDS9+me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 12.08 69 649
+ 12.08 69 649
# me.lemire.integercompression.OptPFD+me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 11.91 4 637
+ 11.91 4 637
# me.lemire.integercompression.OptPFDS9+me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 11.95 7 660
+ 11.95 7 660
# me.lemire.integercompression.FastPFOR+me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 11.61 217 766
+ 11.61 217 766
# me.lemire.integercompression.Simple9
# bits per int, compress speed (mis), decompression speed (mis)
- 13.96 73 313
+ 13.96 73 313
# sparsity 12
# generating random data...
# generating random data... ok.
# kamikaze PForDelta
# bits per int, compress speed (mis), decompression speed (mis)
- 13.57 29 265
+ 13.57 29 265
# me.lemire.integercompression.IntegratedBinaryPacking+me.lemire.integercompression.IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 13.01 611 1012
+ 13.01 611 1012
# me.lemire.integercompression.JustCopy
# bits per int, compress speed (mis), decompression speed (mis)
- 32.00 1215 1565
+ 32.00 1215 1565
# me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 14.73 121 160
+ 14.73 121 160
# me.lemire.integercompression.IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 14.73 131 166
+ 14.73 131 166
# me.lemire.integercompression.BinaryPacking+me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 13.01 603 832
+ 13.01 603 832
# me.lemire.integercompression.NewPFD+me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 13.26 68 737
+ 13.26 68 737
# me.lemire.integercompression.NewPFDS9+me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 13.29 72 761
+ 13.29 72 761
# me.lemire.integercompression.OptPFD+me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 13.06 4 591
+ 13.06 4 591
# me.lemire.integercompression.OptPFDS9+me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 13.10 6 625
+ 13.10 6 625
# me.lemire.integercompression.FastPFOR+me.lemire.integercompression.VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 12.61 213 755
+ 12.61 213 755
# me.lemire.integercompression.Simple9
# bits per int, compress speed (mis), decompression speed (mis)
- 15.38 69 281
+ 15.38 69 281
diff --git a/benchmarkresults/benchmarkresults_icore7_12november2013.txt b/benchmarkresults/benchmarkresults_icore7_12november2013.txt
index 07b11b3..795650e 100644
--- a/benchmarkresults/benchmarkresults_icore7_12november2013.txt
+++ b/benchmarkresults/benchmarkresults_icore7_12november2013.txt
@@ -10,9 +10,9 @@ Its dependencies (if any) will NOT be available to the current build.
[INFO] [enforcer:enforce {execution: enforce-maven}]
[INFO] [exec:java {execution: default-cli}]
# benchmark based on the ClusterData model from:
-# Vo Ngoc Anh and Alistair Moffat.
-# Index compression using 64-bit words.
-# Softw. Pract. Exper.40, 2 (February 2010), 131-147.
+# Vo Ngoc Anh and Alistair Moffat.
+# Index compression using 64-bit words.
+# Softw. Pract. Exper.40, 2 (February 2010), 131-147.
# Results will be written into a CSV file: benchmark-20131112T105209.csv
@@ -21,852 +21,852 @@ Its dependencies (if any) will NOT be available to the current build.
# generating random data... ok.
# kamikaze PForDelta
# bits per int, compress speed (mis), decompression speed (mis)
- 3.28 48 218
+ 3.28 48 218
# IntegratedBinaryPacking + IntegratedVariableByte (Integrated)
# bits per int, compress speed (mis), decompression speed (mis)
- 3.03 623 1205
+ 3.03 623 1205
# JustCopy
# bits per int, compress speed (mis), decompression speed (mis)
- 32.00 1154 1331
+ 32.00 1154 1331
# VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.00 508 554
+ 8.00 508 554
# IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.00 592 709
+ 8.00 592 709
# BinaryPacking + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 3.03 596 900
+ 3.03 596 900
# NewPFD + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 2.95 115 701
+ 2.95 115 701
# NewPFDS9 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 2.98 135 726
+ 2.98 135 726
# NewPFDS16 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 2.95 116 726
+ 2.95 116 726
# OptPFD + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 2.94 19 761
+ 2.94 19 761
# OptPFDS9 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 2.97 22 767
+ 2.97 22 767
# OptPFDS16 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 2.94 19 765
+ 2.94 19 765
# IntegratedFastPFOR + IntegratedVariableByte (Integrated)
# bits per int, compress speed (mis), decompression speed (mis)
- 2.71 219 797
+ 2.71 219 797
# FastPFOR + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 2.71 217 813
+ 2.71 217 813
# Simple9
# bits per int, compress speed (mis), decompression speed (mis)
- 2.90 254 599
+ 2.90 254 599
# XorBinaryPacking + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 2.92 375 669
+ 2.92 375 669
# DeltaZigzagBinaryPacking + DeltaZigzagVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 3.36 394 503
+ 3.36 394 503
# sparsity 2
# generating random data...
# generating random data... ok.
# kamikaze PForDelta
# bits per int, compress speed (mis), decompression speed (mis)
- 4.09 47 254
+ 4.09 47 254
# IntegratedBinaryPacking + IntegratedVariableByte (Integrated)
# bits per int, compress speed (mis), decompression speed (mis)
- 3.84 636 1160
+ 3.84 636 1160
# JustCopy
# bits per int, compress speed (mis), decompression speed (mis)
- 32.00 1152 1264
+ 32.00 1152 1264
# VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.01 510 551
+ 8.01 510 551
# IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.01 594 704
+ 8.01 594 704
# BinaryPacking + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 3.84 602 875
+ 3.84 602 875
# NewPFD + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 3.74 101 673
+ 3.74 101 673
# NewPFDS9 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 3.77 117 695
+ 3.77 117 695
# NewPFDS16 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 3.74 101 694
+ 3.74 101 694
# OptPFD + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 3.73 15 725
+ 3.73 15 725
# OptPFDS9 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 3.76 18 741
+ 3.76 18 741
# OptPFDS16 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 3.73 15 731
+ 3.73 15 731
# IntegratedFastPFOR + IntegratedVariableByte (Integrated)
# bits per int, compress speed (mis), decompression speed (mis)
- 3.48 215 782
+ 3.48 215 782
# FastPFOR + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 3.48 212 789
+ 3.48 212 789
# Simple9
# bits per int, compress speed (mis), decompression speed (mis)
- 3.72 190 530
+ 3.72 190 530
# XorBinaryPacking + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 3.76 375 657
+ 3.76 375 657
# DeltaZigzagBinaryPacking + DeltaZigzagVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 4.32 392 499
+ 4.32 392 499
# sparsity 3
# generating random data...
# generating random data... ok.
# kamikaze PForDelta
# bits per int, compress speed (mis), decompression speed (mis)
- 5.03 42 250
+ 5.03 42 250
# IntegratedBinaryPacking + IntegratedVariableByte (Integrated)
# bits per int, compress speed (mis), decompression speed (mis)
- 4.77 643 1141
+ 4.77 643 1141
# JustCopy
# bits per int, compress speed (mis), decompression speed (mis)
- 32.00 1149 1337
+ 32.00 1149 1337
# VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.02 506 547
+ 8.02 506 547
# IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.02 590 698
+ 8.02 590 698
# BinaryPacking + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 4.77 619 904
+ 4.77 619 904
# NewPFD + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 4.66 89 640
+ 4.66 89 640
# NewPFDS9 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 4.69 103 672
+ 4.69 103 672
# NewPFDS16 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 4.66 89 668
+ 4.66 89 668
# OptPFD + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 4.64 12 700
+ 4.64 12 700
# OptPFDS9 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 4.68 14 712
+ 4.68 14 712
# OptPFDS16 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 4.64 12 704
+ 4.64 12 704
# IntegratedFastPFOR + IntegratedVariableByte (Integrated)
# bits per int, compress speed (mis), decompression speed (mis)
- 4.39 212 762
+ 4.39 212 762
# FastPFOR + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 4.39 209 763
+ 4.39 209 763
# Simple9
# bits per int, compress speed (mis), decompression speed (mis)
- 4.81 146 480
+ 4.81 146 480
# XorBinaryPacking + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 4.75 373 646
+ 4.75 373 646
# DeltaZigzagBinaryPacking + DeltaZigzagVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 5.40 386 496
+ 5.40 386 496
# sparsity 4
# generating random data...
# generating random data... ok.
# kamikaze PForDelta
# bits per int, compress speed (mis), decompression speed (mis)
- 5.77 39 245
+ 5.77 39 245
# IntegratedBinaryPacking + IntegratedVariableByte (Integrated)
# bits per int, compress speed (mis), decompression speed (mis)
- 5.53 629 1095
+ 5.53 629 1095
# JustCopy
# bits per int, compress speed (mis), decompression speed (mis)
- 32.00 1148 1332
+ 32.00 1148 1332
# VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.11 482 522
+ 8.11 482 522
# IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.11 557 655
+ 8.11 557 655
# BinaryPacking + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 5.53 617 889
+ 5.53 617 889
# NewPFD + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 5.42 82 659
+ 5.42 82 659
# NewPFDS9 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 5.45 94 684
+ 5.45 94 684
# NewPFDS16 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 5.42 82 686
+ 5.42 82 686
# OptPFD + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 5.40 10 695
+ 5.40 10 695
# OptPFDS9 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 5.43 12 715
+ 5.43 12 715
# OptPFDS16 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 5.40 10 705
+ 5.40 10 705
# IntegratedFastPFOR + IntegratedVariableByte (Integrated)
# bits per int, compress speed (mis), decompression speed (mis)
- 5.16 214 776
+ 5.16 214 776
# FastPFOR + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 5.16 211 780
+ 5.16 211 780
# Simple9
# bits per int, compress speed (mis), decompression speed (mis)
- 5.66 128 457
+ 5.66 128 457
# XorBinaryPacking + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 5.53 370 645
+ 5.53 370 645
# DeltaZigzagBinaryPacking + DeltaZigzagVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 6.23 389 493
+ 6.23 389 493
# sparsity 5
# generating random data...
# generating random data... ok.
# kamikaze PForDelta
# bits per int, compress speed (mis), decompression speed (mis)
- 6.57 37 248
+ 6.57 37 248
# IntegratedBinaryPacking + IntegratedVariableByte (Integrated)
# bits per int, compress speed (mis), decompression speed (mis)
- 6.32 640 1113
+ 6.32 640 1113
# JustCopy
# bits per int, compress speed (mis), decompression speed (mis)
- 32.00 1150 1349
+ 32.00 1150 1349
# VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.41 416 456
+ 8.41 416 456
# IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.41 473 548
+ 8.41 473 548
# BinaryPacking + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 6.32 622 898
+ 6.32 622 898
# NewPFD + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 6.20 75 643
+ 6.20 75 643
# NewPFDS9 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 6.23 86 668
+ 6.23 86 668
# NewPFDS16 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 6.20 75 666
+ 6.20 75 666
# OptPFD + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 6.18 8 690
+ 6.18 8 690
# OptPFDS9 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 6.21 11 705
+ 6.21 11 705
# OptPFDS16 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 6.18 8 697
+ 6.18 8 697
# IntegratedFastPFOR + IntegratedVariableByte (Integrated)
# bits per int, compress speed (mis), decompression speed (mis)
- 5.93 211 741
+ 5.93 211 741
# FastPFOR + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 5.93 208 772
+ 5.93 208 772
# Simple9
# bits per int, compress speed (mis), decompression speed (mis)
- 6.51 118 426
+ 6.51 118 426
# XorBinaryPacking + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 6.32 374 639
+ 6.32 374 639
# DeltaZigzagBinaryPacking + DeltaZigzagVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 7.05 390 492
+ 7.05 390 492
# sparsity 6
# generating random data...
# generating random data... ok.
# kamikaze PForDelta
# bits per int, compress speed (mis), decompression speed (mis)
- 7.73 35 242
+ 7.73 35 242
# IntegratedBinaryPacking + IntegratedVariableByte (Integrated)
# bits per int, compress speed (mis), decompression speed (mis)
- 7.48 630 1071
+ 7.48 630 1071
# JustCopy
# bits per int, compress speed (mis), decompression speed (mis)
- 32.00 1143 1350
+ 32.00 1143 1350
# VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 9.04 328 365
+ 9.04 328 365
# IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 9.04 365 415
+ 9.04 365 415
# BinaryPacking + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 7.48 620 882
+ 7.48 620 882
# NewPFD + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 7.36 67 641
+ 7.36 67 641
# NewPFDS9 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 7.39 76 668
+ 7.39 76 668
# NewPFDS16 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 7.36 67 667
+ 7.36 67 667
# OptPFD + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 7.33 7 679
+ 7.33 7 679
# OptPFDS9 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 7.37 9 695
+ 7.37 9 695
# OptPFDS16 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 7.33 7 686
+ 7.33 7 686
# IntegratedFastPFOR + IntegratedVariableByte (Integrated)
# bits per int, compress speed (mis), decompression speed (mis)
- 7.09 211 749
+ 7.09 211 749
# FastPFOR + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 7.09 208 764
+ 7.09 208 764
# Simple9
# bits per int, compress speed (mis), decompression speed (mis)
- 7.88 101 383
+ 7.88 101 383
# XorBinaryPacking + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 7.49 372 630
+ 7.49 372 630
# DeltaZigzagBinaryPacking + DeltaZigzagVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.27 389 489
+ 8.27 389 489
# sparsity 7
# generating random data...
# generating random data... ok.
# kamikaze PForDelta
# bits per int, compress speed (mis), decompression speed (mis)
- 8.46 33 244
+ 8.46 33 244
# IntegratedBinaryPacking + IntegratedVariableByte (Integrated)
# bits per int, compress speed (mis), decompression speed (mis)
- 8.21 628 1052
+ 8.21 628 1052
# JustCopy
# bits per int, compress speed (mis), decompression speed (mis)
- 32.00 1148 1334
+ 32.00 1148 1334
# VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 10.01 257 290
+ 10.01 257 290
# IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 10.01 284 315
+ 10.01 284 315
# BinaryPacking + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.21 612 859
+ 8.21 612 859
# NewPFD + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.08 63 626
+ 8.08 63 626
# NewPFDS9 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.11 71 665
+ 8.11 71 665
# NewPFDS16 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.08 63 663
+ 8.08 63 663
# OptPFD + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.06 6 675
+ 8.06 6 675
# OptPFDS9 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.09 8 687
+ 8.09 8 687
# OptPFDS16 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.06 6 682
+ 8.06 6 682
# IntegratedFastPFOR + IntegratedVariableByte (Integrated)
# bits per int, compress speed (mis), decompression speed (mis)
- 7.81 210 756
+ 7.81 210 756
# FastPFOR + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 7.81 207 759
+ 7.81 207 759
# Simple9
# bits per int, compress speed (mis), decompression speed (mis)
- 8.85 92 353
+ 8.85 92 353
# XorBinaryPacking + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.22 369 622
+ 8.22 369 622
# DeltaZigzagBinaryPacking + DeltaZigzagVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 9.00 389 486
+ 9.00 389 486
# sparsity 8
# generating random data...
# generating random data... ok.
# kamikaze PForDelta
# bits per int, compress speed (mis), decompression speed (mis)
- 9.41 32 234
+ 9.41 32 234
# IntegratedBinaryPacking + IntegratedVariableByte (Integrated)
# bits per int, compress speed (mis), decompression speed (mis)
- 9.16 636 1062
+ 9.16 636 1062
# JustCopy
# bits per int, compress speed (mis), decompression speed (mis)
- 32.00 1151 1326
+ 32.00 1151 1326
# VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 11.08 231 269
+ 11.08 231 269
# IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 11.08 259 288
+ 11.08 259 288
# BinaryPacking + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 9.16 616 873
+ 9.16 616 873
# NewPFD + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 9.04 59 638
+ 9.04 59 638
# NewPFDS9 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 9.07 65 664
+ 9.07 65 664
# NewPFDS16 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 9.04 59 664
+ 9.04 59 664
# OptPFD + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 9.01 5 665
+ 9.01 5 665
# OptPFDS9 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 9.05 7 680
+ 9.05 7 680
# OptPFDS16 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 9.01 5 671
+ 9.01 5 671
# IntegratedFastPFOR + IntegratedVariableByte (Integrated)
# bits per int, compress speed (mis), decompression speed (mis)
- 8.77 209 746
+ 8.77 209 746
# FastPFOR + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.77 207 738
+ 8.77 207 738
# Simple9
# bits per int, compress speed (mis), decompression speed (mis)
- 10.25 81 324
+ 10.25 81 324
# XorBinaryPacking + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 9.18 372 625
+ 9.18 372 625
# DeltaZigzagBinaryPacking + DeltaZigzagVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 9.98 387 479
+ 9.98 387 479
# sparsity 9
# generating random data...
# generating random data... ok.
# kamikaze PForDelta
# bits per int, compress speed (mis), decompression speed (mis)
- 10.41 31 238
+ 10.41 31 238
# IntegratedBinaryPacking + IntegratedVariableByte (Integrated)
# bits per int, compress speed (mis), decompression speed (mis)
- 10.15 637 1070
+ 10.15 637 1070
# JustCopy
# bits per int, compress speed (mis), decompression speed (mis)
- 32.00 1145 1413
+ 32.00 1145 1413
# VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 12.15 221 267
+ 12.15 221 267
# IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 12.15 252 284
+ 12.15 252 284
# BinaryPacking + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 10.15 609 849
+ 10.15 609 849
# NewPFD + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 10.03 54 624
+ 10.03 54 624
# NewPFDS9 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 10.06 60 650
+ 10.06 60 650
# NewPFDS16 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 10.03 54 649
+ 10.03 54 649
# OptPFD + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 10.00 5 653
+ 10.00 5 653
# OptPFDS9 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 10.03 7 666
+ 10.03 7 666
# OptPFDS16 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 10.00 5 659
+ 10.00 5 659
# IntegratedFastPFOR + IntegratedVariableByte (Integrated)
# bits per int, compress speed (mis), decompression speed (mis)
- 9.75 207 739
+ 9.75 207 739
# FastPFOR + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 9.75 206 743
+ 9.75 206 743
# Simple9
# bits per int, compress speed (mis), decompression speed (mis)
- 11.72 73 313
+ 11.72 73 313
# XorBinaryPacking + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 10.17 369 611
+ 10.17 369 611
# DeltaZigzagBinaryPacking + DeltaZigzagVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 10.98 381 474
+ 10.98 381 474
# sparsity 10
# generating random data...
# generating random data... ok.
# kamikaze PForDelta
# bits per int, compress speed (mis), decompression speed (mis)
- 11.57 29 236
+ 11.57 29 236
# IntegratedBinaryPacking + IntegratedVariableByte (Integrated)
# bits per int, compress speed (mis), decompression speed (mis)
- 11.28 626 1033
+ 11.28 626 1033
# JustCopy
# bits per int, compress speed (mis), decompression speed (mis)
- 32.00 1141 1328
+ 32.00 1141 1328
# VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 13.18 219 276
+ 13.18 219 276
# IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 13.18 254 294
+ 13.18 254 294
# BinaryPacking + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 11.28 610 848
+ 11.28 610 848
# NewPFD + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 11.19 50 617
+ 11.19 50 617
# NewPFDS9 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 11.23 56 638
+ 11.23 56 638
# NewPFDS16 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 11.19 50 640
+ 11.19 50 640
# OptPFD + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 11.13 4 640
+ 11.13 4 640
# OptPFDS9 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 11.17 6 655
+ 11.17 6 655
# OptPFDS16 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 11.13 4 647
+ 11.13 4 647
# IntegratedFastPFOR + IntegratedVariableByte (Integrated)
# bits per int, compress speed (mis), decompression speed (mis)
- 10.87 207 736
+ 10.87 207 736
# FastPFOR + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 10.87 204 734
+ 10.87 204 734
# Simple9
# bits per int, compress speed (mis), decompression speed (mis)
- 13.19 68 311
+ 13.19 68 311
# XorBinaryPacking + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 11.30 369 612
+ 11.30 369 612
# DeltaZigzagBinaryPacking + DeltaZigzagVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 12.13 386 477
+ 12.13 386 477
# sparsity 11
# generating random data...
# generating random data... ok.
# kamikaze PForDelta
# bits per int, compress speed (mis), decompression speed (mis)
- 12.41 29 229
+ 12.41 29 229
# IntegratedBinaryPacking + IntegratedVariableByte (Integrated)
# bits per int, compress speed (mis), decompression speed (mis)
- 12.01 634 1046
+ 12.01 634 1046
# JustCopy
# bits per int, compress speed (mis), decompression speed (mis)
- 32.00 1148 1365
+ 32.00 1148 1365
# VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 13.84 208 261
+ 13.84 208 261
# IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 13.84 241 277
+ 13.84 241 277
# BinaryPacking + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 12.01 605 832
+ 12.01 605 832
# NewPFD + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 12.07 49 650
+ 12.07 49 650
# NewPFDS9 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 12.10 54 674
+ 12.10 54 674
# NewPFDS16 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 12.07 49 675
+ 12.07 49 675
# OptPFD + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 11.93 4 604
+ 11.93 4 604
# OptPFDS9 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 11.97 6 618
+ 11.97 6 618
# OptPFDS16 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 11.93 4 611
+ 11.93 4 611
# IntegratedFastPFOR + IntegratedVariableByte (Integrated)
# bits per int, compress speed (mis), decompression speed (mis)
- 11.60 206 724
+ 11.60 206 724
# FastPFOR + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 11.60 203 724
+ 11.60 203 724
# Simple9
# bits per int, compress speed (mis), decompression speed (mis)
- 13.98 66 291
+ 13.98 66 291
# XorBinaryPacking + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 12.04 367 603
+ 12.04 367 603
# DeltaZigzagBinaryPacking + DeltaZigzagVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 12.86 385 478
+ 12.86 385 478
# sparsity 12
# generating random data...
# generating random data... ok.
# kamikaze PForDelta
# bits per int, compress speed (mis), decompression speed (mis)
- 13.48 28 236
+ 13.48 28 236
# IntegratedBinaryPacking + IntegratedVariableByte (Integrated)
# bits per int, compress speed (mis), decompression speed (mis)
- 12.96 634 1051
+ 12.96 634 1051
# JustCopy
# bits per int, compress speed (mis), decompression speed (mis)
- 32.00 1150 1307
+ 32.00 1150 1307
# VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 14.69 202 258
+ 14.69 202 258
# IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 14.69 235 272
+ 14.69 235 272
# BinaryPacking + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 12.96 610 849
+ 12.96 610 849
# NewPFD + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 13.17 48 698
+ 13.17 48 698
# NewPFDS9 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 13.20 52 714
+ 13.20 52 714
# NewPFDS16 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 13.17 48 720
+ 13.17 48 720
# OptPFD + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 12.96 4 588
+ 12.96 4 588
# OptPFDS9 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 13.00 6 602
+ 13.00 6 602
# OptPFDS16 + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 12.96 4 597
+ 12.96 4 597
# IntegratedFastPFOR + IntegratedVariableByte (Integrated)
# bits per int, compress speed (mis), decompression speed (mis)
- 12.55 206 726
+ 12.55 206 726
# FastPFOR + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 12.55 203 725
+ 12.55 203 725
# Simple9
# bits per int, compress speed (mis), decompression speed (mis)
- 15.40 63 269
+ 15.40 63 269
# XorBinaryPacking + VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 12.99 368 613
+ 12.99 368 613
# DeltaZigzagBinaryPacking + DeltaZigzagVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 13.81 384 476
+ 13.81 384 476
Results were written into a CSV file: benchmark-20131112T105209.csv
diff --git a/benchmarkresults/benchmarkresults_skippable_haswell_18sept2014.txt b/benchmarkresults/benchmarkresults_skippable_haswell_18sept2014.txt
index 4159637..7e35696 100644
--- a/benchmarkresults/benchmarkresults_skippable_haswell_18sept2014.txt
+++ b/benchmarkresults/benchmarkresults_skippable_haswell_18sept2014.txt
@@ -1,7 +1,7 @@
# benchmark based on the ClusterData model from:
-# Vo Ngoc Anh and Alistair Moffat.
-# Index compression using 64-bit words.
-# Softw. Pract. Exper.40, 2 (February 2010), 131-147.
+# Vo Ngoc Anh and Alistair Moffat.
+# Index compression using 64-bit words.
+# Softw. Pract. Exper.40, 2 (February 2010), 131-147.
# Results will be written into a CSV file: benchmark-20140918T011322.csv
@@ -10,504 +10,504 @@
# generating random data... ok.
# IntegratedBinaryPacking + IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 3.04 840 1619
+ 3.04 840 1619
# JustCopy
# bits per int, compress speed (mis), decompression speed (mis)
- 32.00 1169 1698
+ 32.00 1169 1698
# VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.00 195 369
+ 8.00 195 369
# BinaryPacking+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 3.04 651 1148
+ 3.04 651 1148
# NewPFD+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 2.96 129 865
+ 2.96 129 865
# NewPFDS9+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 2.98 158 877
+ 2.98 158 877
# NewPFDS16+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 2.96 130 879
+ 2.96 130 879
# OptPFD+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 2.95 25 930
+ 2.95 25 930
# OptPFDS9+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 2.97 27 951
+ 2.97 27 951
# OptPFDS16+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 2.95 25 935
+ 2.95 25 935
# FastPFOR+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 2.82 235 928
+ 2.82 235 928
# Simple9
# bits per int, compress speed (mis), decompression speed (mis)
- 2.93 255 740
+ 2.93 255 740
# Simple16
# bits per int, compress speed (mis), decompression speed (mis)
- 2.77 147 395
+ 2.77 147 395
# sparsity 2
# generating random data...
# generating random data... ok.
# IntegratedBinaryPacking + IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 3.82 831 1555
+ 3.82 831 1555
# JustCopy
# bits per int, compress speed (mis), decompression speed (mis)
- 32.00 1183 1800
+ 32.00 1183 1800
# VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.00 220 372
+ 8.00 220 372
# BinaryPacking+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 3.82 659 1139
+ 3.82 659 1139
# NewPFD+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 3.72 116 855
+ 3.72 116 855
# NewPFDS9+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 3.75 136 851
+ 3.75 136 851
# NewPFDS16+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 3.72 115 853
+ 3.72 115 853
# OptPFD+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 3.71 19 895
+ 3.71 19 895
# OptPFDS9+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 3.74 22 917
+ 3.74 22 917
# OptPFDS16+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 3.71 19 900
+ 3.71 19 900
# FastPFOR+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 3.59 230 908
+ 3.59 230 908
# Simple9
# bits per int, compress speed (mis), decompression speed (mis)
- 3.74 195 654
+ 3.74 195 654
# Simple16
# bits per int, compress speed (mis), decompression speed (mis)
- 3.49 111 366
+ 3.49 111 366
# sparsity 3
# generating random data...
# generating random data... ok.
# IntegratedBinaryPacking + IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 4.78 817 1519
+ 4.78 817 1519
# JustCopy
# bits per int, compress speed (mis), decompression speed (mis)
- 32.00 1019 1759
+ 32.00 1019 1759
# VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.02 238 370
+ 8.02 238 370
# BinaryPacking+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 4.78 680 1121
+ 4.78 680 1121
# NewPFD+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 4.67 98 825
+ 4.67 98 825
# NewPFDS9+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 4.70 123 840
+ 4.70 123 840
# NewPFDS16+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 4.67 102 834
+ 4.67 102 834
# OptPFD+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 4.66 15 861
+ 4.66 15 861
# OptPFDS9+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 4.69 18 895
+ 4.69 18 895
# OptPFDS16+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 4.66 14 871
+ 4.66 14 871
# FastPFOR+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 4.54 231 904
+ 4.54 231 904
# Simple9
# bits per int, compress speed (mis), decompression speed (mis)
- 4.84 153 589
+ 4.84 153 589
# Simple16
# bits per int, compress speed (mis), decompression speed (mis)
- 4.40 83 339
+ 4.40 83 339
# sparsity 4
# generating random data...
# generating random data... ok.
# IntegratedBinaryPacking + IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 5.65 788 1505
+ 5.65 788 1505
# JustCopy
# bits per int, compress speed (mis), decompression speed (mis)
- 32.00 1142 1757
+ 32.00 1142 1757
# VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.09 242 363
+ 8.09 242 363
# BinaryPacking+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 5.65 636 1113
+ 5.65 636 1113
# NewPFD+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 5.52 92 828
+ 5.52 92 828
# NewPFDS9+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 5.56 112 826
+ 5.56 112 826
# NewPFDS16+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 5.52 94 826
+ 5.52 94 826
# OptPFD+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 5.51 12 854
+ 5.51 12 854
# OptPFDS9+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 5.54 15 883
+ 5.54 15 883
# OptPFDS16+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 5.51 12 858
+ 5.51 12 858
# FastPFOR+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 5.39 218 886
+ 5.39 218 886
# Simple9
# bits per int, compress speed (mis), decompression speed (mis)
- 5.80 136 566
+ 5.80 136 566
# Simple16
# bits per int, compress speed (mis), decompression speed (mis)
- 5.32 68 319
+ 5.32 68 319
# sparsity 5
# generating random data...
# generating random data... ok.
# IntegratedBinaryPacking + IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 6.31 804 1490
+ 6.31 804 1490
# JustCopy
# bits per int, compress speed (mis), decompression speed (mis)
- 32.00 1105 1860
+ 32.00 1105 1860
# VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.40 245 330
+ 8.40 245 330
# BinaryPacking+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 6.31 673 1121
+ 6.31 673 1121
# NewPFD+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 6.19 87 832
+ 6.19 87 832
# NewPFDS9+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 6.22 107 844
+ 6.22 107 844
# NewPFDS16+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 6.19 88 830
+ 6.19 88 830
# OptPFD+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 6.17 10 851
+ 6.17 10 851
# OptPFDS9+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 6.20 14 883
+ 6.20 14 883
# OptPFDS16+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 6.17 10 852
+ 6.17 10 852
# FastPFOR+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 6.07 217 875
+ 6.07 217 875
# Simple9
# bits per int, compress speed (mis), decompression speed (mis)
- 6.51 130 513
+ 6.51 130 513
# Simple16
# bits per int, compress speed (mis), decompression speed (mis)
- 6.13 60 307
+ 6.13 60 307
# sparsity 6
# generating random data...
# generating random data... ok.
# IntegratedBinaryPacking + IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 6.99 742 1431
+ 6.99 742 1431
# JustCopy
# bits per int, compress speed (mis), decompression speed (mis)
- 32.00 1163 1660
+ 32.00 1163 1660
# VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.99 205 290
+ 8.99 205 290
# BinaryPacking+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 6.99 637 1107
+ 6.99 637 1107
# NewPFD+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 6.87 82 821
+ 6.87 82 821
# NewPFDS9+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 6.90 100 830
+ 6.90 100 830
# NewPFDS16+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 6.87 82 818
+ 6.87 82 818
# OptPFD+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 6.85 9 834
+ 6.85 9 834
# OptPFDS9+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 6.88 12 865
+ 6.88 12 865
# OptPFDS16+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 6.85 9 836
+ 6.85 9 836
# FastPFOR+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 6.75 224 877
+ 6.75 224 877
# Simple9
# bits per int, compress speed (mis), decompression speed (mis)
- 7.33 118 485
+ 7.33 118 485
# Simple16
# bits per int, compress speed (mis), decompression speed (mis)
- 6.98 54 296
+ 6.98 54 296
# sparsity 7
# generating random data...
# generating random data... ok.
# IntegratedBinaryPacking + IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.31 770 1463
+ 8.31 770 1463
# JustCopy
# bits per int, compress speed (mis), decompression speed (mis)
- 32.00 1074 1832
+ 32.00 1074 1832
# VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 10.01 203 240
+ 10.01 203 240
# BinaryPacking+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.31 664 1105
+ 8.31 664 1105
# NewPFD+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.18 73 796
+ 8.18 73 796
# NewPFDS9+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.22 88 808
+ 8.22 88 808
# NewPFDS16+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.18 73 792
+ 8.18 73 792
# OptPFD+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.16 7 819
+ 8.16 7 819
# OptPFDS9+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.20 10 849
+ 8.20 10 849
# OptPFDS16+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.16 7 810
+ 8.16 7 810
# FastPFOR+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.05 217 851
+ 8.05 217 851
# Simple9
# bits per int, compress speed (mis), decompression speed (mis)
- 9.01 103 430
+ 9.01 103 430
# Simple16
# bits per int, compress speed (mis), decompression speed (mis)
- 8.61 47 277
+ 8.61 47 277
# sparsity 8
# generating random data...
# generating random data... ok.
# IntegratedBinaryPacking + IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.88 800 1414
+ 8.88 800 1414
# JustCopy
# bits per int, compress speed (mis), decompression speed (mis)
- 32.00 1078 1718
+ 32.00 1078 1718
# VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 10.91 211 227
+ 10.91 211 227
# BinaryPacking+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.88 671 1083
+ 8.88 671 1083
# NewPFD+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.76 70 804
+ 8.76 70 804
# NewPFDS9+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.80 84 814
+ 8.80 84 814
# NewPFDS16+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.76 70 800
+ 8.76 70 800
# OptPFD+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.73 7 807
+ 8.73 7 807
# OptPFDS9+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.77 9 792
+ 8.77 9 792
# OptPFDS16+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.73 7 801
+ 8.73 7 801
# FastPFOR+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 8.64 211 837
+ 8.64 211 837
# Simple9
# bits per int, compress speed (mis), decompression speed (mis)
- 9.94 96 417
+ 9.94 96 417
# Simple16
# bits per int, compress speed (mis), decompression speed (mis)
- 9.51 44 268
+ 9.51 44 268
# sparsity 9
# generating random data...
# generating random data... ok.
# IntegratedBinaryPacking + IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 10.19 834 1442
+ 10.19 834 1442
# JustCopy
# bits per int, compress speed (mis), decompression speed (mis)
- 32.00 1200 1632
+ 32.00 1200 1632
# VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 12.16 206 212
+ 12.16 206 212
# BinaryPacking+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 10.19 675 1092
+ 10.19 675 1092
# NewPFD+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 10.07 64 804
+ 10.07 64 804
# NewPFDS9+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 10.10 76 814
+ 10.10 76 814
# NewPFDS16+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 10.07 63 802
+ 10.07 63 802
# OptPFD+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 10.04 6 810
+ 10.04 6 810
# OptPFDS9+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 10.08 9 841
+ 10.08 9 841
# OptPFDS16+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 10.04 6 808
+ 10.04 6 808
# FastPFOR+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 9.94 222 858
+ 9.94 222 858
# Simple9
# bits per int, compress speed (mis), decompression speed (mis)
- 11.79 88 397
+ 11.79 88 397
# Simple16
# bits per int, compress speed (mis), decompression speed (mis)
- 11.40 38 253
+ 11.40 38 253
# sparsity 10
# generating random data...
# generating random data... ok.
# IntegratedBinaryPacking + IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 11.10 814 1406
+ 11.10 814 1406
# JustCopy
# bits per int, compress speed (mis), decompression speed (mis)
- 32.00 1215 1820
+ 32.00 1215 1820
# VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 13.07 207 208
+ 13.07 207 208
# BinaryPacking+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 11.10 681 1073
+ 11.10 681 1073
# NewPFD+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 11.00 60 800
+ 11.00 60 800
# NewPFDS9+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 11.04 72 809
+ 11.04 72 809
# NewPFDS16+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 11.00 60 796
+ 11.00 60 796
# OptPFD+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 10.95 6 785
+ 10.95 6 785
# OptPFDS9+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 10.99 8 815
+ 10.99 8 815
# OptPFDS16+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 10.95 6 782
+ 10.95 6 782
# FastPFOR+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 10.84 226 860
+ 10.84 226 860
# Simple9
# bits per int, compress speed (mis), decompression speed (mis)
- 12.93 84 389
+ 12.93 84 389
# Simple16
# bits per int, compress speed (mis), decompression speed (mis)
- 12.58 36 245
+ 12.58 36 245
# sparsity 11
# generating random data...
# generating random data... ok.
# IntegratedBinaryPacking + IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 12.31 814 1392
+ 12.31 814 1392
# JustCopy
# bits per int, compress speed (mis), decompression speed (mis)
- 32.00 1171 1846
+ 32.00 1171 1846
# VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 14.14 172 201
+ 14.14 172 201
# BinaryPacking+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 12.31 668 1071
+ 12.31 668 1071
# NewPFD+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 12.42 56 825
+ 12.42 56 825
# NewPFDS9+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 12.45 67 832
+ 12.45 67 832
# NewPFDS16+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 12.42 56 821
+ 12.42 56 821
# OptPFD+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 12.22 5 729
+ 12.22 5 729
# OptPFDS9+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 12.27 8 758
+ 12.27 8 758
# OptPFDS16+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 12.22 5 731
+ 12.22 5 731
# FastPFOR+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 12.07 222 836
+ 12.07 222 836
# Simple9
# bits per int, compress speed (mis), decompression speed (mis)
- 14.31 81 377
+ 14.31 81 377
# Simple16
# bits per int, compress speed (mis), decompression speed (mis)
- 14.05 33 238
+ 14.05 33 238
# sparsity 12
# generating random data...
# generating random data... ok.
# IntegratedBinaryPacking + IntegratedVariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 12.97 805 1375
+ 12.97 805 1375
# JustCopy
# bits per int, compress speed (mis), decompression speed (mis)
- 32.00 1160 1737
+ 32.00 1160 1737
# VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 14.72 186 193
+ 14.72 186 193
# BinaryPacking+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 12.97 656 1037
+ 12.97 656 1037
# NewPFD+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 13.22 56 886
+ 13.22 56 886
# NewPFDS9+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 13.24 67 891
+ 13.24 67 891
# NewPFDS16+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 13.22 56 883
+ 13.22 56 883
# OptPFD+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 12.98 5 704
+ 12.98 5 704
# OptPFDS9+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 13.02 8 740
+ 13.02 8 740
# OptPFDS16+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 12.98 5 704
+ 12.98 5 704
# FastPFOR+VariableByte
# bits per int, compress speed (mis), decompression speed (mis)
- 12.73 223 845
+ 12.73 223 845
# Simple9
# bits per int, compress speed (mis), decompression speed (mis)
- 15.35 78 347
+ 15.35 78 347
# Simple16
# bits per int, compress speed (mis), decompression speed (mis)
- 15.15 31 225
+ 15.15 31 225
Results were written into a CSV file: benchmark-20140918T011322.csv
diff --git a/pom.xml b/pom.xml
index 3db7c2f..5240577 100644
--- a/pom.xml
+++ b/pom.xml
@@ -2,11 +2,11 @@
4.0.0
me.lemire.integercompression
JavaFastPFOR
- 0.2.0
+ 0.2.2-SNAPSHOT
jar
- 1.7
- 1.7
+ 1.8
+ 1.8
UTF-8
@@ -138,7 +138,7 @@
org.apache.maven.plugins
maven-javadoc-plugin
- 3.4.1
+ 3.6.3
me.lemire.integercompression.vector;com.kamikaze.pfordelta:me.lemire.integercompression.benchmarktools
@@ -190,6 +190,47 @@
3.2.1
+
+
+
+
+ maven-clean-plugin
+ 2.5
+
+
+ maven-deploy-plugin
+ 2.8.1
+
+
+ maven-install-plugin
+ 2.5.1
+
+
+ maven-jar-plugin
+ 2.4
+
+
+ maven-javadoc-plugin
+ 2.9.1
+
+
+ maven-resources-plugin
+ 2.6
+
+
+ maven-site-plugin
+ 3.3
+
+
+ maven-source-plugin
+ 2.2.1
+
+
+ maven-surefire-plugin
+ 2.17
+
+
+
JavaFastPFOR
https://github.com/lemire/JavaFastPFOR/
diff --git a/src/main/java/me/lemire/integercompression/GroupSimple9.java b/src/main/java/me/lemire/integercompression/GroupSimple9.java
index 0ce10ce..a294080 100644
--- a/src/main/java/me/lemire/integercompression/GroupSimple9.java
+++ b/src/main/java/me/lemire/integercompression/GroupSimple9.java
@@ -13,3540 +13,3540 @@
public final class GroupSimple9 implements IntegerCODEC, SkippableIntegerCODEC {
- private static final int[][] M = { { 0, 1, 2, 3, 4, 5, 6, 7, 8 }, { 9, 10, 11, 12, 13, 14, 15, 16, 17 },
- { 18, 19, 20, 21, 22, 23, 24, 25, 26 }, { 27, 28, 29, 30, 31, 32, 33, 34, 35 },
- { 36, 37, 38, 39, 40, 41, 42, 43, 44 }, { 45, 46, 47, 48, 49, 50, 51, 52, 53 },
- { 54, 55, 56, 57, 58, 59, 60, 61, 62 }, { 63, 64, 65, 66, 67, 68, 69, 70, 71 },
- { 72, 73, 74, 75, 76, 77, 78, 79, 80 } };
-
- @Override
- public void compress(int[] in, IntWrapper inpos, int inlength, int out[], IntWrapper outpos) {
- if (inlength == 0)
- return;
- out[outpos.get()] = inlength;
- outpos.increment();
- headlessCompress(in, inpos, inlength, out, outpos);
- }
-
- private void encode0(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- for (int i = 0; i < 24; i++)
- out[outf + 0] = (out[outf + 0] << 1) + (in[inf + i]);
- for (int i = 0; i < 4; i++)
- out[outf + 1] = (out[outf + 1] << 1) + in[inf + 24 + i];
- for (int i = 0; i < 28; i++)
- out[outf + 1] = (out[outf + 1] << 1) + in[inf + 28 + i];
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode1(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- for (int i = 0; i < 24; i++)
- out[outf + 0] = (out[outf + 0] << 1) + in[inf + i];
- for (int i = 0; i < 4; i++)
- out[outf + 1] = (out[outf + 1] << 1) + in[inf + 24 + i];
- for (int i = 0; i < 14; i++)
- out[outf + 1] = (out[outf + 1] << 2) + in[inf + 28 + i];
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode2(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- for (int i = 0; i < 24; i++)
- out[outf + 0] = (out[outf + 0] << 1) + in[inf + i];
- for (int i = 0; i < 4; i++)
- out[outf + 1] = (out[outf + 1] << 1) + in[inf + 24 + i];
- for (int i = 0; i < 9; i++)
- out[outf + 1] = (out[outf + 1] << 3) + in[inf + 28 + i];// 第二个28位是低位存储的,所以浪费的1比特在最顶端。
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode3(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- for (int i = 0; i < 24; i++)
- out[outf + 0] = (out[outf + 0] << 1) + in[inf + i];
- for (int i = 0; i < 4; i++)
- out[outf + 1] = (out[outf + 1] << 1) + in[inf + 24 + i];
- for (int i = 0; i < 7; i++)
- out[outf + 1] = (out[outf + 1] << 4) + in[inf + 28 + i];
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode4(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- for (int i = 0; i < 24; i++)
- out[outf + 0] = (out[outf + 0] << 1) + in[inf + i];
- for (int i = 0; i < 4; i++)
- out[outf + 1] = (out[outf + 1] << 1) + in[inf + 24 + i];
- for (int i = 0; i < 5; i++)
- out[outf + 1] = (out[outf + 1] << 5) + in[inf + 28 + i];
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode5(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- for (int i = 0; i < 24; i++)
- out[outf + 0] = (out[outf + 0] << 1) + in[inf + i];
- for (int i = 0; i < 4; i++)
- out[outf + 1] = (out[outf + 1] << 1) + in[inf + 24 + i];
- for (int i = 0; i < 4; i++)
- out[outf + 1] = (out[outf + 1] << 7) + in[inf + 28 + i];
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode6(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- for (int i = 0; i < 24; i++)
- out[outf + 0] = (out[outf + 0] << 1) + in[inf + i];
- for (int i = 0; i < 4; i++)
- out[outf + 1] = (out[outf + 1] << 1) + in[inf + 24 + i];
- for (int i = 0; i < 3; i++)
- out[outf + 1] = (out[outf + 1] << 9) + in[inf + 28 + i];
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode7(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- for (int i = 0; i < 24; i++)
- out[outf + 0] = (out[outf + 0] << 1) + in[inf + i];
- for (int i = 0; i < 4; i++)
- out[outf + 1] = (out[outf + 1] << 1) + in[inf + 24 + i];
- for (int i = 0; i < 2; i++)
- out[outf + 1] = (out[outf + 1] << 14) + in[inf + 28 + i];
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode8(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- for (int i = 0; i < 24; i++)
- out[outf + 0] = (out[outf + 0] << 1) + in[inf + i];
- for (int i = 0; i < 4; i++)
- out[outf + 1] = (out[outf + 1] << 1) + in[inf + 24 + i];
- for (int i = 0; i < 1; i++)
- out[outf + 1] = (out[outf + 1] << 28) + in[inf + 28 + i];
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode9(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- for (int i = 0; i < 12; i++)
- out[outf + 0] = (out[outf + 0] << 2) + in[inf + i];
- for (int i = 0; i < 2; i++)
- out[outf + 1] = (out[outf + 1] << 2) + in[inf + 12 + i];
- for (int i = 0; i < 28; i++)
- out[outf + 1] = (out[outf + 1] << 1) + in[inf + 14 + i];
-
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode10(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- for (int i = 0; i < 12; i++) {
- out[outf + 0] = (out[outf + 0] << 2) + in[inf + i];
-
- }
- for (int i = 0; i < 2; i++)
- out[outf + 1] = (out[outf + 1] << 2) + in[inf + 12 + i];
- for (int i = 0; i < 14; i++)
- out[outf + 1] = (out[outf + 1] << 2) + in[inf + 14 + i];
-
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode11(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- for (int i = 0; i < 12; i++)
- out[outf + 0] = (out[outf + 0] << 2) + in[inf + i];
- for (int i = 0; i < 2; i++)
- out[outf + 1] = (out[outf + 1] << 2) + in[inf + 12 + i];
- for (int i = 0; i < 9; i++)
- out[outf + 1] = (out[outf + 1] << 3) + in[inf + 14 + i];
-
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode12(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- for (int i = 0; i < 12; i++)
- out[outf + 0] = (out[outf + 0] << 2) + in[inf + i];
- for (int i = 0; i < 2; i++)
- out[outf + 1] = (out[outf + 1] << 2) + in[inf + 12 + i];
- for (int i = 0; i < 7; i++)
- out[outf + 1] = (out[outf + 1] << 4) + in[inf + 14 + i];
-
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode13(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- for (int i = 0; i < 12; i++)
- out[outf + 0] = (out[outf + 0] << 2) + in[inf + i];
- for (int i = 0; i < 2; i++)
- out[outf + 1] = (out[outf + 1] << 2) + in[inf + 12 + i];
- for (int i = 0; i < 5; i++)
- out[outf + 1] = (out[outf + 1] << 5) + in[inf + 14 + i];
-
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode14(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- for (int i = 0; i < 12; i++)
- out[outf + 0] = (out[outf + 0] << 2) + in[inf + i];
- for (int i = 0; i < 2; i++)
- out[outf + 1] = (out[outf + 1] << 2) + in[inf + 12 + i];
- for (int i = 0; i < 4; i++)
- out[outf + 1] = (out[outf + 1] << 7) + in[inf + 14 + i];
-
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode15(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- for (int i = 0; i < 12; i++)
- out[outf + 0] = (out[outf + 0] << 2) + in[inf + i];
- for (int i = 0; i < 2; i++)
- out[outf + 1] = (out[outf + 1] << 2) + in[inf + 12 + i];
- for (int i = 0; i < 3; i++)
- out[outf + 1] = (out[outf + 1] << 9) + in[inf + 14 + i];
-
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode16(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- for (int i = 0; i < 12; i++)
- out[outf + 0] = (out[outf + 0] << 2) + in[inf + i];
- for (int i = 0; i < 2; i++)
- out[outf + 1] = (out[outf + 1] << 2) + in[inf + 12 + i];
- for (int i = 0; i < 2; i++)
- out[outf + 1] = (out[outf + 1] << 14) + in[inf + 14 + i];
-
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode17(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- for (int i = 0; i < 12; i++)
- out[outf + 0] = (out[outf + 0] << 2) + in[inf + i];
- for (int i = 0; i < 2; i++)
- out[outf + 1] = (out[outf + 1] << 2) + in[inf + 12 + i];
- for (int i = 0; i < 1; i++)
- out[outf + 1] = (out[outf + 1] << 28) + in[inf + 14 + i];
-
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode18(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- for (int i = 0; i < 8; i++)
- out[outf + 0] = (out[outf + 0] << 3) + in[inf + i];
- for (int i = 0; i < 1; i++)
- out[outf + 1] = (out[outf + 1] << 3) + in[inf + 8 + i];
- for (int i = 0; i < 28; i++)
- out[outf + 1] = (out[outf + 1] << 1) + in[inf + 9 + i];
-
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode19(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- for (int i = 0; i < 8; i++)
- out[outf + 0] = (out[outf + 0] << 3) + in[inf + i];
- for (int i = 0; i < 1; i++)
- out[outf + 1] = (out[outf + 1] << 3) + in[inf + 8 + i];
- for (int i = 0; i < 14; i++)
- out[outf + 1] = (out[outf + 1] << 2) + in[inf + 9 + i];
-
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode20(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- for (int i = 0; i < 8; i++)
- out[outf + 0] = (out[outf + 0] << 3) + in[inf + i];
- for (int i = 0; i < 1; i++)
- out[outf + 1] = (out[outf + 1] << 3) + in[inf + 8 + i];
- for (int i = 0; i < 9; i++)
- out[outf + 1] = (out[outf + 1] << 3) + in[inf + 9 + i];
-
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode21(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- for (int i = 0; i < 8; i++)
- out[outf + 0] = (out[outf + 0] << 3) + in[inf + i];
- for (int i = 0; i < 1; i++)
- out[outf + 1] = (out[outf + 1] << 3) + in[inf + 8 + i];
- for (int i = 0; i < 7; i++)
- out[outf + 1] = (out[outf + 1] << 4) + in[inf + 9 + i];
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode22(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- for (int i = 0; i < 8; i++)
- out[outf + 0] = (out[outf + 0] << 3) + in[inf + i];
- for (int i = 0; i < 1; i++)
- out[outf + 1] = (out[outf + 1] << 3) + in[inf + 8 + i];
- for (int i = 0; i < 5; i++)
- out[outf + 1] = (out[outf + 1] << 5) + in[inf + 9 + i];
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode23(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- for (int i = 0; i < 8; i++)
- out[outf + 0] = (out[outf + 0] << 3) + in[inf + i];
- for (int i = 0; i < 1; i++)
- out[outf + 1] = (out[outf + 1] << 3) + in[inf + 8 + i];
- for (int i = 0; i < 4; i++)
- out[outf + 1] = (out[outf + 1] << 7) + in[inf + 9 + i];
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode24(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- for (int i = 0; i < 8; i++)
- out[outf + 0] = (out[outf + 0] << 3) + in[inf + i];
- for (int i = 0; i < 1; i++)
- out[outf + 1] = (out[outf + 1] << 3) + in[inf + 8 + i];
- for (int i = 0; i < 3; i++)
- out[outf + 1] = (out[outf + 1] << 9) + in[inf + 9 + i];
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode25(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- for (int i = 0; i < 8; i++)
- out[outf + 0] = (out[outf + 0] << 3) + in[inf + i];
- for (int i = 0; i < 1; i++)
- out[outf + 1] = (out[outf + 1] << 3) + in[inf + 8 + i];
- for (int i = 0; i < 2; i++)
- out[outf + 1] = (out[outf + 1] << 14) + in[inf + 9 + i];
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode26(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- for (int i = 0; i < 8; i++)
- out[outf + 0] = (out[outf + 0] << 3) + in[inf + i];
- for (int i = 0; i < 1; i++)
- out[outf + 1] = (out[outf + 1] << 3) + in[inf + 8 + i];
- for (int i = 0; i < 1; i++)
- out[outf + 1] = (out[outf + 1] << 28) + in[inf + 9 + i];
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode27(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- for (int i = 0; i < 6; i++)
- out[outf + 0] = (out[outf + 0] << 4) + in[inf + i];
- for (int i = 0; i < 1; i++)
- out[outf + 1] = (out[outf + 1] << 4) + in[inf + 6 + i];
- for (int i = 0; i < 28; i++)
- out[outf + 1] = (out[outf + 1] << 1) + in[inf + 7 + i];
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode28(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- for (int i = 0; i < 6; i++)
- out[outf + 0] = (out[outf + 0] << 4) + in[inf + i];
- for (int i = 0; i < 1; i++)
- out[outf + 1] = (out[outf + 1] << 4) + in[inf + 6 + i];
- for (int i = 0; i < 14; i++)
- out[outf + 1] = (out[outf + 1] << 2) + in[inf + 7 + i];
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode29(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- for (int i = 0; i < 6; i++)
- out[outf + 0] = (out[outf + 0] << 4) + in[inf + i];
- for (int i = 0; i < 1; i++)
- out[outf + 1] = (out[outf + 1] << 4) + in[inf + 6 + i];
- for (int i = 0; i < 9; i++)
- out[outf + 1] = (out[outf + 1] << 3) + in[inf + 7 + i];
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode30(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- for (int i = 0; i < 6; i++)
- out[outf + 0] = (out[outf + 0] << 4) + in[inf + i];
- for (int i = 0; i < 1; i++)
- out[outf + 1] = (out[outf + 1] << 4) + in[inf + 6 + i];
- for (int i = 0; i < 7; i++)
- out[outf + 1] = (out[outf + 1] << 4) + in[inf + 7 + i];
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode31(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- for (int i = 0; i < 6; i++)
- out[outf + 0] = (out[outf + 0] << 4) + in[inf + i];
- for (int i = 0; i < 1; i++)
- out[outf + 1] = (out[outf + 1] << 4) + in[inf + 6 + i];
- for (int i = 0; i < 5; i++)
- out[outf + 1] = (out[outf + 1] << 5) + in[inf + 7 + i];
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode32(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- for (int i = 0; i < 6; i++)
- out[outf + 0] = (out[outf + 0] << 4) + in[inf + i];
- for (int i = 0; i < 1; i++)
- out[outf + 1] = (out[outf + 1] << 4) + in[inf + 6 + i];
- for (int i = 0; i < 4; i++)
- out[outf + 1] = (out[outf + 1] << 7) + in[inf + 7 + i];
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode33(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- for (int i = 0; i < 6; i++)
- out[outf + 0] = (out[outf + 0] << 4) + in[inf + i];
- for (int i = 0; i < 1; i++)
- out[outf + 1] = (out[outf + 1] << 4) + in[inf + 6 + i];
- for (int i = 0; i < 3; i++)
- out[outf + 1] = (out[outf + 1] << 9) + in[inf + 7 + i];
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode34(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- for (int i = 0; i < 6; i++)
- out[outf + 0] = (out[outf + 0] << 4) + in[inf + i];
- for (int i = 0; i < 1; i++)
- out[outf + 1] = (out[outf + 1] << 4) + in[inf + 6 + i];
- for (int i = 0; i < 2; i++)
- out[outf + 1] = (out[outf + 1] << 14) + in[inf + 7 + i];
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode35(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- for (int i = 0; i < 6; i++)
- out[outf + 0] = (out[outf + 0] << 4) + in[inf + i];
- for (int i = 0; i < 1; i++)
- out[outf + 1] = (out[outf + 1] << 4) + in[inf + 6 + i];
- for (int i = 0; i < 1; i++)
- out[outf + 1] = (out[outf + 1] << 28) + in[inf + 7 + i];
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode36(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- for (int i = 0; i < 4; i++)
- out[outf + 0] = (out[outf + 0] << 5) + in[inf + i];
- out[outf + 0] = (out[outf + 0] << 4) + (in[inf + 4] >>> 1);
- out[outf + 1] = (out[outf + 1] << 1) + ((in[inf + 4] << 31) >>> 31);
- for (int i = 0; i < 28; i++)
- out[outf + 1] = (out[outf + 1] << 1) + in[inf + 5 + i];
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode37(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- for (int i = 0; i < 4; i++)
- out[outf + 0] = (out[outf + 0] << 5) + in[inf + i];
- out[outf + 0] = (out[outf + 0] << 4) + (in[inf + 4] >>> 1);
- out[outf + 1] = (out[outf + 1] << 1) + ((in[inf + 4] << 31) >>> 31);
- for (int i = 0; i < 14; i++)
- out[outf + 1] = (out[outf + 1] << 2) + in[inf + 5 + i];
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode38(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- for (int i = 0; i < 4; i++)
- out[outf + 0] = (out[outf + 0] << 5) + in[inf + i];
- out[outf + 0] = (out[outf + 0] << 4) + (in[inf + 4] >>> 1);
- out[outf + 1] = (out[outf + 1] << 1) + ((in[inf + 4] << 31) >>> 31);
- for (int i = 0; i < 9; i++)
- out[outf + 1] = (out[outf + 1] << 3) + in[inf + 5 + i];
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode39(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- for (int i = 0; i < 4; i++)
- out[outf + 0] = (out[outf + 0] << 5) + in[inf + i];
- out[outf + 0] = (out[outf + 0] << 4) + (in[inf + 4] >>> 1);
- out[outf + 1] = (out[outf + 1] << 1) + ((in[inf + 4] << 31) >>> 31);
- for (int i = 0; i < 7; i++)
- out[outf + 1] = (out[outf + 1] << 4) + in[inf + 5 + i];
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode40(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- for (int i = 0; i < 4; i++)
- out[outf + 0] = (out[outf + 0] << 5) + in[inf + i];
- out[outf + 0] = (out[outf + 0] << 4) + (in[inf + 4] >>> 1);
- out[outf + 1] = (out[outf + 1] << 1) + ((in[inf + 4] << 31) >>> 31);
- for (int i = 0; i < 5; i++)
- out[outf + 1] = (out[outf + 1] << 5) + in[inf + 5 + i];
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode41(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- for (int i = 0; i < 4; i++)
- out[outf + 0] = (out[outf + 0] << 5) + in[inf + i];
- out[outf + 0] = (out[outf + 0] << 4) + (in[inf + 4] >>> 1);
- out[outf + 1] = (out[outf + 1] << 1) + ((in[inf + 4] << 31) >>> 31);
- for (int i = 0; i < 4; i++)
- out[outf + 1] = (out[outf + 1] << 7) + in[inf + 5 + i];
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode42(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- for (int i = 0; i < 4; i++)
- out[outf + 0] = (out[outf + 0] << 5) + in[inf + i];
- out[outf + 0] = (out[outf + 0] << 4) + (in[inf + 4] >>> 1);
- out[outf + 1] = (out[outf + 1] << 1) + ((in[inf + 4] << 31) >>> 31);
- for (int i = 0; i < 3; i++)
- out[outf + 1] = (out[outf + 1] << 9) + in[inf + 5 + i];
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode43(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- for (int i = 0; i < 4; i++)
- out[outf + 0] = (out[outf + 0] << 5) + in[inf + i];
- out[outf + 0] = (out[outf + 0] << 4) + (in[inf + 4] >>> 1);
- out[outf + 1] = (out[outf + 1] << 1) + ((in[inf + 4] << 31) >>> 31);
- for (int i = 0; i < 2; i++)
- out[outf + 1] = (out[outf + 1] << 14) + in[inf + 5 + i];
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode44(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- for (int i = 0; i < 4; i++)
- out[outf + 0] = (out[outf + 0] << 5) + in[inf + i];
- out[outf + 0] = (out[outf + 0] << 4) + (in[inf + 4] >>> 1);
- out[outf + 1] = (out[outf + 1] << 1) + ((in[inf + 4] << 31) >>> 31);
- for (int i = 0; i < 1; i++)
- out[outf + 1] = (out[outf + 1] << 28) + in[inf + 5 + i];
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode45(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- for (int i = 0; i < 3; i++)
- out[outf + 0] = (out[outf + 0] << 7) + in[inf + i];
- out[outf + 0] = (out[outf + 0] << 3) + (in[inf + 3] >>> 4);
- out[outf + 1] = (out[outf + 1] << 4) + ((in[inf + 3] << 28) >>> 28);
- for (int i = 0; i < 28; i++)
- out[outf + 1] = (out[outf + 1] << 1) + in[inf + 4 + i];
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode46(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- for (int i = 0; i < 3; i++)
- out[outf + 0] = (out[outf + 0] << 7) + in[inf + i];
- out[outf + 0] = (out[outf + 0] << 3) + (in[inf + 3] >>> 4);
- out[outf + 1] = (out[outf + 1] << 4) + ((in[inf + 3] << 28) >>> 28);
- for (int i = 0; i < 14; i++)
- out[outf + 1] = (out[outf + 1] << 2) + in[inf + 4 + i];
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode47(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- for (int i = 0; i < 3; i++)
- out[outf + 0] = (out[outf + 0] << 7) + in[inf + i];
- out[outf + 0] = (out[outf + 0] << 3) + (in[inf + 3] >>> 4);
- out[outf + 1] = (out[outf + 1] << 4) + ((in[inf + 3] << 28) >>> 28);
- for (int i = 0; i < 9; i++)
- out[outf + 1] = (out[outf + 1] << 3) + in[inf + 4 + i];
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode48(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- for (int i = 0; i < 3; i++)
- out[outf + 0] = (out[outf + 0] << 7) + in[inf + i];
- out[outf + 0] = (out[outf + 0] << 3) + (in[inf + 3] >>> 4);
- out[outf + 1] = (out[outf + 1] << 4) + ((in[inf + 3] << 28) >>> 28);
- for (int i = 0; i < 7; i++)
- out[outf + 1] = (out[outf + 1] << 4) + in[inf + 4 + i];
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode49(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- for (int i = 0; i < 3; i++)
- out[outf + 0] = (out[outf + 0] << 7) + in[inf + i];
- out[outf + 0] = (out[outf + 0] << 3) + (in[inf + 3] >>> 4);
- out[outf + 1] = (out[outf + 1] << 4) + ((in[inf + 3] << 28) >>> 28);
- for (int i = 0; i < 5; i++)
- out[outf + 1] = (out[outf + 1] << 5) + in[inf + 4 + i];
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode50(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- for (int i = 0; i < 3; i++)
- out[outf + 0] = (out[outf + 0] << 7) + in[inf + i];
- out[outf + 0] = (out[outf + 0] << 3) + (in[inf + 3] >>> 4);
- out[outf + 1] = (out[outf + 1] << 4) + ((in[inf + 3] << 28) >>> 28);
- for (int i = 0; i < 4; i++)
- out[outf + 1] = (out[outf + 1] << 7) + in[inf + 4 + i];
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode51(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- for (int i = 0; i < 3; i++)
- out[outf + 0] = (out[outf + 0] << 7) + in[inf + i];
- out[outf + 0] = (out[outf + 0] << 3) + (in[inf + 3] >>> 4);
- out[outf + 1] = (out[outf + 1] << 4) + ((in[inf + 3] << 28) >>> 28);
- for (int i = 0; i < 3; i++)
- out[outf + 1] = (out[outf + 1] << 9) + in[inf + 4 + i];
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode52(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- for (int i = 0; i < 3; i++)
- out[outf + 0] = (out[outf + 0] << 7) + in[inf + i];
- out[outf + 0] = (out[outf + 0] << 3) + (in[inf + 3] >>> 4);
- out[outf + 1] = (out[outf + 1] << 4) + ((in[inf + 3] << 28) >>> 28);
- for (int i = 0; i < 2; i++)
- out[outf + 1] = (out[outf + 1] << 14) + in[inf + 4 + i];
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode53(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- for (int i = 0; i < 3; i++)
- out[outf + 0] = (out[outf + 0] << 7) + in[inf + i];
- out[outf + 0] = (out[outf + 0] << 3) + (in[inf + 3] >>> 4);
- out[outf + 1] = (out[outf + 1] << 4) + ((in[inf + 3] << 28) >>> 28);
- for (int i = 0; i < 1; i++)
- out[outf + 1] = (out[outf + 1] << 28) + in[inf + 4 + i];
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode54(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- for (int i = 0; i < 2; i++)
- out[outf + 0] = (out[outf + 0] << 9) + in[inf + i];
- out[outf + 0] = (out[outf + 0] << 6) + (in[inf + 2] >>> 3);
- out[outf + 1] = (out[outf + 1] << 3) + ((in[inf + 2] << 29) >>> 29);
- for (int i = 0; i < 28; i++)
- out[outf + 1] = (out[outf + 1] << 1) + in[inf + 3 + i];
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode55(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- for (int i = 0; i < 2; i++)
- out[outf + 0] = (out[outf + 0] << 9) + in[inf + i];
- out[outf + 0] = (out[outf + 0] << 6) + (in[inf + 2] >>> 3);
- out[outf + 1] = (out[outf + 1] << 3) + ((in[inf + 2] << 29) >>> 29);
- for (int i = 0; i < 14; i++)
- out[outf + 1] = (out[outf + 1] << 2) + in[inf + 3 + i];
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode56(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- for (int i = 0; i < 2; i++)
- out[outf + 0] = (out[outf + 0] << 9) + in[inf + i];
- out[outf + 0] = (out[outf + 0] << 6) + (in[inf + 2] >>> 3);
- out[outf + 1] = (out[outf + 1] << 3) + ((in[inf + 2] << 29) >>> 29);
- for (int i = 0; i < 9; i++)
- out[outf + 1] = (out[outf + 1] << 3) + in[inf + 3 + i];
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode57(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- for (int i = 0; i < 2; i++)
- out[outf + 0] = (out[outf + 0] << 9) + in[inf + i];
- out[outf + 0] = (out[outf + 0] << 6) + (in[inf + 2] >>> 3);
- out[outf + 1] = (out[outf + 1] << 3) + ((in[inf + 2] << 29) >>> 29);
- for (int i = 0; i < 7; i++)
- out[outf + 1] = (out[outf + 1] << 4) + in[inf + 3 + i];
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode58(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- for (int i = 0; i < 2; i++)
- out[outf + 0] = (out[outf + 0] << 9) + in[inf + i];
- out[outf + 0] = (out[outf + 0] << 6) + (in[inf + 2] >>> 3);
- out[outf + 1] = (out[outf + 1] << 3) + ((in[inf + 2] << 29) >>> 29);
- for (int i = 0; i < 5; i++)
- out[outf + 1] = (out[outf + 1] << 5) + in[inf + 3 + i];
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode59(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- for (int i = 0; i < 2; i++)
- out[outf + 0] = (out[outf + 0] << 9) + in[inf + i];
- out[outf + 0] = (out[outf + 0] << 6) + (in[inf + 2] >>> 3);
- out[outf + 1] = (out[outf + 1] << 3) + ((in[inf + 2] << 29) >>> 29);
- for (int i = 0; i < 4; i++)
- out[outf + 1] = (out[outf + 1] << 7) + in[inf + 3 + i];
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode60(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- for (int i = 0; i < 2; i++)
- out[outf + 0] = (out[outf + 0] << 9) + in[inf + i];
- out[outf + 0] = (out[outf + 0] << 6) + (in[inf + 2] >>> 3);
- out[outf + 1] = (out[outf + 1] << 3) + ((in[inf + 2] << 29) >>> 29);
- for (int i = 0; i < 3; i++)
- out[outf + 1] = (out[outf + 1] << 9) + in[inf + 3 + i];
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode61(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- for (int i = 0; i < 2; i++)
- out[outf + 0] = (out[outf + 0] << 9) + in[inf + i];
- out[outf + 0] = (out[outf + 0] << 6) + (in[inf + 2] >>> 3);
- out[outf + 1] = (out[outf + 1] << 3) + ((in[inf + 2] << 29) >>> 29);
- for (int i = 0; i < 2; i++)
- out[outf + 1] = (out[outf + 1] << 14) + in[inf + 3 + i];
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode62(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- for (int i = 0; i < 2; i++)
- out[outf + 0] = (out[outf + 0] << 9) + in[inf + i];
- out[outf + 0] = (out[outf + 0] << 6) + (in[inf + 2] >>> 3);
- out[outf + 1] = (out[outf + 1] << 3) + ((in[inf + 2] << 29) >>> 29);
- for (int i = 0; i < 1; i++)
- out[outf + 1] = (out[outf + 1] << 28) + in[inf + 3 + i];
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode63(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
-
- out[outf + 0] = (out[outf + 0] << 14) + in[inf];
- out[outf + 0] = (out[outf + 0] << 10) + (in[inf + 1] >>> 4);
- out[outf + 1] = (out[outf + 1] << 4) + ((in[inf + 1] << 28) >>> 28);
- for (int i = 0; i < 28; i++)
- out[outf + 1] = (out[outf + 1] << 1) + in[inf + 2 + i];
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode64(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- out[outf + 0] = (out[outf + 0] << 14) + in[inf];
- out[outf + 0] = (out[outf + 0] << 10) + (in[inf + 1] >>> 4);
- out[outf + 1] = (out[outf + 1] << 4) + ((in[inf + 1] << 28) >>> 28);
- for (int i = 0; i < 14; i++)
- out[outf + 1] = (out[outf + 1] << 2) + in[inf + 2 + i];
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode65(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- out[outf + 0] = (out[outf + 0] << 14) + in[inf];
- out[outf + 0] = (out[outf + 0] << 10) + (in[inf + 1] >>> 4);
- out[outf + 1] = (out[outf + 1] << 4) + ((in[inf + 1] << 28) >>> 28);
- for (int i = 0; i < 9; i++)
- out[outf + 1] = (out[outf + 1] << 3) + in[inf + 2 + i];
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode66(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- out[outf + 0] = (out[outf + 0] << 14) + in[inf];
- out[outf + 0] = (out[outf + 0] << 10) + (in[inf + 1] >>> 4);
- out[outf + 1] = (out[outf + 1] << 4) + ((in[inf + 1] << 28) >>> 28);
- for (int i = 0; i < 7; i++)
- out[outf + 1] = (out[outf + 1] << 4) + in[inf + 2 + i];
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode67(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- out[outf + 0] = (out[outf + 0] << 14) + in[inf];
- out[outf + 0] = (out[outf + 0] << 10) + (in[inf + 1] >>> 4);
- out[outf + 1] = (out[outf + 1] << 4) + ((in[inf + 1] << 28) >>> 28);
- for (int i = 0; i < 5; i++)
- out[outf + 1] = (out[outf + 1] << 5) + in[inf + 2 + i];
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode68(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- out[outf + 0] = (out[outf + 0] << 14) + in[inf];
- out[outf + 0] = (out[outf + 0] << 10) + (in[inf + 1] >>> 4);
- out[outf + 1] = (out[outf + 1] << 4) + ((in[inf + 1] << 28) >>> 28);
- for (int i = 0; i < 4; i++)
- out[outf + 1] = (out[outf + 1] << 7) + in[inf + 2 + i];
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode69(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- out[outf + 0] = (out[outf + 0] << 14) + in[inf];
- out[outf + 0] = (out[outf + 0] << 10) + (in[inf + 1] >>> 4);
- out[outf + 1] = (out[outf + 1] << 4) + ((in[inf + 1] << 28) >>> 28);
- for (int i = 0; i < 3; i++)
- out[outf + 1] = (out[outf + 1] << 9) + in[inf + 2 + i];
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode70(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- out[outf + 0] = (out[outf + 0] << 14) + in[inf];
- out[outf + 0] = (out[outf + 0] << 10) + (in[inf + 1] >>> 4);
- out[outf + 1] = (out[outf + 1] << 4) + ((in[inf + 1] << 28) >>> 28);
- for (int i = 0; i < 2; i++)
- out[outf + 1] = (out[outf + 1] << 14) + in[inf + 2 + i];
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode71(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- out[outf + 0] = (out[outf + 0] << 14) + in[inf];
- out[outf + 0] = (out[outf + 0] << 10) + (in[inf + 1] >>> 4);
- out[outf + 1] = (out[outf + 1] << 4) + ((in[inf + 1] << 28) >>> 28);
- for (int i = 0; i < 1; i++)
- out[outf + 1] = (out[outf + 1] << 28) + in[inf + 2 + i];
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode72(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
-
- out[outf + 0] = (out[outf + 0] << 24) + (in[inf] >>> 4);
- out[outf + 1] = (out[outf + 1] << 4) + ((in[inf] << 28) >>> 28);
- for (int i = 0; i < 28; i++)
- out[outf + 1] = (out[outf + 1] << 1) + in[inf + 1 + i];
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode73(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- out[outf + 0] = (out[outf + 0] << 24) + (in[inf] >>> 4);
- out[outf + 1] = (out[outf + 1] << 4) + ((in[inf] << 28) >>> 28);
- for (int i = 0; i < 14; i++)
- out[outf + 1] = (out[outf + 1] << 2) + in[inf + 1 + i];
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode74(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- out[outf + 0] = (out[outf + 0] << 24) + (in[inf] >>> 4);
- out[outf + 1] = (out[outf + 1] << 4) + ((in[inf] << 28) >>> 28);
- for (int i = 0; i < 9; i++)
- out[outf + 1] = (out[outf + 1] << 3) + in[inf + 1 + i];
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode75(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- out[outf + 0] = (out[outf + 0] << 24) + (in[inf] >>> 4);
- out[outf + 1] = (out[outf + 1] << 4) + ((in[inf] << 28) >>> 28);
- for (int i = 0; i < 7; i++)
- out[outf + 1] = (out[outf + 1] << 4) + in[inf + 1 + i];
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode76(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- out[outf + 0] = (out[outf + 0] << 24) + (in[inf] >>> 4);
- out[outf + 1] = (out[outf + 1] << 4) + ((in[inf] << 28) >>> 28);
- for (int i = 0; i < 5; i++)
- out[outf + 1] = (out[outf + 1] << 5) + in[inf + 1 + i];
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode77(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- out[outf + 0] = (out[outf + 0] << 24) + (in[inf] >>> 4);
- out[outf + 1] = (out[outf + 1] << 4) + ((in[inf] << 28) >>> 28);
- for (int i = 0; i < 4; i++)
- out[outf + 1] = (out[outf + 1] << 7) + in[inf + 1 + i];
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode78(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- out[outf + 0] = (out[outf + 0] << 24) + (in[inf] >>> 4);
- out[outf + 1] = (out[outf + 1] << 4) + ((in[inf] << 28) >>> 28);
- for (int i = 0; i < 3; i++)
- out[outf + 1] = (out[outf + 1] << 9) + in[inf + 1 + i];
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode79(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- out[outf + 0] = (out[outf + 0] << 24) + (in[inf] >>> 4);
- out[outf + 1] = (out[outf + 1] << 4) + ((in[inf] << 28) >>> 28);
- for (int i = 0; i < 2; i++)
- out[outf + 1] = (out[outf + 1] << 14) + in[inf + 1 + i];
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- private void encode80(final int[] in, final int inf, final int code, final int[] out,
- final int outf) {
- out[outf + 0] = (out[outf + 0] << 24) + (in[inf] >>> 4);
- out[outf + 1] = (out[outf + 1] << 4) + ((in[inf] << 28) >>> 28);
- for (int i = 0; i < 1; i++)
- out[outf + 1] = (out[outf + 1] << 28) + in[inf + 1 + i];
- out[outf + 0] = code << 24 | out[outf + 0];
-
- }
-
- @Override
- public void uncompress(int[] in, IntWrapper inpos, int inlength, int[] out, IntWrapper outpos) {
- if (inlength == 0)
- return;
- final int outlength = in[inpos.get()];
- inpos.increment();
- headlessUncompress(in, inpos, inlength, out, outpos, outlength);
- }
-
-
-
- private void decode80(int val, int valn, int[] out, int currentPos) {
- // number : 1, bitwidth : 28
- out[currentPos++] = (val << 8) >>> 4 | (valn >>> 28);
- // number : 1, bitwidth : 28
- out[currentPos++] = (valn << 4) >>> 4;
- }
-
- private void decode79(int val, int valn, int[] out, int currentPos) {
- // number : 1, bitwidth : 28
- out[currentPos++] = (val << 8) >>> 4 | (valn >>> 28);
- // number :2, bitwidth : 14
- out[currentPos++] = (valn << 4) >>> 18;
- out[currentPos++] = (valn << 18) >>> 18;
- }
-
- private void decode78(int val, int valn, int[] out, int currentPos) {
- // number : 1, bitwidth : 28
- out[currentPos++] = (val << 8) >>> 4 | (valn >>> 27);
- // number : 3, bitwidth :9
- out[currentPos++] = (valn << 5) >>> 23;
- out[currentPos++] = (valn << 14) >>> 23;
- out[currentPos++] = (valn << 23) >>> 23;
- }
-
- private void decode77(int val, int valn, int[] out, int currentPos) {
- // number : 1, bitwidth : 28
- out[currentPos++] = (val << 8) >>> 4 | (valn >>> 28);
- // number : 4, bitwidth : 7
- out[currentPos++] = (valn << 4) >>> 25;
- out[currentPos++] = (valn << 11) >>> 25;
- out[currentPos++] = (valn << 18) >>> 25;
- out[currentPos++] = (valn << 25) >>> 25;
- }
-
- private void decode76(int val, int valn, int[] out, int currentPos) {
- // number : 5, bitwidth : 5
- out[currentPos++] = (val << 8) >>> 4 | (valn >>> 25);
- // number : 14, bitwidth : 2
- out[currentPos++] = (valn << 7) >>> 27;
- out[currentPos++] = (valn << 12) >>> 27;
- out[currentPos++] = (valn << 17) >>> 27;
- out[currentPos++] = (valn << 22) >>> 27;
- out[currentPos++] = (valn << 27) >>> 27;
- }
-
- private void decode75(int val, int valn, int[] out, int currentPos) {
- // number : 1, bitwidth : 28
- out[currentPos++] = (val << 8) >>> 4 | (valn >>> 28);
- // number : 7, bitwidth : 4
- out[currentPos++] = (valn << 4) >>> 28;
- out[currentPos++] = (valn << 8) >>> 28;
- out[currentPos++] = (valn << 12) >>> 28;
- out[currentPos++] = (valn << 16) >>> 28;
- out[currentPos++] = (valn << 20) >>> 28;
- out[currentPos++] = (valn << 24) >>> 28;
- out[currentPos++] = (valn << 28) >>> 28;
- }
-
- private void decode74(int val, int valn, int[] out, int currentPos) {
- // number : 1, bitwidth : 28
- out[currentPos++] = (val << 8) >>> 4 | (valn >>> 27);
- // number : 9, bitwidth : 3
- out[currentPos++] = (valn << 5) >>> 29;
- out[currentPos++] = (valn << 8) >>> 29;
- out[currentPos++] = (valn << 11) >>> 29;
- out[currentPos++] = (valn << 14) >>> 29;
- out[currentPos++] = (valn << 17) >>> 29;
- out[currentPos++] = (valn << 20) >>> 29;
- out[currentPos++] = (valn << 23) >>> 29;
- out[currentPos++] = (valn << 26) >>> 29;
- out[currentPos++] = (valn << 29) >>> 29;
- }
-
- private void decode73(int val, int valn, int[] out, int currentPos) {
- // number : 1, bitwidth : 28
- out[currentPos++] = (val << 8) >>> 4 | (valn >>> 28);
- // number : 14, bitwidth : 2
- out[currentPos++] = (valn << 4) >>> 30;
- out[currentPos++] = (valn << 6) >>> 30;
- out[currentPos++] = (valn << 8) >>> 30;
- out[currentPos++] = (valn << 10) >>> 30;
- out[currentPos++] = (valn << 12) >>> 30;
- out[currentPos++] = (valn << 14) >>> 30;
- out[currentPos++] = (valn << 16) >>> 30;
- out[currentPos++] = (valn << 18) >>> 30;
- out[currentPos++] = (valn << 20) >>> 30;
- out[currentPos++] = (valn << 22) >>> 30; // 10
- out[currentPos++] = (valn << 24) >>> 30;
- out[currentPos++] = (valn << 26) >>> 30;
- out[currentPos++] = (valn << 28) >>> 30;
- out[currentPos++] = (valn << 30) >>> 30;
- }
-
- private void decode72(int val, int valn, int[] out, int currentPos) {
- // number : 1, bitwidth : 28
- out[currentPos++] = (val << 8) >>> 4 | (valn >>> 28);
- // number : 28, bitwidth : 1
- out[currentPos++] = (valn << 4) >>> 31;
- out[currentPos++] = (valn << 5) >>> 31;
- out[currentPos++] = (valn << 6) >>> 31;
- out[currentPos++] = (valn << 7) >>> 31;
- out[currentPos++] = (valn << 8) >>> 31;
- out[currentPos++] = (valn << 9) >>> 31;
- out[currentPos++] = (valn << 10) >>> 31;
- out[currentPos++] = (valn << 11) >>> 31;
- out[currentPos++] = (valn << 12) >>> 31;
- out[currentPos++] = (valn << 13) >>> 31; // 10
- out[currentPos++] = (valn << 14) >>> 31;
- out[currentPos++] = (valn << 15) >>> 31;
- out[currentPos++] = (valn << 16) >>> 31;
- out[currentPos++] = (valn << 17) >>> 31;
- out[currentPos++] = (valn << 18) >>> 31;
- out[currentPos++] = (valn << 19) >>> 31;
- out[currentPos++] = (valn << 20) >>> 31;
- out[currentPos++] = (valn << 21) >>> 31;
- out[currentPos++] = (valn << 22) >>> 31;
- out[currentPos++] = (valn << 23) >>> 31; // 20
- out[currentPos++] = (valn << 24) >>> 31;
- out[currentPos++] = (valn << 25) >>> 31;
- out[currentPos++] = (valn << 26) >>> 31;
- out[currentPos++] = (valn << 27) >>> 31;
- out[currentPos++] = (valn << 28) >>> 31;
- out[currentPos++] = (valn << 29) >>> 31;
- out[currentPos++] = (valn << 30) >>> 31;
- out[currentPos++] = (valn << 31) >>> 31;
- }
-
- private void decode71(int val, int valn, int[] out, int currentPos) {
- // number : 2, bitwidth : 14
- out[currentPos++] = (val << 8) >>> 18;
- out[currentPos++] = (val << 22) >>> 18 | (valn >>> 28);
- // number : 1, bitwidth : 28
- out[currentPos++] = (valn << 4) >>> 4;
- }
-
- private void decode70(int val, int valn, int[] out, int currentPos) {
- // number : 2, bitwidth : 14
- out[currentPos++] = (val << 8) >>> 18;
- out[currentPos++] = (val << 22) >>> 18 | (valn >>> 28);
- // number : 2, bitwidth : 14
- out[currentPos++] = (valn << 4) >>> 18;
- out[currentPos++] = (valn << 18) >>> 18;
- }
-
- private void decode69(int val, int valn, int[] out, int currentPos) {
- // number : 2, bitwidth : 14
- out[currentPos++] = (val << 8) >>> 18;
- out[currentPos++] = (val << 22) >>> 18 | (valn >>> 27);
- // number : 3, bitwidth : 9
- out[currentPos++] = (valn << 5) >>> 23;
- out[currentPos++] = (valn << 14) >>> 23;
- out[currentPos++] = (valn << 23) >>> 23;
- }
-
- private void decode68(int val, int valn, int[] out, int currentPos) {
- // number : 2, bitwidth : 14
- out[currentPos++] = (val << 8) >>> 18;
- out[currentPos++] = (val << 22) >>> 18 | (valn >>> 28);
- // number : 4, bitwidth : 7
- out[currentPos++] = (valn << 4) >>> 25;
- out[currentPos++] = (valn << 11) >>> 25;
- out[currentPos++] = (valn << 18) >>> 25;
- out[currentPos++] = (valn << 25) >>> 25;
- }
-
- private void decode67(int val, int valn, int[] out, int currentPos) {
- // number : 2, bitwidth : 14
- out[currentPos++] = (val << 8) >>> 18;
- out[currentPos++] = (val << 22) >>> 18 | (valn >>> 25);
- // number : 5, bitwidth : 5
- out[currentPos++] = (valn << 7) >>> 27;
- out[currentPos++] = (valn << 12) >>> 27;
- out[currentPos++] = (valn << 17) >>> 27;
- out[currentPos++] = (valn << 22) >>> 27;
- out[currentPos++] = (valn << 27) >>> 27;
- }
-
- private void decode66(int val, int valn, int[] out, int currentPos) {
- // number : 2, bitwidth : 14
- out[currentPos++] = (val << 8) >>> 18;
- out[currentPos++] = (val << 22) >>> 18 | (valn >>> 28);
- // number : 7, bitwidth : 4
- out[currentPos++] = (valn << 4) >>> 28;
- out[currentPos++] = (valn << 8) >>> 28;
- out[currentPos++] = (valn << 12) >>> 28;
- out[currentPos++] = (valn << 16) >>> 28;
- out[currentPos++] = (valn << 20) >>> 28;
- out[currentPos++] = (valn << 24) >>> 28;
- out[currentPos++] = (valn << 28) >>> 28;
- }
-
- private void decode65(int val, int valn, int[] out, int currentPos) {
- // number : 2, bitwidth : 14
- out[currentPos++] = (val << 8) >>> 18;
- out[currentPos++] = (val << 22) >>> 18 | (valn >>> 27);
- // number : 9, bitwidth : 3
- out[currentPos++] = (valn << 5) >>> 29;
- out[currentPos++] = (valn << 8) >>> 29;
- out[currentPos++] = (valn << 11) >>> 29;
- out[currentPos++] = (valn << 14) >>> 29;
- out[currentPos++] = (valn << 17) >>> 29;
- out[currentPos++] = (valn << 20) >>> 29;
- out[currentPos++] = (valn << 23) >>> 29;
- out[currentPos++] = (valn << 26) >>> 29;
- out[currentPos++] = (valn << 29) >>> 29;
- }
-
- private void decode64(int val, int valn, int[] out, int currentPos) {
- // number : 2, bitwidth : 14
- out[currentPos++] = (val << 8) >>> 18;
- out[currentPos++] = (val << 22) >>> 18 | (valn >>> 28);
- // number : 14, bitwidth : 2
- out[currentPos++] = (valn << 4) >>> 30;
- out[currentPos++] = (valn << 6) >>> 30;
- out[currentPos++] = (valn << 8) >>> 30;
- out[currentPos++] = (valn << 10) >>> 30;
- out[currentPos++] = (valn << 12) >>> 30;
- out[currentPos++] = (valn << 14) >>> 30;
- out[currentPos++] = (valn << 16) >>> 30;
- out[currentPos++] = (valn << 18) >>> 30;
- out[currentPos++] = (valn << 20) >>> 30;
- out[currentPos++] = (valn << 22) >>> 30; // 10
- out[currentPos++] = (valn << 24) >>> 30;
- out[currentPos++] = (valn << 26) >>> 30;
- out[currentPos++] = (valn << 28) >>> 30;
- out[currentPos++] = (valn << 30) >>> 30;
- }
-
- private void decode63(int val, int valn, int[] out, int currentPos) {
- // number : 2, bitwidth : 14
- out[currentPos++] = (val << 8) >>> 18;
- out[currentPos++] = (val << 22) >>> 18 | (valn >>> 28);
- // number : 28, bitwidth : 1
- out[currentPos++] = (valn << 4) >>> 31;
- out[currentPos++] = (valn << 5) >>> 31;
- out[currentPos++] = (valn << 6) >>> 31;
- out[currentPos++] = (valn << 7) >>> 31;
- out[currentPos++] = (valn << 8) >>> 31;
- out[currentPos++] = (valn << 9) >>> 31;
- out[currentPos++] = (valn << 10) >>> 31;
- out[currentPos++] = (valn << 11) >>> 31;
- out[currentPos++] = (valn << 12) >>> 31;
- out[currentPos++] = (valn << 13) >>> 31; // 10
- out[currentPos++] = (valn << 14) >>> 31;
- out[currentPos++] = (valn << 15) >>> 31;
- out[currentPos++] = (valn << 16) >>> 31;
- out[currentPos++] = (valn << 17) >>> 31;
- out[currentPos++] = (valn << 18) >>> 31;
- out[currentPos++] = (valn << 19) >>> 31;
- out[currentPos++] = (valn << 20) >>> 31;
- out[currentPos++] = (valn << 21) >>> 31;
- out[currentPos++] = (valn << 22) >>> 31;
- out[currentPos++] = (valn << 23) >>> 31; // 20
- out[currentPos++] = (valn << 24) >>> 31;
- out[currentPos++] = (valn << 25) >>> 31;
- out[currentPos++] = (valn << 26) >>> 31;
- out[currentPos++] = (valn << 27) >>> 31;
- out[currentPos++] = (valn << 28) >>> 31;
- out[currentPos++] = (valn << 29) >>> 31;
- out[currentPos++] = (valn << 30) >>> 31;
- out[currentPos++] = (valn << 31) >>> 31;
- }
-
- private void decode62(int val, int valn, int[] out, int currentPos) {
- // number : 3, bitwidth : 9
- out[currentPos++] = (val << 8) >>> 23;
- out[currentPos++] = (val << 17) >>> 23;
- out[currentPos++] = (val << 26) >>> 23 | (valn >>> 28);
- // number : 1, bitwidth : 28
- out[currentPos++] = (valn << 4) >>> 4;
- }
-
- private void decode61(int val, int valn, int[] out, int currentPos) {
- // number : 3, bitwidth : 9
- out[currentPos++] = (val << 8) >>> 23;
- out[currentPos++] = (val << 17) >>> 23;
- out[currentPos++] = (val << 26) >>> 23 | (valn >>> 28);
- // number : 2, bitwidth : 14
- out[currentPos++] = (valn << 4) >>> 18;
- out[currentPos++] = (valn << 18) >>> 18;
- }
-
- private void decode60(int val, int valn, int[] out, int currentPos) {
- // number : 3, bitwidth : 9
- out[currentPos++] = (val << 8) >>> 23;
- out[currentPos++] = (val << 17) >>> 23;
- out[currentPos++] = (val << 26) >>> 23 | (valn >>> 27);
- // number : 3, bitwidth : 9
- out[currentPos++] = (valn << 5) >>> 23;
- out[currentPos++] = (valn << 14) >>> 23;
- out[currentPos++] = (valn << 23) >>> 23;
- }
-
- private void decode59(int val, int valn, int[] out, int currentPos) {
- // number : 3, bitwidth : 9
- out[currentPos++] = (val << 8) >>> 23;
- out[currentPos++] = (val << 17) >>> 23;
- out[currentPos++] = (val << 26) >>> 23 | (valn >>> 28);
- // number : 4, bitwidth : 7
- out[currentPos++] = (valn << 4) >>> 25;
- out[currentPos++] = (valn << 11) >>> 25;
- out[currentPos++] = (valn << 18) >>> 25;
- out[currentPos++] = (valn << 25) >>> 25;
- }
-
- private void decode58(int val, int valn, int[] out, int currentPos) {
- // number : 3, bitwidth : 9
- out[currentPos++] = (val << 8) >>> 23;
- out[currentPos++] = (val << 17) >>> 23;
- out[currentPos++] = (val << 26) >>> 23 | (valn >>> 25);
- // number : 5, bitwidth : 5
- out[currentPos++] = (valn << 7) >>> 27;
- out[currentPos++] = (valn << 12) >>> 27;
- out[currentPos++] = (valn << 17) >>> 27;
- out[currentPos++] = (valn << 22) >>> 27;
- out[currentPos++] = (valn << 27) >>> 27;
- }
-
- private void decode57(int val, int valn, int[] out, int currentPos) {
- // number : 3, bitwidth : 9
- out[currentPos++] = (val << 8) >>> 23;
- out[currentPos++] = (val << 17) >>> 23;
- out[currentPos++] = (val << 26) >>> 23 | (valn >>> 28);
- // number : 7, bitwidth : 4
- out[currentPos++] = (valn << 4) >>> 28;
- out[currentPos++] = (valn << 8) >>> 28;
- out[currentPos++] = (valn << 12) >>> 28;
- out[currentPos++] = (valn << 16) >>> 28;
- out[currentPos++] = (valn << 20) >>> 28;
- out[currentPos++] = (valn << 24) >>> 28;
- out[currentPos++] = (valn << 28) >>> 28;
- }
-
- private void decode56(int val, int valn, int[] out, int currentPos) {
- // number : 3, bitwidth : 9
- out[currentPos++] = (val << 8) >>> 23;
- out[currentPos++] = (val << 17) >>> 23;
- out[currentPos++] = (val << 26) >>> 23 | (valn >>> 27);
- // number : 9, bitwidth : 3
- out[currentPos++] = (valn << 5) >>> 29;
- out[currentPos++] = (valn << 8) >>> 29;
- out[currentPos++] = (valn << 11) >>> 29;
- out[currentPos++] = (valn << 14) >>> 29;
- out[currentPos++] = (valn << 17) >>> 29;
- out[currentPos++] = (valn << 20) >>> 29;
- out[currentPos++] = (valn << 23) >>> 29;
- out[currentPos++] = (valn << 26) >>> 29;
- out[currentPos++] = (valn << 29) >>> 29;
- }
-
- private void decode55(int val, int valn, int[] out, int currentPos) {
- // number : 3, bitwidth : 9
- out[currentPos++] = (val << 8) >>> 23;
- out[currentPos++] = (val << 17) >>> 23;
- out[currentPos++] = (val << 26) >>> 23 | (valn >>> 28);
- // number : 14, bitwidth : 2
- out[currentPos++] = (valn << 4) >>> 30;
- out[currentPos++] = (valn << 6) >>> 30;
- out[currentPos++] = (valn << 8) >>> 30;
- out[currentPos++] = (valn << 10) >>> 30;
- out[currentPos++] = (valn << 12) >>> 30;
- out[currentPos++] = (valn << 14) >>> 30;
- out[currentPos++] = (valn << 16) >>> 30;
- out[currentPos++] = (valn << 18) >>> 30;
- out[currentPos++] = (valn << 20) >>> 30;
- out[currentPos++] = (valn << 22) >>> 30; // 10
- out[currentPos++] = (valn << 24) >>> 30;
- out[currentPos++] = (valn << 26) >>> 30;
- out[currentPos++] = (valn << 28) >>> 30;
- out[currentPos++] = (valn << 30) >>> 30;
- }
-
- private void decode54(int val, int valn, int[] out, int currentPos) {
- // number : 3, bitwidth : 9
- out[currentPos++] = (val << 8) >>> 23;
- out[currentPos++] = (val << 17) >>> 23;
- out[currentPos++] = (val << 26) >>> 23 | (valn >>> 28);
- // number : 28, bitwidth : 1
- out[currentPos++] = (valn << 4) >>> 31;
- out[currentPos++] = (valn << 5) >>> 31;
- out[currentPos++] = (valn << 6) >>> 31;
- out[currentPos++] = (valn << 7) >>> 31;
- out[currentPos++] = (valn << 8) >>> 31;
- out[currentPos++] = (valn << 9) >>> 31;
- out[currentPos++] = (valn << 10) >>> 31;
- out[currentPos++] = (valn << 11) >>> 31;
- out[currentPos++] = (valn << 12) >>> 31;
- out[currentPos++] = (valn << 13) >>> 31; // 10
- out[currentPos++] = (valn << 14) >>> 31;
- out[currentPos++] = (valn << 15) >>> 31;
- out[currentPos++] = (valn << 16) >>> 31;
- out[currentPos++] = (valn << 17) >>> 31;
- out[currentPos++] = (valn << 18) >>> 31;
- out[currentPos++] = (valn << 19) >>> 31;
- out[currentPos++] = (valn << 20) >>> 31;
- out[currentPos++] = (valn << 21) >>> 31;
- out[currentPos++] = (valn << 22) >>> 31;
- out[currentPos++] = (valn << 23) >>> 31; // 20
- out[currentPos++] = (valn << 24) >>> 31;
- out[currentPos++] = (valn << 25) >>> 31;
- out[currentPos++] = (valn << 26) >>> 31;
- out[currentPos++] = (valn << 27) >>> 31;
- out[currentPos++] = (valn << 28) >>> 31;
- out[currentPos++] = (valn << 29) >>> 31;
- out[currentPos++] = (valn << 30) >>> 31;
- out[currentPos++] = (valn << 31) >>> 31;
- }
-
- private void decode53(int val, int valn, int[] out, int currentPos) {
- // number : 4, bitwidth : 7
- out[currentPos++] = (val << 8) >>> 25;
- out[currentPos++] = (val << 15) >>> 25;
- out[currentPos++] = (val << 22) >>> 25;
- out[currentPos++] = (val << 29) >>> 25 | (valn >>> 28);
- // number : 1, bitwidth : 28
- out[currentPos++] = (valn << 4) >>> 4;
- }
-
- private void decode52(int val, int valn, int[] out, int currentPos) {
- // number : 4, bitwidth : 7
- out[currentPos++] = (val << 8) >>> 25;
- out[currentPos++] = (val << 15) >>> 25;
- out[currentPos++] = (val << 22) >>> 25;
- out[currentPos++] = (val << 29) >>> 25 | (valn >>> 28);
- // number : 2, bitwidth : 14
- out[currentPos++] = (valn << 4) >>> 18;
- out[currentPos++] = (valn << 18) >>> 18;
- }
-
- private void decode51(int val, int valn, int[] out, int currentPos) {
- // number : 4, bitwidth : 7
- out[currentPos++] = (val << 8) >>> 25;
- out[currentPos++] = (val << 15) >>> 25;
- out[currentPos++] = (val << 22) >>> 25;
- out[currentPos++] = (val << 29) >>> 25 | (valn >>> 27);
- // number : 3, bitwidth : 9
- out[currentPos++] = (valn << 5) >>> 23;
- out[currentPos++] = (valn << 14) >>> 23;
- out[currentPos++] = (valn << 23) >>> 23;
- }
-
- private void decode50(int val, int valn, int[] out, int currentPos) {
- // number : 4, bitwidth : 7
- out[currentPos++] = (val << 8) >>> 25;
- out[currentPos++] = (val << 15) >>> 25;
- out[currentPos++] = (val << 22) >>> 25;
- out[currentPos++] = (val << 29) >>> 25 | (valn >>> 28);
- // number : 4, bitwidth : 7
- out[currentPos++] = (valn << 4) >>> 25;
- out[currentPos++] = (valn << 11) >>> 25;
- out[currentPos++] = (valn << 18) >>> 25;
- out[currentPos++] = (valn << 25) >>> 25;
- }
-
- private void decode49(int val, int valn, int[] out, int currentPos) {
- // number : 4, bitwidth : 7
- out[currentPos++] = (val << 8) >>> 25;
- out[currentPos++] = (val << 15) >>> 25;
- out[currentPos++] = (val << 22) >>> 25;
- out[currentPos++] = (val << 29) >>> 25 | (valn >>> 25);
- // number : 5, bitwidth : 5
- out[currentPos++] = (valn << 7) >>> 27;
- out[currentPos++] = (valn << 12) >>> 27;
- out[currentPos++] = (valn << 17) >>> 27;
- out[currentPos++] = (valn << 22) >>> 27;
- out[currentPos++] = (valn << 27) >>> 27;
- }
-
- private void decode48(int val, int valn, int[] out, int currentPos) {
- // number : 4, bitwidth : 7
- out[currentPos++] = (val << 8) >>> 25;
- out[currentPos++] = (val << 15) >>> 25;
- out[currentPos++] = (val << 22) >>> 25;
- out[currentPos++] = (val << 29) >>> 25 | (valn >>> 28);
- // number : 7, bitwidth : 4
- out[currentPos++] = (valn << 4) >>> 28;
- out[currentPos++] = (valn << 8) >>> 28;
- out[currentPos++] = (valn << 12) >>> 28;
- out[currentPos++] = (valn << 16) >>> 28;
- out[currentPos++] = (valn << 20) >>> 28;
- out[currentPos++] = (valn << 24) >>> 28;
- out[currentPos++] = (valn << 28) >>> 28;
- }
-
- private void decode47(int val, int valn, int[] out, int currentPos) {
- // number : 4, bitwidth : 7
- out[currentPos++] = (val << 8) >>> 25;
- out[currentPos++] = (val << 15) >>> 25;
- out[currentPos++] = (val << 22) >>> 25;
- out[currentPos++] = (val << 29) >>> 25 | (valn >>> 27);
- // number : 9, bitwidth : 3
- out[currentPos++] = (valn << 5) >>> 29;
- out[currentPos++] = (valn << 8) >>> 29;
- out[currentPos++] = (valn << 11) >>> 29;
- out[currentPos++] = (valn << 14) >>> 29;
- out[currentPos++] = (valn << 17) >>> 29;
- out[currentPos++] = (valn << 20) >>> 29;
- out[currentPos++] = (valn << 23) >>> 29;
- out[currentPos++] = (valn << 26) >>> 29;
- out[currentPos++] = (valn << 29) >>> 29;
- }
-
- private void decode46(int val, int valn, int[] out, int currentPos) {
- // number : 4, bitwidth : 7
- out[currentPos++] = (val << 8) >>> 25;
- out[currentPos++] = (val << 15) >>> 25;
- out[currentPos++] = (val << 22) >>> 25;
- out[currentPos++] = (val << 29) >>> 25 | (valn >>> 28);
- // number : 14, bitwidth : 2
- out[currentPos++] = (valn << 4) >>> 30;
- out[currentPos++] = (valn << 6) >>> 30;
- out[currentPos++] = (valn << 8) >>> 30;
- out[currentPos++] = (valn << 10) >>> 30;
- out[currentPos++] = (valn << 12) >>> 30;
- out[currentPos++] = (valn << 14) >>> 30;
- out[currentPos++] = (valn << 16) >>> 30;
- out[currentPos++] = (valn << 18) >>> 30;
- out[currentPos++] = (valn << 20) >>> 30;
- out[currentPos++] = (valn << 22) >>> 30; // 10
- out[currentPos++] = (valn << 24) >>> 30;
- out[currentPos++] = (valn << 26) >>> 30;
- out[currentPos++] = (valn << 28) >>> 30;
- out[currentPos++] = (valn << 30) >>> 30;
- }
-
- private void decode45(int val, int valn, int[] out, int currentPos) {
- // number : 4, bitwidth : 7
- out[currentPos++] = (val << 8) >>> 25;
- out[currentPos++] = (val << 15) >>> 25;
- out[currentPos++] = (val << 22) >>> 25;
- out[currentPos++] = (val << 29) >>> 25 | (valn >>> 28);
- // number : 28, bitwidth : 1
- out[currentPos++] = (valn << 4) >>> 31;
- out[currentPos++] = (valn << 5) >>> 31;
- out[currentPos++] = (valn << 6) >>> 31;
- out[currentPos++] = (valn << 7) >>> 31;
- out[currentPos++] = (valn << 8) >>> 31;
- out[currentPos++] = (valn << 9) >>> 31;
- out[currentPos++] = (valn << 10) >>> 31;
- out[currentPos++] = (valn << 11) >>> 31;
- out[currentPos++] = (valn << 12) >>> 31;
- out[currentPos++] = (valn << 13) >>> 31; // 10
- out[currentPos++] = (valn << 14) >>> 31;
- out[currentPos++] = (valn << 15) >>> 31;
- out[currentPos++] = (valn << 16) >>> 31;
- out[currentPos++] = (valn << 17) >>> 31;
- out[currentPos++] = (valn << 18) >>> 31;
- out[currentPos++] = (valn << 19) >>> 31;
- out[currentPos++] = (valn << 20) >>> 31;
- out[currentPos++] = (valn << 21) >>> 31;
- out[currentPos++] = (valn << 22) >>> 31;
- out[currentPos++] = (valn << 23) >>> 31; // 20
- out[currentPos++] = (valn << 24) >>> 31;
- out[currentPos++] = (valn << 25) >>> 31;
- out[currentPos++] = (valn << 26) >>> 31;
- out[currentPos++] = (valn << 27) >>> 31;
- out[currentPos++] = (valn << 28) >>> 31;
- out[currentPos++] = (valn << 29) >>> 31;
- out[currentPos++] = (valn << 30) >>> 31;
- out[currentPos++] = (valn << 31) >>> 31;
- }
-
- private void decode44(int val, int valn, int[] out, int currentPos) {
- // number : 5, bitwidth : 5
- out[currentPos++] = (val << 8) >>> 27;
- out[currentPos++] = (val << 13) >>> 27;
- out[currentPos++] = (val << 18) >>> 27;
- out[currentPos++] = (val << 23) >>> 27;
- out[currentPos++] = (val << 28) >>> 27 | (valn >>> 28);
- // number : 1, bitwidth : 28
- out[currentPos++] = (valn << 4) >>> 4;
- }
-
- private void decode43(int val, int valn, int[] out, int currentPos) {
- // number : 5, bitwidth : 5
- out[currentPos++] = (val << 8) >>> 27;
- out[currentPos++] = (val << 13) >>> 27;
- out[currentPos++] = (val << 18) >>> 27;
- out[currentPos++] = (val << 23) >>> 27;
- out[currentPos++] = (val << 28) >>> 27 | (valn >>> 28);
- // number : 2, bitwidth : 14
- out[currentPos++] = (valn << 4) >>> 18;
- out[currentPos++] = (valn << 18) >>> 18;
- }
-
- private void decode42(int val, int valn, int[] out, int currentPos) {
- // number : 5, bitwidth : 5
- out[currentPos++] = (val << 8) >>> 27;
- out[currentPos++] = (val << 13) >>> 27;
- out[currentPos++] = (val << 18) >>> 27;
- out[currentPos++] = (val << 23) >>> 27;
- out[currentPos++] = (val << 28) >>> 27 | (valn >>> 27);
- // number : 3, bitwidth : 9
- out[currentPos++] = (valn << 5) >>> 23;
- out[currentPos++] = (valn << 14) >>> 23;
- out[currentPos++] = (valn << 23) >>> 23;
- }
-
- private void decode41(int val, int valn, int[] out, int currentPos) {
- // number : 5, bitwidth : 5
- out[currentPos++] = (val << 8) >>> 27;
- out[currentPos++] = (val << 13) >>> 27;
- out[currentPos++] = (val << 18) >>> 27;
- out[currentPos++] = (val << 23) >>> 27;
- out[currentPos++] = (val << 28) >>> 27 | (valn >>> 28);
- // number : 4, bitwidth : 7
- out[currentPos++] = (valn << 4) >>> 25;
- out[currentPos++] = (valn << 11) >>> 25;
- out[currentPos++] = (valn << 18) >>> 25;
- out[currentPos++] = (valn << 25) >>> 25;
- }
-
- private void decode40(int val, int valn, int[] out, int currentPos) {
- // number : 5, bitwidth : 5
- out[currentPos++] = (val << 8) >>> 27;
- out[currentPos++] = (val << 13) >>> 27;
- out[currentPos++] = (val << 18) >>> 27;
- out[currentPos++] = (val << 23) >>> 27;
- out[currentPos++] = (val << 28) >>> 27 | (valn >>> 25);
- // number : 5, bitwidth : 5
- out[currentPos++] = (valn << 7) >>> 27;
- out[currentPos++] = (valn << 12) >>> 27;
- out[currentPos++] = (valn << 17) >>> 27;
- out[currentPos++] = (valn << 22) >>> 27;
- out[currentPos++] = (valn << 27) >>> 27;
- }
-
- private void decode39(int val, int valn, int[] out, int currentPos) {
- // number : 5, bitwidth : 5
- out[currentPos++] = (val << 8) >>> 27;
- out[currentPos++] = (val << 13) >>> 27;
- out[currentPos++] = (val << 18) >>> 27;
- out[currentPos++] = (val << 23) >>> 27;
- out[currentPos++] = (val << 28) >>> 27 | (valn >>> 28);
- // number : 7, bitwidth : 4
- out[currentPos++] = (valn << 4) >>> 28;
- out[currentPos++] = (valn << 8) >>> 28;
- out[currentPos++] = (valn << 12) >>> 28;
- out[currentPos++] = (valn << 16) >>> 28;
- out[currentPos++] = (valn << 20) >>> 28;
- out[currentPos++] = (valn << 24) >>> 28;
- out[currentPos++] = (valn << 28) >>> 28;
- }
-
- private void decode38(int val, int valn, int[] out, int currentPos) {
- // number : 5, bitwidth : 5
- out[currentPos++] = (val << 8) >>> 27;
- out[currentPos++] = (val << 13) >>> 27;
- out[currentPos++] = (val << 18) >>> 27;
- out[currentPos++] = (val << 23) >>> 27;
- out[currentPos++] = (val << 28) >>> 27 | (valn >>> 27);
- // number : 9, bitwidth : 3
- out[currentPos++] = (valn << 5) >>> 29;
- out[currentPos++] = (valn << 8) >>> 29;
- out[currentPos++] = (valn << 11) >>> 29;
- out[currentPos++] = (valn << 14) >>> 29;
- out[currentPos++] = (valn << 17) >>> 29;
- out[currentPos++] = (valn << 20) >>> 29;
- out[currentPos++] = (valn << 23) >>> 29;
- out[currentPos++] = (valn << 26) >>> 29;
- out[currentPos++] = (valn << 29) >>> 29;
- }
-
- private void decode37(int val, int valn, int[] out, int currentPos) {
- // number : 5, bitwidth : 5
- out[currentPos++] = (val << 8) >>> 27;
- out[currentPos++] = (val << 13) >>> 27;
- out[currentPos++] = (val << 18) >>> 27;
- out[currentPos++] = (val << 23) >>> 27;
- out[currentPos++] = (val << 28) >>> 27 | (valn >>> 28);
- // number : 14, bitwidth : 2
- out[currentPos++] = (valn << 4) >>> 30;
- out[currentPos++] = (valn << 6) >>> 30;
- out[currentPos++] = (valn << 8) >>> 30;
- out[currentPos++] = (valn << 10) >>> 30;
- out[currentPos++] = (valn << 12) >>> 30;
- out[currentPos++] = (valn << 14) >>> 30;
- out[currentPos++] = (valn << 16) >>> 30;
- out[currentPos++] = (valn << 18) >>> 30;
- out[currentPos++] = (valn << 20) >>> 30;
- out[currentPos++] = (valn << 22) >>> 30; // 10
- out[currentPos++] = (valn << 24) >>> 30;
- out[currentPos++] = (valn << 26) >>> 30;
- out[currentPos++] = (valn << 28) >>> 30;
- out[currentPos++] = (valn << 30) >>> 30;
- }
-
- private void decode36(int val, int valn, int[] out, int currentPos) {
- // number : 5, bitwidth : 5
- out[currentPos++] = (val << 8) >>> 27;
- out[currentPos++] = (val << 13) >>> 27;
- out[currentPos++] = (val << 18) >>> 27;
- out[currentPos++] = (val << 23) >>> 27;
- out[currentPos++] = (val << 28) >>> 27 | (valn >>> 28);
- // number : 28, bitwidth : 1
- out[currentPos++] = (valn << 4) >>> 31;
- out[currentPos++] = (valn << 5) >>> 31;
- out[currentPos++] = (valn << 6) >>> 31;
- out[currentPos++] = (valn << 7) >>> 31;
- out[currentPos++] = (valn << 8) >>> 31;
- out[currentPos++] = (valn << 9) >>> 31;
- out[currentPos++] = (valn << 10) >>> 31;
- out[currentPos++] = (valn << 11) >>> 31;
- out[currentPos++] = (valn << 12) >>> 31;
- out[currentPos++] = (valn << 13) >>> 31; // 10
- out[currentPos++] = (valn << 14) >>> 31;
- out[currentPos++] = (valn << 15) >>> 31;
- out[currentPos++] = (valn << 16) >>> 31;
- out[currentPos++] = (valn << 17) >>> 31;
- out[currentPos++] = (valn << 18) >>> 31;
- out[currentPos++] = (valn << 19) >>> 31;
- out[currentPos++] = (valn << 20) >>> 31;
- out[currentPos++] = (valn << 21) >>> 31;
- out[currentPos++] = (valn << 22) >>> 31;
- out[currentPos++] = (valn << 23) >>> 31; // 20
- out[currentPos++] = (valn << 24) >>> 31;
- out[currentPos++] = (valn << 25) >>> 31;
- out[currentPos++] = (valn << 26) >>> 31;
- out[currentPos++] = (valn << 27) >>> 31;
- out[currentPos++] = (valn << 28) >>> 31;
- out[currentPos++] = (valn << 29) >>> 31;
- out[currentPos++] = (valn << 30) >>> 31;
- out[currentPos++] = (valn << 31) >>> 31;
- }
-
- private void decode35(int val, int valn, int[] out, int currentPos) {
- // number : 7, bitwidth : 4
- out[currentPos++] = (val << 8) >>> 28;
- out[currentPos++] = (val << 12) >>> 28;
- out[currentPos++] = (val << 16) >>> 28;
- out[currentPos++] = (val << 20) >>> 28;
- out[currentPos++] = (val << 24) >>> 28;
- out[currentPos++] = (val << 28) >>> 28;
- out[currentPos++] = (valn << 0) >>> 28;
- // number : 1, bitwidth : 28
- out[currentPos++] = (valn << 4) >>> 4;
- }
-
- private void decode34(int val, int valn, int[] out, int currentPos) {
- // number : 7, bitwidth : 4
- out[currentPos++] = (val << 8) >>> 28;
- out[currentPos++] = (val << 12) >>> 28;
- out[currentPos++] = (val << 16) >>> 28;
- out[currentPos++] = (val << 20) >>> 28;
- out[currentPos++] = (val << 24) >>> 28;
- out[currentPos++] = (val << 28) >>> 28;
- out[currentPos++] = (valn << 0) >>> 28;
- // number : 2, bitwidth : 14
- out[currentPos++] = (valn << 4) >>> 18;
- out[currentPos++] = (valn << 18) >>> 18;
- }
-
- private void decode33(int val, int valn, int[] out, int currentPos) {
- // number : 7, bitwidth : 4
- out[currentPos++] = (val << 8) >>> 28;
- out[currentPos++] = (val << 12) >>> 28;
- out[currentPos++] = (val << 16) >>> 28;
- out[currentPos++] = (val << 20) >>> 28;
- out[currentPos++] = (val << 24) >>> 28;
- out[currentPos++] = (val << 28) >>> 28;
- out[currentPos++] = (valn << 1) >>> 28;
- // number : 3, bitwidth : 9
- out[currentPos++] = (valn << 5) >>> 23;
- out[currentPos++] = (valn << 14) >>> 23;
- out[currentPos++] = (valn << 23) >>> 23;
- }
-
- private void decode32(int val, int valn, int[] out, int currentPos) {
- // number : 7, bitwidth : 4
- out[currentPos++] = (val << 8) >>> 28;
- out[currentPos++] = (val << 12) >>> 28;
- out[currentPos++] = (val << 16) >>> 28;
- out[currentPos++] = (val << 20) >>> 28;
- out[currentPos++] = (val << 24) >>> 28;
- out[currentPos++] = (val << 28) >>> 28;
- out[currentPos++] = (valn << 0) >>> 28;
- // number : 4, bitwidth : 7
- out[currentPos++] = (valn << 4) >>> 25;
- out[currentPos++] = (valn << 11) >>> 25;
- out[currentPos++] = (valn << 18) >>> 25;
- out[currentPos++] = (valn << 25) >>> 25;
- }
-
- private void decode31(int val, int valn, int[] out, int currentPos) {
- // number : 7, bitwidth : 4
- out[currentPos++] = (val << 8) >>> 28;
- out[currentPos++] = (val << 12) >>> 28;
- out[currentPos++] = (val << 16) >>> 28;
- out[currentPos++] = (val << 20) >>> 28;
- out[currentPos++] = (val << 24) >>> 28;
- out[currentPos++] = (val << 28) >>> 28;
- out[currentPos++] = (valn << 3) >>> 28;
- // number : 5, bitwidth : 5
- out[currentPos++] = (valn << 7) >>> 27;
- out[currentPos++] = (valn << 12) >>> 27;
- out[currentPos++] = (valn << 17) >>> 27;
- out[currentPos++] = (valn << 22) >>> 27;
- out[currentPos++] = (valn << 27) >>> 27;
- }
-
- private void decode30(int val, int valn, int[] out, int currentPos) {
- // number : 7, bitwidth : 4
- out[currentPos++] = (val << 8) >>> 28;
- out[currentPos++] = (val << 12) >>> 28;
- out[currentPos++] = (val << 16) >>> 28;
- out[currentPos++] = (val << 20) >>> 28;
- out[currentPos++] = (val << 24) >>> 28;
- out[currentPos++] = (val << 28) >>> 28;
- out[currentPos++] = (valn << 0) >>> 28;
- // number : 7, bitwidth : 4
- out[currentPos++] = (valn << 4) >>> 28;
- out[currentPos++] = (valn << 8) >>> 28;
- out[currentPos++] = (valn << 12) >>> 28;
- out[currentPos++] = (valn << 16) >>> 28;
- out[currentPos++] = (valn << 20) >>> 28;
- out[currentPos++] = (valn << 24) >>> 28;
- out[currentPos++] = (valn << 28) >>> 28;
- }
-
- private void decode29(int val, int valn, int[] out, int currentPos) {
- // number : 7, bitwidth : 4
- out[currentPos++] = (val << 8) >>> 28;
- out[currentPos++] = (val << 12) >>> 28;
- out[currentPos++] = (val << 16) >>> 28;
- out[currentPos++] = (val << 20) >>> 28;
- out[currentPos++] = (val << 24) >>> 28;
- out[currentPos++] = (val << 28) >>> 28;
- out[currentPos++] = (valn << 1) >>> 28;
- // number : 9, bitwidth : 3
- out[currentPos++] = (valn << 5) >>> 29;
- out[currentPos++] = (valn << 8) >>> 29;
- out[currentPos++] = (valn << 11) >>> 29;
- out[currentPos++] = (valn << 14) >>> 29;
- out[currentPos++] = (valn << 17) >>> 29;
- out[currentPos++] = (valn << 20) >>> 29;
- out[currentPos++] = (valn << 23) >>> 29;
- out[currentPos++] = (valn << 26) >>> 29;
- out[currentPos++] = (valn << 29) >>> 29;
- }
-
- private void decode28(int val, int valn, int[] out, int currentPos) {
- // number : 7, bitwidth : 4
- out[currentPos++] = (val << 8) >>> 28;
- out[currentPos++] = (val << 12) >>> 28;
- out[currentPos++] = (val << 16) >>> 28;
- out[currentPos++] = (val << 20) >>> 28;
- out[currentPos++] = (val << 24) >>> 28;
- out[currentPos++] = (val << 28) >>> 28;
- out[currentPos++] = (valn << 0) >>> 28;
- // number : 14, bitwidth : 2
- out[currentPos++] = (valn << 4) >>> 30;
- out[currentPos++] = (valn << 6) >>> 30;
- out[currentPos++] = (valn << 8) >>> 30;
- out[currentPos++] = (valn << 10) >>> 30;
- out[currentPos++] = (valn << 12) >>> 30;
- out[currentPos++] = (valn << 14) >>> 30;
- out[currentPos++] = (valn << 16) >>> 30;
- out[currentPos++] = (valn << 18) >>> 30;
- out[currentPos++] = (valn << 20) >>> 30;
- out[currentPos++] = (valn << 22) >>> 30; // 10
- out[currentPos++] = (valn << 24) >>> 30;
- out[currentPos++] = (valn << 26) >>> 30;
- out[currentPos++] = (valn << 28) >>> 30;
- out[currentPos++] = (valn << 30) >>> 30;
- }
-
- private void decode27(int val, int valn, int[] out, int currentPos) {
- // number : 7, bitwidth : 4
- out[currentPos++] = (val << 8) >>> 28;
- out[currentPos++] = (val << 12) >>> 28;
- out[currentPos++] = (val << 16) >>> 28;
- out[currentPos++] = (val << 20) >>> 28;
- out[currentPos++] = (val << 24) >>> 28;
- out[currentPos++] = (val << 28) >>> 28;
- out[currentPos++] = (valn << 0) >>> 28;
- // number : 28, bitwidth : 1
- out[currentPos++] = (valn << 4) >>> 31;
- out[currentPos++] = (valn << 5) >>> 31;
- out[currentPos++] = (valn << 6) >>> 31;
- out[currentPos++] = (valn << 7) >>> 31;
- out[currentPos++] = (valn << 8) >>> 31;
- out[currentPos++] = (valn << 9) >>> 31;
- out[currentPos++] = (valn << 10) >>> 31;
- out[currentPos++] = (valn << 11) >>> 31;
- out[currentPos++] = (valn << 12) >>> 31;
- out[currentPos++] = (valn << 13) >>> 31; // 10
- out[currentPos++] = (valn << 14) >>> 31;
- out[currentPos++] = (valn << 15) >>> 31;
- out[currentPos++] = (valn << 16) >>> 31;
- out[currentPos++] = (valn << 17) >>> 31;
- out[currentPos++] = (valn << 18) >>> 31;
- out[currentPos++] = (valn << 19) >>> 31;
- out[currentPos++] = (valn << 20) >>> 31;
- out[currentPos++] = (valn << 21) >>> 31;
- out[currentPos++] = (valn << 22) >>> 31;
- out[currentPos++] = (valn << 23) >>> 31; // 20
- out[currentPos++] = (valn << 24) >>> 31;
- out[currentPos++] = (valn << 25) >>> 31;
- out[currentPos++] = (valn << 26) >>> 31;
- out[currentPos++] = (valn << 27) >>> 31;
- out[currentPos++] = (valn << 28) >>> 31;
- out[currentPos++] = (valn << 29) >>> 31;
- out[currentPos++] = (valn << 30) >>> 31;
- out[currentPos++] = (valn << 31) >>> 31;
- }
-
- private void decode26(int val, int valn, int[] out, int currentPos) {
- // number : 9, bitwidth : 3
- out[currentPos++] = (val << 8) >>> 29;
- out[currentPos++] = (val << 11) >>> 29;
- out[currentPos++] = (val << 14) >>> 29;
- out[currentPos++] = (val << 17) >>> 29;
- out[currentPos++] = (val << 20) >>> 29;
- out[currentPos++] = (val << 23) >>> 29;
- out[currentPos++] = (val << 26) >>> 29;
- out[currentPos++] = (val << 29) >>> 29;
- out[currentPos++] = (valn << 1) >>> 29;
- // number : 1, bitwidth : 28
- out[currentPos++] = (valn << 4) >>> 4;
- }
-
- private void decode25(int val, int valn, int[] out, int currentPos) {
- // number : 9, bitwidth : 3
- out[currentPos++] = (val << 8) >>> 29;
- out[currentPos++] = (val << 11) >>> 29;
- out[currentPos++] = (val << 14) >>> 29;
- out[currentPos++] = (val << 17) >>> 29;
- out[currentPos++] = (val << 20) >>> 29;
- out[currentPos++] = (val << 23) >>> 29;
- out[currentPos++] = (val << 26) >>> 29;
- out[currentPos++] = (val << 29) >>> 29;
- out[currentPos++] = (valn << 1) >>> 29;
- // number : 2, bitwidth : 14
- out[currentPos++] = (valn << 4) >>> 18;
- out[currentPos++] = (valn << 18) >>> 18;
- }
-
- private void decode24(int val, int valn, int[] out, int currentPos) {
- // number : 9, bitwidth : 3
- out[currentPos++] = (val << 8) >>> 29;
- out[currentPos++] = (val << 11) >>> 29;
- out[currentPos++] = (val << 14) >>> 29;
- out[currentPos++] = (val << 17) >>> 29;
- out[currentPos++] = (val << 20) >>> 29;
- out[currentPos++] = (val << 23) >>> 29;
- out[currentPos++] = (val << 26) >>> 29;
- out[currentPos++] = (val << 29) >>> 29;
- out[currentPos++] = (valn << 2) >>> 29;
- // number : 3, bitwidth : 9
- out[currentPos++] = (valn << 5) >>> 23;
- out[currentPos++] = (valn << 14) >>> 23;
- out[currentPos++] = (valn << 23) >>> 23;
- }
-
- private void decode23(int val, int valn, int[] out, int currentPos) {
- // number : 9, bitwidth : 3
- out[currentPos++] = (val << 8) >>> 29;
- out[currentPos++] = (val << 11) >>> 29;
- out[currentPos++] = (val << 14) >>> 29;
- out[currentPos++] = (val << 17) >>> 29;
- out[currentPos++] = (val << 20) >>> 29;
- out[currentPos++] = (val << 23) >>> 29;
- out[currentPos++] = (val << 26) >>> 29;
- out[currentPos++] = (val << 29) >>> 29;
- out[currentPos++] = (valn << 1) >>> 29;
- // number : 4, bitwidth : 7
- out[currentPos++] = (valn << 4) >>> 25;
- out[currentPos++] = (valn << 11) >>> 25;
- out[currentPos++] = (valn << 18) >>> 25;
- out[currentPos++] = (valn << 25) >>> 25;
- }
-
- private void decode22(int val, int valn, int[] out, int currentPos) {
- // number : 9, bitwidth : 3
- out[currentPos++] = (val << 8) >>> 29;
- out[currentPos++] = (val << 11) >>> 29;
- out[currentPos++] = (val << 14) >>> 29;
- out[currentPos++] = (val << 17) >>> 29;
- out[currentPos++] = (val << 20) >>> 29;
- out[currentPos++] = (val << 23) >>> 29;
- out[currentPos++] = (val << 26) >>> 29;
- out[currentPos++] = (val << 29) >>> 29;
- out[currentPos++] = (valn << 4) >>> 29;
- // number : 5, bitwidth : 5
- out[currentPos++] = (valn << 7) >>> 27;
- out[currentPos++] = (valn << 12) >>> 27;
- out[currentPos++] = (valn << 17) >>> 27;
- out[currentPos++] = (valn << 22) >>> 27;
- out[currentPos++] = (valn << 27) >>> 27;
- }
-
- private void decode21(int val, int valn, int[] out, int currentPos) {
- // number : 9, bitwidth : 3
- out[currentPos++] = (val << 8) >>> 29;
- out[currentPos++] = (val << 11) >>> 29;
- out[currentPos++] = (val << 14) >>> 29;
- out[currentPos++] = (val << 17) >>> 29;
- out[currentPos++] = (val << 20) >>> 29;
- out[currentPos++] = (val << 23) >>> 29;
- out[currentPos++] = (val << 26) >>> 29;
- out[currentPos++] = (val << 29) >>> 29;
- out[currentPos++] = (valn << 1) >>> 29;
- // number : 7, bitwidth : 4
- out[currentPos++] = (valn << 4) >>> 28;
- out[currentPos++] = (valn << 8) >>> 28;
- out[currentPos++] = (valn << 12) >>> 28;
- out[currentPos++] = (valn << 16) >>> 28;
- out[currentPos++] = (valn << 20) >>> 28;
- out[currentPos++] = (valn << 24) >>> 28;
- out[currentPos++] = (valn << 28) >>> 28;
- }
-
- private void decode20(int val, int valn, int[] out, int currentPos) {
- // number : 9, bitwidth : 3
- out[currentPos++] = (val << 8) >>> 29;
- out[currentPos++] = (val << 11) >>> 29;
- out[currentPos++] = (val << 14) >>> 29;
- out[currentPos++] = (val << 17) >>> 29;
- out[currentPos++] = (val << 20) >>> 29;
- out[currentPos++] = (val << 23) >>> 29;
- out[currentPos++] = (val << 26) >>> 29;
- out[currentPos++] = (val << 29) >>> 29;
- out[currentPos++] = (valn << 2) >>> 29;
- // number : 9, bitwidth : 3
- out[currentPos++] = (valn << 5) >>> 29;
- out[currentPos++] = (valn << 8) >>> 29;
- out[currentPos++] = (valn << 11) >>> 29;
- out[currentPos++] = (valn << 14) >>> 29;
- out[currentPos++] = (valn << 17) >>> 29;
- out[currentPos++] = (valn << 20) >>> 29;
- out[currentPos++] = (valn << 23) >>> 29;
- out[currentPos++] = (valn << 26) >>> 29;
- out[currentPos++] = (valn << 29) >>> 29;
- }
-
- private void decode19(int val, int valn, int[] out, int currentPos) {
- // number : 9, bitwidth : 3
- out[currentPos++] = (val << 8) >>> 29;
- out[currentPos++] = (val << 11) >>> 29;
- out[currentPos++] = (val << 14) >>> 29;
- out[currentPos++] = (val << 17) >>> 29;
- out[currentPos++] = (val << 20) >>> 29;
- out[currentPos++] = (val << 23) >>> 29;
- out[currentPos++] = (val << 26) >>> 29;
- out[currentPos++] = (val << 29) >>> 29;
- out[currentPos++] = (valn << 1) >>> 29;
- // number : 14, bitwidth : 2
- out[currentPos++] = (valn << 4) >>> 30;
- out[currentPos++] = (valn << 6) >>> 30;
- out[currentPos++] = (valn << 8) >>> 30;
- out[currentPos++] = (valn << 10) >>> 30;
- out[currentPos++] = (valn << 12) >>> 30;
- out[currentPos++] = (valn << 14) >>> 30;
- out[currentPos++] = (valn << 16) >>> 30;
- out[currentPos++] = (valn << 18) >>> 30;
- out[currentPos++] = (valn << 20) >>> 30;
- out[currentPos++] = (valn << 22) >>> 30; // 10
- out[currentPos++] = (valn << 24) >>> 30;
- out[currentPos++] = (valn << 26) >>> 30;
- out[currentPos++] = (valn << 28) >>> 30;
- out[currentPos++] = (valn << 30) >>> 30;
- }
-
- private void decode18(int val, int valn, int[] out, int currentPos) {
- // number : 9, bitwidth : 3
- out[currentPos++] = (val << 8) >>> 29;
- out[currentPos++] = (val << 11) >>> 29;
- out[currentPos++] = (val << 14) >>> 29;
- out[currentPos++] = (val << 17) >>> 29;
- out[currentPos++] = (val << 20) >>> 29;
- out[currentPos++] = (val << 23) >>> 29;
- out[currentPos++] = (val << 26) >>> 29;
- out[currentPos++] = (val << 29) >>> 29;
- out[currentPos++] = (valn << 1) >>> 29;
- // number : 28, bitwidth : 1
- out[currentPos++] = (valn << 4) >>> 31;
- out[currentPos++] = (valn << 5) >>> 31;
- out[currentPos++] = (valn << 6) >>> 31;
- out[currentPos++] = (valn << 7) >>> 31;
- out[currentPos++] = (valn << 8) >>> 31;
- out[currentPos++] = (valn << 9) >>> 31;
- out[currentPos++] = (valn << 10) >>> 31;
- out[currentPos++] = (valn << 11) >>> 31;
- out[currentPos++] = (valn << 12) >>> 31;
- out[currentPos++] = (valn << 13) >>> 31; // 10
- out[currentPos++] = (valn << 14) >>> 31;
- out[currentPos++] = (valn << 15) >>> 31;
- out[currentPos++] = (valn << 16) >>> 31;
- out[currentPos++] = (valn << 17) >>> 31;
- out[currentPos++] = (valn << 18) >>> 31;
- out[currentPos++] = (valn << 19) >>> 31;
- out[currentPos++] = (valn << 20) >>> 31;
- out[currentPos++] = (valn << 21) >>> 31;
- out[currentPos++] = (valn << 22) >>> 31;
- out[currentPos++] = (valn << 23) >>> 31; // 20
- out[currentPos++] = (valn << 24) >>> 31;
- out[currentPos++] = (valn << 25) >>> 31;
- out[currentPos++] = (valn << 26) >>> 31;
- out[currentPos++] = (valn << 27) >>> 31;
- out[currentPos++] = (valn << 28) >>> 31;
- out[currentPos++] = (valn << 29) >>> 31;
- out[currentPos++] = (valn << 30) >>> 31;
- out[currentPos++] = (valn << 31) >>> 31;
- }
-
- private void decode17(int val, int valn, int[] out, int currentPos) {
- // number : 14, bitwidth : 2
- out[currentPos++] = (val << 8) >>> 30;
- out[currentPos++] = (val << 10) >>> 30;
- out[currentPos++] = (val << 12) >>> 30;
- out[currentPos++] = (val << 14) >>> 30;
- out[currentPos++] = (val << 16) >>> 30;
- out[currentPos++] = (val << 18) >>> 30;
- out[currentPos++] = (val << 20) >>> 30;
- out[currentPos++] = (val << 22) >>> 30; // 10
- out[currentPos++] = (val << 24) >>> 30;
- out[currentPos++] = (val << 26) >>> 30;
- out[currentPos++] = (val << 28) >>> 30;
- out[currentPos++] = (val << 30) >>> 30;
- out[currentPos++] = (valn << 0) >>> 30;
- out[currentPos++] = (valn << 2) >>> 30;
- // number : 1, bitwidth : 28
- out[currentPos++] = (valn << 4) >>> 4;
- }
-
- private void decode16(int val, int valn, int[] out, int currentPos) {
- // number : 14, bitwidth : 2
- out[currentPos++] = (val << 8) >>> 30;
- out[currentPos++] = (val << 10) >>> 30;
- out[currentPos++] = (val << 12) >>> 30;
- out[currentPos++] = (val << 14) >>> 30;
- out[currentPos++] = (val << 16) >>> 30;
- out[currentPos++] = (val << 18) >>> 30;
- out[currentPos++] = (val << 20) >>> 30;
- out[currentPos++] = (val << 22) >>> 30; // 10
- out[currentPos++] = (val << 24) >>> 30;
- out[currentPos++] = (val << 26) >>> 30;
- out[currentPos++] = (val << 28) >>> 30;
- out[currentPos++] = (val << 30) >>> 30;
- out[currentPos++] = (valn << 0) >>> 30;
- out[currentPos++] = (valn << 2) >>> 30;
- // number : 2, bitwidth : 14
- out[currentPos++] = (valn << 4) >>> 18;
- out[currentPos++] = (valn << 18) >>> 18;
- }
-
- private void decode15(int val, int valn, int[] out, int currentPos) {
- // number : 14, bitwidth : 2
- out[currentPos++] = (val << 8) >>> 30;
- out[currentPos++] = (val << 10) >>> 30;
- out[currentPos++] = (val << 12) >>> 30;
- out[currentPos++] = (val << 14) >>> 30;
- out[currentPos++] = (val << 16) >>> 30;
- out[currentPos++] = (val << 18) >>> 30;
- out[currentPos++] = (val << 20) >>> 30;
- out[currentPos++] = (val << 22) >>> 30; // 10
- out[currentPos++] = (val << 24) >>> 30;
- out[currentPos++] = (val << 26) >>> 30;
- out[currentPos++] = (val << 28) >>> 30;
- out[currentPos++] = (val << 30) >>> 30;
- out[currentPos++] = (valn << 1) >>> 30;
- out[currentPos++] = (valn << 3) >>> 30;
- // number : 3, bitwidth : 9
- out[currentPos++] = (valn << 5) >>> 23;
- out[currentPos++] = (valn << 14) >>> 23;
- out[currentPos++] = (valn << 23) >>> 23;
- }
-
- private void decode14(int val, int valn, int[] out, int currentPos) {
- // number : 14, bitwidth : 2
- out[currentPos++] = (val << 8) >>> 30;
- out[currentPos++] = (val << 10) >>> 30;
- out[currentPos++] = (val << 12) >>> 30;
- out[currentPos++] = (val << 14) >>> 30;
- out[currentPos++] = (val << 16) >>> 30;
- out[currentPos++] = (val << 18) >>> 30;
- out[currentPos++] = (val << 20) >>> 30;
- out[currentPos++] = (val << 22) >>> 30; // 10
- out[currentPos++] = (val << 24) >>> 30;
- out[currentPos++] = (val << 26) >>> 30;
- out[currentPos++] = (val << 28) >>> 30;
- out[currentPos++] = (val << 30) >>> 30;
- out[currentPos++] = (valn << 0) >>> 30;
- out[currentPos++] = (valn << 2) >>> 30;
- // number : 4, bitwidth : 7
- out[currentPos++] = (valn << 4) >>> 25;
- out[currentPos++] = (valn << 11) >>> 25;
- out[currentPos++] = (valn << 18) >>> 25;
- out[currentPos++] = (valn << 25) >>> 25;
- }
-
- private void decode13(int val, int valn, int[] out, int currentPos) {
- // number : 14, bitwidth : 2
- out[currentPos++] = (val << 8) >>> 30;
- out[currentPos++] = (val << 10) >>> 30;
- out[currentPos++] = (val << 12) >>> 30;
- out[currentPos++] = (val << 14) >>> 30;
- out[currentPos++] = (val << 16) >>> 30;
- out[currentPos++] = (val << 18) >>> 30;
- out[currentPos++] = (val << 20) >>> 30;
- out[currentPos++] = (val << 22) >>> 30; // 10
- out[currentPos++] = (val << 24) >>> 30;
- out[currentPos++] = (val << 26) >>> 30;
- out[currentPos++] = (val << 28) >>> 30;
- out[currentPos++] = (val << 30) >>> 30;
- out[currentPos++] = (valn << 3) >>> 30;
- out[currentPos++] = (valn << 5) >>> 30;
- // number : 5, bitwidth : 5
- out[currentPos++] = (valn << 7) >>> 27;
- out[currentPos++] = (valn << 12) >>> 27;
- out[currentPos++] = (valn << 17) >>> 27;
- out[currentPos++] = (valn << 22) >>> 27;
- out[currentPos++] = (valn << 27) >>> 27;
-
- }
-
- private void decode12(int val, int valn, int[] out, int currentPos) {
- // number : 14, bitwidth : 2
- out[currentPos++] = (val << 8) >>> 30;
- out[currentPos++] = (val << 10) >>> 30;
- out[currentPos++] = (val << 12) >>> 30;
- out[currentPos++] = (val << 14) >>> 30;
- out[currentPos++] = (val << 16) >>> 30;
- out[currentPos++] = (val << 18) >>> 30;
- out[currentPos++] = (val << 20) >>> 30;
- out[currentPos++] = (val << 22) >>> 30; // 10
- out[currentPos++] = (val << 24) >>> 30;
- out[currentPos++] = (val << 26) >>> 30;
- out[currentPos++] = (val << 28) >>> 30;
- out[currentPos++] = (val << 30) >>> 30;
- out[currentPos++] = (valn << 0) >>> 30;
- out[currentPos++] = (valn << 2) >>> 30;
- // number : 7, bitwidth : 4
- out[currentPos++] = (valn << 4) >>> 28;
- out[currentPos++] = (valn << 8) >>> 28;
- out[currentPos++] = (valn << 12) >>> 28;
- out[currentPos++] = (valn << 16) >>> 28;
- out[currentPos++] = (valn << 20) >>> 28;
- out[currentPos++] = (valn << 24) >>> 28;
- out[currentPos++] = (valn << 28) >>> 28;
-
- }
-
- private void decode11(int val, int valn, int[] out, int currentPos) {
- // number : 14, bitwidth : 2
- out[currentPos++] = (val << 8) >>> 30;
- out[currentPos++] = (val << 10) >>> 30;
- out[currentPos++] = (val << 12) >>> 30;
- out[currentPos++] = (val << 14) >>> 30;
- out[currentPos++] = (val << 16) >>> 30;
- out[currentPos++] = (val << 18) >>> 30;
- out[currentPos++] = (val << 20) >>> 30;
- out[currentPos++] = (val << 22) >>> 30; // 10
- out[currentPos++] = (val << 24) >>> 30;
- out[currentPos++] = (val << 26) >>> 30;
- out[currentPos++] = (val << 28) >>> 30;
- out[currentPos++] = (val << 30) >>> 30;
- out[currentPos++] = (valn << 1) >>> 30;
- out[currentPos++] = (valn << 3) >>> 30;
- // number : 9, bitwidth : 3
- out[currentPos++] = (valn << 5) >>> 29;
- out[currentPos++] = (valn << 8) >>> 29;
- out[currentPos++] = (valn << 11) >>> 29;
- out[currentPos++] = (valn << 14) >>> 29;
- out[currentPos++] = (valn << 17) >>> 29;
- out[currentPos++] = (valn << 20) >>> 29;
- out[currentPos++] = (valn << 23) >>> 29;
- out[currentPos++] = (valn << 26) >>> 29;
- out[currentPos++] = (valn << 29) >>> 29;
-
- }
-
- private void decode10(int val, int valn, int[] out, int currentPos) {
- // number : 14, bitwidth : 2
- out[currentPos++] = (val << 8) >>> 30;
- out[currentPos++] = (val << 10) >>> 30;
- out[currentPos++] = (val << 12) >>> 30;
- out[currentPos++] = (val << 14) >>> 30;
- out[currentPos++] = (val << 16) >>> 30;
- out[currentPos++] = (val << 18) >>> 30;
- out[currentPos++] = (val << 20) >>> 30;
- out[currentPos++] = (val << 22) >>> 30; // 10
- out[currentPos++] = (val << 24) >>> 30;
- out[currentPos++] = (val << 26) >>> 30;
- out[currentPos++] = (val << 28) >>> 30;
- out[currentPos++] = (val << 30) >>> 30;
- out[currentPos++] = (valn << 0) >>> 30;
- out[currentPos++] = (valn << 2) >>> 30;
- // number : 14, bitwidth : 2
- out[currentPos++] = (valn << 4) >>> 30;
- out[currentPos++] = (valn << 6) >>> 30;
- out[currentPos++] = (valn << 8) >>> 30;
- out[currentPos++] = (valn << 10) >>> 30;
- out[currentPos++] = (valn << 12) >>> 30;
- out[currentPos++] = (valn << 14) >>> 30;
- out[currentPos++] = (valn << 16) >>> 30;
- out[currentPos++] = (valn << 18) >>> 30;
- out[currentPos++] = (valn << 20) >>> 30;
- out[currentPos++] = (valn << 22) >>> 30; // 10
- out[currentPos++] = (valn << 24) >>> 30;
- out[currentPos++] = (valn << 26) >>> 30;
- out[currentPos++] = (valn << 28) >>> 30;
- out[currentPos++] = (valn << 30) >>> 30;
- }
-
- private void decode9(int val, int valn, int[] out, int currentPos) {
- // number : 14, bitwidth : 2
- out[currentPos++] = (val << 8) >>> 30;
- out[currentPos++] = (val << 10) >>> 30;
- out[currentPos++] = (val << 12) >>> 30;
- out[currentPos++] = (val << 14) >>> 30;
- out[currentPos++] = (val << 16) >>> 30;
- out[currentPos++] = (val << 18) >>> 30;
- out[currentPos++] = (val << 20) >>> 30;
- out[currentPos++] = (val << 22) >>> 30; // 10
- out[currentPos++] = (val << 24) >>> 30;
- out[currentPos++] = (val << 26) >>> 30;
- out[currentPos++] = (val << 28) >>> 30;
- out[currentPos++] = (val << 30) >>> 30;
- out[currentPos++] = (valn << 0) >>> 30;
- out[currentPos++] = (valn << 2) >>> 30;
- // number : 28, bitwidth : 1
- out[currentPos++] = (valn << 4) >>> 31;
- out[currentPos++] = (valn << 5) >>> 31;
- out[currentPos++] = (valn << 6) >>> 31;
- out[currentPos++] = (valn << 7) >>> 31;
- out[currentPos++] = (valn << 8) >>> 31;
- out[currentPos++] = (valn << 9) >>> 31;
- out[currentPos++] = (valn << 10) >>> 31;
- out[currentPos++] = (valn << 11) >>> 31;
- out[currentPos++] = (valn << 12) >>> 31;
- out[currentPos++] = (valn << 13) >>> 31; // 10
- out[currentPos++] = (valn << 14) >>> 31;
- out[currentPos++] = (valn << 15) >>> 31;
- out[currentPos++] = (valn << 16) >>> 31;
- out[currentPos++] = (valn << 17) >>> 31;
- out[currentPos++] = (valn << 18) >>> 31;
- out[currentPos++] = (valn << 19) >>> 31;
- out[currentPos++] = (valn << 20) >>> 31;
- out[currentPos++] = (valn << 21) >>> 31;
- out[currentPos++] = (valn << 22) >>> 31;
- out[currentPos++] = (valn << 23) >>> 31; // 20
- out[currentPos++] = (valn << 24) >>> 31;
- out[currentPos++] = (valn << 25) >>> 31;
- out[currentPos++] = (valn << 26) >>> 31;
- out[currentPos++] = (valn << 27) >>> 31;
- out[currentPos++] = (valn << 28) >>> 31;
- out[currentPos++] = (valn << 29) >>> 31;
- out[currentPos++] = (valn << 30) >>> 31;
- out[currentPos++] = (valn << 31) >>> 31;
- }
-
- private void decode8(int val, int valn, int[] out, int currentPos) {
- // number : 28, bitwidth : 1
- out[currentPos++] = (val << 8) >>> 31;
- out[currentPos++] = (val << 9) >>> 31;
- out[currentPos++] = (val << 10) >>> 31;
- out[currentPos++] = (val << 11) >>> 31;
- out[currentPos++] = (val << 12) >>> 31;
- out[currentPos++] = (val << 13) >>> 31; // 10
- out[currentPos++] = (val << 14) >>> 31;
- out[currentPos++] = (val << 15) >>> 31;
- out[currentPos++] = (val << 16) >>> 31;
- out[currentPos++] = (val << 17) >>> 31;
- out[currentPos++] = (val << 18) >>> 31;
- out[currentPos++] = (val << 19) >>> 31;
- out[currentPos++] = (val << 20) >>> 31;
- out[currentPos++] = (val << 21) >>> 31;
- out[currentPos++] = (val << 22) >>> 31;
- out[currentPos++] = (val << 23) >>> 31; // 20
- out[currentPos++] = (val << 24) >>> 31;
- out[currentPos++] = (val << 25) >>> 31;
- out[currentPos++] = (val << 26) >>> 31;
- out[currentPos++] = (val << 27) >>> 31;
- out[currentPos++] = (val << 28) >>> 31;
- out[currentPos++] = (val << 29) >>> 31;
- out[currentPos++] = (val << 30) >>> 31;
- out[currentPos++] = (val << 31) >>> 31;
- out[currentPos++] = valn >>> 31;
- out[currentPos++] = (valn << 1) >>> 31;
- out[currentPos++] = (valn << 2) >>> 31;
- out[currentPos++] = (valn << 3) >>> 31;
- // number : 1, bitwidth : 28
- out[currentPos++] = (valn << 4) >>> 4;
- }
-
- private void decode7(int val, int valn, int[] out, int currentPos) {
- // number : 28, bitwidth : 1
- out[currentPos++] = (val << 8) >>> 31;
- out[currentPos++] = (val << 9) >>> 31;
- out[currentPos++] = (val << 10) >>> 31;
- out[currentPos++] = (val << 11) >>> 31;
- out[currentPos++] = (val << 12) >>> 31;
- out[currentPos++] = (val << 13) >>> 31; // 10
- out[currentPos++] = (val << 14) >>> 31;
- out[currentPos++] = (val << 15) >>> 31;
- out[currentPos++] = (val << 16) >>> 31;
- out[currentPos++] = (val << 17) >>> 31;
- out[currentPos++] = (val << 18) >>> 31;
- out[currentPos++] = (val << 19) >>> 31;
- out[currentPos++] = (val << 20) >>> 31;
- out[currentPos++] = (val << 21) >>> 31;
- out[currentPos++] = (val << 22) >>> 31;
- out[currentPos++] = (val << 23) >>> 31; // 20
- out[currentPos++] = (val << 24) >>> 31;
- out[currentPos++] = (val << 25) >>> 31;
- out[currentPos++] = (val << 26) >>> 31;
- out[currentPos++] = (val << 27) >>> 31;
- out[currentPos++] = (val << 28) >>> 31;
- out[currentPos++] = (val << 29) >>> 31;
- out[currentPos++] = (val << 30) >>> 31;
- out[currentPos++] = (val << 31) >>> 31;
- out[currentPos++] = valn >>> 31;
- out[currentPos++] = (valn << 1) >>> 31;
- out[currentPos++] = (valn << 2) >>> 31;
- out[currentPos++] = (valn << 3) >>> 31;
- // number : 2, bitwidth : 14
- out[currentPos++] = (valn << 4) >>> 18;
- out[currentPos++] = (valn << 18) >>> 18;
- }
-
- private void decode6(int val, int valn, int[] out, int currentPos) {
- // number : 28, bitwidth : 1
- out[currentPos++] = (val << 8) >>> 31;
- out[currentPos++] = (val << 9) >>> 31;
- out[currentPos++] = (val << 10) >>> 31;
- out[currentPos++] = (val << 11) >>> 31;
- out[currentPos++] = (val << 12) >>> 31;
- out[currentPos++] = (val << 13) >>> 31; // 10
- out[currentPos++] = (val << 14) >>> 31;
- out[currentPos++] = (val << 15) >>> 31;
- out[currentPos++] = (val << 16) >>> 31;
- out[currentPos++] = (val << 17) >>> 31;
- out[currentPos++] = (val << 18) >>> 31;
- out[currentPos++] = (val << 19) >>> 31;
- out[currentPos++] = (val << 20) >>> 31;
- out[currentPos++] = (val << 21) >>> 31;
- out[currentPos++] = (val << 22) >>> 31;
- out[currentPos++] = (val << 23) >>> 31; // 20
- out[currentPos++] = (val << 24) >>> 31;
- out[currentPos++] = (val << 25) >>> 31;
- out[currentPos++] = (val << 26) >>> 31;
- out[currentPos++] = (val << 27) >>> 31;
- out[currentPos++] = (val << 28) >>> 31;
- out[currentPos++] = (val << 29) >>> 31;
- out[currentPos++] = (val << 30) >>> 31;
- out[currentPos++] = (val << 31) >>> 31;
- out[currentPos++] = (valn << 1) >>> 31;
- out[currentPos++] = (valn << 2) >>> 31;
- out[currentPos++] = (valn << 3) >>> 31;
- out[currentPos++] = (valn << 4) >>> 31;
- // number : 3, bitwidth : 9
- out[currentPos++] = (valn << 5) >>> 23;
- out[currentPos++] = (valn << 14) >>> 23;
- out[currentPos++] = (valn << 23) >>> 23;
- }
-
- private void decode5(int val, int valn, int[] out, int currentPos) {
- // number : 28, bitwidth : 1
- out[currentPos++] = (val << 8) >>> 31;
- out[currentPos++] = (val << 9) >>> 31;
- out[currentPos++] = (val << 10) >>> 31;
- out[currentPos++] = (val << 11) >>> 31;
- out[currentPos++] = (val << 12) >>> 31;
- out[currentPos++] = (val << 13) >>> 31; // 10
- out[currentPos++] = (val << 14) >>> 31;
- out[currentPos++] = (val << 15) >>> 31;
- out[currentPos++] = (val << 16) >>> 31;
- out[currentPos++] = (val << 17) >>> 31;
- out[currentPos++] = (val << 18) >>> 31;
- out[currentPos++] = (val << 19) >>> 31;
- out[currentPos++] = (val << 20) >>> 31;
- out[currentPos++] = (val << 21) >>> 31;
- out[currentPos++] = (val << 22) >>> 31;
- out[currentPos++] = (val << 23) >>> 31; // 20
- out[currentPos++] = (val << 24) >>> 31;
- out[currentPos++] = (val << 25) >>> 31;
- out[currentPos++] = (val << 26) >>> 31;
- out[currentPos++] = (val << 27) >>> 31;
- out[currentPos++] = (val << 28) >>> 31;
- out[currentPos++] = (val << 29) >>> 31;
- out[currentPos++] = (val << 30) >>> 31;
- out[currentPos++] = (val << 31) >>> 31;
- out[currentPos++] = valn >>> 31;
- out[currentPos++] = (valn << 1) >>> 31;
- out[currentPos++] = (valn << 2) >>> 31;
- out[currentPos++] = (valn << 3) >>> 31;
- // number : 4, bitwidth : 7
- out[currentPos++] = (valn << 4) >>> 25;
- out[currentPos++] = (valn << 11) >>> 25;
- out[currentPos++] = (valn << 18) >>> 25;
- out[currentPos++] = (valn << 25) >>> 25;
- }
-
- private void decode4(int val, int valn, int[] out, int currentPos) {
- // number : 28, bitwidth : 1
- out[currentPos++] = (val << 8) >>> 31;
- out[currentPos++] = (val << 9) >>> 31;
- out[currentPos++] = (val << 10) >>> 31;
- out[currentPos++] = (val << 11) >>> 31;
- out[currentPos++] = (val << 12) >>> 31;
- out[currentPos++] = (val << 13) >>> 31; // 10
- out[currentPos++] = (val << 14) >>> 31;
- out[currentPos++] = (val << 15) >>> 31;
- out[currentPos++] = (val << 16) >>> 31;
- out[currentPos++] = (val << 17) >>> 31;
- out[currentPos++] = (val << 18) >>> 31;
- out[currentPos++] = (val << 19) >>> 31;
- out[currentPos++] = (val << 20) >>> 31;
- out[currentPos++] = (val << 21) >>> 31;
- out[currentPos++] = (val << 22) >>> 31;
- out[currentPos++] = (val << 23) >>> 31; // 20
- out[currentPos++] = (val << 24) >>> 31;
- out[currentPos++] = (val << 25) >>> 31;
- out[currentPos++] = (val << 26) >>> 31;
- out[currentPos++] = (val << 27) >>> 31;
- out[currentPos++] = (val << 28) >>> 31;
- out[currentPos++] = (val << 29) >>> 31;
- out[currentPos++] = (val << 30) >>> 31;
- out[currentPos++] = (val << 31) >>> 31;
- out[currentPos++] = (valn << 3) >>> 31;// 头部3bit
- out[currentPos++] = (valn << 4) >>> 31;
- out[currentPos++] = (valn << 5) >>> 31;
- out[currentPos++] = (valn << 6) >>> 31;
- // number : 5, bitwidth : 5
- out[currentPos++] = (valn << 7) >>> 27;
- out[currentPos++] = (valn << 12) >>> 27;
- out[currentPos++] = (valn << 17) >>> 27;
- out[currentPos++] = (valn << 22) >>> 27;
- out[currentPos++] = (valn << 27) >>> 27;
- }
-
- private void decode3(int val, int valn, int[] out, int currentPos) {
- // number : 28, bitwidth : 1
- out[currentPos++] = (val << 8) >>> 31;
- out[currentPos++] = (val << 9) >>> 31;
- out[currentPos++] = (val << 10) >>> 31;
- out[currentPos++] = (val << 11) >>> 31;
- out[currentPos++] = (val << 12) >>> 31;
- out[currentPos++] = (val << 13) >>> 31; // 10
- out[currentPos++] = (val << 14) >>> 31;
- out[currentPos++] = (val << 15) >>> 31;
- out[currentPos++] = (val << 16) >>> 31;
- out[currentPos++] = (val << 17) >>> 31;
- out[currentPos++] = (val << 18) >>> 31;
- out[currentPos++] = (val << 19) >>> 31;
- out[currentPos++] = (val << 20) >>> 31;
- out[currentPos++] = (val << 21) >>> 31;
- out[currentPos++] = (val << 22) >>> 31;
- out[currentPos++] = (val << 23) >>> 31; // 20
- out[currentPos++] = (val << 24) >>> 31;
- out[currentPos++] = (val << 25) >>> 31;
- out[currentPos++] = (val << 26) >>> 31;
- out[currentPos++] = (val << 27) >>> 31;
- out[currentPos++] = (val << 28) >>> 31;
- out[currentPos++] = (val << 29) >>> 31;
- out[currentPos++] = (val << 30) >>> 31;
- out[currentPos++] = (val << 31) >>> 31;
- out[currentPos++] = valn >>> 31;
- out[currentPos++] = (valn << 1) >>> 31;
- out[currentPos++] = (valn << 2) >>> 31;
- out[currentPos++] = (valn << 3) >>> 31;
- // number : 7, bitwidth : 4
- out[currentPos++] = (valn << 4) >>> 28;
- out[currentPos++] = (valn << 8) >>> 28;
- out[currentPos++] = (valn << 12) >>> 28;
- out[currentPos++] = (valn << 16) >>> 28;
- out[currentPos++] = (valn << 20) >>> 28;
- out[currentPos++] = (valn << 24) >>> 28;
- out[currentPos++] = (valn << 28) >>> 28;
- }
-
- private void decode2(int val, int valn, int[] out, int currentPos) {
- // number : 28, bitwidth : 1
- out[currentPos++] = (val << 8) >>> 31;
- out[currentPos++] = (val << 9) >>> 31;
- out[currentPos++] = (val << 10) >>> 31;
- out[currentPos++] = (val << 11) >>> 31;
- out[currentPos++] = (val << 12) >>> 31;
- out[currentPos++] = (val << 13) >>> 31; // 10
- out[currentPos++] = (val << 14) >>> 31;
- out[currentPos++] = (val << 15) >>> 31;
- out[currentPos++] = (val << 16) >>> 31;
- out[currentPos++] = (val << 17) >>> 31;
- out[currentPos++] = (val << 18) >>> 31;
- out[currentPos++] = (val << 19) >>> 31;
- out[currentPos++] = (val << 20) >>> 31;
- out[currentPos++] = (val << 21) >>> 31;
- out[currentPos++] = (val << 22) >>> 31;
- out[currentPos++] = (val << 23) >>> 31; // 20
- out[currentPos++] = (val << 24) >>> 31;
- out[currentPos++] = (val << 25) >>> 31;
- out[currentPos++] = (val << 26) >>> 31;
- out[currentPos++] = (val << 27) >>> 31;
- out[currentPos++] = (val << 28) >>> 31;
- out[currentPos++] = (val << 29) >>> 31;
- out[currentPos++] = (val << 30) >>> 31;
- out[currentPos++] = (val << 31) >>> 31;
- out[currentPos++] = (valn << 1) >>> 31;// 头部1bit
- out[currentPos++] = (valn << 2) >>> 31;
- out[currentPos++] = (valn << 3) >>> 31;
- out[currentPos++] = (valn << 4) >>> 31;
- // number : 9, bitwidth : 3
- out[currentPos++] = (valn << 5) >>> 29;
- out[currentPos++] = (valn << 8) >>> 29;
- out[currentPos++] = (valn << 11) >>> 29;
- out[currentPos++] = (valn << 14) >>> 29;
- out[currentPos++] = (valn << 17) >>> 29;
- out[currentPos++] = (valn << 20) >>> 29;
- out[currentPos++] = (valn << 23) >>> 29;
- out[currentPos++] = (valn << 26) >>> 29;
- out[currentPos++] = (valn << 29) >>> 29;
- }
-
- private void decode1(int val, int valn, int[] out, int currentPos) {
- // number : 28, bitwidth : 1
- out[currentPos++] = (val << 8) >>> 31;
- out[currentPos++] = (val << 9) >>> 31;
- out[currentPos++] = (val << 10) >>> 31;
- out[currentPos++] = (val << 11) >>> 31;
- out[currentPos++] = (val << 12) >>> 31;
- out[currentPos++] = (val << 13) >>> 31; // 10
- out[currentPos++] = (val << 14) >>> 31;
- out[currentPos++] = (val << 15) >>> 31;
- out[currentPos++] = (val << 16) >>> 31;
- out[currentPos++] = (val << 17) >>> 31;
- out[currentPos++] = (val << 18) >>> 31;
- out[currentPos++] = (val << 19) >>> 31;
- out[currentPos++] = (val << 20) >>> 31;
- out[currentPos++] = (val << 21) >>> 31;
- out[currentPos++] = (val << 22) >>> 31;
- out[currentPos++] = (val << 23) >>> 31;// 20
- out[currentPos++] = (val << 24) >>> 31;
- out[currentPos++] = (val << 25) >>> 31;
- out[currentPos++] = (val << 26) >>> 31;
- out[currentPos++] = (val << 27) >>> 31;
- out[currentPos++] = (val << 28) >>> 31;
- out[currentPos++] = (val << 29) >>> 31;
- out[currentPos++] = (val << 30) >>> 31;
- out[currentPos++] = (val << 31) >>> 31;
- out[currentPos++] = valn >>> 31;
- out[currentPos++] = (valn << 1) >>> 31;
- out[currentPos++] = (valn << 2) >>> 31;
- out[currentPos++] = (valn << 3) >>> 31;
- // number : 14, bitwidth : 2
- out[currentPos++] = (valn << 4) >>> 30;
- out[currentPos++] = (valn << 6) >>> 30;
- out[currentPos++] = (valn << 8) >>> 30;
- out[currentPos++] = (valn << 10) >>> 30;
- out[currentPos++] = (valn << 12) >>> 30;
- out[currentPos++] = (valn << 14) >>> 30;
- out[currentPos++] = (valn << 16) >>> 30;
- out[currentPos++] = (valn << 18) >>> 30;
- out[currentPos++] = (valn << 20) >>> 30;
- out[currentPos++] = (valn << 22) >>> 30; // 10
- out[currentPos++] = (valn << 24) >>> 30;
- out[currentPos++] = (valn << 26) >>> 30;
- out[currentPos++] = (valn << 28) >>> 30;
- out[currentPos++] = (valn << 30) >>> 30;
- }
-
- private void decode0(int val, int valn, int[] out, int currentPos) {
- // number : 28, bitwidth : 1
- out[currentPos++] = (val << 8) >>> 31;
- out[currentPos++] = (val << 9) >>> 31;
- out[currentPos++] = (val << 10) >>> 31;
- out[currentPos++] = (val << 11) >>> 31;
- out[currentPos++] = (val << 12) >>> 31;
- out[currentPos++] = (val << 13) >>> 31; // 10
- out[currentPos++] = (val << 14) >>> 31;
- out[currentPos++] = (val << 15) >>> 31;
- out[currentPos++] = (val << 16) >>> 31;
- out[currentPos++] = (val << 17) >>> 31;
- out[currentPos++] = (val << 18) >>> 31;
- out[currentPos++] = (val << 19) >>> 31;
- out[currentPos++] = (val << 20) >>> 31;
- out[currentPos++] = (val << 21) >>> 31;
- out[currentPos++] = (val << 22) >>> 31;
- out[currentPos++] = (val << 23) >>> 31; // 20
- out[currentPos++] = (val << 24) >>> 31;
- out[currentPos++] = (val << 25) >>> 31;
- out[currentPos++] = (val << 26) >>> 31;
- out[currentPos++] = (val << 27) >>> 31;
- out[currentPos++] = (val << 28) >>> 31;
- out[currentPos++] = (val << 29) >>> 31;
- out[currentPos++] = (val << 30) >>> 31;
- out[currentPos++] = (val << 31) >>> 31;
- out[currentPos++] = valn >>> 31;
- out[currentPos++] = (valn << 1) >>> 31;
- out[currentPos++] = (valn << 2) >>> 31;
- out[currentPos++] = (valn << 3) >>> 31;
- // number : 28, bitwidth : 1
- out[currentPos++] = (valn << 4) >>> 31;
- out[currentPos++] = (valn << 5) >>> 31;
- out[currentPos++] = (valn << 6) >>> 31;
- out[currentPos++] = (valn << 7) >>> 31;
- out[currentPos++] = (valn << 8) >>> 31;
- out[currentPos++] = (valn << 9) >>> 31;
- out[currentPos++] = (valn << 10) >>> 31;
- out[currentPos++] = (valn << 11) >>> 31;
- out[currentPos++] = (valn << 12) >>> 31;
- out[currentPos++] = (valn << 13) >>> 31; // 10
- out[currentPos++] = (valn << 14) >>> 31;
- out[currentPos++] = (valn << 15) >>> 31;
- out[currentPos++] = (valn << 16) >>> 31;
- out[currentPos++] = (valn << 17) >>> 31;
- out[currentPos++] = (valn << 18) >>> 31;
- out[currentPos++] = (valn << 19) >>> 31;
- out[currentPos++] = (valn << 20) >>> 31;
- out[currentPos++] = (valn << 21) >>> 31;
- out[currentPos++] = (valn << 22) >>> 31;
- out[currentPos++] = (valn << 23) >>> 31; // 20
- out[currentPos++] = (valn << 24) >>> 31;
- out[currentPos++] = (valn << 25) >>> 31;
- out[currentPos++] = (valn << 26) >>> 31;
- out[currentPos++] = (valn << 27) >>> 31;
- out[currentPos++] = (valn << 28) >>> 31;
- out[currentPos++] = (valn << 29) >>> 31;
- out[currentPos++] = (valn << 30) >>> 31;
- out[currentPos++] = (valn << 31) >>> 31;
- }
-
-
- private final static int bitLength[] = { 1, 2, 3, 4, 5, 7, 9, 14, 28 };
-
- private final static int codeNum[] = { 28, 14, 9, 7, 5, 4, 3, 2, 1 };
-
- @Override
- public String toString() {
- return this.getClass().getSimpleName();
- }
-
- @Override
- public void headlessCompress(int[] in, IntWrapper inpos, int inlength, int[] out, IntWrapper outpos) {
- int tmpoutpos = outpos.get();
- int currentPos = inpos.get();
- int selector1 = 0;
- int selector2 = 0;
- final int finalin = currentPos + inlength;
- while (currentPos < finalin - 28 * 2) {
- int nextCurrentPos = currentPos;
- mainloop1: for (selector1=0; selector1 <= 8; selector1++) {
- int compressedNum = codeNum[selector1];
- //if (finalin <= nextCurrentPos + compressedNum - 1)
- // compressedNum = finalin - nextCurrentPos;
- int b = bitLength[selector1];
- int max = 1 << b;
- int i = 0;
- for (; i < compressedNum; i++) {
- if (Util.smallerorequalthan(max, in[nextCurrentPos + i]))
- continue mainloop1;
- }
- nextCurrentPos += compressedNum;
- break;
- }
- mainloop2: for (selector2 = 0; selector2 <= 8; selector2++) {
- int compressedNum = codeNum[selector2];
- //if (finalin <= nextCurrentPos + compressedNum - 1)
- // compressedNum = finalin - nextCurrentPos;
- int b = bitLength[selector2];
- int max = 1 << b;
- int i = 0;
- for (; i < compressedNum; i++) {
- if (Util.smallerorequalthan(max, in[nextCurrentPos + i]))
- continue mainloop2;
- }
- nextCurrentPos += compressedNum;
- break;
- }
- int code = M[selector1][selector2];
- out[tmpoutpos] = 0;
- out[tmpoutpos + 1] = 0;
- switch (code) {
- case 0:
- encode0(in, currentPos, code, out, tmpoutpos);
- break;
- case 1:
- encode1(in, currentPos, code, out, tmpoutpos);
- break;
- case 2:
- encode2(in, currentPos, code, out, tmpoutpos);
- break;
- case 3:
- encode3(in, currentPos, code, out, tmpoutpos);
- break;
- case 4:
- encode4(in, currentPos, code, out, tmpoutpos);
- break;
- case 5:
- encode5(in, currentPos, code, out, tmpoutpos);
- break;
- case 6:
- encode6(in, currentPos, code, out, tmpoutpos);
- break;
- case 7:
- encode7(in, currentPos, code, out, tmpoutpos);
- break;
- case 8:
- encode8(in, currentPos, code, out, tmpoutpos);
- break;
- case 9:
- encode9(in, currentPos, code, out, tmpoutpos);
- break;
- case 10:
- encode10(in, currentPos, code, out, tmpoutpos);
- break;
- case 11:
- encode11(in, currentPos, code, out, tmpoutpos);
- break;
- case 12:
- encode12(in, currentPos, code, out, tmpoutpos);
- break;
- case 13:
- encode13(in, currentPos, code, out, tmpoutpos);
- break;
- case 14:
- encode14(in, currentPos, code, out, tmpoutpos);
- break;
- case 15:
- encode15(in, currentPos, code, out, tmpoutpos);
- break;
- case 16:
- encode16(in, currentPos, code, out, tmpoutpos);
- break;
- case 17:
- encode17(in, currentPos, code, out, tmpoutpos);
- break;
- case 18:
- encode18(in, currentPos, code, out, tmpoutpos);
- break;
- case 19:
- encode19(in, currentPos, code, out, tmpoutpos);
- break;
- case 20:
- encode20(in, currentPos, code, out, tmpoutpos);
- break;
- case 21:
- encode21(in, currentPos, code, out, tmpoutpos);
- break;
- case 22:
- encode22(in, currentPos, code, out, tmpoutpos);
- break;
- case 23:
- encode23(in, currentPos, code, out, tmpoutpos);
- break;
- case 24:
- encode24(in, currentPos, code, out, tmpoutpos);
- break;
- case 25:
- encode25(in, currentPos, code, out, tmpoutpos);
- break;
- case 26:
- encode26(in, currentPos, code, out, tmpoutpos);
- break;
- case 27:
- encode27(in, currentPos, code, out, tmpoutpos);
- break;
- case 28:
- encode28(in, currentPos, code, out, tmpoutpos);
- break;
- case 29:
- encode29(in, currentPos, code, out, tmpoutpos);
- break;
- case 30:
- encode30(in, currentPos, code, out, tmpoutpos);
- break;
- case 31:
- encode31(in, currentPos, code, out, tmpoutpos);
- break;
- case 32:
- encode32(in, currentPos, code, out, tmpoutpos);
- break;
- case 33:
- encode33(in, currentPos, code, out, tmpoutpos);
- break;
- case 34:
- encode34(in, currentPos, code, out, tmpoutpos);
- break;
- case 35:
- encode35(in, currentPos, code, out, tmpoutpos);
- break;
- case 36:
- encode36(in, currentPos, code, out, tmpoutpos);
- break;
- case 37:
- encode37(in, currentPos, code, out, tmpoutpos);
- break;
- case 38:
- encode38(in, currentPos, code, out, tmpoutpos);
- break;
- case 39:
- encode39(in, currentPos, code, out, tmpoutpos);
- break;
- case 40:
- encode40(in, currentPos, code, out, tmpoutpos);
- break;
- case 41:
- encode41(in, currentPos, code, out, tmpoutpos);
- break;
- case 42:
- encode42(in, currentPos, code, out, tmpoutpos);
- break;
- case 43:
- encode43(in, currentPos, code, out, tmpoutpos);
- break;
- case 44:
- encode44(in, currentPos, code, out, tmpoutpos);
- break;
- case 45:
- encode45(in, currentPos, code, out, tmpoutpos);
- break;
- case 46:
- encode46(in, currentPos, code, out, tmpoutpos);
- break;
- case 47:
- encode47(in, currentPos, code, out, tmpoutpos);
- break;
- case 48:
- encode48(in, currentPos, code, out, tmpoutpos);
- break;
- case 49:
- encode49(in, currentPos, code, out, tmpoutpos);
- break;
- case 50:
- encode50(in, currentPos, code, out, tmpoutpos);
- break;
- case 51:
- encode51(in, currentPos, code, out, tmpoutpos);
- break;
- case 52:
- encode52(in, currentPos, code, out, tmpoutpos);
- break;
- case 53:
- encode53(in, currentPos, code, out, tmpoutpos);
- break;
- case 54:
- encode54(in, currentPos, code, out, tmpoutpos);
- break;
- case 55:
- encode55(in, currentPos, code, out, tmpoutpos);
- break;
- case 56:
- encode56(in, currentPos, code, out, tmpoutpos);
- break;
- case 57:
- encode57(in, currentPos, code, out, tmpoutpos);
- break;
- case 58:
- encode58(in, currentPos, code, out, tmpoutpos);
- break;
- case 59:
- encode59(in, currentPos, code, out, tmpoutpos);
- break;
- case 60:
- encode60(in, currentPos, code, out, tmpoutpos);
- break;
- case 61:
- encode61(in, currentPos, code, out, tmpoutpos);
- break;
- case 62:
- encode62(in, currentPos, code, out, tmpoutpos);
- break;
- case 63:
- encode63(in, currentPos, code, out, tmpoutpos);
- break;
- case 64:
- encode64(in, currentPos, code, out, tmpoutpos);
- break;
- case 65:
- encode65(in, currentPos, code, out, tmpoutpos);
- break;
- case 66:
- encode66(in, currentPos, code, out, tmpoutpos);
- break;
- case 67:
- encode67(in, currentPos, code, out, tmpoutpos);
- break;
- case 68:
- encode68(in, currentPos, code, out, tmpoutpos);
- break;
- case 69:
- encode69(in, currentPos, code, out, tmpoutpos);
- break;
- case 70:
- encode70(in, currentPos, code, out, tmpoutpos);
- break;
- case 71:
- encode71(in, currentPos, code, out, tmpoutpos);
- break;
- case 72:
- encode72(in, currentPos, code, out, tmpoutpos);
- break;
- case 73:
- encode73(in, currentPos, code, out, tmpoutpos);
- break;
- case 74:
- encode74(in, currentPos, code, out, tmpoutpos);
- break;
- case 75:
- encode75(in, currentPos, code, out, tmpoutpos);
- break;
- case 76:
- encode76(in, currentPos, code, out, tmpoutpos);
- break;
- case 77:
- encode77(in, currentPos, code, out, tmpoutpos);
- break;
- case 78:
- encode78(in, currentPos, code, out, tmpoutpos);
- break;
- case 79:
- encode79(in, currentPos, code, out, tmpoutpos);
- break;
- case 80:
- encode80(in, currentPos, code, out, tmpoutpos);
- break;
- default:
- throw new RuntimeException("unsupported code");
- }// end switch
- tmpoutpos += 2;
- currentPos = nextCurrentPos;
- }
-
- outer: while (currentPos < finalin) {
- mainloop: for (int selector = 0; selector < 8; selector++) {
- int res = 0;
- int compressedNum = codeNum[selector];
- if (finalin <= currentPos + compressedNum - 1)
- compressedNum = finalin - currentPos;
- int b = bitLength[selector];
- int max = 1 << b;
- int i = 0;
- for (; i < compressedNum; i++) {
- if (Util.smallerorequalthan(max, in[currentPos + i]))
- continue mainloop;
- res = (res << b) + in[currentPos + i];
- }
- if (compressedNum != codeNum[selector]) {
- res <<= (codeNum[selector] - compressedNum) * b;
- }
- res |= selector << 28;
- out[tmpoutpos++] = res;
-
- currentPos += compressedNum;
- continue outer;
- }
- final int selector = 8;
- out[tmpoutpos++] = in[currentPos++] | (selector << 28);
- }
- inpos.set(currentPos);
- outpos.set(tmpoutpos);
- }
-
- @Override
- public void headlessUncompress(int[] in, IntWrapper inpos, int inlength, int[] out, IntWrapper outpos, int num) {
- int currentPos = outpos.get();
- int tmpinpos = inpos.get();
- final int finalout = currentPos + num;
- while (currentPos < finalout - 2 * 28) {
-
- int val = in[tmpinpos++];
- int valn = in[tmpinpos++];
- int header = val >>> 24;
- switch (header) {
- case 0: {
- decode0(val, valn, out, currentPos);
- currentPos+=56;
- break;
- }
- case 1: {
- decode1(val, valn, out, currentPos);
- currentPos+=42;
- break;
- }
- case 2: {
- decode2(val, valn, out, currentPos);
- currentPos+=37;
- break;
- }
- case 3: {
- decode3(val, valn, out, currentPos);
- currentPos+=35;
- break;
- }
- case 4: {
- decode4(val, valn, out, currentPos);
- currentPos+=33;
- break;
- }
- case 5: {
- decode5(val, valn, out, currentPos);
- currentPos+=32;
- break;
- }
- case 6: {
- decode6(val, valn, out, currentPos);
- currentPos+=31;
- break;
- }
- case 7: {
- decode7(val, valn, out, currentPos);
- currentPos+=30;
- break;
- }
- case 8: {
- decode8(val, valn, out, currentPos);
- currentPos+=29;
- break;
- }
- case 9: {
- decode9(val, valn, out, currentPos);
- currentPos+=42;
- break;
- }
- case 10: {
- decode10(val, valn, out, currentPos);
- currentPos+=28;
- break;
- }
- case 11: {
- decode11(val, valn, out, currentPos);
- currentPos+=23;
- break;
- }
- case 12: {
- decode12(val, valn, out, currentPos);
- currentPos+=21;
- break;
- }
- case 13: {
- decode13(val, valn, out, currentPos);
- currentPos+=19;
- break;
- }
- case 14: {
- decode14(val, valn, out, currentPos);
- currentPos+=18;
- break;
- }
- case 15: {
- decode15(val, valn, out, currentPos);
- currentPos+=17;
- break;
- }
- case 16: {
- decode16(val, valn, out, currentPos);
- currentPos+=16;
- break;
- }
- case 17: {
- decode17(val, valn, out, currentPos);
- currentPos+=15;
- break;
- }
- case 18: {
- decode18(val, valn, out, currentPos);
- currentPos+=37;
- break;
- }
- case 19: {
- decode19(val, valn, out, currentPos);
- currentPos+=23;
- break;
- }
- case 20: {
- decode20(val, valn, out, currentPos);
- currentPos+=18;
- break;
- }
- case 21: {
- decode21(val, valn, out, currentPos);
- currentPos+=16;
- break;
- }
- case 22: {
- decode22(val, valn, out, currentPos);
- currentPos+=14;
- break;
- }
- case 23: {
- decode23(val, valn, out, currentPos);
- currentPos+=13;
- break;
- }
- case 24: {
- decode24(val, valn, out, currentPos);
- currentPos+=12;
- break;
- }
- case 25: {
- decode25(val, valn, out, currentPos);
- currentPos+=11;
- break;
- }
- case 26: {
- decode26(val, valn, out, currentPos);
- currentPos+=10;
- break;
- }
- case 27: {
- decode27(val, valn, out, currentPos);
- currentPos+=35;
- break;
- }
- case 28: {
- decode28(val, valn, out, currentPos);
- currentPos+=21;
- break;
- }
- case 29: {
- decode29(val, valn, out, currentPos);
- currentPos+=16;
- break;
- }
-
- case 30: {
- decode30(val, valn, out, currentPos);
- currentPos+=14;
- break;
- }
- case 31: {
- decode31(val, valn, out, currentPos);
- currentPos+=12;
- break;
- }
- case 32: {
- decode32(val, valn, out, currentPos);
- currentPos+=11;
- break;
- }
- case 33: {
- decode33(val, valn, out, currentPos);
- currentPos+=10;
- break;
- }
- case 34: {
- decode34(val, valn, out, currentPos);
- currentPos+=9;
- break;
- }
- case 35: {
- decode35(val, valn, out, currentPos);
- currentPos+=8;
- break;
- }
- case 36: {
- decode36(val, valn, out, currentPos);
- currentPos+=33;
- break;
- }
- case 37: {
- decode37(val, valn, out, currentPos);
- currentPos+=19;
- break;
- }
- case 38: {
- decode38(val, valn, out, currentPos);
- currentPos+=14;
- break;
- }
- case 39: {
- decode39(val, valn, out, currentPos);
- currentPos+=12;
- break;
- }
- case 40: {
- decode40(val, valn, out, currentPos);
- currentPos+=10;
- break;
- }
- case 41: {
- decode41(val, valn, out, currentPos);
- currentPos+=9;
- break;
- }
- case 42: {
- decode42(val, valn, out, currentPos);
- currentPos+=8;
- break;
- }
- case 43: {
- decode43(val, valn, out, currentPos);
- currentPos+=7;
- break;
- }
- case 44: {
- decode44(val, valn, out, currentPos);
- currentPos+=6;
- break;
- }
- case 45: {
- decode45(val, valn, out, currentPos);
- currentPos+=32;
- break;
- }
- case 46: {
- decode46(val, valn, out, currentPos);
- currentPos+=18;
- break;
- }
- case 47: {
- decode47(val, valn, out, currentPos);
- currentPos+=13;
- break;
- }
- case 48: {
- decode48(val, valn, out, currentPos);
- currentPos+=11;
- break;
- }
- case 49: {
- decode49(val, valn, out, currentPos);
- currentPos+=9;
- break;
- }
- case 50: {
- decode50(val, valn, out, currentPos);
- currentPos+=8;
- break;
- }
- case 51: {
- decode51(val, valn, out, currentPos);
- currentPos+=7;
- break;
- }
- case 52: {
- decode52(val, valn, out, currentPos);
- currentPos+=6;
- break;
- }
- case 53: {
- decode53(val, valn, out, currentPos);
- currentPos+=5;
- break;
- }
- case 54: {
- decode54(val, valn, out, currentPos);
- currentPos+=31;
- break;
- }
- case 55: {
- decode55(val, valn, out, currentPos);
- currentPos+=17;
- break;
- }
- case 56: {
- decode56(val, valn, out, currentPos);
- currentPos+=12;
- break;
- }
- case 57: {
- decode57(val, valn, out, currentPos);
- currentPos+=10;
- break;
- }
- case 58: {
- decode58(val, valn, out, currentPos);
- currentPos+=8;
- break;
- }
- case 59: {
- decode59(val, valn, out, currentPos);
- currentPos+=7;
- break;
- }
- case 60: {
- decode60(val, valn, out, currentPos);
- currentPos+=6;
- break;
- }
- case 61: {
- decode61(val, valn, out, currentPos);
- currentPos+=5;
- break;
- }
- case 62: {
- decode62(val, valn, out, currentPos);
- currentPos+=4;
- break;
- }
- case 63: {
- decode63(val, valn, out, currentPos);
- currentPos+=30;
- break;
- }
- case 64: {
- decode64(val, valn, out, currentPos);
- currentPos+=16;
- break;
- }
- case 65: {
- decode65(val, valn, out, currentPos);
- currentPos+=11;
- break;
- }
- case 66: {
- decode66(val, valn, out, currentPos);
- currentPos+=9;
- break;
- }
- case 67: {
- decode67(val, valn, out, currentPos);
- currentPos+=7;
- break;
- }
- case 68: {
- decode68(val, valn, out, currentPos);
- currentPos+=6;
- break;
- }
- case 69: {
- decode69(val, valn, out, currentPos);
- currentPos+=5;
- break;
- }
- case 70: {
- decode70(val, valn, out, currentPos);
- currentPos+=4;
- break;
- }
- case 71: {
- decode71(val, valn, out, currentPos);
- currentPos+=3;
- break;
- }
- case 72: {
- decode72(val, valn, out, currentPos);
- currentPos+=29;
- break;
- }
- case 73: {
- decode73(val, valn, out, currentPos);
- currentPos+=15;
- break;
- }
- case 74: {
- decode74(val, valn, out, currentPos);
- currentPos+=10;
- break;
- }
- case 75: {
- decode75(val, valn, out, currentPos);
- currentPos+=8;
- break;
- }
- case 76: {
- decode76(val, valn, out, currentPos);
- currentPos+=6;
- break;
- }
- case 77: {
- decode77(val, valn, out, currentPos);
- currentPos+=5;
- break;
- }
- case 78: {
- decode78(val, valn, out, currentPos);
- currentPos+=4;
- break;
- }
- case 79: {
- decode79(val, valn, out, currentPos);
- currentPos+=3;
- break;
- }
- case 80: {
- decode80(val, valn, out, currentPos);
- currentPos+=2;
- break;
- }
- default:
- throw new RuntimeException("Wrong code: " + header);
- }// end switch
- } // end while
-
- while (currentPos < finalout) {
- int val = in[tmpinpos++];
- int header = val >>> 28;
- switch (header) {
- case 0: { // number : 28, bitwidth : 1
- final int howmany = finalout - currentPos < 28 ? finalout - currentPos : 28;
- for (int k = 0; k < howmany; ++k) {
- out[currentPos++] = (val << (k + 4)) >>> 31;
- }
- break;
- }
- case 1: { // number : 14, bitwidth : 2
- final int howmany = finalout - currentPos < 14 ? finalout - currentPos : 14;
- for (int k = 0; k < howmany; ++k) {
- out[currentPos++] = (val << (2 * k + 4)) >>> 30;
- }
- break;
- }
- case 2: { // number : 9, bitwidth : 3
- final int howmany = finalout - currentPos < 9 ? finalout - currentPos : 9;
- for (int k = 0; k < howmany; ++k) {
- out[currentPos++] = (val << (3 * k + 5)) >>> 29;
- }
- break;
- }
- case 3: { // number : 7, bitwidth : 4
- final int howmany = finalout - currentPos < 7 ? finalout - currentPos : 7;
- for (int k = 0; k < howmany; ++k) {
- out[currentPos++] = (val << (4 * k + 4)) >>> 28;
- }
- break;
- }
- case 4: { // number : 5, bitwidth : 5
- final int howmany = finalout - currentPos < 5 ? finalout - currentPos : 5;
- for (int k = 0; k < howmany; ++k) {
- out[currentPos++] = (val << (5 * k + 7)) >>> 27;
- }
- break;
- }
- case 5: { // number : 4, bitwidth : 7
- final int howmany = finalout - currentPos < 4 ? finalout - currentPos : 4;
- for (int k = 0; k < howmany; ++k) {
- out[currentPos++] = (val << (7 * k + 4)) >>> 25;
- }
- break;
- }
- case 6: { // number : 3, bitwidth : 9
- final int howmany = finalout - currentPos < 3 ? finalout - currentPos : 3;
- for (int k = 0; k < howmany; ++k) {
- out[currentPos++] = (val << (9 * k + 5)) >>> 23;
- }
- break;
- }
- case 7: { // number : 2, bitwidth : 14
- final int howmany = finalout - currentPos < 2 ? finalout - currentPos : 2;
- for (int k = 0; k < howmany; ++k) {
- out[currentPos++] = (val << (14 * k + 4)) >>> 18;
- }
- break;
- }
- case 8: { // number : 1, bitwidth : 28
- out[currentPos++] = (val << 4) >>> 4;
- break;
- }
- default: {
- throw new RuntimeException("shouldn't happen");
- }
- }
- }
-
- outpos.set(finalout);
- inpos.set(tmpinpos);
-
- }
+ private static final int[][] M = { { 0, 1, 2, 3, 4, 5, 6, 7, 8 }, { 9, 10, 11, 12, 13, 14, 15, 16, 17 },
+ { 18, 19, 20, 21, 22, 23, 24, 25, 26 }, { 27, 28, 29, 30, 31, 32, 33, 34, 35 },
+ { 36, 37, 38, 39, 40, 41, 42, 43, 44 }, { 45, 46, 47, 48, 49, 50, 51, 52, 53 },
+ { 54, 55, 56, 57, 58, 59, 60, 61, 62 }, { 63, 64, 65, 66, 67, 68, 69, 70, 71 },
+ { 72, 73, 74, 75, 76, 77, 78, 79, 80 } };
+
+ @Override
+ public void compress(int[] in, IntWrapper inpos, int inlength, int out[], IntWrapper outpos) {
+ if (inlength == 0)
+ return;
+ out[outpos.get()] = inlength;
+ outpos.increment();
+ headlessCompress(in, inpos, inlength, out, outpos);
+ }
+
+ private void encode0(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ for (int i = 0; i < 24; i++)
+ out[outf + 0] = (out[outf + 0] << 1) + (in[inf + i]);
+ for (int i = 0; i < 4; i++)
+ out[outf + 1] = (out[outf + 1] << 1) + in[inf + 24 + i];
+ for (int i = 0; i < 28; i++)
+ out[outf + 1] = (out[outf + 1] << 1) + in[inf + 28 + i];
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode1(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ for (int i = 0; i < 24; i++)
+ out[outf + 0] = (out[outf + 0] << 1) + in[inf + i];
+ for (int i = 0; i < 4; i++)
+ out[outf + 1] = (out[outf + 1] << 1) + in[inf + 24 + i];
+ for (int i = 0; i < 14; i++)
+ out[outf + 1] = (out[outf + 1] << 2) + in[inf + 28 + i];
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode2(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ for (int i = 0; i < 24; i++)
+ out[outf + 0] = (out[outf + 0] << 1) + in[inf + i];
+ for (int i = 0; i < 4; i++)
+ out[outf + 1] = (out[outf + 1] << 1) + in[inf + 24 + i];
+ for (int i = 0; i < 9; i++)
+ out[outf + 1] = (out[outf + 1] << 3) + in[inf + 28 + i];// 第二个28位是低位存储的,所以浪费的1比特在最顶端。
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode3(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ for (int i = 0; i < 24; i++)
+ out[outf + 0] = (out[outf + 0] << 1) + in[inf + i];
+ for (int i = 0; i < 4; i++)
+ out[outf + 1] = (out[outf + 1] << 1) + in[inf + 24 + i];
+ for (int i = 0; i < 7; i++)
+ out[outf + 1] = (out[outf + 1] << 4) + in[inf + 28 + i];
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode4(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ for (int i = 0; i < 24; i++)
+ out[outf + 0] = (out[outf + 0] << 1) + in[inf + i];
+ for (int i = 0; i < 4; i++)
+ out[outf + 1] = (out[outf + 1] << 1) + in[inf + 24 + i];
+ for (int i = 0; i < 5; i++)
+ out[outf + 1] = (out[outf + 1] << 5) + in[inf + 28 + i];
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode5(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ for (int i = 0; i < 24; i++)
+ out[outf + 0] = (out[outf + 0] << 1) + in[inf + i];
+ for (int i = 0; i < 4; i++)
+ out[outf + 1] = (out[outf + 1] << 1) + in[inf + 24 + i];
+ for (int i = 0; i < 4; i++)
+ out[outf + 1] = (out[outf + 1] << 7) + in[inf + 28 + i];
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode6(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ for (int i = 0; i < 24; i++)
+ out[outf + 0] = (out[outf + 0] << 1) + in[inf + i];
+ for (int i = 0; i < 4; i++)
+ out[outf + 1] = (out[outf + 1] << 1) + in[inf + 24 + i];
+ for (int i = 0; i < 3; i++)
+ out[outf + 1] = (out[outf + 1] << 9) + in[inf + 28 + i];
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode7(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ for (int i = 0; i < 24; i++)
+ out[outf + 0] = (out[outf + 0] << 1) + in[inf + i];
+ for (int i = 0; i < 4; i++)
+ out[outf + 1] = (out[outf + 1] << 1) + in[inf + 24 + i];
+ for (int i = 0; i < 2; i++)
+ out[outf + 1] = (out[outf + 1] << 14) + in[inf + 28 + i];
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode8(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ for (int i = 0; i < 24; i++)
+ out[outf + 0] = (out[outf + 0] << 1) + in[inf + i];
+ for (int i = 0; i < 4; i++)
+ out[outf + 1] = (out[outf + 1] << 1) + in[inf + 24 + i];
+ for (int i = 0; i < 1; i++)
+ out[outf + 1] = (out[outf + 1] << 28) + in[inf + 28 + i];
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode9(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ for (int i = 0; i < 12; i++)
+ out[outf + 0] = (out[outf + 0] << 2) + in[inf + i];
+ for (int i = 0; i < 2; i++)
+ out[outf + 1] = (out[outf + 1] << 2) + in[inf + 12 + i];
+ for (int i = 0; i < 28; i++)
+ out[outf + 1] = (out[outf + 1] << 1) + in[inf + 14 + i];
+
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode10(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ for (int i = 0; i < 12; i++) {
+ out[outf + 0] = (out[outf + 0] << 2) + in[inf + i];
+
+ }
+ for (int i = 0; i < 2; i++)
+ out[outf + 1] = (out[outf + 1] << 2) + in[inf + 12 + i];
+ for (int i = 0; i < 14; i++)
+ out[outf + 1] = (out[outf + 1] << 2) + in[inf + 14 + i];
+
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode11(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ for (int i = 0; i < 12; i++)
+ out[outf + 0] = (out[outf + 0] << 2) + in[inf + i];
+ for (int i = 0; i < 2; i++)
+ out[outf + 1] = (out[outf + 1] << 2) + in[inf + 12 + i];
+ for (int i = 0; i < 9; i++)
+ out[outf + 1] = (out[outf + 1] << 3) + in[inf + 14 + i];
+
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode12(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ for (int i = 0; i < 12; i++)
+ out[outf + 0] = (out[outf + 0] << 2) + in[inf + i];
+ for (int i = 0; i < 2; i++)
+ out[outf + 1] = (out[outf + 1] << 2) + in[inf + 12 + i];
+ for (int i = 0; i < 7; i++)
+ out[outf + 1] = (out[outf + 1] << 4) + in[inf + 14 + i];
+
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode13(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ for (int i = 0; i < 12; i++)
+ out[outf + 0] = (out[outf + 0] << 2) + in[inf + i];
+ for (int i = 0; i < 2; i++)
+ out[outf + 1] = (out[outf + 1] << 2) + in[inf + 12 + i];
+ for (int i = 0; i < 5; i++)
+ out[outf + 1] = (out[outf + 1] << 5) + in[inf + 14 + i];
+
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode14(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ for (int i = 0; i < 12; i++)
+ out[outf + 0] = (out[outf + 0] << 2) + in[inf + i];
+ for (int i = 0; i < 2; i++)
+ out[outf + 1] = (out[outf + 1] << 2) + in[inf + 12 + i];
+ for (int i = 0; i < 4; i++)
+ out[outf + 1] = (out[outf + 1] << 7) + in[inf + 14 + i];
+
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode15(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ for (int i = 0; i < 12; i++)
+ out[outf + 0] = (out[outf + 0] << 2) + in[inf + i];
+ for (int i = 0; i < 2; i++)
+ out[outf + 1] = (out[outf + 1] << 2) + in[inf + 12 + i];
+ for (int i = 0; i < 3; i++)
+ out[outf + 1] = (out[outf + 1] << 9) + in[inf + 14 + i];
+
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode16(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ for (int i = 0; i < 12; i++)
+ out[outf + 0] = (out[outf + 0] << 2) + in[inf + i];
+ for (int i = 0; i < 2; i++)
+ out[outf + 1] = (out[outf + 1] << 2) + in[inf + 12 + i];
+ for (int i = 0; i < 2; i++)
+ out[outf + 1] = (out[outf + 1] << 14) + in[inf + 14 + i];
+
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode17(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ for (int i = 0; i < 12; i++)
+ out[outf + 0] = (out[outf + 0] << 2) + in[inf + i];
+ for (int i = 0; i < 2; i++)
+ out[outf + 1] = (out[outf + 1] << 2) + in[inf + 12 + i];
+ for (int i = 0; i < 1; i++)
+ out[outf + 1] = (out[outf + 1] << 28) + in[inf + 14 + i];
+
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode18(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ for (int i = 0; i < 8; i++)
+ out[outf + 0] = (out[outf + 0] << 3) + in[inf + i];
+ for (int i = 0; i < 1; i++)
+ out[outf + 1] = (out[outf + 1] << 3) + in[inf + 8 + i];
+ for (int i = 0; i < 28; i++)
+ out[outf + 1] = (out[outf + 1] << 1) + in[inf + 9 + i];
+
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode19(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ for (int i = 0; i < 8; i++)
+ out[outf + 0] = (out[outf + 0] << 3) + in[inf + i];
+ for (int i = 0; i < 1; i++)
+ out[outf + 1] = (out[outf + 1] << 3) + in[inf + 8 + i];
+ for (int i = 0; i < 14; i++)
+ out[outf + 1] = (out[outf + 1] << 2) + in[inf + 9 + i];
+
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode20(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ for (int i = 0; i < 8; i++)
+ out[outf + 0] = (out[outf + 0] << 3) + in[inf + i];
+ for (int i = 0; i < 1; i++)
+ out[outf + 1] = (out[outf + 1] << 3) + in[inf + 8 + i];
+ for (int i = 0; i < 9; i++)
+ out[outf + 1] = (out[outf + 1] << 3) + in[inf + 9 + i];
+
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode21(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ for (int i = 0; i < 8; i++)
+ out[outf + 0] = (out[outf + 0] << 3) + in[inf + i];
+ for (int i = 0; i < 1; i++)
+ out[outf + 1] = (out[outf + 1] << 3) + in[inf + 8 + i];
+ for (int i = 0; i < 7; i++)
+ out[outf + 1] = (out[outf + 1] << 4) + in[inf + 9 + i];
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode22(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ for (int i = 0; i < 8; i++)
+ out[outf + 0] = (out[outf + 0] << 3) + in[inf + i];
+ for (int i = 0; i < 1; i++)
+ out[outf + 1] = (out[outf + 1] << 3) + in[inf + 8 + i];
+ for (int i = 0; i < 5; i++)
+ out[outf + 1] = (out[outf + 1] << 5) + in[inf + 9 + i];
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode23(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ for (int i = 0; i < 8; i++)
+ out[outf + 0] = (out[outf + 0] << 3) + in[inf + i];
+ for (int i = 0; i < 1; i++)
+ out[outf + 1] = (out[outf + 1] << 3) + in[inf + 8 + i];
+ for (int i = 0; i < 4; i++)
+ out[outf + 1] = (out[outf + 1] << 7) + in[inf + 9 + i];
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode24(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ for (int i = 0; i < 8; i++)
+ out[outf + 0] = (out[outf + 0] << 3) + in[inf + i];
+ for (int i = 0; i < 1; i++)
+ out[outf + 1] = (out[outf + 1] << 3) + in[inf + 8 + i];
+ for (int i = 0; i < 3; i++)
+ out[outf + 1] = (out[outf + 1] << 9) + in[inf + 9 + i];
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode25(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ for (int i = 0; i < 8; i++)
+ out[outf + 0] = (out[outf + 0] << 3) + in[inf + i];
+ for (int i = 0; i < 1; i++)
+ out[outf + 1] = (out[outf + 1] << 3) + in[inf + 8 + i];
+ for (int i = 0; i < 2; i++)
+ out[outf + 1] = (out[outf + 1] << 14) + in[inf + 9 + i];
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode26(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ for (int i = 0; i < 8; i++)
+ out[outf + 0] = (out[outf + 0] << 3) + in[inf + i];
+ for (int i = 0; i < 1; i++)
+ out[outf + 1] = (out[outf + 1] << 3) + in[inf + 8 + i];
+ for (int i = 0; i < 1; i++)
+ out[outf + 1] = (out[outf + 1] << 28) + in[inf + 9 + i];
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode27(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ for (int i = 0; i < 6; i++)
+ out[outf + 0] = (out[outf + 0] << 4) + in[inf + i];
+ for (int i = 0; i < 1; i++)
+ out[outf + 1] = (out[outf + 1] << 4) + in[inf + 6 + i];
+ for (int i = 0; i < 28; i++)
+ out[outf + 1] = (out[outf + 1] << 1) + in[inf + 7 + i];
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode28(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ for (int i = 0; i < 6; i++)
+ out[outf + 0] = (out[outf + 0] << 4) + in[inf + i];
+ for (int i = 0; i < 1; i++)
+ out[outf + 1] = (out[outf + 1] << 4) + in[inf + 6 + i];
+ for (int i = 0; i < 14; i++)
+ out[outf + 1] = (out[outf + 1] << 2) + in[inf + 7 + i];
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode29(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ for (int i = 0; i < 6; i++)
+ out[outf + 0] = (out[outf + 0] << 4) + in[inf + i];
+ for (int i = 0; i < 1; i++)
+ out[outf + 1] = (out[outf + 1] << 4) + in[inf + 6 + i];
+ for (int i = 0; i < 9; i++)
+ out[outf + 1] = (out[outf + 1] << 3) + in[inf + 7 + i];
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode30(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ for (int i = 0; i < 6; i++)
+ out[outf + 0] = (out[outf + 0] << 4) + in[inf + i];
+ for (int i = 0; i < 1; i++)
+ out[outf + 1] = (out[outf + 1] << 4) + in[inf + 6 + i];
+ for (int i = 0; i < 7; i++)
+ out[outf + 1] = (out[outf + 1] << 4) + in[inf + 7 + i];
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode31(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ for (int i = 0; i < 6; i++)
+ out[outf + 0] = (out[outf + 0] << 4) + in[inf + i];
+ for (int i = 0; i < 1; i++)
+ out[outf + 1] = (out[outf + 1] << 4) + in[inf + 6 + i];
+ for (int i = 0; i < 5; i++)
+ out[outf + 1] = (out[outf + 1] << 5) + in[inf + 7 + i];
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode32(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ for (int i = 0; i < 6; i++)
+ out[outf + 0] = (out[outf + 0] << 4) + in[inf + i];
+ for (int i = 0; i < 1; i++)
+ out[outf + 1] = (out[outf + 1] << 4) + in[inf + 6 + i];
+ for (int i = 0; i < 4; i++)
+ out[outf + 1] = (out[outf + 1] << 7) + in[inf + 7 + i];
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode33(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ for (int i = 0; i < 6; i++)
+ out[outf + 0] = (out[outf + 0] << 4) + in[inf + i];
+ for (int i = 0; i < 1; i++)
+ out[outf + 1] = (out[outf + 1] << 4) + in[inf + 6 + i];
+ for (int i = 0; i < 3; i++)
+ out[outf + 1] = (out[outf + 1] << 9) + in[inf + 7 + i];
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode34(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ for (int i = 0; i < 6; i++)
+ out[outf + 0] = (out[outf + 0] << 4) + in[inf + i];
+ for (int i = 0; i < 1; i++)
+ out[outf + 1] = (out[outf + 1] << 4) + in[inf + 6 + i];
+ for (int i = 0; i < 2; i++)
+ out[outf + 1] = (out[outf + 1] << 14) + in[inf + 7 + i];
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode35(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ for (int i = 0; i < 6; i++)
+ out[outf + 0] = (out[outf + 0] << 4) + in[inf + i];
+ for (int i = 0; i < 1; i++)
+ out[outf + 1] = (out[outf + 1] << 4) + in[inf + 6 + i];
+ for (int i = 0; i < 1; i++)
+ out[outf + 1] = (out[outf + 1] << 28) + in[inf + 7 + i];
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode36(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ for (int i = 0; i < 4; i++)
+ out[outf + 0] = (out[outf + 0] << 5) + in[inf + i];
+ out[outf + 0] = (out[outf + 0] << 4) + (in[inf + 4] >>> 1);
+ out[outf + 1] = (out[outf + 1] << 1) + ((in[inf + 4] << 31) >>> 31);
+ for (int i = 0; i < 28; i++)
+ out[outf + 1] = (out[outf + 1] << 1) + in[inf + 5 + i];
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode37(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ for (int i = 0; i < 4; i++)
+ out[outf + 0] = (out[outf + 0] << 5) + in[inf + i];
+ out[outf + 0] = (out[outf + 0] << 4) + (in[inf + 4] >>> 1);
+ out[outf + 1] = (out[outf + 1] << 1) + ((in[inf + 4] << 31) >>> 31);
+ for (int i = 0; i < 14; i++)
+ out[outf + 1] = (out[outf + 1] << 2) + in[inf + 5 + i];
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode38(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ for (int i = 0; i < 4; i++)
+ out[outf + 0] = (out[outf + 0] << 5) + in[inf + i];
+ out[outf + 0] = (out[outf + 0] << 4) + (in[inf + 4] >>> 1);
+ out[outf + 1] = (out[outf + 1] << 1) + ((in[inf + 4] << 31) >>> 31);
+ for (int i = 0; i < 9; i++)
+ out[outf + 1] = (out[outf + 1] << 3) + in[inf + 5 + i];
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode39(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ for (int i = 0; i < 4; i++)
+ out[outf + 0] = (out[outf + 0] << 5) + in[inf + i];
+ out[outf + 0] = (out[outf + 0] << 4) + (in[inf + 4] >>> 1);
+ out[outf + 1] = (out[outf + 1] << 1) + ((in[inf + 4] << 31) >>> 31);
+ for (int i = 0; i < 7; i++)
+ out[outf + 1] = (out[outf + 1] << 4) + in[inf + 5 + i];
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode40(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ for (int i = 0; i < 4; i++)
+ out[outf + 0] = (out[outf + 0] << 5) + in[inf + i];
+ out[outf + 0] = (out[outf + 0] << 4) + (in[inf + 4] >>> 1);
+ out[outf + 1] = (out[outf + 1] << 1) + ((in[inf + 4] << 31) >>> 31);
+ for (int i = 0; i < 5; i++)
+ out[outf + 1] = (out[outf + 1] << 5) + in[inf + 5 + i];
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode41(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ for (int i = 0; i < 4; i++)
+ out[outf + 0] = (out[outf + 0] << 5) + in[inf + i];
+ out[outf + 0] = (out[outf + 0] << 4) + (in[inf + 4] >>> 1);
+ out[outf + 1] = (out[outf + 1] << 1) + ((in[inf + 4] << 31) >>> 31);
+ for (int i = 0; i < 4; i++)
+ out[outf + 1] = (out[outf + 1] << 7) + in[inf + 5 + i];
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode42(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ for (int i = 0; i < 4; i++)
+ out[outf + 0] = (out[outf + 0] << 5) + in[inf + i];
+ out[outf + 0] = (out[outf + 0] << 4) + (in[inf + 4] >>> 1);
+ out[outf + 1] = (out[outf + 1] << 1) + ((in[inf + 4] << 31) >>> 31);
+ for (int i = 0; i < 3; i++)
+ out[outf + 1] = (out[outf + 1] << 9) + in[inf + 5 + i];
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode43(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ for (int i = 0; i < 4; i++)
+ out[outf + 0] = (out[outf + 0] << 5) + in[inf + i];
+ out[outf + 0] = (out[outf + 0] << 4) + (in[inf + 4] >>> 1);
+ out[outf + 1] = (out[outf + 1] << 1) + ((in[inf + 4] << 31) >>> 31);
+ for (int i = 0; i < 2; i++)
+ out[outf + 1] = (out[outf + 1] << 14) + in[inf + 5 + i];
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode44(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ for (int i = 0; i < 4; i++)
+ out[outf + 0] = (out[outf + 0] << 5) + in[inf + i];
+ out[outf + 0] = (out[outf + 0] << 4) + (in[inf + 4] >>> 1);
+ out[outf + 1] = (out[outf + 1] << 1) + ((in[inf + 4] << 31) >>> 31);
+ for (int i = 0; i < 1; i++)
+ out[outf + 1] = (out[outf + 1] << 28) + in[inf + 5 + i];
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode45(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ for (int i = 0; i < 3; i++)
+ out[outf + 0] = (out[outf + 0] << 7) + in[inf + i];
+ out[outf + 0] = (out[outf + 0] << 3) + (in[inf + 3] >>> 4);
+ out[outf + 1] = (out[outf + 1] << 4) + ((in[inf + 3] << 28) >>> 28);
+ for (int i = 0; i < 28; i++)
+ out[outf + 1] = (out[outf + 1] << 1) + in[inf + 4 + i];
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode46(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ for (int i = 0; i < 3; i++)
+ out[outf + 0] = (out[outf + 0] << 7) + in[inf + i];
+ out[outf + 0] = (out[outf + 0] << 3) + (in[inf + 3] >>> 4);
+ out[outf + 1] = (out[outf + 1] << 4) + ((in[inf + 3] << 28) >>> 28);
+ for (int i = 0; i < 14; i++)
+ out[outf + 1] = (out[outf + 1] << 2) + in[inf + 4 + i];
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode47(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ for (int i = 0; i < 3; i++)
+ out[outf + 0] = (out[outf + 0] << 7) + in[inf + i];
+ out[outf + 0] = (out[outf + 0] << 3) + (in[inf + 3] >>> 4);
+ out[outf + 1] = (out[outf + 1] << 4) + ((in[inf + 3] << 28) >>> 28);
+ for (int i = 0; i < 9; i++)
+ out[outf + 1] = (out[outf + 1] << 3) + in[inf + 4 + i];
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode48(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ for (int i = 0; i < 3; i++)
+ out[outf + 0] = (out[outf + 0] << 7) + in[inf + i];
+ out[outf + 0] = (out[outf + 0] << 3) + (in[inf + 3] >>> 4);
+ out[outf + 1] = (out[outf + 1] << 4) + ((in[inf + 3] << 28) >>> 28);
+ for (int i = 0; i < 7; i++)
+ out[outf + 1] = (out[outf + 1] << 4) + in[inf + 4 + i];
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode49(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ for (int i = 0; i < 3; i++)
+ out[outf + 0] = (out[outf + 0] << 7) + in[inf + i];
+ out[outf + 0] = (out[outf + 0] << 3) + (in[inf + 3] >>> 4);
+ out[outf + 1] = (out[outf + 1] << 4) + ((in[inf + 3] << 28) >>> 28);
+ for (int i = 0; i < 5; i++)
+ out[outf + 1] = (out[outf + 1] << 5) + in[inf + 4 + i];
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode50(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ for (int i = 0; i < 3; i++)
+ out[outf + 0] = (out[outf + 0] << 7) + in[inf + i];
+ out[outf + 0] = (out[outf + 0] << 3) + (in[inf + 3] >>> 4);
+ out[outf + 1] = (out[outf + 1] << 4) + ((in[inf + 3] << 28) >>> 28);
+ for (int i = 0; i < 4; i++)
+ out[outf + 1] = (out[outf + 1] << 7) + in[inf + 4 + i];
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode51(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ for (int i = 0; i < 3; i++)
+ out[outf + 0] = (out[outf + 0] << 7) + in[inf + i];
+ out[outf + 0] = (out[outf + 0] << 3) + (in[inf + 3] >>> 4);
+ out[outf + 1] = (out[outf + 1] << 4) + ((in[inf + 3] << 28) >>> 28);
+ for (int i = 0; i < 3; i++)
+ out[outf + 1] = (out[outf + 1] << 9) + in[inf + 4 + i];
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode52(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ for (int i = 0; i < 3; i++)
+ out[outf + 0] = (out[outf + 0] << 7) + in[inf + i];
+ out[outf + 0] = (out[outf + 0] << 3) + (in[inf + 3] >>> 4);
+ out[outf + 1] = (out[outf + 1] << 4) + ((in[inf + 3] << 28) >>> 28);
+ for (int i = 0; i < 2; i++)
+ out[outf + 1] = (out[outf + 1] << 14) + in[inf + 4 + i];
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode53(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ for (int i = 0; i < 3; i++)
+ out[outf + 0] = (out[outf + 0] << 7) + in[inf + i];
+ out[outf + 0] = (out[outf + 0] << 3) + (in[inf + 3] >>> 4);
+ out[outf + 1] = (out[outf + 1] << 4) + ((in[inf + 3] << 28) >>> 28);
+ for (int i = 0; i < 1; i++)
+ out[outf + 1] = (out[outf + 1] << 28) + in[inf + 4 + i];
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode54(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ for (int i = 0; i < 2; i++)
+ out[outf + 0] = (out[outf + 0] << 9) + in[inf + i];
+ out[outf + 0] = (out[outf + 0] << 6) + (in[inf + 2] >>> 3);
+ out[outf + 1] = (out[outf + 1] << 3) + ((in[inf + 2] << 29) >>> 29);
+ for (int i = 0; i < 28; i++)
+ out[outf + 1] = (out[outf + 1] << 1) + in[inf + 3 + i];
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode55(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ for (int i = 0; i < 2; i++)
+ out[outf + 0] = (out[outf + 0] << 9) + in[inf + i];
+ out[outf + 0] = (out[outf + 0] << 6) + (in[inf + 2] >>> 3);
+ out[outf + 1] = (out[outf + 1] << 3) + ((in[inf + 2] << 29) >>> 29);
+ for (int i = 0; i < 14; i++)
+ out[outf + 1] = (out[outf + 1] << 2) + in[inf + 3 + i];
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode56(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ for (int i = 0; i < 2; i++)
+ out[outf + 0] = (out[outf + 0] << 9) + in[inf + i];
+ out[outf + 0] = (out[outf + 0] << 6) + (in[inf + 2] >>> 3);
+ out[outf + 1] = (out[outf + 1] << 3) + ((in[inf + 2] << 29) >>> 29);
+ for (int i = 0; i < 9; i++)
+ out[outf + 1] = (out[outf + 1] << 3) + in[inf + 3 + i];
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode57(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ for (int i = 0; i < 2; i++)
+ out[outf + 0] = (out[outf + 0] << 9) + in[inf + i];
+ out[outf + 0] = (out[outf + 0] << 6) + (in[inf + 2] >>> 3);
+ out[outf + 1] = (out[outf + 1] << 3) + ((in[inf + 2] << 29) >>> 29);
+ for (int i = 0; i < 7; i++)
+ out[outf + 1] = (out[outf + 1] << 4) + in[inf + 3 + i];
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode58(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ for (int i = 0; i < 2; i++)
+ out[outf + 0] = (out[outf + 0] << 9) + in[inf + i];
+ out[outf + 0] = (out[outf + 0] << 6) + (in[inf + 2] >>> 3);
+ out[outf + 1] = (out[outf + 1] << 3) + ((in[inf + 2] << 29) >>> 29);
+ for (int i = 0; i < 5; i++)
+ out[outf + 1] = (out[outf + 1] << 5) + in[inf + 3 + i];
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode59(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ for (int i = 0; i < 2; i++)
+ out[outf + 0] = (out[outf + 0] << 9) + in[inf + i];
+ out[outf + 0] = (out[outf + 0] << 6) + (in[inf + 2] >>> 3);
+ out[outf + 1] = (out[outf + 1] << 3) + ((in[inf + 2] << 29) >>> 29);
+ for (int i = 0; i < 4; i++)
+ out[outf + 1] = (out[outf + 1] << 7) + in[inf + 3 + i];
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode60(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ for (int i = 0; i < 2; i++)
+ out[outf + 0] = (out[outf + 0] << 9) + in[inf + i];
+ out[outf + 0] = (out[outf + 0] << 6) + (in[inf + 2] >>> 3);
+ out[outf + 1] = (out[outf + 1] << 3) + ((in[inf + 2] << 29) >>> 29);
+ for (int i = 0; i < 3; i++)
+ out[outf + 1] = (out[outf + 1] << 9) + in[inf + 3 + i];
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode61(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ for (int i = 0; i < 2; i++)
+ out[outf + 0] = (out[outf + 0] << 9) + in[inf + i];
+ out[outf + 0] = (out[outf + 0] << 6) + (in[inf + 2] >>> 3);
+ out[outf + 1] = (out[outf + 1] << 3) + ((in[inf + 2] << 29) >>> 29);
+ for (int i = 0; i < 2; i++)
+ out[outf + 1] = (out[outf + 1] << 14) + in[inf + 3 + i];
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode62(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ for (int i = 0; i < 2; i++)
+ out[outf + 0] = (out[outf + 0] << 9) + in[inf + i];
+ out[outf + 0] = (out[outf + 0] << 6) + (in[inf + 2] >>> 3);
+ out[outf + 1] = (out[outf + 1] << 3) + ((in[inf + 2] << 29) >>> 29);
+ for (int i = 0; i < 1; i++)
+ out[outf + 1] = (out[outf + 1] << 28) + in[inf + 3 + i];
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode63(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+
+ out[outf + 0] = (out[outf + 0] << 14) + in[inf];
+ out[outf + 0] = (out[outf + 0] << 10) + (in[inf + 1] >>> 4);
+ out[outf + 1] = (out[outf + 1] << 4) + ((in[inf + 1] << 28) >>> 28);
+ for (int i = 0; i < 28; i++)
+ out[outf + 1] = (out[outf + 1] << 1) + in[inf + 2 + i];
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode64(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ out[outf + 0] = (out[outf + 0] << 14) + in[inf];
+ out[outf + 0] = (out[outf + 0] << 10) + (in[inf + 1] >>> 4);
+ out[outf + 1] = (out[outf + 1] << 4) + ((in[inf + 1] << 28) >>> 28);
+ for (int i = 0; i < 14; i++)
+ out[outf + 1] = (out[outf + 1] << 2) + in[inf + 2 + i];
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode65(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ out[outf + 0] = (out[outf + 0] << 14) + in[inf];
+ out[outf + 0] = (out[outf + 0] << 10) + (in[inf + 1] >>> 4);
+ out[outf + 1] = (out[outf + 1] << 4) + ((in[inf + 1] << 28) >>> 28);
+ for (int i = 0; i < 9; i++)
+ out[outf + 1] = (out[outf + 1] << 3) + in[inf + 2 + i];
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode66(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ out[outf + 0] = (out[outf + 0] << 14) + in[inf];
+ out[outf + 0] = (out[outf + 0] << 10) + (in[inf + 1] >>> 4);
+ out[outf + 1] = (out[outf + 1] << 4) + ((in[inf + 1] << 28) >>> 28);
+ for (int i = 0; i < 7; i++)
+ out[outf + 1] = (out[outf + 1] << 4) + in[inf + 2 + i];
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode67(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ out[outf + 0] = (out[outf + 0] << 14) + in[inf];
+ out[outf + 0] = (out[outf + 0] << 10) + (in[inf + 1] >>> 4);
+ out[outf + 1] = (out[outf + 1] << 4) + ((in[inf + 1] << 28) >>> 28);
+ for (int i = 0; i < 5; i++)
+ out[outf + 1] = (out[outf + 1] << 5) + in[inf + 2 + i];
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode68(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ out[outf + 0] = (out[outf + 0] << 14) + in[inf];
+ out[outf + 0] = (out[outf + 0] << 10) + (in[inf + 1] >>> 4);
+ out[outf + 1] = (out[outf + 1] << 4) + ((in[inf + 1] << 28) >>> 28);
+ for (int i = 0; i < 4; i++)
+ out[outf + 1] = (out[outf + 1] << 7) + in[inf + 2 + i];
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode69(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ out[outf + 0] = (out[outf + 0] << 14) + in[inf];
+ out[outf + 0] = (out[outf + 0] << 10) + (in[inf + 1] >>> 4);
+ out[outf + 1] = (out[outf + 1] << 4) + ((in[inf + 1] << 28) >>> 28);
+ for (int i = 0; i < 3; i++)
+ out[outf + 1] = (out[outf + 1] << 9) + in[inf + 2 + i];
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode70(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ out[outf + 0] = (out[outf + 0] << 14) + in[inf];
+ out[outf + 0] = (out[outf + 0] << 10) + (in[inf + 1] >>> 4);
+ out[outf + 1] = (out[outf + 1] << 4) + ((in[inf + 1] << 28) >>> 28);
+ for (int i = 0; i < 2; i++)
+ out[outf + 1] = (out[outf + 1] << 14) + in[inf + 2 + i];
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode71(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ out[outf + 0] = (out[outf + 0] << 14) + in[inf];
+ out[outf + 0] = (out[outf + 0] << 10) + (in[inf + 1] >>> 4);
+ out[outf + 1] = (out[outf + 1] << 4) + ((in[inf + 1] << 28) >>> 28);
+ for (int i = 0; i < 1; i++)
+ out[outf + 1] = (out[outf + 1] << 28) + in[inf + 2 + i];
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode72(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+
+ out[outf + 0] = (out[outf + 0] << 24) + (in[inf] >>> 4);
+ out[outf + 1] = (out[outf + 1] << 4) + ((in[inf] << 28) >>> 28);
+ for (int i = 0; i < 28; i++)
+ out[outf + 1] = (out[outf + 1] << 1) + in[inf + 1 + i];
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode73(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ out[outf + 0] = (out[outf + 0] << 24) + (in[inf] >>> 4);
+ out[outf + 1] = (out[outf + 1] << 4) + ((in[inf] << 28) >>> 28);
+ for (int i = 0; i < 14; i++)
+ out[outf + 1] = (out[outf + 1] << 2) + in[inf + 1 + i];
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode74(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ out[outf + 0] = (out[outf + 0] << 24) + (in[inf] >>> 4);
+ out[outf + 1] = (out[outf + 1] << 4) + ((in[inf] << 28) >>> 28);
+ for (int i = 0; i < 9; i++)
+ out[outf + 1] = (out[outf + 1] << 3) + in[inf + 1 + i];
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode75(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ out[outf + 0] = (out[outf + 0] << 24) + (in[inf] >>> 4);
+ out[outf + 1] = (out[outf + 1] << 4) + ((in[inf] << 28) >>> 28);
+ for (int i = 0; i < 7; i++)
+ out[outf + 1] = (out[outf + 1] << 4) + in[inf + 1 + i];
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode76(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ out[outf + 0] = (out[outf + 0] << 24) + (in[inf] >>> 4);
+ out[outf + 1] = (out[outf + 1] << 4) + ((in[inf] << 28) >>> 28);
+ for (int i = 0; i < 5; i++)
+ out[outf + 1] = (out[outf + 1] << 5) + in[inf + 1 + i];
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode77(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ out[outf + 0] = (out[outf + 0] << 24) + (in[inf] >>> 4);
+ out[outf + 1] = (out[outf + 1] << 4) + ((in[inf] << 28) >>> 28);
+ for (int i = 0; i < 4; i++)
+ out[outf + 1] = (out[outf + 1] << 7) + in[inf + 1 + i];
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode78(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ out[outf + 0] = (out[outf + 0] << 24) + (in[inf] >>> 4);
+ out[outf + 1] = (out[outf + 1] << 4) + ((in[inf] << 28) >>> 28);
+ for (int i = 0; i < 3; i++)
+ out[outf + 1] = (out[outf + 1] << 9) + in[inf + 1 + i];
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode79(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ out[outf + 0] = (out[outf + 0] << 24) + (in[inf] >>> 4);
+ out[outf + 1] = (out[outf + 1] << 4) + ((in[inf] << 28) >>> 28);
+ for (int i = 0; i < 2; i++)
+ out[outf + 1] = (out[outf + 1] << 14) + in[inf + 1 + i];
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ private void encode80(final int[] in, final int inf, final int code, final int[] out,
+ final int outf) {
+ out[outf + 0] = (out[outf + 0] << 24) + (in[inf] >>> 4);
+ out[outf + 1] = (out[outf + 1] << 4) + ((in[inf] << 28) >>> 28);
+ for (int i = 0; i < 1; i++)
+ out[outf + 1] = (out[outf + 1] << 28) + in[inf + 1 + i];
+ out[outf + 0] = code << 24 | out[outf + 0];
+
+ }
+
+ @Override
+ public void uncompress(int[] in, IntWrapper inpos, int inlength, int[] out, IntWrapper outpos) {
+ if (inlength == 0)
+ return;
+ final int outlength = in[inpos.get()];
+ inpos.increment();
+ headlessUncompress(in, inpos, inlength, out, outpos, outlength);
+ }
+
+
+
+ private void decode80(int val, int valn, int[] out, int currentPos) {
+ // number : 1, bitwidth : 28
+ out[currentPos++] = (val << 8) >>> 4 | (valn >>> 28);
+ // number : 1, bitwidth : 28
+ out[currentPos++] = (valn << 4) >>> 4;
+ }
+
+ private void decode79(int val, int valn, int[] out, int currentPos) {
+ // number : 1, bitwidth : 28
+ out[currentPos++] = (val << 8) >>> 4 | (valn >>> 28);
+ // number :2, bitwidth : 14
+ out[currentPos++] = (valn << 4) >>> 18;
+ out[currentPos++] = (valn << 18) >>> 18;
+ }
+
+ private void decode78(int val, int valn, int[] out, int currentPos) {
+ // number : 1, bitwidth : 28
+ out[currentPos++] = (val << 8) >>> 4 | (valn >>> 27);
+ // number : 3, bitwidth :9
+ out[currentPos++] = (valn << 5) >>> 23;
+ out[currentPos++] = (valn << 14) >>> 23;
+ out[currentPos++] = (valn << 23) >>> 23;
+ }
+
+ private void decode77(int val, int valn, int[] out, int currentPos) {
+ // number : 1, bitwidth : 28
+ out[currentPos++] = (val << 8) >>> 4 | (valn >>> 28);
+ // number : 4, bitwidth : 7
+ out[currentPos++] = (valn << 4) >>> 25;
+ out[currentPos++] = (valn << 11) >>> 25;
+ out[currentPos++] = (valn << 18) >>> 25;
+ out[currentPos++] = (valn << 25) >>> 25;
+ }
+
+ private void decode76(int val, int valn, int[] out, int currentPos) {
+ // number : 5, bitwidth : 5
+ out[currentPos++] = (val << 8) >>> 4 | (valn >>> 25);
+ // number : 14, bitwidth : 2
+ out[currentPos++] = (valn << 7) >>> 27;
+ out[currentPos++] = (valn << 12) >>> 27;
+ out[currentPos++] = (valn << 17) >>> 27;
+ out[currentPos++] = (valn << 22) >>> 27;
+ out[currentPos++] = (valn << 27) >>> 27;
+ }
+
+ private void decode75(int val, int valn, int[] out, int currentPos) {
+ // number : 1, bitwidth : 28
+ out[currentPos++] = (val << 8) >>> 4 | (valn >>> 28);
+ // number : 7, bitwidth : 4
+ out[currentPos++] = (valn << 4) >>> 28;
+ out[currentPos++] = (valn << 8) >>> 28;
+ out[currentPos++] = (valn << 12) >>> 28;
+ out[currentPos++] = (valn << 16) >>> 28;
+ out[currentPos++] = (valn << 20) >>> 28;
+ out[currentPos++] = (valn << 24) >>> 28;
+ out[currentPos++] = (valn << 28) >>> 28;
+ }
+
+ private void decode74(int val, int valn, int[] out, int currentPos) {
+ // number : 1, bitwidth : 28
+ out[currentPos++] = (val << 8) >>> 4 | (valn >>> 27);
+ // number : 9, bitwidth : 3
+ out[currentPos++] = (valn << 5) >>> 29;
+ out[currentPos++] = (valn << 8) >>> 29;
+ out[currentPos++] = (valn << 11) >>> 29;
+ out[currentPos++] = (valn << 14) >>> 29;
+ out[currentPos++] = (valn << 17) >>> 29;
+ out[currentPos++] = (valn << 20) >>> 29;
+ out[currentPos++] = (valn << 23) >>> 29;
+ out[currentPos++] = (valn << 26) >>> 29;
+ out[currentPos++] = (valn << 29) >>> 29;
+ }
+
+ private void decode73(int val, int valn, int[] out, int currentPos) {
+ // number : 1, bitwidth : 28
+ out[currentPos++] = (val << 8) >>> 4 | (valn >>> 28);
+ // number : 14, bitwidth : 2
+ out[currentPos++] = (valn << 4) >>> 30;
+ out[currentPos++] = (valn << 6) >>> 30;
+ out[currentPos++] = (valn << 8) >>> 30;
+ out[currentPos++] = (valn << 10) >>> 30;
+ out[currentPos++] = (valn << 12) >>> 30;
+ out[currentPos++] = (valn << 14) >>> 30;
+ out[currentPos++] = (valn << 16) >>> 30;
+ out[currentPos++] = (valn << 18) >>> 30;
+ out[currentPos++] = (valn << 20) >>> 30;
+ out[currentPos++] = (valn << 22) >>> 30; // 10
+ out[currentPos++] = (valn << 24) >>> 30;
+ out[currentPos++] = (valn << 26) >>> 30;
+ out[currentPos++] = (valn << 28) >>> 30;
+ out[currentPos++] = (valn << 30) >>> 30;
+ }
+
+ private void decode72(int val, int valn, int[] out, int currentPos) {
+ // number : 1, bitwidth : 28
+ out[currentPos++] = (val << 8) >>> 4 | (valn >>> 28);
+ // number : 28, bitwidth : 1
+ out[currentPos++] = (valn << 4) >>> 31;
+ out[currentPos++] = (valn << 5) >>> 31;
+ out[currentPos++] = (valn << 6) >>> 31;
+ out[currentPos++] = (valn << 7) >>> 31;
+ out[currentPos++] = (valn << 8) >>> 31;
+ out[currentPos++] = (valn << 9) >>> 31;
+ out[currentPos++] = (valn << 10) >>> 31;
+ out[currentPos++] = (valn << 11) >>> 31;
+ out[currentPos++] = (valn << 12) >>> 31;
+ out[currentPos++] = (valn << 13) >>> 31; // 10
+ out[currentPos++] = (valn << 14) >>> 31;
+ out[currentPos++] = (valn << 15) >>> 31;
+ out[currentPos++] = (valn << 16) >>> 31;
+ out[currentPos++] = (valn << 17) >>> 31;
+ out[currentPos++] = (valn << 18) >>> 31;
+ out[currentPos++] = (valn << 19) >>> 31;
+ out[currentPos++] = (valn << 20) >>> 31;
+ out[currentPos++] = (valn << 21) >>> 31;
+ out[currentPos++] = (valn << 22) >>> 31;
+ out[currentPos++] = (valn << 23) >>> 31; // 20
+ out[currentPos++] = (valn << 24) >>> 31;
+ out[currentPos++] = (valn << 25) >>> 31;
+ out[currentPos++] = (valn << 26) >>> 31;
+ out[currentPos++] = (valn << 27) >>> 31;
+ out[currentPos++] = (valn << 28) >>> 31;
+ out[currentPos++] = (valn << 29) >>> 31;
+ out[currentPos++] = (valn << 30) >>> 31;
+ out[currentPos++] = (valn << 31) >>> 31;
+ }
+
+ private void decode71(int val, int valn, int[] out, int currentPos) {
+ // number : 2, bitwidth : 14
+ out[currentPos++] = (val << 8) >>> 18;
+ out[currentPos++] = (val << 22) >>> 18 | (valn >>> 28);
+ // number : 1, bitwidth : 28
+ out[currentPos++] = (valn << 4) >>> 4;
+ }
+
+ private void decode70(int val, int valn, int[] out, int currentPos) {
+ // number : 2, bitwidth : 14
+ out[currentPos++] = (val << 8) >>> 18;
+ out[currentPos++] = (val << 22) >>> 18 | (valn >>> 28);
+ // number : 2, bitwidth : 14
+ out[currentPos++] = (valn << 4) >>> 18;
+ out[currentPos++] = (valn << 18) >>> 18;
+ }
+
+ private void decode69(int val, int valn, int[] out, int currentPos) {
+ // number : 2, bitwidth : 14
+ out[currentPos++] = (val << 8) >>> 18;
+ out[currentPos++] = (val << 22) >>> 18 | (valn >>> 27);
+ // number : 3, bitwidth : 9
+ out[currentPos++] = (valn << 5) >>> 23;
+ out[currentPos++] = (valn << 14) >>> 23;
+ out[currentPos++] = (valn << 23) >>> 23;
+ }
+
+ private void decode68(int val, int valn, int[] out, int currentPos) {
+ // number : 2, bitwidth : 14
+ out[currentPos++] = (val << 8) >>> 18;
+ out[currentPos++] = (val << 22) >>> 18 | (valn >>> 28);
+ // number : 4, bitwidth : 7
+ out[currentPos++] = (valn << 4) >>> 25;
+ out[currentPos++] = (valn << 11) >>> 25;
+ out[currentPos++] = (valn << 18) >>> 25;
+ out[currentPos++] = (valn << 25) >>> 25;
+ }
+
+ private void decode67(int val, int valn, int[] out, int currentPos) {
+ // number : 2, bitwidth : 14
+ out[currentPos++] = (val << 8) >>> 18;
+ out[currentPos++] = (val << 22) >>> 18 | (valn >>> 25);
+ // number : 5, bitwidth : 5
+ out[currentPos++] = (valn << 7) >>> 27;
+ out[currentPos++] = (valn << 12) >>> 27;
+ out[currentPos++] = (valn << 17) >>> 27;
+ out[currentPos++] = (valn << 22) >>> 27;
+ out[currentPos++] = (valn << 27) >>> 27;
+ }
+
+ private void decode66(int val, int valn, int[] out, int currentPos) {
+ // number : 2, bitwidth : 14
+ out[currentPos++] = (val << 8) >>> 18;
+ out[currentPos++] = (val << 22) >>> 18 | (valn >>> 28);
+ // number : 7, bitwidth : 4
+ out[currentPos++] = (valn << 4) >>> 28;
+ out[currentPos++] = (valn << 8) >>> 28;
+ out[currentPos++] = (valn << 12) >>> 28;
+ out[currentPos++] = (valn << 16) >>> 28;
+ out[currentPos++] = (valn << 20) >>> 28;
+ out[currentPos++] = (valn << 24) >>> 28;
+ out[currentPos++] = (valn << 28) >>> 28;
+ }
+
+ private void decode65(int val, int valn, int[] out, int currentPos) {
+ // number : 2, bitwidth : 14
+ out[currentPos++] = (val << 8) >>> 18;
+ out[currentPos++] = (val << 22) >>> 18 | (valn >>> 27);
+ // number : 9, bitwidth : 3
+ out[currentPos++] = (valn << 5) >>> 29;
+ out[currentPos++] = (valn << 8) >>> 29;
+ out[currentPos++] = (valn << 11) >>> 29;
+ out[currentPos++] = (valn << 14) >>> 29;
+ out[currentPos++] = (valn << 17) >>> 29;
+ out[currentPos++] = (valn << 20) >>> 29;
+ out[currentPos++] = (valn << 23) >>> 29;
+ out[currentPos++] = (valn << 26) >>> 29;
+ out[currentPos++] = (valn << 29) >>> 29;
+ }
+
+ private void decode64(int val, int valn, int[] out, int currentPos) {
+ // number : 2, bitwidth : 14
+ out[currentPos++] = (val << 8) >>> 18;
+ out[currentPos++] = (val << 22) >>> 18 | (valn >>> 28);
+ // number : 14, bitwidth : 2
+ out[currentPos++] = (valn << 4) >>> 30;
+ out[currentPos++] = (valn << 6) >>> 30;
+ out[currentPos++] = (valn << 8) >>> 30;
+ out[currentPos++] = (valn << 10) >>> 30;
+ out[currentPos++] = (valn << 12) >>> 30;
+ out[currentPos++] = (valn << 14) >>> 30;
+ out[currentPos++] = (valn << 16) >>> 30;
+ out[currentPos++] = (valn << 18) >>> 30;
+ out[currentPos++] = (valn << 20) >>> 30;
+ out[currentPos++] = (valn << 22) >>> 30; // 10
+ out[currentPos++] = (valn << 24) >>> 30;
+ out[currentPos++] = (valn << 26) >>> 30;
+ out[currentPos++] = (valn << 28) >>> 30;
+ out[currentPos++] = (valn << 30) >>> 30;
+ }
+
+ private void decode63(int val, int valn, int[] out, int currentPos) {
+ // number : 2, bitwidth : 14
+ out[currentPos++] = (val << 8) >>> 18;
+ out[currentPos++] = (val << 22) >>> 18 | (valn >>> 28);
+ // number : 28, bitwidth : 1
+ out[currentPos++] = (valn << 4) >>> 31;
+ out[currentPos++] = (valn << 5) >>> 31;
+ out[currentPos++] = (valn << 6) >>> 31;
+ out[currentPos++] = (valn << 7) >>> 31;
+ out[currentPos++] = (valn << 8) >>> 31;
+ out[currentPos++] = (valn << 9) >>> 31;
+ out[currentPos++] = (valn << 10) >>> 31;
+ out[currentPos++] = (valn << 11) >>> 31;
+ out[currentPos++] = (valn << 12) >>> 31;
+ out[currentPos++] = (valn << 13) >>> 31; // 10
+ out[currentPos++] = (valn << 14) >>> 31;
+ out[currentPos++] = (valn << 15) >>> 31;
+ out[currentPos++] = (valn << 16) >>> 31;
+ out[currentPos++] = (valn << 17) >>> 31;
+ out[currentPos++] = (valn << 18) >>> 31;
+ out[currentPos++] = (valn << 19) >>> 31;
+ out[currentPos++] = (valn << 20) >>> 31;
+ out[currentPos++] = (valn << 21) >>> 31;
+ out[currentPos++] = (valn << 22) >>> 31;
+ out[currentPos++] = (valn << 23) >>> 31; // 20
+ out[currentPos++] = (valn << 24) >>> 31;
+ out[currentPos++] = (valn << 25) >>> 31;
+ out[currentPos++] = (valn << 26) >>> 31;
+ out[currentPos++] = (valn << 27) >>> 31;
+ out[currentPos++] = (valn << 28) >>> 31;
+ out[currentPos++] = (valn << 29) >>> 31;
+ out[currentPos++] = (valn << 30) >>> 31;
+ out[currentPos++] = (valn << 31) >>> 31;
+ }
+
+ private void decode62(int val, int valn, int[] out, int currentPos) {
+ // number : 3, bitwidth : 9
+ out[currentPos++] = (val << 8) >>> 23;
+ out[currentPos++] = (val << 17) >>> 23;
+ out[currentPos++] = (val << 26) >>> 23 | (valn >>> 28);
+ // number : 1, bitwidth : 28
+ out[currentPos++] = (valn << 4) >>> 4;
+ }
+
+ private void decode61(int val, int valn, int[] out, int currentPos) {
+ // number : 3, bitwidth : 9
+ out[currentPos++] = (val << 8) >>> 23;
+ out[currentPos++] = (val << 17) >>> 23;
+ out[currentPos++] = (val << 26) >>> 23 | (valn >>> 28);
+ // number : 2, bitwidth : 14
+ out[currentPos++] = (valn << 4) >>> 18;
+ out[currentPos++] = (valn << 18) >>> 18;
+ }
+
+ private void decode60(int val, int valn, int[] out, int currentPos) {
+ // number : 3, bitwidth : 9
+ out[currentPos++] = (val << 8) >>> 23;
+ out[currentPos++] = (val << 17) >>> 23;
+ out[currentPos++] = (val << 26) >>> 23 | (valn >>> 27);
+ // number : 3, bitwidth : 9
+ out[currentPos++] = (valn << 5) >>> 23;
+ out[currentPos++] = (valn << 14) >>> 23;
+ out[currentPos++] = (valn << 23) >>> 23;
+ }
+
+ private void decode59(int val, int valn, int[] out, int currentPos) {
+ // number : 3, bitwidth : 9
+ out[currentPos++] = (val << 8) >>> 23;
+ out[currentPos++] = (val << 17) >>> 23;
+ out[currentPos++] = (val << 26) >>> 23 | (valn >>> 28);
+ // number : 4, bitwidth : 7
+ out[currentPos++] = (valn << 4) >>> 25;
+ out[currentPos++] = (valn << 11) >>> 25;
+ out[currentPos++] = (valn << 18) >>> 25;
+ out[currentPos++] = (valn << 25) >>> 25;
+ }
+
+ private void decode58(int val, int valn, int[] out, int currentPos) {
+ // number : 3, bitwidth : 9
+ out[currentPos++] = (val << 8) >>> 23;
+ out[currentPos++] = (val << 17) >>> 23;
+ out[currentPos++] = (val << 26) >>> 23 | (valn >>> 25);
+ // number : 5, bitwidth : 5
+ out[currentPos++] = (valn << 7) >>> 27;
+ out[currentPos++] = (valn << 12) >>> 27;
+ out[currentPos++] = (valn << 17) >>> 27;
+ out[currentPos++] = (valn << 22) >>> 27;
+ out[currentPos++] = (valn << 27) >>> 27;
+ }
+
+ private void decode57(int val, int valn, int[] out, int currentPos) {
+ // number : 3, bitwidth : 9
+ out[currentPos++] = (val << 8) >>> 23;
+ out[currentPos++] = (val << 17) >>> 23;
+ out[currentPos++] = (val << 26) >>> 23 | (valn >>> 28);
+ // number : 7, bitwidth : 4
+ out[currentPos++] = (valn << 4) >>> 28;
+ out[currentPos++] = (valn << 8) >>> 28;
+ out[currentPos++] = (valn << 12) >>> 28;
+ out[currentPos++] = (valn << 16) >>> 28;
+ out[currentPos++] = (valn << 20) >>> 28;
+ out[currentPos++] = (valn << 24) >>> 28;
+ out[currentPos++] = (valn << 28) >>> 28;
+ }
+
+ private void decode56(int val, int valn, int[] out, int currentPos) {
+ // number : 3, bitwidth : 9
+ out[currentPos++] = (val << 8) >>> 23;
+ out[currentPos++] = (val << 17) >>> 23;
+ out[currentPos++] = (val << 26) >>> 23 | (valn >>> 27);
+ // number : 9, bitwidth : 3
+ out[currentPos++] = (valn << 5) >>> 29;
+ out[currentPos++] = (valn << 8) >>> 29;
+ out[currentPos++] = (valn << 11) >>> 29;
+ out[currentPos++] = (valn << 14) >>> 29;
+ out[currentPos++] = (valn << 17) >>> 29;
+ out[currentPos++] = (valn << 20) >>> 29;
+ out[currentPos++] = (valn << 23) >>> 29;
+ out[currentPos++] = (valn << 26) >>> 29;
+ out[currentPos++] = (valn << 29) >>> 29;
+ }
+
+ private void decode55(int val, int valn, int[] out, int currentPos) {
+ // number : 3, bitwidth : 9
+ out[currentPos++] = (val << 8) >>> 23;
+ out[currentPos++] = (val << 17) >>> 23;
+ out[currentPos++] = (val << 26) >>> 23 | (valn >>> 28);
+ // number : 14, bitwidth : 2
+ out[currentPos++] = (valn << 4) >>> 30;
+ out[currentPos++] = (valn << 6) >>> 30;
+ out[currentPos++] = (valn << 8) >>> 30;
+ out[currentPos++] = (valn << 10) >>> 30;
+ out[currentPos++] = (valn << 12) >>> 30;
+ out[currentPos++] = (valn << 14) >>> 30;
+ out[currentPos++] = (valn << 16) >>> 30;
+ out[currentPos++] = (valn << 18) >>> 30;
+ out[currentPos++] = (valn << 20) >>> 30;
+ out[currentPos++] = (valn << 22) >>> 30; // 10
+ out[currentPos++] = (valn << 24) >>> 30;
+ out[currentPos++] = (valn << 26) >>> 30;
+ out[currentPos++] = (valn << 28) >>> 30;
+ out[currentPos++] = (valn << 30) >>> 30;
+ }
+
+ private void decode54(int val, int valn, int[] out, int currentPos) {
+ // number : 3, bitwidth : 9
+ out[currentPos++] = (val << 8) >>> 23;
+ out[currentPos++] = (val << 17) >>> 23;
+ out[currentPos++] = (val << 26) >>> 23 | (valn >>> 28);
+ // number : 28, bitwidth : 1
+ out[currentPos++] = (valn << 4) >>> 31;
+ out[currentPos++] = (valn << 5) >>> 31;
+ out[currentPos++] = (valn << 6) >>> 31;
+ out[currentPos++] = (valn << 7) >>> 31;
+ out[currentPos++] = (valn << 8) >>> 31;
+ out[currentPos++] = (valn << 9) >>> 31;
+ out[currentPos++] = (valn << 10) >>> 31;
+ out[currentPos++] = (valn << 11) >>> 31;
+ out[currentPos++] = (valn << 12) >>> 31;
+ out[currentPos++] = (valn << 13) >>> 31; // 10
+ out[currentPos++] = (valn << 14) >>> 31;
+ out[currentPos++] = (valn << 15) >>> 31;
+ out[currentPos++] = (valn << 16) >>> 31;
+ out[currentPos++] = (valn << 17) >>> 31;
+ out[currentPos++] = (valn << 18) >>> 31;
+ out[currentPos++] = (valn << 19) >>> 31;
+ out[currentPos++] = (valn << 20) >>> 31;
+ out[currentPos++] = (valn << 21) >>> 31;
+ out[currentPos++] = (valn << 22) >>> 31;
+ out[currentPos++] = (valn << 23) >>> 31; // 20
+ out[currentPos++] = (valn << 24) >>> 31;
+ out[currentPos++] = (valn << 25) >>> 31;
+ out[currentPos++] = (valn << 26) >>> 31;
+ out[currentPos++] = (valn << 27) >>> 31;
+ out[currentPos++] = (valn << 28) >>> 31;
+ out[currentPos++] = (valn << 29) >>> 31;
+ out[currentPos++] = (valn << 30) >>> 31;
+ out[currentPos++] = (valn << 31) >>> 31;
+ }
+
+ private void decode53(int val, int valn, int[] out, int currentPos) {
+ // number : 4, bitwidth : 7
+ out[currentPos++] = (val << 8) >>> 25;
+ out[currentPos++] = (val << 15) >>> 25;
+ out[currentPos++] = (val << 22) >>> 25;
+ out[currentPos++] = (val << 29) >>> 25 | (valn >>> 28);
+ // number : 1, bitwidth : 28
+ out[currentPos++] = (valn << 4) >>> 4;
+ }
+
+ private void decode52(int val, int valn, int[] out, int currentPos) {
+ // number : 4, bitwidth : 7
+ out[currentPos++] = (val << 8) >>> 25;
+ out[currentPos++] = (val << 15) >>> 25;
+ out[currentPos++] = (val << 22) >>> 25;
+ out[currentPos++] = (val << 29) >>> 25 | (valn >>> 28);
+ // number : 2, bitwidth : 14
+ out[currentPos++] = (valn << 4) >>> 18;
+ out[currentPos++] = (valn << 18) >>> 18;
+ }
+
+ private void decode51(int val, int valn, int[] out, int currentPos) {
+ // number : 4, bitwidth : 7
+ out[currentPos++] = (val << 8) >>> 25;
+ out[currentPos++] = (val << 15) >>> 25;
+ out[currentPos++] = (val << 22) >>> 25;
+ out[currentPos++] = (val << 29) >>> 25 | (valn >>> 27);
+ // number : 3, bitwidth : 9
+ out[currentPos++] = (valn << 5) >>> 23;
+ out[currentPos++] = (valn << 14) >>> 23;
+ out[currentPos++] = (valn << 23) >>> 23;
+ }
+
+ private void decode50(int val, int valn, int[] out, int currentPos) {
+ // number : 4, bitwidth : 7
+ out[currentPos++] = (val << 8) >>> 25;
+ out[currentPos++] = (val << 15) >>> 25;
+ out[currentPos++] = (val << 22) >>> 25;
+ out[currentPos++] = (val << 29) >>> 25 | (valn >>> 28);
+ // number : 4, bitwidth : 7
+ out[currentPos++] = (valn << 4) >>> 25;
+ out[currentPos++] = (valn << 11) >>> 25;
+ out[currentPos++] = (valn << 18) >>> 25;
+ out[currentPos++] = (valn << 25) >>> 25;
+ }
+
+ private void decode49(int val, int valn, int[] out, int currentPos) {
+ // number : 4, bitwidth : 7
+ out[currentPos++] = (val << 8) >>> 25;
+ out[currentPos++] = (val << 15) >>> 25;
+ out[currentPos++] = (val << 22) >>> 25;
+ out[currentPos++] = (val << 29) >>> 25 | (valn >>> 25);
+ // number : 5, bitwidth : 5
+ out[currentPos++] = (valn << 7) >>> 27;
+ out[currentPos++] = (valn << 12) >>> 27;
+ out[currentPos++] = (valn << 17) >>> 27;
+ out[currentPos++] = (valn << 22) >>> 27;
+ out[currentPos++] = (valn << 27) >>> 27;
+ }
+
+ private void decode48(int val, int valn, int[] out, int currentPos) {
+ // number : 4, bitwidth : 7
+ out[currentPos++] = (val << 8) >>> 25;
+ out[currentPos++] = (val << 15) >>> 25;
+ out[currentPos++] = (val << 22) >>> 25;
+ out[currentPos++] = (val << 29) >>> 25 | (valn >>> 28);
+ // number : 7, bitwidth : 4
+ out[currentPos++] = (valn << 4) >>> 28;
+ out[currentPos++] = (valn << 8) >>> 28;
+ out[currentPos++] = (valn << 12) >>> 28;
+ out[currentPos++] = (valn << 16) >>> 28;
+ out[currentPos++] = (valn << 20) >>> 28;
+ out[currentPos++] = (valn << 24) >>> 28;
+ out[currentPos++] = (valn << 28) >>> 28;
+ }
+
+ private void decode47(int val, int valn, int[] out, int currentPos) {
+ // number : 4, bitwidth : 7
+ out[currentPos++] = (val << 8) >>> 25;
+ out[currentPos++] = (val << 15) >>> 25;
+ out[currentPos++] = (val << 22) >>> 25;
+ out[currentPos++] = (val << 29) >>> 25 | (valn >>> 27);
+ // number : 9, bitwidth : 3
+ out[currentPos++] = (valn << 5) >>> 29;
+ out[currentPos++] = (valn << 8) >>> 29;
+ out[currentPos++] = (valn << 11) >>> 29;
+ out[currentPos++] = (valn << 14) >>> 29;
+ out[currentPos++] = (valn << 17) >>> 29;
+ out[currentPos++] = (valn << 20) >>> 29;
+ out[currentPos++] = (valn << 23) >>> 29;
+ out[currentPos++] = (valn << 26) >>> 29;
+ out[currentPos++] = (valn << 29) >>> 29;
+ }
+
+ private void decode46(int val, int valn, int[] out, int currentPos) {
+ // number : 4, bitwidth : 7
+ out[currentPos++] = (val << 8) >>> 25;
+ out[currentPos++] = (val << 15) >>> 25;
+ out[currentPos++] = (val << 22) >>> 25;
+ out[currentPos++] = (val << 29) >>> 25 | (valn >>> 28);
+ // number : 14, bitwidth : 2
+ out[currentPos++] = (valn << 4) >>> 30;
+ out[currentPos++] = (valn << 6) >>> 30;
+ out[currentPos++] = (valn << 8) >>> 30;
+ out[currentPos++] = (valn << 10) >>> 30;
+ out[currentPos++] = (valn << 12) >>> 30;
+ out[currentPos++] = (valn << 14) >>> 30;
+ out[currentPos++] = (valn << 16) >>> 30;
+ out[currentPos++] = (valn << 18) >>> 30;
+ out[currentPos++] = (valn << 20) >>> 30;
+ out[currentPos++] = (valn << 22) >>> 30; // 10
+ out[currentPos++] = (valn << 24) >>> 30;
+ out[currentPos++] = (valn << 26) >>> 30;
+ out[currentPos++] = (valn << 28) >>> 30;
+ out[currentPos++] = (valn << 30) >>> 30;
+ }
+
+ private void decode45(int val, int valn, int[] out, int currentPos) {
+ // number : 4, bitwidth : 7
+ out[currentPos++] = (val << 8) >>> 25;
+ out[currentPos++] = (val << 15) >>> 25;
+ out[currentPos++] = (val << 22) >>> 25;
+ out[currentPos++] = (val << 29) >>> 25 | (valn >>> 28);
+ // number : 28, bitwidth : 1
+ out[currentPos++] = (valn << 4) >>> 31;
+ out[currentPos++] = (valn << 5) >>> 31;
+ out[currentPos++] = (valn << 6) >>> 31;
+ out[currentPos++] = (valn << 7) >>> 31;
+ out[currentPos++] = (valn << 8) >>> 31;
+ out[currentPos++] = (valn << 9) >>> 31;
+ out[currentPos++] = (valn << 10) >>> 31;
+ out[currentPos++] = (valn << 11) >>> 31;
+ out[currentPos++] = (valn << 12) >>> 31;
+ out[currentPos++] = (valn << 13) >>> 31; // 10
+ out[currentPos++] = (valn << 14) >>> 31;
+ out[currentPos++] = (valn << 15) >>> 31;
+ out[currentPos++] = (valn << 16) >>> 31;
+ out[currentPos++] = (valn << 17) >>> 31;
+ out[currentPos++] = (valn << 18) >>> 31;
+ out[currentPos++] = (valn << 19) >>> 31;
+ out[currentPos++] = (valn << 20) >>> 31;
+ out[currentPos++] = (valn << 21) >>> 31;
+ out[currentPos++] = (valn << 22) >>> 31;
+ out[currentPos++] = (valn << 23) >>> 31; // 20
+ out[currentPos++] = (valn << 24) >>> 31;
+ out[currentPos++] = (valn << 25) >>> 31;
+ out[currentPos++] = (valn << 26) >>> 31;
+ out[currentPos++] = (valn << 27) >>> 31;
+ out[currentPos++] = (valn << 28) >>> 31;
+ out[currentPos++] = (valn << 29) >>> 31;
+ out[currentPos++] = (valn << 30) >>> 31;
+ out[currentPos++] = (valn << 31) >>> 31;
+ }
+
+ private void decode44(int val, int valn, int[] out, int currentPos) {
+ // number : 5, bitwidth : 5
+ out[currentPos++] = (val << 8) >>> 27;
+ out[currentPos++] = (val << 13) >>> 27;
+ out[currentPos++] = (val << 18) >>> 27;
+ out[currentPos++] = (val << 23) >>> 27;
+ out[currentPos++] = (val << 28) >>> 27 | (valn >>> 28);
+ // number : 1, bitwidth : 28
+ out[currentPos++] = (valn << 4) >>> 4;
+ }
+
+ private void decode43(int val, int valn, int[] out, int currentPos) {
+ // number : 5, bitwidth : 5
+ out[currentPos++] = (val << 8) >>> 27;
+ out[currentPos++] = (val << 13) >>> 27;
+ out[currentPos++] = (val << 18) >>> 27;
+ out[currentPos++] = (val << 23) >>> 27;
+ out[currentPos++] = (val << 28) >>> 27 | (valn >>> 28);
+ // number : 2, bitwidth : 14
+ out[currentPos++] = (valn << 4) >>> 18;
+ out[currentPos++] = (valn << 18) >>> 18;
+ }
+
+ private void decode42(int val, int valn, int[] out, int currentPos) {
+ // number : 5, bitwidth : 5
+ out[currentPos++] = (val << 8) >>> 27;
+ out[currentPos++] = (val << 13) >>> 27;
+ out[currentPos++] = (val << 18) >>> 27;
+ out[currentPos++] = (val << 23) >>> 27;
+ out[currentPos++] = (val << 28) >>> 27 | (valn >>> 27);
+ // number : 3, bitwidth : 9
+ out[currentPos++] = (valn << 5) >>> 23;
+ out[currentPos++] = (valn << 14) >>> 23;
+ out[currentPos++] = (valn << 23) >>> 23;
+ }
+
+ private void decode41(int val, int valn, int[] out, int currentPos) {
+ // number : 5, bitwidth : 5
+ out[currentPos++] = (val << 8) >>> 27;
+ out[currentPos++] = (val << 13) >>> 27;
+ out[currentPos++] = (val << 18) >>> 27;
+ out[currentPos++] = (val << 23) >>> 27;
+ out[currentPos++] = (val << 28) >>> 27 | (valn >>> 28);
+ // number : 4, bitwidth : 7
+ out[currentPos++] = (valn << 4) >>> 25;
+ out[currentPos++] = (valn << 11) >>> 25;
+ out[currentPos++] = (valn << 18) >>> 25;
+ out[currentPos++] = (valn << 25) >>> 25;
+ }
+
+ private void decode40(int val, int valn, int[] out, int currentPos) {
+ // number : 5, bitwidth : 5
+ out[currentPos++] = (val << 8) >>> 27;
+ out[currentPos++] = (val << 13) >>> 27;
+ out[currentPos++] = (val << 18) >>> 27;
+ out[currentPos++] = (val << 23) >>> 27;
+ out[currentPos++] = (val << 28) >>> 27 | (valn >>> 25);
+ // number : 5, bitwidth : 5
+ out[currentPos++] = (valn << 7) >>> 27;
+ out[currentPos++] = (valn << 12) >>> 27;
+ out[currentPos++] = (valn << 17) >>> 27;
+ out[currentPos++] = (valn << 22) >>> 27;
+ out[currentPos++] = (valn << 27) >>> 27;
+ }
+
+ private void decode39(int val, int valn, int[] out, int currentPos) {
+ // number : 5, bitwidth : 5
+ out[currentPos++] = (val << 8) >>> 27;
+ out[currentPos++] = (val << 13) >>> 27;
+ out[currentPos++] = (val << 18) >>> 27;
+ out[currentPos++] = (val << 23) >>> 27;
+ out[currentPos++] = (val << 28) >>> 27 | (valn >>> 28);
+ // number : 7, bitwidth : 4
+ out[currentPos++] = (valn << 4) >>> 28;
+ out[currentPos++] = (valn << 8) >>> 28;
+ out[currentPos++] = (valn << 12) >>> 28;
+ out[currentPos++] = (valn << 16) >>> 28;
+ out[currentPos++] = (valn << 20) >>> 28;
+ out[currentPos++] = (valn << 24) >>> 28;
+ out[currentPos++] = (valn << 28) >>> 28;
+ }
+
+ private void decode38(int val, int valn, int[] out, int currentPos) {
+ // number : 5, bitwidth : 5
+ out[currentPos++] = (val << 8) >>> 27;
+ out[currentPos++] = (val << 13) >>> 27;
+ out[currentPos++] = (val << 18) >>> 27;
+ out[currentPos++] = (val << 23) >>> 27;
+ out[currentPos++] = (val << 28) >>> 27 | (valn >>> 27);
+ // number : 9, bitwidth : 3
+ out[currentPos++] = (valn << 5) >>> 29;
+ out[currentPos++] = (valn << 8) >>> 29;
+ out[currentPos++] = (valn << 11) >>> 29;
+ out[currentPos++] = (valn << 14) >>> 29;
+ out[currentPos++] = (valn << 17) >>> 29;
+ out[currentPos++] = (valn << 20) >>> 29;
+ out[currentPos++] = (valn << 23) >>> 29;
+ out[currentPos++] = (valn << 26) >>> 29;
+ out[currentPos++] = (valn << 29) >>> 29;
+ }
+
+ private void decode37(int val, int valn, int[] out, int currentPos) {
+ // number : 5, bitwidth : 5
+ out[currentPos++] = (val << 8) >>> 27;
+ out[currentPos++] = (val << 13) >>> 27;
+ out[currentPos++] = (val << 18) >>> 27;
+ out[currentPos++] = (val << 23) >>> 27;
+ out[currentPos++] = (val << 28) >>> 27 | (valn >>> 28);
+ // number : 14, bitwidth : 2
+ out[currentPos++] = (valn << 4) >>> 30;
+ out[currentPos++] = (valn << 6) >>> 30;
+ out[currentPos++] = (valn << 8) >>> 30;
+ out[currentPos++] = (valn << 10) >>> 30;
+ out[currentPos++] = (valn << 12) >>> 30;
+ out[currentPos++] = (valn << 14) >>> 30;
+ out[currentPos++] = (valn << 16) >>> 30;
+ out[currentPos++] = (valn << 18) >>> 30;
+ out[currentPos++] = (valn << 20) >>> 30;
+ out[currentPos++] = (valn << 22) >>> 30; // 10
+ out[currentPos++] = (valn << 24) >>> 30;
+ out[currentPos++] = (valn << 26) >>> 30;
+ out[currentPos++] = (valn << 28) >>> 30;
+ out[currentPos++] = (valn << 30) >>> 30;
+ }
+
+ private void decode36(int val, int valn, int[] out, int currentPos) {
+ // number : 5, bitwidth : 5
+ out[currentPos++] = (val << 8) >>> 27;
+ out[currentPos++] = (val << 13) >>> 27;
+ out[currentPos++] = (val << 18) >>> 27;
+ out[currentPos++] = (val << 23) >>> 27;
+ out[currentPos++] = (val << 28) >>> 27 | (valn >>> 28);
+ // number : 28, bitwidth : 1
+ out[currentPos++] = (valn << 4) >>> 31;
+ out[currentPos++] = (valn << 5) >>> 31;
+ out[currentPos++] = (valn << 6) >>> 31;
+ out[currentPos++] = (valn << 7) >>> 31;
+ out[currentPos++] = (valn << 8) >>> 31;
+ out[currentPos++] = (valn << 9) >>> 31;
+ out[currentPos++] = (valn << 10) >>> 31;
+ out[currentPos++] = (valn << 11) >>> 31;
+ out[currentPos++] = (valn << 12) >>> 31;
+ out[currentPos++] = (valn << 13) >>> 31; // 10
+ out[currentPos++] = (valn << 14) >>> 31;
+ out[currentPos++] = (valn << 15) >>> 31;
+ out[currentPos++] = (valn << 16) >>> 31;
+ out[currentPos++] = (valn << 17) >>> 31;
+ out[currentPos++] = (valn << 18) >>> 31;
+ out[currentPos++] = (valn << 19) >>> 31;
+ out[currentPos++] = (valn << 20) >>> 31;
+ out[currentPos++] = (valn << 21) >>> 31;
+ out[currentPos++] = (valn << 22) >>> 31;
+ out[currentPos++] = (valn << 23) >>> 31; // 20
+ out[currentPos++] = (valn << 24) >>> 31;
+ out[currentPos++] = (valn << 25) >>> 31;
+ out[currentPos++] = (valn << 26) >>> 31;
+ out[currentPos++] = (valn << 27) >>> 31;
+ out[currentPos++] = (valn << 28) >>> 31;
+ out[currentPos++] = (valn << 29) >>> 31;
+ out[currentPos++] = (valn << 30) >>> 31;
+ out[currentPos++] = (valn << 31) >>> 31;
+ }
+
+ private void decode35(int val, int valn, int[] out, int currentPos) {
+ // number : 7, bitwidth : 4
+ out[currentPos++] = (val << 8) >>> 28;
+ out[currentPos++] = (val << 12) >>> 28;
+ out[currentPos++] = (val << 16) >>> 28;
+ out[currentPos++] = (val << 20) >>> 28;
+ out[currentPos++] = (val << 24) >>> 28;
+ out[currentPos++] = (val << 28) >>> 28;
+ out[currentPos++] = (valn << 0) >>> 28;
+ // number : 1, bitwidth : 28
+ out[currentPos++] = (valn << 4) >>> 4;
+ }
+
+ private void decode34(int val, int valn, int[] out, int currentPos) {
+ // number : 7, bitwidth : 4
+ out[currentPos++] = (val << 8) >>> 28;
+ out[currentPos++] = (val << 12) >>> 28;
+ out[currentPos++] = (val << 16) >>> 28;
+ out[currentPos++] = (val << 20) >>> 28;
+ out[currentPos++] = (val << 24) >>> 28;
+ out[currentPos++] = (val << 28) >>> 28;
+ out[currentPos++] = (valn << 0) >>> 28;
+ // number : 2, bitwidth : 14
+ out[currentPos++] = (valn << 4) >>> 18;
+ out[currentPos++] = (valn << 18) >>> 18;
+ }
+
+ private void decode33(int val, int valn, int[] out, int currentPos) {
+ // number : 7, bitwidth : 4
+ out[currentPos++] = (val << 8) >>> 28;
+ out[currentPos++] = (val << 12) >>> 28;
+ out[currentPos++] = (val << 16) >>> 28;
+ out[currentPos++] = (val << 20) >>> 28;
+ out[currentPos++] = (val << 24) >>> 28;
+ out[currentPos++] = (val << 28) >>> 28;
+ out[currentPos++] = (valn << 1) >>> 28;
+ // number : 3, bitwidth : 9
+ out[currentPos++] = (valn << 5) >>> 23;
+ out[currentPos++] = (valn << 14) >>> 23;
+ out[currentPos++] = (valn << 23) >>> 23;
+ }
+
+ private void decode32(int val, int valn, int[] out, int currentPos) {
+ // number : 7, bitwidth : 4
+ out[currentPos++] = (val << 8) >>> 28;
+ out[currentPos++] = (val << 12) >>> 28;
+ out[currentPos++] = (val << 16) >>> 28;
+ out[currentPos++] = (val << 20) >>> 28;
+ out[currentPos++] = (val << 24) >>> 28;
+ out[currentPos++] = (val << 28) >>> 28;
+ out[currentPos++] = (valn << 0) >>> 28;
+ // number : 4, bitwidth : 7
+ out[currentPos++] = (valn << 4) >>> 25;
+ out[currentPos++] = (valn << 11) >>> 25;
+ out[currentPos++] = (valn << 18) >>> 25;
+ out[currentPos++] = (valn << 25) >>> 25;
+ }
+
+ private void decode31(int val, int valn, int[] out, int currentPos) {
+ // number : 7, bitwidth : 4
+ out[currentPos++] = (val << 8) >>> 28;
+ out[currentPos++] = (val << 12) >>> 28;
+ out[currentPos++] = (val << 16) >>> 28;
+ out[currentPos++] = (val << 20) >>> 28;
+ out[currentPos++] = (val << 24) >>> 28;
+ out[currentPos++] = (val << 28) >>> 28;
+ out[currentPos++] = (valn << 3) >>> 28;
+ // number : 5, bitwidth : 5
+ out[currentPos++] = (valn << 7) >>> 27;
+ out[currentPos++] = (valn << 12) >>> 27;
+ out[currentPos++] = (valn << 17) >>> 27;
+ out[currentPos++] = (valn << 22) >>> 27;
+ out[currentPos++] = (valn << 27) >>> 27;
+ }
+
+ private void decode30(int val, int valn, int[] out, int currentPos) {
+ // number : 7, bitwidth : 4
+ out[currentPos++] = (val << 8) >>> 28;
+ out[currentPos++] = (val << 12) >>> 28;
+ out[currentPos++] = (val << 16) >>> 28;
+ out[currentPos++] = (val << 20) >>> 28;
+ out[currentPos++] = (val << 24) >>> 28;
+ out[currentPos++] = (val << 28) >>> 28;
+ out[currentPos++] = (valn << 0) >>> 28;
+ // number : 7, bitwidth : 4
+ out[currentPos++] = (valn << 4) >>> 28;
+ out[currentPos++] = (valn << 8) >>> 28;
+ out[currentPos++] = (valn << 12) >>> 28;
+ out[currentPos++] = (valn << 16) >>> 28;
+ out[currentPos++] = (valn << 20) >>> 28;
+ out[currentPos++] = (valn << 24) >>> 28;
+ out[currentPos++] = (valn << 28) >>> 28;
+ }
+
+ private void decode29(int val, int valn, int[] out, int currentPos) {
+ // number : 7, bitwidth : 4
+ out[currentPos++] = (val << 8) >>> 28;
+ out[currentPos++] = (val << 12) >>> 28;
+ out[currentPos++] = (val << 16) >>> 28;
+ out[currentPos++] = (val << 20) >>> 28;
+ out[currentPos++] = (val << 24) >>> 28;
+ out[currentPos++] = (val << 28) >>> 28;
+ out[currentPos++] = (valn << 1) >>> 28;
+ // number : 9, bitwidth : 3
+ out[currentPos++] = (valn << 5) >>> 29;
+ out[currentPos++] = (valn << 8) >>> 29;
+ out[currentPos++] = (valn << 11) >>> 29;
+ out[currentPos++] = (valn << 14) >>> 29;
+ out[currentPos++] = (valn << 17) >>> 29;
+ out[currentPos++] = (valn << 20) >>> 29;
+ out[currentPos++] = (valn << 23) >>> 29;
+ out[currentPos++] = (valn << 26) >>> 29;
+ out[currentPos++] = (valn << 29) >>> 29;
+ }
+
+ private void decode28(int val, int valn, int[] out, int currentPos) {
+ // number : 7, bitwidth : 4
+ out[currentPos++] = (val << 8) >>> 28;
+ out[currentPos++] = (val << 12) >>> 28;
+ out[currentPos++] = (val << 16) >>> 28;
+ out[currentPos++] = (val << 20) >>> 28;
+ out[currentPos++] = (val << 24) >>> 28;
+ out[currentPos++] = (val << 28) >>> 28;
+ out[currentPos++] = (valn << 0) >>> 28;
+ // number : 14, bitwidth : 2
+ out[currentPos++] = (valn << 4) >>> 30;
+ out[currentPos++] = (valn << 6) >>> 30;
+ out[currentPos++] = (valn << 8) >>> 30;
+ out[currentPos++] = (valn << 10) >>> 30;
+ out[currentPos++] = (valn << 12) >>> 30;
+ out[currentPos++] = (valn << 14) >>> 30;
+ out[currentPos++] = (valn << 16) >>> 30;
+ out[currentPos++] = (valn << 18) >>> 30;
+ out[currentPos++] = (valn << 20) >>> 30;
+ out[currentPos++] = (valn << 22) >>> 30; // 10
+ out[currentPos++] = (valn << 24) >>> 30;
+ out[currentPos++] = (valn << 26) >>> 30;
+ out[currentPos++] = (valn << 28) >>> 30;
+ out[currentPos++] = (valn << 30) >>> 30;
+ }
+
+ private void decode27(int val, int valn, int[] out, int currentPos) {
+ // number : 7, bitwidth : 4
+ out[currentPos++] = (val << 8) >>> 28;
+ out[currentPos++] = (val << 12) >>> 28;
+ out[currentPos++] = (val << 16) >>> 28;
+ out[currentPos++] = (val << 20) >>> 28;
+ out[currentPos++] = (val << 24) >>> 28;
+ out[currentPos++] = (val << 28) >>> 28;
+ out[currentPos++] = (valn << 0) >>> 28;
+ // number : 28, bitwidth : 1
+ out[currentPos++] = (valn << 4) >>> 31;
+ out[currentPos++] = (valn << 5) >>> 31;
+ out[currentPos++] = (valn << 6) >>> 31;
+ out[currentPos++] = (valn << 7) >>> 31;
+ out[currentPos++] = (valn << 8) >>> 31;
+ out[currentPos++] = (valn << 9) >>> 31;
+ out[currentPos++] = (valn << 10) >>> 31;
+ out[currentPos++] = (valn << 11) >>> 31;
+ out[currentPos++] = (valn << 12) >>> 31;
+ out[currentPos++] = (valn << 13) >>> 31; // 10
+ out[currentPos++] = (valn << 14) >>> 31;
+ out[currentPos++] = (valn << 15) >>> 31;
+ out[currentPos++] = (valn << 16) >>> 31;
+ out[currentPos++] = (valn << 17) >>> 31;
+ out[currentPos++] = (valn << 18) >>> 31;
+ out[currentPos++] = (valn << 19) >>> 31;
+ out[currentPos++] = (valn << 20) >>> 31;
+ out[currentPos++] = (valn << 21) >>> 31;
+ out[currentPos++] = (valn << 22) >>> 31;
+ out[currentPos++] = (valn << 23) >>> 31; // 20
+ out[currentPos++] = (valn << 24) >>> 31;
+ out[currentPos++] = (valn << 25) >>> 31;
+ out[currentPos++] = (valn << 26) >>> 31;
+ out[currentPos++] = (valn << 27) >>> 31;
+ out[currentPos++] = (valn << 28) >>> 31;
+ out[currentPos++] = (valn << 29) >>> 31;
+ out[currentPos++] = (valn << 30) >>> 31;
+ out[currentPos++] = (valn << 31) >>> 31;
+ }
+
+ private void decode26(int val, int valn, int[] out, int currentPos) {
+ // number : 9, bitwidth : 3
+ out[currentPos++] = (val << 8) >>> 29;
+ out[currentPos++] = (val << 11) >>> 29;
+ out[currentPos++] = (val << 14) >>> 29;
+ out[currentPos++] = (val << 17) >>> 29;
+ out[currentPos++] = (val << 20) >>> 29;
+ out[currentPos++] = (val << 23) >>> 29;
+ out[currentPos++] = (val << 26) >>> 29;
+ out[currentPos++] = (val << 29) >>> 29;
+ out[currentPos++] = (valn << 1) >>> 29;
+ // number : 1, bitwidth : 28
+ out[currentPos++] = (valn << 4) >>> 4;
+ }
+
+ private void decode25(int val, int valn, int[] out, int currentPos) {
+ // number : 9, bitwidth : 3
+ out[currentPos++] = (val << 8) >>> 29;
+ out[currentPos++] = (val << 11) >>> 29;
+ out[currentPos++] = (val << 14) >>> 29;
+ out[currentPos++] = (val << 17) >>> 29;
+ out[currentPos++] = (val << 20) >>> 29;
+ out[currentPos++] = (val << 23) >>> 29;
+ out[currentPos++] = (val << 26) >>> 29;
+ out[currentPos++] = (val << 29) >>> 29;
+ out[currentPos++] = (valn << 1) >>> 29;
+ // number : 2, bitwidth : 14
+ out[currentPos++] = (valn << 4) >>> 18;
+ out[currentPos++] = (valn << 18) >>> 18;
+ }
+
+ private void decode24(int val, int valn, int[] out, int currentPos) {
+ // number : 9, bitwidth : 3
+ out[currentPos++] = (val << 8) >>> 29;
+ out[currentPos++] = (val << 11) >>> 29;
+ out[currentPos++] = (val << 14) >>> 29;
+ out[currentPos++] = (val << 17) >>> 29;
+ out[currentPos++] = (val << 20) >>> 29;
+ out[currentPos++] = (val << 23) >>> 29;
+ out[currentPos++] = (val << 26) >>> 29;
+ out[currentPos++] = (val << 29) >>> 29;
+ out[currentPos++] = (valn << 2) >>> 29;
+ // number : 3, bitwidth : 9
+ out[currentPos++] = (valn << 5) >>> 23;
+ out[currentPos++] = (valn << 14) >>> 23;
+ out[currentPos++] = (valn << 23) >>> 23;
+ }
+
+ private void decode23(int val, int valn, int[] out, int currentPos) {
+ // number : 9, bitwidth : 3
+ out[currentPos++] = (val << 8) >>> 29;
+ out[currentPos++] = (val << 11) >>> 29;
+ out[currentPos++] = (val << 14) >>> 29;
+ out[currentPos++] = (val << 17) >>> 29;
+ out[currentPos++] = (val << 20) >>> 29;
+ out[currentPos++] = (val << 23) >>> 29;
+ out[currentPos++] = (val << 26) >>> 29;
+ out[currentPos++] = (val << 29) >>> 29;
+ out[currentPos++] = (valn << 1) >>> 29;
+ // number : 4, bitwidth : 7
+ out[currentPos++] = (valn << 4) >>> 25;
+ out[currentPos++] = (valn << 11) >>> 25;
+ out[currentPos++] = (valn << 18) >>> 25;
+ out[currentPos++] = (valn << 25) >>> 25;
+ }
+
+ private void decode22(int val, int valn, int[] out, int currentPos) {
+ // number : 9, bitwidth : 3
+ out[currentPos++] = (val << 8) >>> 29;
+ out[currentPos++] = (val << 11) >>> 29;
+ out[currentPos++] = (val << 14) >>> 29;
+ out[currentPos++] = (val << 17) >>> 29;
+ out[currentPos++] = (val << 20) >>> 29;
+ out[currentPos++] = (val << 23) >>> 29;
+ out[currentPos++] = (val << 26) >>> 29;
+ out[currentPos++] = (val << 29) >>> 29;
+ out[currentPos++] = (valn << 4) >>> 29;
+ // number : 5, bitwidth : 5
+ out[currentPos++] = (valn << 7) >>> 27;
+ out[currentPos++] = (valn << 12) >>> 27;
+ out[currentPos++] = (valn << 17) >>> 27;
+ out[currentPos++] = (valn << 22) >>> 27;
+ out[currentPos++] = (valn << 27) >>> 27;
+ }
+
+ private void decode21(int val, int valn, int[] out, int currentPos) {
+ // number : 9, bitwidth : 3
+ out[currentPos++] = (val << 8) >>> 29;
+ out[currentPos++] = (val << 11) >>> 29;
+ out[currentPos++] = (val << 14) >>> 29;
+ out[currentPos++] = (val << 17) >>> 29;
+ out[currentPos++] = (val << 20) >>> 29;
+ out[currentPos++] = (val << 23) >>> 29;
+ out[currentPos++] = (val << 26) >>> 29;
+ out[currentPos++] = (val << 29) >>> 29;
+ out[currentPos++] = (valn << 1) >>> 29;
+ // number : 7, bitwidth : 4
+ out[currentPos++] = (valn << 4) >>> 28;
+ out[currentPos++] = (valn << 8) >>> 28;
+ out[currentPos++] = (valn << 12) >>> 28;
+ out[currentPos++] = (valn << 16) >>> 28;
+ out[currentPos++] = (valn << 20) >>> 28;
+ out[currentPos++] = (valn << 24) >>> 28;
+ out[currentPos++] = (valn << 28) >>> 28;
+ }
+
+ private void decode20(int val, int valn, int[] out, int currentPos) {
+ // number : 9, bitwidth : 3
+ out[currentPos++] = (val << 8) >>> 29;
+ out[currentPos++] = (val << 11) >>> 29;
+ out[currentPos++] = (val << 14) >>> 29;
+ out[currentPos++] = (val << 17) >>> 29;
+ out[currentPos++] = (val << 20) >>> 29;
+ out[currentPos++] = (val << 23) >>> 29;
+ out[currentPos++] = (val << 26) >>> 29;
+ out[currentPos++] = (val << 29) >>> 29;
+ out[currentPos++] = (valn << 2) >>> 29;
+ // number : 9, bitwidth : 3
+ out[currentPos++] = (valn << 5) >>> 29;
+ out[currentPos++] = (valn << 8) >>> 29;
+ out[currentPos++] = (valn << 11) >>> 29;
+ out[currentPos++] = (valn << 14) >>> 29;
+ out[currentPos++] = (valn << 17) >>> 29;
+ out[currentPos++] = (valn << 20) >>> 29;
+ out[currentPos++] = (valn << 23) >>> 29;
+ out[currentPos++] = (valn << 26) >>> 29;
+ out[currentPos++] = (valn << 29) >>> 29;
+ }
+
+ private void decode19(int val, int valn, int[] out, int currentPos) {
+ // number : 9, bitwidth : 3
+ out[currentPos++] = (val << 8) >>> 29;
+ out[currentPos++] = (val << 11) >>> 29;
+ out[currentPos++] = (val << 14) >>> 29;
+ out[currentPos++] = (val << 17) >>> 29;
+ out[currentPos++] = (val << 20) >>> 29;
+ out[currentPos++] = (val << 23) >>> 29;
+ out[currentPos++] = (val << 26) >>> 29;
+ out[currentPos++] = (val << 29) >>> 29;
+ out[currentPos++] = (valn << 1) >>> 29;
+ // number : 14, bitwidth : 2
+ out[currentPos++] = (valn << 4) >>> 30;
+ out[currentPos++] = (valn << 6) >>> 30;
+ out[currentPos++] = (valn << 8) >>> 30;
+ out[currentPos++] = (valn << 10) >>> 30;
+ out[currentPos++] = (valn << 12) >>> 30;
+ out[currentPos++] = (valn << 14) >>> 30;
+ out[currentPos++] = (valn << 16) >>> 30;
+ out[currentPos++] = (valn << 18) >>> 30;
+ out[currentPos++] = (valn << 20) >>> 30;
+ out[currentPos++] = (valn << 22) >>> 30; // 10
+ out[currentPos++] = (valn << 24) >>> 30;
+ out[currentPos++] = (valn << 26) >>> 30;
+ out[currentPos++] = (valn << 28) >>> 30;
+ out[currentPos++] = (valn << 30) >>> 30;
+ }
+
+ private void decode18(int val, int valn, int[] out, int currentPos) {
+ // number : 9, bitwidth : 3
+ out[currentPos++] = (val << 8) >>> 29;
+ out[currentPos++] = (val << 11) >>> 29;
+ out[currentPos++] = (val << 14) >>> 29;
+ out[currentPos++] = (val << 17) >>> 29;
+ out[currentPos++] = (val << 20) >>> 29;
+ out[currentPos++] = (val << 23) >>> 29;
+ out[currentPos++] = (val << 26) >>> 29;
+ out[currentPos++] = (val << 29) >>> 29;
+ out[currentPos++] = (valn << 1) >>> 29;
+ // number : 28, bitwidth : 1
+ out[currentPos++] = (valn << 4) >>> 31;
+ out[currentPos++] = (valn << 5) >>> 31;
+ out[currentPos++] = (valn << 6) >>> 31;
+ out[currentPos++] = (valn << 7) >>> 31;
+ out[currentPos++] = (valn << 8) >>> 31;
+ out[currentPos++] = (valn << 9) >>> 31;
+ out[currentPos++] = (valn << 10) >>> 31;
+ out[currentPos++] = (valn << 11) >>> 31;
+ out[currentPos++] = (valn << 12) >>> 31;
+ out[currentPos++] = (valn << 13) >>> 31; // 10
+ out[currentPos++] = (valn << 14) >>> 31;
+ out[currentPos++] = (valn << 15) >>> 31;
+ out[currentPos++] = (valn << 16) >>> 31;
+ out[currentPos++] = (valn << 17) >>> 31;
+ out[currentPos++] = (valn << 18) >>> 31;
+ out[currentPos++] = (valn << 19) >>> 31;
+ out[currentPos++] = (valn << 20) >>> 31;
+ out[currentPos++] = (valn << 21) >>> 31;
+ out[currentPos++] = (valn << 22) >>> 31;
+ out[currentPos++] = (valn << 23) >>> 31; // 20
+ out[currentPos++] = (valn << 24) >>> 31;
+ out[currentPos++] = (valn << 25) >>> 31;
+ out[currentPos++] = (valn << 26) >>> 31;
+ out[currentPos++] = (valn << 27) >>> 31;
+ out[currentPos++] = (valn << 28) >>> 31;
+ out[currentPos++] = (valn << 29) >>> 31;
+ out[currentPos++] = (valn << 30) >>> 31;
+ out[currentPos++] = (valn << 31) >>> 31;
+ }
+
+ private void decode17(int val, int valn, int[] out, int currentPos) {
+ // number : 14, bitwidth : 2
+ out[currentPos++] = (val << 8) >>> 30;
+ out[currentPos++] = (val << 10) >>> 30;
+ out[currentPos++] = (val << 12) >>> 30;
+ out[currentPos++] = (val << 14) >>> 30;
+ out[currentPos++] = (val << 16) >>> 30;
+ out[currentPos++] = (val << 18) >>> 30;
+ out[currentPos++] = (val << 20) >>> 30;
+ out[currentPos++] = (val << 22) >>> 30; // 10
+ out[currentPos++] = (val << 24) >>> 30;
+ out[currentPos++] = (val << 26) >>> 30;
+ out[currentPos++] = (val << 28) >>> 30;
+ out[currentPos++] = (val << 30) >>> 30;
+ out[currentPos++] = (valn << 0) >>> 30;
+ out[currentPos++] = (valn << 2) >>> 30;
+ // number : 1, bitwidth : 28
+ out[currentPos++] = (valn << 4) >>> 4;
+ }
+
+ private void decode16(int val, int valn, int[] out, int currentPos) {
+ // number : 14, bitwidth : 2
+ out[currentPos++] = (val << 8) >>> 30;
+ out[currentPos++] = (val << 10) >>> 30;
+ out[currentPos++] = (val << 12) >>> 30;
+ out[currentPos++] = (val << 14) >>> 30;
+ out[currentPos++] = (val << 16) >>> 30;
+ out[currentPos++] = (val << 18) >>> 30;
+ out[currentPos++] = (val << 20) >>> 30;
+ out[currentPos++] = (val << 22) >>> 30; // 10
+ out[currentPos++] = (val << 24) >>> 30;
+ out[currentPos++] = (val << 26) >>> 30;
+ out[currentPos++] = (val << 28) >>> 30;
+ out[currentPos++] = (val << 30) >>> 30;
+ out[currentPos++] = (valn << 0) >>> 30;
+ out[currentPos++] = (valn << 2) >>> 30;
+ // number : 2, bitwidth : 14
+ out[currentPos++] = (valn << 4) >>> 18;
+ out[currentPos++] = (valn << 18) >>> 18;
+ }
+
+ private void decode15(int val, int valn, int[] out, int currentPos) {
+ // number : 14, bitwidth : 2
+ out[currentPos++] = (val << 8) >>> 30;
+ out[currentPos++] = (val << 10) >>> 30;
+ out[currentPos++] = (val << 12) >>> 30;
+ out[currentPos++] = (val << 14) >>> 30;
+ out[currentPos++] = (val << 16) >>> 30;
+ out[currentPos++] = (val << 18) >>> 30;
+ out[currentPos++] = (val << 20) >>> 30;
+ out[currentPos++] = (val << 22) >>> 30; // 10
+ out[currentPos++] = (val << 24) >>> 30;
+ out[currentPos++] = (val << 26) >>> 30;
+ out[currentPos++] = (val << 28) >>> 30;
+ out[currentPos++] = (val << 30) >>> 30;
+ out[currentPos++] = (valn << 1) >>> 30;
+ out[currentPos++] = (valn << 3) >>> 30;
+ // number : 3, bitwidth : 9
+ out[currentPos++] = (valn << 5) >>> 23;
+ out[currentPos++] = (valn << 14) >>> 23;
+ out[currentPos++] = (valn << 23) >>> 23;
+ }
+
+ private void decode14(int val, int valn, int[] out, int currentPos) {
+ // number : 14, bitwidth : 2
+ out[currentPos++] = (val << 8) >>> 30;
+ out[currentPos++] = (val << 10) >>> 30;
+ out[currentPos++] = (val << 12) >>> 30;
+ out[currentPos++] = (val << 14) >>> 30;
+ out[currentPos++] = (val << 16) >>> 30;
+ out[currentPos++] = (val << 18) >>> 30;
+ out[currentPos++] = (val << 20) >>> 30;
+ out[currentPos++] = (val << 22) >>> 30; // 10
+ out[currentPos++] = (val << 24) >>> 30;
+ out[currentPos++] = (val << 26) >>> 30;
+ out[currentPos++] = (val << 28) >>> 30;
+ out[currentPos++] = (val << 30) >>> 30;
+ out[currentPos++] = (valn << 0) >>> 30;
+ out[currentPos++] = (valn << 2) >>> 30;
+ // number : 4, bitwidth : 7
+ out[currentPos++] = (valn << 4) >>> 25;
+ out[currentPos++] = (valn << 11) >>> 25;
+ out[currentPos++] = (valn << 18) >>> 25;
+ out[currentPos++] = (valn << 25) >>> 25;
+ }
+
+ private void decode13(int val, int valn, int[] out, int currentPos) {
+ // number : 14, bitwidth : 2
+ out[currentPos++] = (val << 8) >>> 30;
+ out[currentPos++] = (val << 10) >>> 30;
+ out[currentPos++] = (val << 12) >>> 30;
+ out[currentPos++] = (val << 14) >>> 30;
+ out[currentPos++] = (val << 16) >>> 30;
+ out[currentPos++] = (val << 18) >>> 30;
+ out[currentPos++] = (val << 20) >>> 30;
+ out[currentPos++] = (val << 22) >>> 30; // 10
+ out[currentPos++] = (val << 24) >>> 30;
+ out[currentPos++] = (val << 26) >>> 30;
+ out[currentPos++] = (val << 28) >>> 30;
+ out[currentPos++] = (val << 30) >>> 30;
+ out[currentPos++] = (valn << 3) >>> 30;
+ out[currentPos++] = (valn << 5) >>> 30;
+ // number : 5, bitwidth : 5
+ out[currentPos++] = (valn << 7) >>> 27;
+ out[currentPos++] = (valn << 12) >>> 27;
+ out[currentPos++] = (valn << 17) >>> 27;
+ out[currentPos++] = (valn << 22) >>> 27;
+ out[currentPos++] = (valn << 27) >>> 27;
+
+ }
+
+ private void decode12(int val, int valn, int[] out, int currentPos) {
+ // number : 14, bitwidth : 2
+ out[currentPos++] = (val << 8) >>> 30;
+ out[currentPos++] = (val << 10) >>> 30;
+ out[currentPos++] = (val << 12) >>> 30;
+ out[currentPos++] = (val << 14) >>> 30;
+ out[currentPos++] = (val << 16) >>> 30;
+ out[currentPos++] = (val << 18) >>> 30;
+ out[currentPos++] = (val << 20) >>> 30;
+ out[currentPos++] = (val << 22) >>> 30; // 10
+ out[currentPos++] = (val << 24) >>> 30;
+ out[currentPos++] = (val << 26) >>> 30;
+ out[currentPos++] = (val << 28) >>> 30;
+ out[currentPos++] = (val << 30) >>> 30;
+ out[currentPos++] = (valn << 0) >>> 30;
+ out[currentPos++] = (valn << 2) >>> 30;
+ // number : 7, bitwidth : 4
+ out[currentPos++] = (valn << 4) >>> 28;
+ out[currentPos++] = (valn << 8) >>> 28;
+ out[currentPos++] = (valn << 12) >>> 28;
+ out[currentPos++] = (valn << 16) >>> 28;
+ out[currentPos++] = (valn << 20) >>> 28;
+ out[currentPos++] = (valn << 24) >>> 28;
+ out[currentPos++] = (valn << 28) >>> 28;
+
+ }
+
+ private void decode11(int val, int valn, int[] out, int currentPos) {
+ // number : 14, bitwidth : 2
+ out[currentPos++] = (val << 8) >>> 30;
+ out[currentPos++] = (val << 10) >>> 30;
+ out[currentPos++] = (val << 12) >>> 30;
+ out[currentPos++] = (val << 14) >>> 30;
+ out[currentPos++] = (val << 16) >>> 30;
+ out[currentPos++] = (val << 18) >>> 30;
+ out[currentPos++] = (val << 20) >>> 30;
+ out[currentPos++] = (val << 22) >>> 30; // 10
+ out[currentPos++] = (val << 24) >>> 30;
+ out[currentPos++] = (val << 26) >>> 30;
+ out[currentPos++] = (val << 28) >>> 30;
+ out[currentPos++] = (val << 30) >>> 30;
+ out[currentPos++] = (valn << 1) >>> 30;
+ out[currentPos++] = (valn << 3) >>> 30;
+ // number : 9, bitwidth : 3
+ out[currentPos++] = (valn << 5) >>> 29;
+ out[currentPos++] = (valn << 8) >>> 29;
+ out[currentPos++] = (valn << 11) >>> 29;
+ out[currentPos++] = (valn << 14) >>> 29;
+ out[currentPos++] = (valn << 17) >>> 29;
+ out[currentPos++] = (valn << 20) >>> 29;
+ out[currentPos++] = (valn << 23) >>> 29;
+ out[currentPos++] = (valn << 26) >>> 29;
+ out[currentPos++] = (valn << 29) >>> 29;
+
+ }
+
+ private void decode10(int val, int valn, int[] out, int currentPos) {
+ // number : 14, bitwidth : 2
+ out[currentPos++] = (val << 8) >>> 30;
+ out[currentPos++] = (val << 10) >>> 30;
+ out[currentPos++] = (val << 12) >>> 30;
+ out[currentPos++] = (val << 14) >>> 30;
+ out[currentPos++] = (val << 16) >>> 30;
+ out[currentPos++] = (val << 18) >>> 30;
+ out[currentPos++] = (val << 20) >>> 30;
+ out[currentPos++] = (val << 22) >>> 30; // 10
+ out[currentPos++] = (val << 24) >>> 30;
+ out[currentPos++] = (val << 26) >>> 30;
+ out[currentPos++] = (val << 28) >>> 30;
+ out[currentPos++] = (val << 30) >>> 30;
+ out[currentPos++] = (valn << 0) >>> 30;
+ out[currentPos++] = (valn << 2) >>> 30;
+ // number : 14, bitwidth : 2
+ out[currentPos++] = (valn << 4) >>> 30;
+ out[currentPos++] = (valn << 6) >>> 30;
+ out[currentPos++] = (valn << 8) >>> 30;
+ out[currentPos++] = (valn << 10) >>> 30;
+ out[currentPos++] = (valn << 12) >>> 30;
+ out[currentPos++] = (valn << 14) >>> 30;
+ out[currentPos++] = (valn << 16) >>> 30;
+ out[currentPos++] = (valn << 18) >>> 30;
+ out[currentPos++] = (valn << 20) >>> 30;
+ out[currentPos++] = (valn << 22) >>> 30; // 10
+ out[currentPos++] = (valn << 24) >>> 30;
+ out[currentPos++] = (valn << 26) >>> 30;
+ out[currentPos++] = (valn << 28) >>> 30;
+ out[currentPos++] = (valn << 30) >>> 30;
+ }
+
+ private void decode9(int val, int valn, int[] out, int currentPos) {
+ // number : 14, bitwidth : 2
+ out[currentPos++] = (val << 8) >>> 30;
+ out[currentPos++] = (val << 10) >>> 30;
+ out[currentPos++] = (val << 12) >>> 30;
+ out[currentPos++] = (val << 14) >>> 30;
+ out[currentPos++] = (val << 16) >>> 30;
+ out[currentPos++] = (val << 18) >>> 30;
+ out[currentPos++] = (val << 20) >>> 30;
+ out[currentPos++] = (val << 22) >>> 30; // 10
+ out[currentPos++] = (val << 24) >>> 30;
+ out[currentPos++] = (val << 26) >>> 30;
+ out[currentPos++] = (val << 28) >>> 30;
+ out[currentPos++] = (val << 30) >>> 30;
+ out[currentPos++] = (valn << 0) >>> 30;
+ out[currentPos++] = (valn << 2) >>> 30;
+ // number : 28, bitwidth : 1
+ out[currentPos++] = (valn << 4) >>> 31;
+ out[currentPos++] = (valn << 5) >>> 31;
+ out[currentPos++] = (valn << 6) >>> 31;
+ out[currentPos++] = (valn << 7) >>> 31;
+ out[currentPos++] = (valn << 8) >>> 31;
+ out[currentPos++] = (valn << 9) >>> 31;
+ out[currentPos++] = (valn << 10) >>> 31;
+ out[currentPos++] = (valn << 11) >>> 31;
+ out[currentPos++] = (valn << 12) >>> 31;
+ out[currentPos++] = (valn << 13) >>> 31; // 10
+ out[currentPos++] = (valn << 14) >>> 31;
+ out[currentPos++] = (valn << 15) >>> 31;
+ out[currentPos++] = (valn << 16) >>> 31;
+ out[currentPos++] = (valn << 17) >>> 31;
+ out[currentPos++] = (valn << 18) >>> 31;
+ out[currentPos++] = (valn << 19) >>> 31;
+ out[currentPos++] = (valn << 20) >>> 31;
+ out[currentPos++] = (valn << 21) >>> 31;
+ out[currentPos++] = (valn << 22) >>> 31;
+ out[currentPos++] = (valn << 23) >>> 31; // 20
+ out[currentPos++] = (valn << 24) >>> 31;
+ out[currentPos++] = (valn << 25) >>> 31;
+ out[currentPos++] = (valn << 26) >>> 31;
+ out[currentPos++] = (valn << 27) >>> 31;
+ out[currentPos++] = (valn << 28) >>> 31;
+ out[currentPos++] = (valn << 29) >>> 31;
+ out[currentPos++] = (valn << 30) >>> 31;
+ out[currentPos++] = (valn << 31) >>> 31;
+ }
+
+ private void decode8(int val, int valn, int[] out, int currentPos) {
+ // number : 28, bitwidth : 1
+ out[currentPos++] = (val << 8) >>> 31;
+ out[currentPos++] = (val << 9) >>> 31;
+ out[currentPos++] = (val << 10) >>> 31;
+ out[currentPos++] = (val << 11) >>> 31;
+ out[currentPos++] = (val << 12) >>> 31;
+ out[currentPos++] = (val << 13) >>> 31; // 10
+ out[currentPos++] = (val << 14) >>> 31;
+ out[currentPos++] = (val << 15) >>> 31;
+ out[currentPos++] = (val << 16) >>> 31;
+ out[currentPos++] = (val << 17) >>> 31;
+ out[currentPos++] = (val << 18) >>> 31;
+ out[currentPos++] = (val << 19) >>> 31;
+ out[currentPos++] = (val << 20) >>> 31;
+ out[currentPos++] = (val << 21) >>> 31;
+ out[currentPos++] = (val << 22) >>> 31;
+ out[currentPos++] = (val << 23) >>> 31; // 20
+ out[currentPos++] = (val << 24) >>> 31;
+ out[currentPos++] = (val << 25) >>> 31;
+ out[currentPos++] = (val << 26) >>> 31;
+ out[currentPos++] = (val << 27) >>> 31;
+ out[currentPos++] = (val << 28) >>> 31;
+ out[currentPos++] = (val << 29) >>> 31;
+ out[currentPos++] = (val << 30) >>> 31;
+ out[currentPos++] = (val << 31) >>> 31;
+ out[currentPos++] = valn >>> 31;
+ out[currentPos++] = (valn << 1) >>> 31;
+ out[currentPos++] = (valn << 2) >>> 31;
+ out[currentPos++] = (valn << 3) >>> 31;
+ // number : 1, bitwidth : 28
+ out[currentPos++] = (valn << 4) >>> 4;
+ }
+
+ private void decode7(int val, int valn, int[] out, int currentPos) {
+ // number : 28, bitwidth : 1
+ out[currentPos++] = (val << 8) >>> 31;
+ out[currentPos++] = (val << 9) >>> 31;
+ out[currentPos++] = (val << 10) >>> 31;
+ out[currentPos++] = (val << 11) >>> 31;
+ out[currentPos++] = (val << 12) >>> 31;
+ out[currentPos++] = (val << 13) >>> 31; // 10
+ out[currentPos++] = (val << 14) >>> 31;
+ out[currentPos++] = (val << 15) >>> 31;
+ out[currentPos++] = (val << 16) >>> 31;
+ out[currentPos++] = (val << 17) >>> 31;
+ out[currentPos++] = (val << 18) >>> 31;
+ out[currentPos++] = (val << 19) >>> 31;
+ out[currentPos++] = (val << 20) >>> 31;
+ out[currentPos++] = (val << 21) >>> 31;
+ out[currentPos++] = (val << 22) >>> 31;
+ out[currentPos++] = (val << 23) >>> 31; // 20
+ out[currentPos++] = (val << 24) >>> 31;
+ out[currentPos++] = (val << 25) >>> 31;
+ out[currentPos++] = (val << 26) >>> 31;
+ out[currentPos++] = (val << 27) >>> 31;
+ out[currentPos++] = (val << 28) >>> 31;
+ out[currentPos++] = (val << 29) >>> 31;
+ out[currentPos++] = (val << 30) >>> 31;
+ out[currentPos++] = (val << 31) >>> 31;
+ out[currentPos++] = valn >>> 31;
+ out[currentPos++] = (valn << 1) >>> 31;
+ out[currentPos++] = (valn << 2) >>> 31;
+ out[currentPos++] = (valn << 3) >>> 31;
+ // number : 2, bitwidth : 14
+ out[currentPos++] = (valn << 4) >>> 18;
+ out[currentPos++] = (valn << 18) >>> 18;
+ }
+
+ private void decode6(int val, int valn, int[] out, int currentPos) {
+ // number : 28, bitwidth : 1
+ out[currentPos++] = (val << 8) >>> 31;
+ out[currentPos++] = (val << 9) >>> 31;
+ out[currentPos++] = (val << 10) >>> 31;
+ out[currentPos++] = (val << 11) >>> 31;
+ out[currentPos++] = (val << 12) >>> 31;
+ out[currentPos++] = (val << 13) >>> 31; // 10
+ out[currentPos++] = (val << 14) >>> 31;
+ out[currentPos++] = (val << 15) >>> 31;
+ out[currentPos++] = (val << 16) >>> 31;
+ out[currentPos++] = (val << 17) >>> 31;
+ out[currentPos++] = (val << 18) >>> 31;
+ out[currentPos++] = (val << 19) >>> 31;
+ out[currentPos++] = (val << 20) >>> 31;
+ out[currentPos++] = (val << 21) >>> 31;
+ out[currentPos++] = (val << 22) >>> 31;
+ out[currentPos++] = (val << 23) >>> 31; // 20
+ out[currentPos++] = (val << 24) >>> 31;
+ out[currentPos++] = (val << 25) >>> 31;
+ out[currentPos++] = (val << 26) >>> 31;
+ out[currentPos++] = (val << 27) >>> 31;
+ out[currentPos++] = (val << 28) >>> 31;
+ out[currentPos++] = (val << 29) >>> 31;
+ out[currentPos++] = (val << 30) >>> 31;
+ out[currentPos++] = (val << 31) >>> 31;
+ out[currentPos++] = (valn << 1) >>> 31;
+ out[currentPos++] = (valn << 2) >>> 31;
+ out[currentPos++] = (valn << 3) >>> 31;
+ out[currentPos++] = (valn << 4) >>> 31;
+ // number : 3, bitwidth : 9
+ out[currentPos++] = (valn << 5) >>> 23;
+ out[currentPos++] = (valn << 14) >>> 23;
+ out[currentPos++] = (valn << 23) >>> 23;
+ }
+
+ private void decode5(int val, int valn, int[] out, int currentPos) {
+ // number : 28, bitwidth : 1
+ out[currentPos++] = (val << 8) >>> 31;
+ out[currentPos++] = (val << 9) >>> 31;
+ out[currentPos++] = (val << 10) >>> 31;
+ out[currentPos++] = (val << 11) >>> 31;
+ out[currentPos++] = (val << 12) >>> 31;
+ out[currentPos++] = (val << 13) >>> 31; // 10
+ out[currentPos++] = (val << 14) >>> 31;
+ out[currentPos++] = (val << 15) >>> 31;
+ out[currentPos++] = (val << 16) >>> 31;
+ out[currentPos++] = (val << 17) >>> 31;
+ out[currentPos++] = (val << 18) >>> 31;
+ out[currentPos++] = (val << 19) >>> 31;
+ out[currentPos++] = (val << 20) >>> 31;
+ out[currentPos++] = (val << 21) >>> 31;
+ out[currentPos++] = (val << 22) >>> 31;
+ out[currentPos++] = (val << 23) >>> 31; // 20
+ out[currentPos++] = (val << 24) >>> 31;
+ out[currentPos++] = (val << 25) >>> 31;
+ out[currentPos++] = (val << 26) >>> 31;
+ out[currentPos++] = (val << 27) >>> 31;
+ out[currentPos++] = (val << 28) >>> 31;
+ out[currentPos++] = (val << 29) >>> 31;
+ out[currentPos++] = (val << 30) >>> 31;
+ out[currentPos++] = (val << 31) >>> 31;
+ out[currentPos++] = valn >>> 31;
+ out[currentPos++] = (valn << 1) >>> 31;
+ out[currentPos++] = (valn << 2) >>> 31;
+ out[currentPos++] = (valn << 3) >>> 31;
+ // number : 4, bitwidth : 7
+ out[currentPos++] = (valn << 4) >>> 25;
+ out[currentPos++] = (valn << 11) >>> 25;
+ out[currentPos++] = (valn << 18) >>> 25;
+ out[currentPos++] = (valn << 25) >>> 25;
+ }
+
+ private void decode4(int val, int valn, int[] out, int currentPos) {
+ // number : 28, bitwidth : 1
+ out[currentPos++] = (val << 8) >>> 31;
+ out[currentPos++] = (val << 9) >>> 31;
+ out[currentPos++] = (val << 10) >>> 31;
+ out[currentPos++] = (val << 11) >>> 31;
+ out[currentPos++] = (val << 12) >>> 31;
+ out[currentPos++] = (val << 13) >>> 31; // 10
+ out[currentPos++] = (val << 14) >>> 31;
+ out[currentPos++] = (val << 15) >>> 31;
+ out[currentPos++] = (val << 16) >>> 31;
+ out[currentPos++] = (val << 17) >>> 31;
+ out[currentPos++] = (val << 18) >>> 31;
+ out[currentPos++] = (val << 19) >>> 31;
+ out[currentPos++] = (val << 20) >>> 31;
+ out[currentPos++] = (val << 21) >>> 31;
+ out[currentPos++] = (val << 22) >>> 31;
+ out[currentPos++] = (val << 23) >>> 31; // 20
+ out[currentPos++] = (val << 24) >>> 31;
+ out[currentPos++] = (val << 25) >>> 31;
+ out[currentPos++] = (val << 26) >>> 31;
+ out[currentPos++] = (val << 27) >>> 31;
+ out[currentPos++] = (val << 28) >>> 31;
+ out[currentPos++] = (val << 29) >>> 31;
+ out[currentPos++] = (val << 30) >>> 31;
+ out[currentPos++] = (val << 31) >>> 31;
+ out[currentPos++] = (valn << 3) >>> 31;// 头部3bit
+ out[currentPos++] = (valn << 4) >>> 31;
+ out[currentPos++] = (valn << 5) >>> 31;
+ out[currentPos++] = (valn << 6) >>> 31;
+ // number : 5, bitwidth : 5
+ out[currentPos++] = (valn << 7) >>> 27;
+ out[currentPos++] = (valn << 12) >>> 27;
+ out[currentPos++] = (valn << 17) >>> 27;
+ out[currentPos++] = (valn << 22) >>> 27;
+ out[currentPos++] = (valn << 27) >>> 27;
+ }
+
+ private void decode3(int val, int valn, int[] out, int currentPos) {
+ // number : 28, bitwidth : 1
+ out[currentPos++] = (val << 8) >>> 31;
+ out[currentPos++] = (val << 9) >>> 31;
+ out[currentPos++] = (val << 10) >>> 31;
+ out[currentPos++] = (val << 11) >>> 31;
+ out[currentPos++] = (val << 12) >>> 31;
+ out[currentPos++] = (val << 13) >>> 31; // 10
+ out[currentPos++] = (val << 14) >>> 31;
+ out[currentPos++] = (val << 15) >>> 31;
+ out[currentPos++] = (val << 16) >>> 31;
+ out[currentPos++] = (val << 17) >>> 31;
+ out[currentPos++] = (val << 18) >>> 31;
+ out[currentPos++] = (val << 19) >>> 31;
+ out[currentPos++] = (val << 20) >>> 31;
+ out[currentPos++] = (val << 21) >>> 31;
+ out[currentPos++] = (val << 22) >>> 31;
+ out[currentPos++] = (val << 23) >>> 31; // 20
+ out[currentPos++] = (val << 24) >>> 31;
+ out[currentPos++] = (val << 25) >>> 31;
+ out[currentPos++] = (val << 26) >>> 31;
+ out[currentPos++] = (val << 27) >>> 31;
+ out[currentPos++] = (val << 28) >>> 31;
+ out[currentPos++] = (val << 29) >>> 31;
+ out[currentPos++] = (val << 30) >>> 31;
+ out[currentPos++] = (val << 31) >>> 31;
+ out[currentPos++] = valn >>> 31;
+ out[currentPos++] = (valn << 1) >>> 31;
+ out[currentPos++] = (valn << 2) >>> 31;
+ out[currentPos++] = (valn << 3) >>> 31;
+ // number : 7, bitwidth : 4
+ out[currentPos++] = (valn << 4) >>> 28;
+ out[currentPos++] = (valn << 8) >>> 28;
+ out[currentPos++] = (valn << 12) >>> 28;
+ out[currentPos++] = (valn << 16) >>> 28;
+ out[currentPos++] = (valn << 20) >>> 28;
+ out[currentPos++] = (valn << 24) >>> 28;
+ out[currentPos++] = (valn << 28) >>> 28;
+ }
+
+ private void decode2(int val, int valn, int[] out, int currentPos) {
+ // number : 28, bitwidth : 1
+ out[currentPos++] = (val << 8) >>> 31;
+ out[currentPos++] = (val << 9) >>> 31;
+ out[currentPos++] = (val << 10) >>> 31;
+ out[currentPos++] = (val << 11) >>> 31;
+ out[currentPos++] = (val << 12) >>> 31;
+ out[currentPos++] = (val << 13) >>> 31; // 10
+ out[currentPos++] = (val << 14) >>> 31;
+ out[currentPos++] = (val << 15) >>> 31;
+ out[currentPos++] = (val << 16) >>> 31;
+ out[currentPos++] = (val << 17) >>> 31;
+ out[currentPos++] = (val << 18) >>> 31;
+ out[currentPos++] = (val << 19) >>> 31;
+ out[currentPos++] = (val << 20) >>> 31;
+ out[currentPos++] = (val << 21) >>> 31;
+ out[currentPos++] = (val << 22) >>> 31;
+ out[currentPos++] = (val << 23) >>> 31; // 20
+ out[currentPos++] = (val << 24) >>> 31;
+ out[currentPos++] = (val << 25) >>> 31;
+ out[currentPos++] = (val << 26) >>> 31;
+ out[currentPos++] = (val << 27) >>> 31;
+ out[currentPos++] = (val << 28) >>> 31;
+ out[currentPos++] = (val << 29) >>> 31;
+ out[currentPos++] = (val << 30) >>> 31;
+ out[currentPos++] = (val << 31) >>> 31;
+ out[currentPos++] = (valn << 1) >>> 31;// 头部1bit
+ out[currentPos++] = (valn << 2) >>> 31;
+ out[currentPos++] = (valn << 3) >>> 31;
+ out[currentPos++] = (valn << 4) >>> 31;
+ // number : 9, bitwidth : 3
+ out[currentPos++] = (valn << 5) >>> 29;
+ out[currentPos++] = (valn << 8) >>> 29;
+ out[currentPos++] = (valn << 11) >>> 29;
+ out[currentPos++] = (valn << 14) >>> 29;
+ out[currentPos++] = (valn << 17) >>> 29;
+ out[currentPos++] = (valn << 20) >>> 29;
+ out[currentPos++] = (valn << 23) >>> 29;
+ out[currentPos++] = (valn << 26) >>> 29;
+ out[currentPos++] = (valn << 29) >>> 29;
+ }
+
+ private void decode1(int val, int valn, int[] out, int currentPos) {
+ // number : 28, bitwidth : 1
+ out[currentPos++] = (val << 8) >>> 31;
+ out[currentPos++] = (val << 9) >>> 31;
+ out[currentPos++] = (val << 10) >>> 31;
+ out[currentPos++] = (val << 11) >>> 31;
+ out[currentPos++] = (val << 12) >>> 31;
+ out[currentPos++] = (val << 13) >>> 31; // 10
+ out[currentPos++] = (val << 14) >>> 31;
+ out[currentPos++] = (val << 15) >>> 31;
+ out[currentPos++] = (val << 16) >>> 31;
+ out[currentPos++] = (val << 17) >>> 31;
+ out[currentPos++] = (val << 18) >>> 31;
+ out[currentPos++] = (val << 19) >>> 31;
+ out[currentPos++] = (val << 20) >>> 31;
+ out[currentPos++] = (val << 21) >>> 31;
+ out[currentPos++] = (val << 22) >>> 31;
+ out[currentPos++] = (val << 23) >>> 31;// 20
+ out[currentPos++] = (val << 24) >>> 31;
+ out[currentPos++] = (val << 25) >>> 31;
+ out[currentPos++] = (val << 26) >>> 31;
+ out[currentPos++] = (val << 27) >>> 31;
+ out[currentPos++] = (val << 28) >>> 31;
+ out[currentPos++] = (val << 29) >>> 31;
+ out[currentPos++] = (val << 30) >>> 31;
+ out[currentPos++] = (val << 31) >>> 31;
+ out[currentPos++] = valn >>> 31;
+ out[currentPos++] = (valn << 1) >>> 31;
+ out[currentPos++] = (valn << 2) >>> 31;
+ out[currentPos++] = (valn << 3) >>> 31;
+ // number : 14, bitwidth : 2
+ out[currentPos++] = (valn << 4) >>> 30;
+ out[currentPos++] = (valn << 6) >>> 30;
+ out[currentPos++] = (valn << 8) >>> 30;
+ out[currentPos++] = (valn << 10) >>> 30;
+ out[currentPos++] = (valn << 12) >>> 30;
+ out[currentPos++] = (valn << 14) >>> 30;
+ out[currentPos++] = (valn << 16) >>> 30;
+ out[currentPos++] = (valn << 18) >>> 30;
+ out[currentPos++] = (valn << 20) >>> 30;
+ out[currentPos++] = (valn << 22) >>> 30; // 10
+ out[currentPos++] = (valn << 24) >>> 30;
+ out[currentPos++] = (valn << 26) >>> 30;
+ out[currentPos++] = (valn << 28) >>> 30;
+ out[currentPos++] = (valn << 30) >>> 30;
+ }
+
+ private void decode0(int val, int valn, int[] out, int currentPos) {
+ // number : 28, bitwidth : 1
+ out[currentPos++] = (val << 8) >>> 31;
+ out[currentPos++] = (val << 9) >>> 31;
+ out[currentPos++] = (val << 10) >>> 31;
+ out[currentPos++] = (val << 11) >>> 31;
+ out[currentPos++] = (val << 12) >>> 31;
+ out[currentPos++] = (val << 13) >>> 31; // 10
+ out[currentPos++] = (val << 14) >>> 31;
+ out[currentPos++] = (val << 15) >>> 31;
+ out[currentPos++] = (val << 16) >>> 31;
+ out[currentPos++] = (val << 17) >>> 31;
+ out[currentPos++] = (val << 18) >>> 31;
+ out[currentPos++] = (val << 19) >>> 31;
+ out[currentPos++] = (val << 20) >>> 31;
+ out[currentPos++] = (val << 21) >>> 31;
+ out[currentPos++] = (val << 22) >>> 31;
+ out[currentPos++] = (val << 23) >>> 31; // 20
+ out[currentPos++] = (val << 24) >>> 31;
+ out[currentPos++] = (val << 25) >>> 31;
+ out[currentPos++] = (val << 26) >>> 31;
+ out[currentPos++] = (val << 27) >>> 31;
+ out[currentPos++] = (val << 28) >>> 31;
+ out[currentPos++] = (val << 29) >>> 31;
+ out[currentPos++] = (val << 30) >>> 31;
+ out[currentPos++] = (val << 31) >>> 31;
+ out[currentPos++] = valn >>> 31;
+ out[currentPos++] = (valn << 1) >>> 31;
+ out[currentPos++] = (valn << 2) >>> 31;
+ out[currentPos++] = (valn << 3) >>> 31;
+ // number : 28, bitwidth : 1
+ out[currentPos++] = (valn << 4) >>> 31;
+ out[currentPos++] = (valn << 5) >>> 31;
+ out[currentPos++] = (valn << 6) >>> 31;
+ out[currentPos++] = (valn << 7) >>> 31;
+ out[currentPos++] = (valn << 8) >>> 31;
+ out[currentPos++] = (valn << 9) >>> 31;
+ out[currentPos++] = (valn << 10) >>> 31;
+ out[currentPos++] = (valn << 11) >>> 31;
+ out[currentPos++] = (valn << 12) >>> 31;
+ out[currentPos++] = (valn << 13) >>> 31; // 10
+ out[currentPos++] = (valn << 14) >>> 31;
+ out[currentPos++] = (valn << 15) >>> 31;
+ out[currentPos++] = (valn << 16) >>> 31;
+ out[currentPos++] = (valn << 17) >>> 31;
+ out[currentPos++] = (valn << 18) >>> 31;
+ out[currentPos++] = (valn << 19) >>> 31;
+ out[currentPos++] = (valn << 20) >>> 31;
+ out[currentPos++] = (valn << 21) >>> 31;
+ out[currentPos++] = (valn << 22) >>> 31;
+ out[currentPos++] = (valn << 23) >>> 31; // 20
+ out[currentPos++] = (valn << 24) >>> 31;
+ out[currentPos++] = (valn << 25) >>> 31;
+ out[currentPos++] = (valn << 26) >>> 31;
+ out[currentPos++] = (valn << 27) >>> 31;
+ out[currentPos++] = (valn << 28) >>> 31;
+ out[currentPos++] = (valn << 29) >>> 31;
+ out[currentPos++] = (valn << 30) >>> 31;
+ out[currentPos++] = (valn << 31) >>> 31;
+ }
+
+
+ private final static int bitLength[] = { 1, 2, 3, 4, 5, 7, 9, 14, 28 };
+
+ private final static int codeNum[] = { 28, 14, 9, 7, 5, 4, 3, 2, 1 };
+
+ @Override
+ public String toString() {
+ return this.getClass().getSimpleName();
+ }
+
+ @Override
+ public void headlessCompress(int[] in, IntWrapper inpos, int inlength, int[] out, IntWrapper outpos) {
+ int tmpoutpos = outpos.get();
+ int currentPos = inpos.get();
+ int selector1 = 0;
+ int selector2 = 0;
+ final int finalin = currentPos + inlength;
+ while (currentPos < finalin - 28 * 2) {
+ int nextCurrentPos = currentPos;
+ mainloop1: for (selector1=0; selector1 <= 8; selector1++) {
+ int compressedNum = codeNum[selector1];
+ //if (finalin <= nextCurrentPos + compressedNum - 1)
+ // compressedNum = finalin - nextCurrentPos;
+ int b = bitLength[selector1];
+ int max = 1 << b;
+ int i = 0;
+ for (; i < compressedNum; i++) {
+ if (Util.smallerorequalthan(max, in[nextCurrentPos + i]))
+ continue mainloop1;
+ }
+ nextCurrentPos += compressedNum;
+ break;
+ }
+ mainloop2: for (selector2 = 0; selector2 <= 8; selector2++) {
+ int compressedNum = codeNum[selector2];
+ //if (finalin <= nextCurrentPos + compressedNum - 1)
+ // compressedNum = finalin - nextCurrentPos;
+ int b = bitLength[selector2];
+ int max = 1 << b;
+ int i = 0;
+ for (; i < compressedNum; i++) {
+ if (Util.smallerorequalthan(max, in[nextCurrentPos + i]))
+ continue mainloop2;
+ }
+ nextCurrentPos += compressedNum;
+ break;
+ }
+ int code = M[selector1][selector2];
+ out[tmpoutpos] = 0;
+ out[tmpoutpos + 1] = 0;
+ switch (code) {
+ case 0:
+ encode0(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 1:
+ encode1(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 2:
+ encode2(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 3:
+ encode3(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 4:
+ encode4(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 5:
+ encode5(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 6:
+ encode6(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 7:
+ encode7(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 8:
+ encode8(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 9:
+ encode9(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 10:
+ encode10(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 11:
+ encode11(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 12:
+ encode12(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 13:
+ encode13(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 14:
+ encode14(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 15:
+ encode15(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 16:
+ encode16(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 17:
+ encode17(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 18:
+ encode18(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 19:
+ encode19(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 20:
+ encode20(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 21:
+ encode21(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 22:
+ encode22(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 23:
+ encode23(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 24:
+ encode24(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 25:
+ encode25(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 26:
+ encode26(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 27:
+ encode27(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 28:
+ encode28(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 29:
+ encode29(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 30:
+ encode30(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 31:
+ encode31(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 32:
+ encode32(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 33:
+ encode33(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 34:
+ encode34(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 35:
+ encode35(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 36:
+ encode36(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 37:
+ encode37(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 38:
+ encode38(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 39:
+ encode39(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 40:
+ encode40(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 41:
+ encode41(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 42:
+ encode42(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 43:
+ encode43(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 44:
+ encode44(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 45:
+ encode45(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 46:
+ encode46(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 47:
+ encode47(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 48:
+ encode48(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 49:
+ encode49(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 50:
+ encode50(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 51:
+ encode51(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 52:
+ encode52(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 53:
+ encode53(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 54:
+ encode54(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 55:
+ encode55(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 56:
+ encode56(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 57:
+ encode57(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 58:
+ encode58(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 59:
+ encode59(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 60:
+ encode60(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 61:
+ encode61(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 62:
+ encode62(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 63:
+ encode63(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 64:
+ encode64(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 65:
+ encode65(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 66:
+ encode66(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 67:
+ encode67(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 68:
+ encode68(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 69:
+ encode69(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 70:
+ encode70(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 71:
+ encode71(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 72:
+ encode72(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 73:
+ encode73(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 74:
+ encode74(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 75:
+ encode75(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 76:
+ encode76(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 77:
+ encode77(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 78:
+ encode78(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 79:
+ encode79(in, currentPos, code, out, tmpoutpos);
+ break;
+ case 80:
+ encode80(in, currentPos, code, out, tmpoutpos);
+ break;
+ default:
+ throw new RuntimeException("unsupported code");
+ }// end switch
+ tmpoutpos += 2;
+ currentPos = nextCurrentPos;
+ }
+
+ outer: while (currentPos < finalin) {
+ mainloop: for (int selector = 0; selector < 8; selector++) {
+ int res = 0;
+ int compressedNum = codeNum[selector];
+ if (finalin <= currentPos + compressedNum - 1)
+ compressedNum = finalin - currentPos;
+ int b = bitLength[selector];
+ int max = 1 << b;
+ int i = 0;
+ for (; i < compressedNum; i++) {
+ if (Util.smallerorequalthan(max, in[currentPos + i]))
+ continue mainloop;
+ res = (res << b) + in[currentPos + i];
+ }
+ if (compressedNum != codeNum[selector]) {
+ res <<= (codeNum[selector] - compressedNum) * b;
+ }
+ res |= selector << 28;
+ out[tmpoutpos++] = res;
+
+ currentPos += compressedNum;
+ continue outer;
+ }
+ final int selector = 8;
+ out[tmpoutpos++] = in[currentPos++] | (selector << 28);
+ }
+ inpos.set(currentPos);
+ outpos.set(tmpoutpos);
+ }
+
+ @Override
+ public void headlessUncompress(int[] in, IntWrapper inpos, int inlength, int[] out, IntWrapper outpos, int num) {
+ int currentPos = outpos.get();
+ int tmpinpos = inpos.get();
+ final int finalout = currentPos + num;
+ while (currentPos < finalout - 2 * 28) {
+
+ int val = in[tmpinpos++];
+ int valn = in[tmpinpos++];
+ int header = val >>> 24;
+ switch (header) {
+ case 0: {
+ decode0(val, valn, out, currentPos);
+ currentPos+=56;
+ break;
+ }
+ case 1: {
+ decode1(val, valn, out, currentPos);
+ currentPos+=42;
+ break;
+ }
+ case 2: {
+ decode2(val, valn, out, currentPos);
+ currentPos+=37;
+ break;
+ }
+ case 3: {
+ decode3(val, valn, out, currentPos);
+ currentPos+=35;
+ break;
+ }
+ case 4: {
+ decode4(val, valn, out, currentPos);
+ currentPos+=33;
+ break;
+ }
+ case 5: {
+ decode5(val, valn, out, currentPos);
+ currentPos+=32;
+ break;
+ }
+ case 6: {
+ decode6(val, valn, out, currentPos);
+ currentPos+=31;
+ break;
+ }
+ case 7: {
+ decode7(val, valn, out, currentPos);
+ currentPos+=30;
+ break;
+ }
+ case 8: {
+ decode8(val, valn, out, currentPos);
+ currentPos+=29;
+ break;
+ }
+ case 9: {
+ decode9(val, valn, out, currentPos);
+ currentPos+=42;
+ break;
+ }
+ case 10: {
+ decode10(val, valn, out, currentPos);
+ currentPos+=28;
+ break;
+ }
+ case 11: {
+ decode11(val, valn, out, currentPos);
+ currentPos+=23;
+ break;
+ }
+ case 12: {
+ decode12(val, valn, out, currentPos);
+ currentPos+=21;
+ break;
+ }
+ case 13: {
+ decode13(val, valn, out, currentPos);
+ currentPos+=19;
+ break;
+ }
+ case 14: {
+ decode14(val, valn, out, currentPos);
+ currentPos+=18;
+ break;
+ }
+ case 15: {
+ decode15(val, valn, out, currentPos);
+ currentPos+=17;
+ break;
+ }
+ case 16: {
+ decode16(val, valn, out, currentPos);
+ currentPos+=16;
+ break;
+ }
+ case 17: {
+ decode17(val, valn, out, currentPos);
+ currentPos+=15;
+ break;
+ }
+ case 18: {
+ decode18(val, valn, out, currentPos);
+ currentPos+=37;
+ break;
+ }
+ case 19: {
+ decode19(val, valn, out, currentPos);
+ currentPos+=23;
+ break;
+ }
+ case 20: {
+ decode20(val, valn, out, currentPos);
+ currentPos+=18;
+ break;
+ }
+ case 21: {
+ decode21(val, valn, out, currentPos);
+ currentPos+=16;
+ break;
+ }
+ case 22: {
+ decode22(val, valn, out, currentPos);
+ currentPos+=14;
+ break;
+ }
+ case 23: {
+ decode23(val, valn, out, currentPos);
+ currentPos+=13;
+ break;
+ }
+ case 24: {
+ decode24(val, valn, out, currentPos);
+ currentPos+=12;
+ break;
+ }
+ case 25: {
+ decode25(val, valn, out, currentPos);
+ currentPos+=11;
+ break;
+ }
+ case 26: {
+ decode26(val, valn, out, currentPos);
+ currentPos+=10;
+ break;
+ }
+ case 27: {
+ decode27(val, valn, out, currentPos);
+ currentPos+=35;
+ break;
+ }
+ case 28: {
+ decode28(val, valn, out, currentPos);
+ currentPos+=21;
+ break;
+ }
+ case 29: {
+ decode29(val, valn, out, currentPos);
+ currentPos+=16;
+ break;
+ }
+
+ case 30: {
+ decode30(val, valn, out, currentPos);
+ currentPos+=14;
+ break;
+ }
+ case 31: {
+ decode31(val, valn, out, currentPos);
+ currentPos+=12;
+ break;
+ }
+ case 32: {
+ decode32(val, valn, out, currentPos);
+ currentPos+=11;
+ break;
+ }
+ case 33: {
+ decode33(val, valn, out, currentPos);
+ currentPos+=10;
+ break;
+ }
+ case 34: {
+ decode34(val, valn, out, currentPos);
+ currentPos+=9;
+ break;
+ }
+ case 35: {
+ decode35(val, valn, out, currentPos);
+ currentPos+=8;
+ break;
+ }
+ case 36: {
+ decode36(val, valn, out, currentPos);
+ currentPos+=33;
+ break;
+ }
+ case 37: {
+ decode37(val, valn, out, currentPos);
+ currentPos+=19;
+ break;
+ }
+ case 38: {
+ decode38(val, valn, out, currentPos);
+ currentPos+=14;
+ break;
+ }
+ case 39: {
+ decode39(val, valn, out, currentPos);
+ currentPos+=12;
+ break;
+ }
+ case 40: {
+ decode40(val, valn, out, currentPos);
+ currentPos+=10;
+ break;
+ }
+ case 41: {
+ decode41(val, valn, out, currentPos);
+ currentPos+=9;
+ break;
+ }
+ case 42: {
+ decode42(val, valn, out, currentPos);
+ currentPos+=8;
+ break;
+ }
+ case 43: {
+ decode43(val, valn, out, currentPos);
+ currentPos+=7;
+ break;
+ }
+ case 44: {
+ decode44(val, valn, out, currentPos);
+ currentPos+=6;
+ break;
+ }
+ case 45: {
+ decode45(val, valn, out, currentPos);
+ currentPos+=32;
+ break;
+ }
+ case 46: {
+ decode46(val, valn, out, currentPos);
+ currentPos+=18;
+ break;
+ }
+ case 47: {
+ decode47(val, valn, out, currentPos);
+ currentPos+=13;
+ break;
+ }
+ case 48: {
+ decode48(val, valn, out, currentPos);
+ currentPos+=11;
+ break;
+ }
+ case 49: {
+ decode49(val, valn, out, currentPos);
+ currentPos+=9;
+ break;
+ }
+ case 50: {
+ decode50(val, valn, out, currentPos);
+ currentPos+=8;
+ break;
+ }
+ case 51: {
+ decode51(val, valn, out, currentPos);
+ currentPos+=7;
+ break;
+ }
+ case 52: {
+ decode52(val, valn, out, currentPos);
+ currentPos+=6;
+ break;
+ }
+ case 53: {
+ decode53(val, valn, out, currentPos);
+ currentPos+=5;
+ break;
+ }
+ case 54: {
+ decode54(val, valn, out, currentPos);
+ currentPos+=31;
+ break;
+ }
+ case 55: {
+ decode55(val, valn, out, currentPos);
+ currentPos+=17;
+ break;
+ }
+ case 56: {
+ decode56(val, valn, out, currentPos);
+ currentPos+=12;
+ break;
+ }
+ case 57: {
+ decode57(val, valn, out, currentPos);
+ currentPos+=10;
+ break;
+ }
+ case 58: {
+ decode58(val, valn, out, currentPos);
+ currentPos+=8;
+ break;
+ }
+ case 59: {
+ decode59(val, valn, out, currentPos);
+ currentPos+=7;
+ break;
+ }
+ case 60: {
+ decode60(val, valn, out, currentPos);
+ currentPos+=6;
+ break;
+ }
+ case 61: {
+ decode61(val, valn, out, currentPos);
+ currentPos+=5;
+ break;
+ }
+ case 62: {
+ decode62(val, valn, out, currentPos);
+ currentPos+=4;
+ break;
+ }
+ case 63: {
+ decode63(val, valn, out, currentPos);
+ currentPos+=30;
+ break;
+ }
+ case 64: {
+ decode64(val, valn, out, currentPos);
+ currentPos+=16;
+ break;
+ }
+ case 65: {
+ decode65(val, valn, out, currentPos);
+ currentPos+=11;
+ break;
+ }
+ case 66: {
+ decode66(val, valn, out, currentPos);
+ currentPos+=9;
+ break;
+ }
+ case 67: {
+ decode67(val, valn, out, currentPos);
+ currentPos+=7;
+ break;
+ }
+ case 68: {
+ decode68(val, valn, out, currentPos);
+ currentPos+=6;
+ break;
+ }
+ case 69: {
+ decode69(val, valn, out, currentPos);
+ currentPos+=5;
+ break;
+ }
+ case 70: {
+ decode70(val, valn, out, currentPos);
+ currentPos+=4;
+ break;
+ }
+ case 71: {
+ decode71(val, valn, out, currentPos);
+ currentPos+=3;
+ break;
+ }
+ case 72: {
+ decode72(val, valn, out, currentPos);
+ currentPos+=29;
+ break;
+ }
+ case 73: {
+ decode73(val, valn, out, currentPos);
+ currentPos+=15;
+ break;
+ }
+ case 74: {
+ decode74(val, valn, out, currentPos);
+ currentPos+=10;
+ break;
+ }
+ case 75: {
+ decode75(val, valn, out, currentPos);
+ currentPos+=8;
+ break;
+ }
+ case 76: {
+ decode76(val, valn, out, currentPos);
+ currentPos+=6;
+ break;
+ }
+ case 77: {
+ decode77(val, valn, out, currentPos);
+ currentPos+=5;
+ break;
+ }
+ case 78: {
+ decode78(val, valn, out, currentPos);
+ currentPos+=4;
+ break;
+ }
+ case 79: {
+ decode79(val, valn, out, currentPos);
+ currentPos+=3;
+ break;
+ }
+ case 80: {
+ decode80(val, valn, out, currentPos);
+ currentPos+=2;
+ break;
+ }
+ default:
+ throw new RuntimeException("Wrong code: " + header);
+ }// end switch
+ } // end while
+
+ while (currentPos < finalout) {
+ int val = in[tmpinpos++];
+ int header = val >>> 28;
+ switch (header) {
+ case 0: { // number : 28, bitwidth : 1
+ final int howmany = finalout - currentPos < 28 ? finalout - currentPos : 28;
+ for (int k = 0; k < howmany; ++k) {
+ out[currentPos++] = (val << (k + 4)) >>> 31;
+ }
+ break;
+ }
+ case 1: { // number : 14, bitwidth : 2
+ final int howmany = finalout - currentPos < 14 ? finalout - currentPos : 14;
+ for (int k = 0; k < howmany; ++k) {
+ out[currentPos++] = (val << (2 * k + 4)) >>> 30;
+ }
+ break;
+ }
+ case 2: { // number : 9, bitwidth : 3
+ final int howmany = finalout - currentPos < 9 ? finalout - currentPos : 9;
+ for (int k = 0; k < howmany; ++k) {
+ out[currentPos++] = (val << (3 * k + 5)) >>> 29;
+ }
+ break;
+ }
+ case 3: { // number : 7, bitwidth : 4
+ final int howmany = finalout - currentPos < 7 ? finalout - currentPos : 7;
+ for (int k = 0; k < howmany; ++k) {
+ out[currentPos++] = (val << (4 * k + 4)) >>> 28;
+ }
+ break;
+ }
+ case 4: { // number : 5, bitwidth : 5
+ final int howmany = finalout - currentPos < 5 ? finalout - currentPos : 5;
+ for (int k = 0; k < howmany; ++k) {
+ out[currentPos++] = (val << (5 * k + 7)) >>> 27;
+ }
+ break;
+ }
+ case 5: { // number : 4, bitwidth : 7
+ final int howmany = finalout - currentPos < 4 ? finalout - currentPos : 4;
+ for (int k = 0; k < howmany; ++k) {
+ out[currentPos++] = (val << (7 * k + 4)) >>> 25;
+ }
+ break;
+ }
+ case 6: { // number : 3, bitwidth : 9
+ final int howmany = finalout - currentPos < 3 ? finalout - currentPos : 3;
+ for (int k = 0; k < howmany; ++k) {
+ out[currentPos++] = (val << (9 * k + 5)) >>> 23;
+ }
+ break;
+ }
+ case 7: { // number : 2, bitwidth : 14
+ final int howmany = finalout - currentPos < 2 ? finalout - currentPos : 2;
+ for (int k = 0; k < howmany; ++k) {
+ out[currentPos++] = (val << (14 * k + 4)) >>> 18;
+ }
+ break;
+ }
+ case 8: { // number : 1, bitwidth : 28
+ out[currentPos++] = (val << 4) >>> 4;
+ break;
+ }
+ default: {
+ throw new RuntimeException("shouldn't happen");
+ }
+ }
+ }
+
+ outpos.set(finalout);
+ inpos.set(tmpinpos);
+
+ }
}
\ No newline at end of file
diff --git a/src/main/java/me/lemire/integercompression/S16.java b/src/main/java/me/lemire/integercompression/S16.java
index 08ffbc4..e40522d 100644
--- a/src/main/java/me/lemire/integercompression/S16.java
+++ b/src/main/java/me/lemire/integercompression/S16.java
@@ -15,191 +15,191 @@
*/
public final class S16 {
- /**
- * Compress an integer array using Simple16
- *
- *
- * @param in
- * array to compress
- * @param currentPos
- * where to start reading
- * @param inlength
- * how many integers to read
- * @param out
- * output array
- * @param tmpoutpos
- * location in the output array
- * @return the number of 32-bit words written (in compressed form)
- */
- public static int compress(final int[] in, int currentPos, int inlength, final int out[], final int tmpoutpos) {
- int outpos = tmpoutpos;
- final int finalin = currentPos + inlength;
- while (currentPos < finalin) {
- int inoffset = compressblock(out, outpos++, in, currentPos, inlength);
- if (inoffset == -1)
- throw new RuntimeException("Too big a number");
- currentPos += inoffset;
- inlength -= inoffset;
- }
- return outpos - tmpoutpos;
- }
-
- /**
- * Estimate size of the compressed output.
- *
- * @param in
- * array to compress
- * @param currentPos
- * where to start reading
- * @param inlength
- * how many integers to read
- * @return estimated size of the output (in 32-bit integers)
- */
- public static int estimatecompress(final int[] in, int currentPos, int inlength) {
- final int finalin = currentPos + inlength;
- int counter = 0;
- while (currentPos < finalin) {
- int inoffset = fakecompressblock(in, currentPos, inlength);
- if (inoffset == -1)
- throw new RuntimeException("Too big a number");
- currentPos += inoffset;
- inlength -= inoffset;
- ++counter;
- }
- return counter;
- }
-
- /**
- * Compress an integer array using Simple16
- *
- * @param out
- * the compressed output
- * @param outOffset
- * the offset of the output in the number of integers
- * @param in
- * the integer input array
- * @param inOffset
- * the offset of the input in the number of integers
- * @param n
- * the number of elements to be compressed
- * @return the size of the outputs in 32-bit integers
- *
- */
- public static final int compressblock(int[] out, int outOffset, int[] in, int inOffset, int n) {
- int numIdx, j, num, bits;
- for (numIdx = 0; numIdx < S16_NUMSIZE; numIdx++) {
- out[outOffset] = numIdx << S16_BITSSIZE;
- num = (S16_NUM[numIdx] < n) ? S16_NUM[numIdx] : n;
-
- for (j = 0, bits = 0; (j < num) && (in[inOffset + j] < SHIFTED_S16_BITS[numIdx][j]);) {
- out[outOffset] |= (in[inOffset + j] << bits);
- bits += S16_BITS[numIdx][j];
- j++;
- }
-
- if (j == num) {
- return num;
- }
- }
-
- return -1;
- }
-
- private static final int fakecompressblock(int[] in, int inOffset, int n) {
- int numIdx, j, num;
- for (numIdx = 0; numIdx < S16_NUMSIZE; numIdx++) {
- num = (S16_NUM[numIdx] < n) ? S16_NUM[numIdx] : n;
-
- for (j = 0; (j < num) && (in[inOffset + j] < SHIFTED_S16_BITS[numIdx][j]);) {
- j++;
- }
-
- if (j == num) {
- return num;
- }
- }
-
- return -1;
- }
-
- /**
- * Decompress an integer array using Simple16
- *
- * @param out
- * the decompressed output
- * @param outOffset
- * the offset of the output in the number of integers
- * @param in
- * the compressed input array
- * @param inOffset
- * the offset of the input in the number of integers
- * @param n
- * the number of elements to be compressed
- * @return the number of processed integers
- */
- public static final int decompressblock(int[] out, int outOffset, int[] in, int inOffset, int n) {
- int numIdx, j = 0, bits = 0;
- numIdx = in[inOffset] >>> S16_BITSSIZE;
- int num = S16_NUM[numIdx] < n ? S16_NUM[numIdx] : n;
- for (j = 0, bits = 0; j < num; j++) {
- out[outOffset + j] = (in[inOffset] >>> bits) & (0xffffffff >>> (32 - S16_BITS[numIdx][j]));
- bits += S16_BITS[numIdx][j];
- }
- return num;
- }
-
- /**
- * Uncompressed data from an input array into an output array
- *
- * @param in
- * input array (in compressed form)
- * @param tmpinpos
- * starting location in the compressed input array
- * @param inlength
- * how much data we wish the read (in 32-bit words)
- * @param out
- * output array (in decompressed form)
- * @param currentPos
- * current position in the output array
- * @param outlength
- * available data in the output array
- */
- public static void uncompress(final int[] in, int tmpinpos, final int inlength, final int[] out, int currentPos,
- int outlength) {
- final int finalpos = tmpinpos + inlength;
- while (tmpinpos < finalpos) {
- final int howmany = decompressblock(out, currentPos, in, tmpinpos, outlength);
- outlength -= howmany;
- currentPos += howmany;
- tmpinpos += 1;
- }
-
- }
-
- private static int[][] shiftme(int[][] x) {
- int[][] answer = new int[x.length][];
- for (int k = 0; k < x.length; ++k) {
- answer[k] = new int[x[k].length];
- for (int z = 0; z < answer[k].length; ++z)
- answer[k][z] = 1 << x[k][z];
- }
- return answer;
- }
-
- private static final int S16_NUMSIZE = 16;
- private static final int S16_BITSSIZE = 28;
- // the possible number of bits used to represent one integer
- private static final int[] S16_NUM = { 28, 21, 21, 21, 14, 9, 8, 7, 6, 6, 5, 5, 4, 3, 2, 1 };
- // the corresponding number of elements for each value of the number of
- // bits
- private static final int[][] S16_BITS = {
- { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
- { 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
- { 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1 },
- { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2 },
- { 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 }, { 4, 3, 3, 3, 3, 3, 3, 3, 3 }, { 3, 4, 4, 4, 4, 3, 3, 3 },
- { 4, 4, 4, 4, 4, 4, 4 }, { 5, 5, 5, 5, 4, 4 }, { 4, 4, 5, 5, 5, 5 }, { 6, 6, 6, 5, 5 }, { 5, 5, 6, 6, 6 },
- { 7, 7, 7, 7 }, { 10, 9, 9, }, { 14, 14 }, { 28 } };
- private static final int[][] SHIFTED_S16_BITS = shiftme(S16_BITS);
+ /**
+ * Compress an integer array using Simple16
+ *
+ *
+ * @param in
+ * array to compress
+ * @param currentPos
+ * where to start reading
+ * @param inlength
+ * how many integers to read
+ * @param out
+ * output array
+ * @param tmpoutpos
+ * location in the output array
+ * @return the number of 32-bit words written (in compressed form)
+ */
+ public static int compress(final int[] in, int currentPos, int inlength, final int out[], final int tmpoutpos) {
+ int outpos = tmpoutpos;
+ final int finalin = currentPos + inlength;
+ while (currentPos < finalin) {
+ int inoffset = compressblock(out, outpos++, in, currentPos, inlength);
+ if (inoffset == -1)
+ throw new RuntimeException("Too big a number");
+ currentPos += inoffset;
+ inlength -= inoffset;
+ }
+ return outpos - tmpoutpos;
+ }
+
+ /**
+ * Estimate size of the compressed output.
+ *
+ * @param in
+ * array to compress
+ * @param currentPos
+ * where to start reading
+ * @param inlength
+ * how many integers to read
+ * @return estimated size of the output (in 32-bit integers)
+ */
+ public static int estimatecompress(final int[] in, int currentPos, int inlength) {
+ final int finalin = currentPos + inlength;
+ int counter = 0;
+ while (currentPos < finalin) {
+ int inoffset = fakecompressblock(in, currentPos, inlength);
+ if (inoffset == -1)
+ throw new RuntimeException("Too big a number");
+ currentPos += inoffset;
+ inlength -= inoffset;
+ ++counter;
+ }
+ return counter;
+ }
+
+ /**
+ * Compress an integer array using Simple16
+ *
+ * @param out
+ * the compressed output
+ * @param outOffset
+ * the offset of the output in the number of integers
+ * @param in
+ * the integer input array
+ * @param inOffset
+ * the offset of the input in the number of integers
+ * @param n
+ * the number of elements to be compressed
+ * @return the size of the outputs in 32-bit integers
+ *
+ */
+ public static final int compressblock(int[] out, int outOffset, int[] in, int inOffset, int n) {
+ int numIdx, j, num, bits;
+ for (numIdx = 0; numIdx < S16_NUMSIZE; numIdx++) {
+ out[outOffset] = numIdx << S16_BITSSIZE;
+ num = (S16_NUM[numIdx] < n) ? S16_NUM[numIdx] : n;
+
+ for (j = 0, bits = 0; (j < num) && (in[inOffset + j] < SHIFTED_S16_BITS[numIdx][j]);) {
+ out[outOffset] |= (in[inOffset + j] << bits);
+ bits += S16_BITS[numIdx][j];
+ j++;
+ }
+
+ if (j == num) {
+ return num;
+ }
+ }
+
+ return -1;
+ }
+
+ private static final int fakecompressblock(int[] in, int inOffset, int n) {
+ int numIdx, j, num;
+ for (numIdx = 0; numIdx < S16_NUMSIZE; numIdx++) {
+ num = (S16_NUM[numIdx] < n) ? S16_NUM[numIdx] : n;
+
+ for (j = 0; (j < num) && (in[inOffset + j] < SHIFTED_S16_BITS[numIdx][j]);) {
+ j++;
+ }
+
+ if (j == num) {
+ return num;
+ }
+ }
+
+ return -1;
+ }
+
+ /**
+ * Decompress an integer array using Simple16
+ *
+ * @param out
+ * the decompressed output
+ * @param outOffset
+ * the offset of the output in the number of integers
+ * @param in
+ * the compressed input array
+ * @param inOffset
+ * the offset of the input in the number of integers
+ * @param n
+ * the number of elements to be compressed
+ * @return the number of processed integers
+ */
+ public static final int decompressblock(int[] out, int outOffset, int[] in, int inOffset, int n) {
+ int numIdx, j = 0, bits = 0;
+ numIdx = in[inOffset] >>> S16_BITSSIZE;
+ int num = S16_NUM[numIdx] < n ? S16_NUM[numIdx] : n;
+ for (j = 0, bits = 0; j < num; j++) {
+ out[outOffset + j] = (in[inOffset] >>> bits) & (0xffffffff >>> (32 - S16_BITS[numIdx][j]));
+ bits += S16_BITS[numIdx][j];
+ }
+ return num;
+ }
+
+ /**
+ * Uncompressed data from an input array into an output array
+ *
+ * @param in
+ * input array (in compressed form)
+ * @param tmpinpos
+ * starting location in the compressed input array
+ * @param inlength
+ * how much data we wish the read (in 32-bit words)
+ * @param out
+ * output array (in decompressed form)
+ * @param currentPos
+ * current position in the output array
+ * @param outlength
+ * available data in the output array
+ */
+ public static void uncompress(final int[] in, int tmpinpos, final int inlength, final int[] out, int currentPos,
+ int outlength) {
+ final int finalpos = tmpinpos + inlength;
+ while (tmpinpos < finalpos) {
+ final int howmany = decompressblock(out, currentPos, in, tmpinpos, outlength);
+ outlength -= howmany;
+ currentPos += howmany;
+ tmpinpos += 1;
+ }
+
+ }
+
+ private static int[][] shiftme(int[][] x) {
+ int[][] answer = new int[x.length][];
+ for (int k = 0; k < x.length; ++k) {
+ answer[k] = new int[x[k].length];
+ for (int z = 0; z < answer[k].length; ++z)
+ answer[k][z] = 1 << x[k][z];
+ }
+ return answer;
+ }
+
+ private static final int S16_NUMSIZE = 16;
+ private static final int S16_BITSSIZE = 28;
+ // the possible number of bits used to represent one integer
+ private static final int[] S16_NUM = { 28, 21, 21, 21, 14, 9, 8, 7, 6, 6, 5, 5, 4, 3, 2, 1 };
+ // the corresponding number of elements for each value of the number of
+ // bits
+ private static final int[][] S16_BITS = {
+ { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
+ { 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
+ { 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1 },
+ { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2 },
+ { 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 }, { 4, 3, 3, 3, 3, 3, 3, 3, 3 }, { 3, 4, 4, 4, 4, 3, 3, 3 },
+ { 4, 4, 4, 4, 4, 4, 4 }, { 5, 5, 5, 5, 4, 4 }, { 4, 4, 5, 5, 5, 5 }, { 6, 6, 6, 5, 5 }, { 5, 5, 6, 6, 6 },
+ { 7, 7, 7, 7 }, { 10, 9, 9, }, { 14, 14 }, { 28 } };
+ private static final int[][] SHIFTED_S16_BITS = shiftme(S16_BITS);
}
diff --git a/src/main/java/me/lemire/integercompression/S9.java b/src/main/java/me/lemire/integercompression/S9.java
index 2180e5a..7e03e42 100644
--- a/src/main/java/me/lemire/integercompression/S9.java
+++ b/src/main/java/me/lemire/integercompression/S9.java
@@ -17,187 +17,187 @@
public final class S9 {
- /**
- * Estimate size of the compressed output.
- *
- * @param in
- * array to compress
- * @param currentPos
- * where to start reading
- * @param inlength
- * how many integers to read
- * @return estimated size of the output (in 32-bit integers)
- */
- public static int estimatecompress(int[] in, int currentPos, int inlength) {
- int tmpoutpos = 0;
- int finalpos = currentPos + inlength;
- outer: while (currentPos < finalpos) {
- mainloop: for (int selector = 0; selector < 8; selector++) {
+ /**
+ * Estimate size of the compressed output.
+ *
+ * @param in
+ * array to compress
+ * @param currentPos
+ * where to start reading
+ * @param inlength
+ * how many integers to read
+ * @return estimated size of the output (in 32-bit integers)
+ */
+ public static int estimatecompress(int[] in, int currentPos, int inlength) {
+ int tmpoutpos = 0;
+ int finalpos = currentPos + inlength;
+ outer: while (currentPos < finalpos) {
+ mainloop: for (int selector = 0; selector < 8; selector++) {
- int compressedNum = codeNum[selector];
- if (finalpos <= currentPos + compressedNum - 1)
- compressedNum = finalpos - currentPos;
- int b = bitLength[selector];
- int max = 1 << b;
- int i = 0;
- for (; i < compressedNum; i++)
- if (Util.smallerorequalthan(max , in[currentPos + i]))
- continue mainloop;
- currentPos += compressedNum;
- ++tmpoutpos;
- continue outer;
- }
- final int selector = 8;
- if (in[currentPos] >= 1 << bitLength[selector])
- throw new RuntimeException("Too big a number");
- tmpoutpos++;
- currentPos++;
+ int compressedNum = codeNum[selector];
+ if (finalpos <= currentPos + compressedNum - 1)
+ compressedNum = finalpos - currentPos;
+ int b = bitLength[selector];
+ int max = 1 << b;
+ int i = 0;
+ for (; i < compressedNum; i++)
+ if (Util.smallerorequalthan(max , in[currentPos + i]))
+ continue mainloop;
+ currentPos += compressedNum;
+ ++tmpoutpos;
+ continue outer;
+ }
+ final int selector = 8;
+ if (in[currentPos] >= 1 << bitLength[selector])
+ throw new RuntimeException("Too big a number");
+ tmpoutpos++;
+ currentPos++;
- }
- return tmpoutpos;
- }
+ }
+ return tmpoutpos;
+ }
- /**
- * Compress an integer array using Simple9
- *
- *
- * @param in
- * array to compress
- * @param currentPos
- * where to start reading
- * @param inlength
- * how many integers to read
- * @param out
- * output array
- * @param tmpoutpos
- * location in the output array
- * @return the number of 32-bit words written (in compressed form)
- */
- public static int compress(int[] in, int currentPos, int inlength, int out[], int tmpoutpos) {
- int origtmpoutpos = tmpoutpos;
- int finalpos = currentPos + inlength;
- outer: while (currentPos < finalpos) {
- mainloop: for (int selector = 0; selector < 8; selector++) {
- int res = 0;
- int compressedNum = codeNum[selector];
- if (finalpos <= currentPos + compressedNum - 1)
- compressedNum = finalpos - currentPos;
- int b = bitLength[selector];
- int max = 1 << b;
- int i = 0;
- for (; i < compressedNum; i++) {
- if (Util.smallerorequalthan(max, in[currentPos + i]))
- continue mainloop;
- res = (res << b) + in[currentPos + i];
- }
- if (compressedNum != codeNum[selector])
- res <<= (codeNum[selector] - compressedNum) * b;
- res |= selector << 28;
- out[tmpoutpos++] = res;
- currentPos += compressedNum;
- continue outer;
- }
- final int selector = 8;
- if (in[currentPos] >= 1 << bitLength[selector])
- throw new RuntimeException("Too big a number");
- out[tmpoutpos++] = in[currentPos++] | (selector << 28);
- }
- return tmpoutpos - origtmpoutpos;
- }
+ /**
+ * Compress an integer array using Simple9
+ *
+ *
+ * @param in
+ * array to compress
+ * @param currentPos
+ * where to start reading
+ * @param inlength
+ * how many integers to read
+ * @param out
+ * output array
+ * @param tmpoutpos
+ * location in the output array
+ * @return the number of 32-bit words written (in compressed form)
+ */
+ public static int compress(int[] in, int currentPos, int inlength, int out[], int tmpoutpos) {
+ int origtmpoutpos = tmpoutpos;
+ int finalpos = currentPos + inlength;
+ outer: while (currentPos < finalpos) {
+ mainloop: for (int selector = 0; selector < 8; selector++) {
+ int res = 0;
+ int compressedNum = codeNum[selector];
+ if (finalpos <= currentPos + compressedNum - 1)
+ compressedNum = finalpos - currentPos;
+ int b = bitLength[selector];
+ int max = 1 << b;
+ int i = 0;
+ for (; i < compressedNum; i++) {
+ if (Util.smallerorequalthan(max, in[currentPos + i]))
+ continue mainloop;
+ res = (res << b) + in[currentPos + i];
+ }
+ if (compressedNum != codeNum[selector])
+ res <<= (codeNum[selector] - compressedNum) * b;
+ res |= selector << 28;
+ out[tmpoutpos++] = res;
+ currentPos += compressedNum;
+ continue outer;
+ }
+ final int selector = 8;
+ if (in[currentPos] >= 1 << bitLength[selector])
+ throw new RuntimeException("Too big a number");
+ out[tmpoutpos++] = in[currentPos++] | (selector << 28);
+ }
+ return tmpoutpos - origtmpoutpos;
+ }
- /**
- * Uncompressed data from an input array into an output array
- *
- * @param in
- * input array (in compressed form)
- * @param tmpinpos
- * starting location in the compressed input array
- * @param inlength
- * how much data we wish the read (in 32-bit words)
- * @param out
- * output array (in decompressed form)
- * @param currentPos
- * current position in the output array
- * @param outlength
- * available data in the output array
- */
- public static void uncompress(int[] in, int tmpinpos, int inlength, int[] out, int currentPos, int outlength) {
- int finallength = currentPos + outlength;
+ /**
+ * Uncompressed data from an input array into an output array
+ *
+ * @param in
+ * input array (in compressed form)
+ * @param tmpinpos
+ * starting location in the compressed input array
+ * @param inlength
+ * how much data we wish the read (in 32-bit words)
+ * @param out
+ * output array (in decompressed form)
+ * @param currentPos
+ * current position in the output array
+ * @param outlength
+ * available data in the output array
+ */
+ public static void uncompress(int[] in, int tmpinpos, int inlength, int[] out, int currentPos, int outlength) {
+ int finallength = currentPos + outlength;
- while (currentPos < finallength) {
- int val = in[tmpinpos++];
- int header = val >>> 28;
- switch (header) {
- case 0: { // number : 28, bitwidth : 1
- final int howmany = finallength - currentPos < 28 ? finallength - currentPos : 28;
- for (int k = 0; k < howmany; ++k) {
- out[currentPos++] = (val << (k + 4)) >>> 31;
- }
- break;
- }
- case 1: { // number : 14, bitwidth : 2
- final int howmany = finallength - currentPos < 14 ? finallength - currentPos : 14;
- for (int k = 0; k < howmany; ++k) {
- out[currentPos++] = (val << (2 * k + 4)) >>> 30;
- }
- break;
- }
- case 2: { // number : 9, bitwidth : 3
- final int howmany = finallength - currentPos < 9 ? finallength - currentPos : 9;
- for (int k = 0; k < howmany; ++k) {
- out[currentPos++] = (val << (3 * k + 5)) >>> 29;
- }
- break;
- }
- case 3: { // number : 7, bitwidth : 4
- final int howmany = finallength - currentPos < 7 ? finallength - currentPos : 7;
- for (int k = 0; k < howmany; ++k) {
- out[currentPos++] = (val << (4 * k + 4)) >>> 28;
- }
- break;
- }
- case 4: { // number : 5, bitwidth : 5
- final int howmany = finallength - currentPos < 5 ? finallength - currentPos : 5;
- for (int k = 0; k < howmany; ++k) {
- out[currentPos++] = (val << (5 * k + 7)) >>> 27;
- }
- break;
- }
- case 5: { // number : 4, bitwidth : 7
- final int howmany = finallength - currentPos < 4 ? finallength - currentPos : 4;
- for (int k = 0; k < howmany; ++k) {
- out[currentPos++] = (val << (7 * k + 4)) >>> 25;
- }
- break;
- }
- case 6: { // number : 3, bitwidth : 9
- final int howmany = finallength - currentPos < 3 ? finallength - currentPos : 3;
- for (int k = 0; k < howmany; ++k) {
- out[currentPos++] = (val << (9 * k + 5)) >>> 23;
- }
- break;
- }
- case 7: { // number : 2, bitwidth : 14
- final int howmany = finallength - currentPos < 2 ? finallength - currentPos : 2;
- for (int k = 0; k < howmany; ++k) {
- out[currentPos++] = (val << (14 * k + 4)) >>> 18;
- }
- break;
- }
- case 8: { // number : 1, bitwidth : 28
- out[currentPos++] = (val << 4) >>> 4;
- break;
- }
- default: {
- throw new RuntimeException("shouldn't happen");
- }
- }
- }
+ while (currentPos < finallength) {
+ int val = in[tmpinpos++];
+ int header = val >>> 28;
+ switch (header) {
+ case 0: { // number : 28, bitwidth : 1
+ final int howmany = finallength - currentPos < 28 ? finallength - currentPos : 28;
+ for (int k = 0; k < howmany; ++k) {
+ out[currentPos++] = (val << (k + 4)) >>> 31;
+ }
+ break;
+ }
+ case 1: { // number : 14, bitwidth : 2
+ final int howmany = finallength - currentPos < 14 ? finallength - currentPos : 14;
+ for (int k = 0; k < howmany; ++k) {
+ out[currentPos++] = (val << (2 * k + 4)) >>> 30;
+ }
+ break;
+ }
+ case 2: { // number : 9, bitwidth : 3
+ final int howmany = finallength - currentPos < 9 ? finallength - currentPos : 9;
+ for (int k = 0; k < howmany; ++k) {
+ out[currentPos++] = (val << (3 * k + 5)) >>> 29;
+ }
+ break;
+ }
+ case 3: { // number : 7, bitwidth : 4
+ final int howmany = finallength - currentPos < 7 ? finallength - currentPos : 7;
+ for (int k = 0; k < howmany; ++k) {
+ out[currentPos++] = (val << (4 * k + 4)) >>> 28;
+ }
+ break;
+ }
+ case 4: { // number : 5, bitwidth : 5
+ final int howmany = finallength - currentPos < 5 ? finallength - currentPos : 5;
+ for (int k = 0; k < howmany; ++k) {
+ out[currentPos++] = (val << (5 * k + 7)) >>> 27;
+ }
+ break;
+ }
+ case 5: { // number : 4, bitwidth : 7
+ final int howmany = finallength - currentPos < 4 ? finallength - currentPos : 4;
+ for (int k = 0; k < howmany; ++k) {
+ out[currentPos++] = (val << (7 * k + 4)) >>> 25;
+ }
+ break;
+ }
+ case 6: { // number : 3, bitwidth : 9
+ final int howmany = finallength - currentPos < 3 ? finallength - currentPos : 3;
+ for (int k = 0; k < howmany; ++k) {
+ out[currentPos++] = (val << (9 * k + 5)) >>> 23;
+ }
+ break;
+ }
+ case 7: { // number : 2, bitwidth : 14
+ final int howmany = finallength - currentPos < 2 ? finallength - currentPos : 2;
+ for (int k = 0; k < howmany; ++k) {
+ out[currentPos++] = (val << (14 * k + 4)) >>> 18;
+ }
+ break;
+ }
+ case 8: { // number : 1, bitwidth : 28
+ out[currentPos++] = (val << 4) >>> 4;
+ break;
+ }
+ default: {
+ throw new RuntimeException("shouldn't happen");
+ }
+ }
+ }
- }
+ }
- private final static int bitLength[] = { 1, 2, 3, 4, 5, 7, 9, 14, 28 };
+ private final static int bitLength[] = { 1, 2, 3, 4, 5, 7, 9, 14, 28 };
- private final static int codeNum[] = { 28, 14, 9, 7, 5, 4, 3, 2, 1 };
+ private final static int codeNum[] = { 28, 14, 9, 7, 5, 4, 3, 2, 1 };
}
diff --git a/src/main/java/me/lemire/integercompression/Simple16.java b/src/main/java/me/lemire/integercompression/Simple16.java
index e0f9d5a..cdc7308 100644
--- a/src/main/java/me/lemire/integercompression/Simple16.java
+++ b/src/main/java/me/lemire/integercompression/Simple16.java
@@ -13,173 +13,173 @@
*/
public final class Simple16 implements IntegerCODEC, SkippableIntegerCODEC {
- public void headlessCompress(int[] in, IntWrapper inpos, int inlength, int out[], IntWrapper outpos) {
- int i_inpos = inpos.get();
- int i_outpos = outpos.get();
- final int finalin = i_inpos + inlength;
- while (i_inpos < finalin) {
- int inoffset = compressblock(out, i_outpos++, in, i_inpos, inlength);
- if (inoffset == -1)
- throw new RuntimeException("Too big a number");
- i_inpos += inoffset;
- inlength -= inoffset;
- }
- inpos.set(i_inpos);
- outpos.set(i_outpos);
- }
-
- /**
- * Compress an integer array using Simple16
- *
- * @param out
- * the compressed output
- * @param outOffset
- * the offset of the output in the number of integers
- * @param in
- * the integer input array
- * @param inOffset
- * the offset of the input in the number of integers
- * @param n
- * the number of elements to be compressed
- * @return the number of compressed integers
- */
- public static final int compressblock(int[] out, int outOffset, int[] in, int inOffset, int n) {
- int numIdx, j, num, bits;
- for (numIdx = 0; numIdx < S16_NUMSIZE; numIdx++) {
- out[outOffset] = numIdx << S16_BITSSIZE;
- num = (S16_NUM[numIdx] < n) ? S16_NUM[numIdx] : n;
-
- for (j = 0, bits = 0; (j < num) && (in[inOffset + j] < SHIFTED_S16_BITS[numIdx][j]);) {
- out[outOffset] |= (in[inOffset + j] << bits);
- bits += S16_BITS[numIdx][j];
- j++;
- }
-
- if (j == num) {
- return num;
- }
- }
-
- return -1;
- }
-
- /**
- * Decompress an integer array using Simple16
- *
- * @param out
- * the decompressed output
- * @param outOffset
- * the offset of the output in the number of integers
- * @param in
- * the compressed input array
- * @param inOffset
- * the offset of the input in the number of integers
- * @param n
- * the number of elements to be compressed
- * @return the number of processed integers
- */
- public static final int decompressblock(int[] out, int outOffset, int[] in, int inOffset, int n) {
- int numIdx, j = 0, bits = 0;
- numIdx = in[inOffset] >>> S16_BITSSIZE;
- int num = S16_NUM[numIdx] < n ? S16_NUM[numIdx] : n;
- for (j = 0, bits = 0; j < num; j++) {
- out[outOffset + j] = (in[inOffset] >>> bits) & (0xffffffff >>> (32 - S16_BITS[numIdx][j]));
- bits += S16_BITS[numIdx][j];
- }
- return num;
- }
-
- @Override
- public void headlessUncompress(int[] in, IntWrapper inpos, int inlength, int[] out, IntWrapper outpos, int num) {
- int i_inpos = inpos.get();
- int i_outpos = outpos.get();
- while (num > 0) {
- final int howmany = decompressblock(out, i_outpos, in, i_inpos, num);
- num -= howmany;
- i_outpos += howmany;
- i_inpos++;
- }
- inpos.set(i_inpos);
- outpos.set(i_outpos);
- }
-
- /**
- * Uncompress data from an array to another array.
- *
- * Both inpos and outpos parameters are modified to indicate new positions
- * after read/write.
- *
- * @param in
- * array containing data in compressed form
- * @param tmpinpos
- * where to start reading in the array
- * @param inlength
- * length of the compressed data (ignored by some schemes)
- * @param out
- * array where to write the compressed output
- * @param currentPos
- * where to write the compressed output in out
- * @param outlength
- * number of integers we want to decode
- */
- public static void uncompress(int[] in, int tmpinpos, int inlength, int[] out, int currentPos, int outlength) {
- final int finalpos = tmpinpos + inlength;
- while (tmpinpos < finalpos) {
- final int howmany = decompressblock(out, currentPos, in, tmpinpos, outlength);
- outlength -= howmany;
- currentPos += howmany;
- tmpinpos += 1;
- }
-
- }
-
- private static int[][] shiftme(int[][] x) {
- int[][] answer = new int[x.length][];
- for (int k = 0; k < x.length; ++k) {
- answer[k] = new int[x[k].length];
- for (int z = 0; z < answer[k].length; ++z)
- answer[k][z] = 1 << x[k][z];
- }
- return answer;
- }
-
- @Override
- public void compress(int[] in, IntWrapper inpos, int inlength, int[] out, IntWrapper outpos) {
- if (inlength == 0)
- return;
- out[outpos.get()] = inlength;
- outpos.increment();
- headlessCompress(in, inpos, inlength, out, outpos);
- }
-
- @Override
- public void uncompress(int[] in, IntWrapper inpos, int inlength, int[] out, IntWrapper outpos) {
- if (inlength == 0)
- return;
- final int outlength = in[inpos.get()];
- inpos.increment();
- headlessUncompress(in, inpos, inlength, out, outpos, outlength);
-
- }
-
- @Override
- public String toString() {
- return this.getClass().getSimpleName();
- }
-
- private static final int S16_NUMSIZE = 16;
- private static final int S16_BITSSIZE = 28;
- // the possible number of bits used to represent one integer
- private static final int[] S16_NUM = { 28, 21, 21, 21, 14, 9, 8, 7, 6, 6, 5, 5, 4, 3, 2, 1 };
- // the corresponding number of elements for each value of the number of bits
- private static final int[][] S16_BITS = {
- { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
- { 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
- { 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1 },
- { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2 },
- { 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 }, { 4, 3, 3, 3, 3, 3, 3, 3, 3 }, { 3, 4, 4, 4, 4, 3, 3, 3 },
- { 4, 4, 4, 4, 4, 4, 4 }, { 5, 5, 5, 5, 4, 4 }, { 4, 4, 5, 5, 5, 5 }, { 6, 6, 6, 5, 5 }, { 5, 5, 6, 6, 6 },
- { 7, 7, 7, 7 }, { 10, 9, 9, }, { 14, 14 }, { 28 } };
- private static final int[][] SHIFTED_S16_BITS = shiftme(S16_BITS);
+ public void headlessCompress(int[] in, IntWrapper inpos, int inlength, int out[], IntWrapper outpos) {
+ int i_inpos = inpos.get();
+ int i_outpos = outpos.get();
+ final int finalin = i_inpos + inlength;
+ while (i_inpos < finalin) {
+ int inoffset = compressblock(out, i_outpos++, in, i_inpos, inlength);
+ if (inoffset == -1)
+ throw new RuntimeException("Too big a number");
+ i_inpos += inoffset;
+ inlength -= inoffset;
+ }
+ inpos.set(i_inpos);
+ outpos.set(i_outpos);
+ }
+
+ /**
+ * Compress an integer array using Simple16
+ *
+ * @param out
+ * the compressed output
+ * @param outOffset
+ * the offset of the output in the number of integers
+ * @param in
+ * the integer input array
+ * @param inOffset
+ * the offset of the input in the number of integers
+ * @param n
+ * the number of elements to be compressed
+ * @return the number of compressed integers
+ */
+ public static final int compressblock(int[] out, int outOffset, int[] in, int inOffset, int n) {
+ int numIdx, j, num, bits;
+ for (numIdx = 0; numIdx < S16_NUMSIZE; numIdx++) {
+ out[outOffset] = numIdx << S16_BITSSIZE;
+ num = (S16_NUM[numIdx] < n) ? S16_NUM[numIdx] : n;
+
+ for (j = 0, bits = 0; (j < num) && (in[inOffset + j] < SHIFTED_S16_BITS[numIdx][j]);) {
+ out[outOffset] |= (in[inOffset + j] << bits);
+ bits += S16_BITS[numIdx][j];
+ j++;
+ }
+
+ if (j == num) {
+ return num;
+ }
+ }
+
+ return -1;
+ }
+
+ /**
+ * Decompress an integer array using Simple16
+ *
+ * @param out
+ * the decompressed output
+ * @param outOffset
+ * the offset of the output in the number of integers
+ * @param in
+ * the compressed input array
+ * @param inOffset
+ * the offset of the input in the number of integers
+ * @param n
+ * the number of elements to be compressed
+ * @return the number of processed integers
+ */
+ public static final int decompressblock(int[] out, int outOffset, int[] in, int inOffset, int n) {
+ int numIdx, j = 0, bits = 0;
+ numIdx = in[inOffset] >>> S16_BITSSIZE;
+ int num = S16_NUM[numIdx] < n ? S16_NUM[numIdx] : n;
+ for (j = 0, bits = 0; j < num; j++) {
+ out[outOffset + j] = (in[inOffset] >>> bits) & (0xffffffff >>> (32 - S16_BITS[numIdx][j]));
+ bits += S16_BITS[numIdx][j];
+ }
+ return num;
+ }
+
+ @Override
+ public void headlessUncompress(int[] in, IntWrapper inpos, int inlength, int[] out, IntWrapper outpos, int num) {
+ int i_inpos = inpos.get();
+ int i_outpos = outpos.get();
+ while (num > 0) {
+ final int howmany = decompressblock(out, i_outpos, in, i_inpos, num);
+ num -= howmany;
+ i_outpos += howmany;
+ i_inpos++;
+ }
+ inpos.set(i_inpos);
+ outpos.set(i_outpos);
+ }
+
+ /**
+ * Uncompress data from an array to another array.
+ *
+ * Both inpos and outpos parameters are modified to indicate new positions
+ * after read/write.
+ *
+ * @param in
+ * array containing data in compressed form
+ * @param tmpinpos
+ * where to start reading in the array
+ * @param inlength
+ * length of the compressed data (ignored by some schemes)
+ * @param out
+ * array where to write the compressed output
+ * @param currentPos
+ * where to write the compressed output in out
+ * @param outlength
+ * number of integers we want to decode
+ */
+ public static void uncompress(int[] in, int tmpinpos, int inlength, int[] out, int currentPos, int outlength) {
+ final int finalpos = tmpinpos + inlength;
+ while (tmpinpos < finalpos) {
+ final int howmany = decompressblock(out, currentPos, in, tmpinpos, outlength);
+ outlength -= howmany;
+ currentPos += howmany;
+ tmpinpos += 1;
+ }
+
+ }
+
+ private static int[][] shiftme(int[][] x) {
+ int[][] answer = new int[x.length][];
+ for (int k = 0; k < x.length; ++k) {
+ answer[k] = new int[x[k].length];
+ for (int z = 0; z < answer[k].length; ++z)
+ answer[k][z] = 1 << x[k][z];
+ }
+ return answer;
+ }
+
+ @Override
+ public void compress(int[] in, IntWrapper inpos, int inlength, int[] out, IntWrapper outpos) {
+ if (inlength == 0)
+ return;
+ out[outpos.get()] = inlength;
+ outpos.increment();
+ headlessCompress(in, inpos, inlength, out, outpos);
+ }
+
+ @Override
+ public void uncompress(int[] in, IntWrapper inpos, int inlength, int[] out, IntWrapper outpos) {
+ if (inlength == 0)
+ return;
+ final int outlength = in[inpos.get()];
+ inpos.increment();
+ headlessUncompress(in, inpos, inlength, out, outpos, outlength);
+
+ }
+
+ @Override
+ public String toString() {
+ return this.getClass().getSimpleName();
+ }
+
+ private static final int S16_NUMSIZE = 16;
+ private static final int S16_BITSSIZE = 28;
+ // the possible number of bits used to represent one integer
+ private static final int[] S16_NUM = { 28, 21, 21, 21, 14, 9, 8, 7, 6, 6, 5, 5, 4, 3, 2, 1 };
+ // the corresponding number of elements for each value of the number of bits
+ private static final int[][] S16_BITS = {
+ { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
+ { 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
+ { 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1 },
+ { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2 },
+ { 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 }, { 4, 3, 3, 3, 3, 3, 3, 3, 3 }, { 3, 4, 4, 4, 4, 3, 3, 3 },
+ { 4, 4, 4, 4, 4, 4, 4 }, { 5, 5, 5, 5, 4, 4 }, { 4, 4, 5, 5, 5, 5 }, { 6, 6, 6, 5, 5 }, { 5, 5, 6, 6, 6 },
+ { 7, 7, 7, 7 }, { 10, 9, 9, }, { 14, 14 }, { 28 } };
+ private static final int[][] SHIFTED_S16_BITS = shiftme(S16_BITS);
}
\ No newline at end of file
diff --git a/src/main/java/me/lemire/integercompression/Simple9.java b/src/main/java/me/lemire/integercompression/Simple9.java
index 032489d..4864756 100644
--- a/src/main/java/me/lemire/integercompression/Simple9.java
+++ b/src/main/java/me/lemire/integercompression/Simple9.java
@@ -20,280 +20,280 @@
public final class Simple9 implements IntegerCODEC, SkippableIntegerCODEC {
- @Override
- public void headlessCompress(int[] in, IntWrapper inpos, int inlength, int out[], IntWrapper outpos) {
- int tmpoutpos = outpos.get();
- int currentPos = inpos.get();
- final int finalin = currentPos + inlength;
- outer: while (currentPos < finalin - 28) {
- mainloop: for (int selector = 0; selector < 8; selector++) {
+ @Override
+ public void headlessCompress(int[] in, IntWrapper inpos, int inlength, int out[], IntWrapper outpos) {
+ int tmpoutpos = outpos.get();
+ int currentPos = inpos.get();
+ final int finalin = currentPos + inlength;
+ outer: while (currentPos < finalin - 28) {
+ mainloop: for (int selector = 0; selector < 8; selector++) {
- int res = 0;
- int compressedNum = codeNum[selector];
- int b = bitLength[selector];
- int max = 1 << b;
- int i = 0;
- for (; i < compressedNum; i++) {
- if (max <= in[currentPos + i])
- continue mainloop;
- res = (res << b) + in[currentPos + i];
- }
- res |= selector << 28;
- out[tmpoutpos++] = res;
- currentPos += compressedNum;
- continue outer;
- }
- final int selector = 8;
- if (in[currentPos] >= 1 << bitLength[selector])
- throw new RuntimeException("Too big a number");
- out[tmpoutpos++] = in[currentPos++] | (selector << 28);
- }
- outer: while (currentPos < finalin) {
- mainloop: for (int selector = 0; selector < 8; selector++) {
- int res = 0;
- int compressedNum = codeNum[selector];
- if (finalin <= currentPos + compressedNum - 1)
- compressedNum = finalin - currentPos;
- int b = bitLength[selector];
- int max = 1 << b;
- int i = 0;
- for (; i < compressedNum; i++) {
- if (max <= in[currentPos + i])
- continue mainloop;
- res = (res << b) + in[currentPos + i];
- }
+ int res = 0;
+ int compressedNum = codeNum[selector];
+ int b = bitLength[selector];
+ int max = 1 << b;
+ int i = 0;
+ for (; i < compressedNum; i++) {
+ if (max <= in[currentPos + i])
+ continue mainloop;
+ res = (res << b) + in[currentPos + i];
+ }
+ res |= selector << 28;
+ out[tmpoutpos++] = res;
+ currentPos += compressedNum;
+ continue outer;
+ }
+ final int selector = 8;
+ if (in[currentPos] >= 1 << bitLength[selector])
+ throw new RuntimeException("Too big a number");
+ out[tmpoutpos++] = in[currentPos++] | (selector << 28);
+ }
+ outer: while (currentPos < finalin) {
+ mainloop: for (int selector = 0; selector < 8; selector++) {
+ int res = 0;
+ int compressedNum = codeNum[selector];
+ if (finalin <= currentPos + compressedNum - 1)
+ compressedNum = finalin - currentPos;
+ int b = bitLength[selector];
+ int max = 1 << b;
+ int i = 0;
+ for (; i < compressedNum; i++) {
+ if (max <= in[currentPos + i])
+ continue mainloop;
+ res = (res << b) + in[currentPos + i];
+ }
- if (compressedNum != codeNum[selector])
- res <<= (codeNum[selector] - compressedNum) * b;
- res |= selector << 28;
- out[tmpoutpos++] = res;
- currentPos += compressedNum;
- continue outer;
- }
- final int selector = 8;
- if (in[currentPos] >= 1 << bitLength[selector])
- throw new RuntimeException("Too big a number");
- out[tmpoutpos++] = in[currentPos++] | (selector << 28);
- }
- inpos.set(currentPos);
- outpos.set(tmpoutpos);
- }
+ if (compressedNum != codeNum[selector])
+ res <<= (codeNum[selector] - compressedNum) * b;
+ res |= selector << 28;
+ out[tmpoutpos++] = res;
+ currentPos += compressedNum;
+ continue outer;
+ }
+ final int selector = 8;
+ if (in[currentPos] >= 1 << bitLength[selector])
+ throw new RuntimeException("Too big a number");
+ out[tmpoutpos++] = in[currentPos++] | (selector << 28);
+ }
+ inpos.set(currentPos);
+ outpos.set(tmpoutpos);
+ }
- @Override
- public void headlessUncompress(int[] in, IntWrapper inpos, int inlength, int[] out, IntWrapper outpos,
- int outlength) {
- int currentPos = outpos.get();
- int tmpinpos = inpos.get();
- final int finalout = currentPos + outlength;
- while (currentPos < finalout - 28) {
- int val = in[tmpinpos++];
- int header = val >>> 28;
- switch (header) {
- case 0: { // number : 28, bitwidth : 1
- out[currentPos++] = (val << 4) >>> 31;
- out[currentPos++] = (val << 5) >>> 31;
- out[currentPos++] = (val << 6) >>> 31;
- out[currentPos++] = (val << 7) >>> 31;
- out[currentPos++] = (val << 8) >>> 31;
- out[currentPos++] = (val << 9) >>> 31;
- out[currentPos++] = (val << 10) >>> 31;
- out[currentPos++] = (val << 11) >>> 31;
- out[currentPos++] = (val << 12) >>> 31;
- out[currentPos++] = (val << 13) >>> 31; // 10
- out[currentPos++] = (val << 14) >>> 31;
- out[currentPos++] = (val << 15) >>> 31;
- out[currentPos++] = (val << 16) >>> 31;
- out[currentPos++] = (val << 17) >>> 31;
- out[currentPos++] = (val << 18) >>> 31;
- out[currentPos++] = (val << 19) >>> 31;
- out[currentPos++] = (val << 20) >>> 31;
- out[currentPos++] = (val << 21) >>> 31;
- out[currentPos++] = (val << 22) >>> 31;
- out[currentPos++] = (val << 23) >>> 31; // 20
- out[currentPos++] = (val << 24) >>> 31;
- out[currentPos++] = (val << 25) >>> 31;
- out[currentPos++] = (val << 26) >>> 31;
- out[currentPos++] = (val << 27) >>> 31;
- out[currentPos++] = (val << 28) >>> 31;
- out[currentPos++] = (val << 29) >>> 31;
- out[currentPos++] = (val << 30) >>> 31;
- out[currentPos++] = (val << 31) >>> 31;
- break;
- }
- case 1: { // number : 14, bitwidth : 2
- out[currentPos++] = (val << 4) >>> 30;
- out[currentPos++] = (val << 6) >>> 30;
- out[currentPos++] = (val << 8) >>> 30;
- out[currentPos++] = (val << 10) >>> 30;
- out[currentPos++] = (val << 12) >>> 30;
- out[currentPos++] = (val << 14) >>> 30;
- out[currentPos++] = (val << 16) >>> 30;
- out[currentPos++] = (val << 18) >>> 30;
- out[currentPos++] = (val << 20) >>> 30;
- out[currentPos++] = (val << 22) >>> 30; // 10
- out[currentPos++] = (val << 24) >>> 30;
- out[currentPos++] = (val << 26) >>> 30;
- out[currentPos++] = (val << 28) >>> 30;
- out[currentPos++] = (val << 30) >>> 30;
- break;
- }
- case 2: { // number : 9, bitwidth : 3
- out[currentPos++] = (val << 5) >>> 29;
- out[currentPos++] = (val << 8) >>> 29;
- out[currentPos++] = (val << 11) >>> 29;
- out[currentPos++] = (val << 14) >>> 29;
- out[currentPos++] = (val << 17) >>> 29;
- out[currentPos++] = (val << 20) >>> 29;
- out[currentPos++] = (val << 23) >>> 29;
- out[currentPos++] = (val << 26) >>> 29;
- out[currentPos++] = (val << 29) >>> 29;
- break;
- }
- case 3: { // number : 7, bitwidth : 4
- out[currentPos++] = (val << 4) >>> 28;
- out[currentPos++] = (val << 8) >>> 28;
- out[currentPos++] = (val << 12) >>> 28;
- out[currentPos++] = (val << 16) >>> 28;
- out[currentPos++] = (val << 20) >>> 28;
- out[currentPos++] = (val << 24) >>> 28;
- out[currentPos++] = (val << 28) >>> 28;
- break;
- }
- case 4: { // number : 5, bitwidth : 5
- out[currentPos++] = (val << 7) >>> 27;
- out[currentPos++] = (val << 12) >>> 27;
- out[currentPos++] = (val << 17) >>> 27;
- out[currentPos++] = (val << 22) >>> 27;
- out[currentPos++] = (val << 27) >>> 27;
- break;
- }
- case 5: { // number : 4, bitwidth : 7
- out[currentPos++] = (val << 4) >>> 25;
- out[currentPos++] = (val << 11) >>> 25;
- out[currentPos++] = (val << 18) >>> 25;
- out[currentPos++] = (val << 25) >>> 25;
- break;
- }
- case 6: { // number : 3, bitwidth : 9
- out[currentPos++] = (val << 5) >>> 23;
- out[currentPos++] = (val << 14) >>> 23;
- out[currentPos++] = (val << 23) >>> 23;
- break;
- }
- case 7: { // number : 2, bitwidth : 14
- out[currentPos++] = (val << 4) >>> 18;
- out[currentPos++] = (val << 18) >>> 18;
- break;
- }
- case 8: { // number : 1, bitwidth : 28
- out[currentPos++] = (val << 4) >>> 4;
- break;
- }
- default: {
- throw new RuntimeException("shouldn't happen: limited to 28-bit integers");
- }
- }
- }
- while (currentPos < finalout) {
- int val = in[tmpinpos++];
- int header = val >>> 28;
- switch (header) {
- case 0: { // number : 28, bitwidth : 1
- final int howmany = finalout - currentPos;
- for (int k = 0; k < howmany; ++k) {
- out[currentPos++] = (val << (k + 4)) >>> 31;
- }
- break;
- }
- case 1: { // number : 14, bitwidth : 2
- final int howmany = finalout - currentPos < 14 ? finalout - currentPos : 14;
- for (int k = 0; k < howmany; ++k) {
- out[currentPos++] = (val << (2 * k + 4)) >>> 30;
- }
- break;
- }
- case 2: { // number : 9, bitwidth : 3
- final int howmany = finalout - currentPos < 9 ? finalout - currentPos : 9;
- for (int k = 0; k < howmany; ++k) {
- out[currentPos++] = (val << (3 * k + 5)) >>> 29;
- }
- break;
- }
- case 3: { // number : 7, bitwidth : 4
- final int howmany = finalout - currentPos < 7 ? finalout - currentPos : 7;
- for (int k = 0; k < howmany; ++k) {
- out[currentPos++] = (val << (4 * k + 4)) >>> 28;
- }
- break;
- }
- case 4: { // number : 5, bitwidth : 5
- final int howmany = finalout - currentPos < 5 ? finalout - currentPos : 5;
- for (int k = 0; k < howmany; ++k) {
- out[currentPos++] = (val << (5 * k + 7)) >>> 27;
- }
- break;
- }
- case 5: { // number : 4, bitwidth : 7
- final int howmany = finalout - currentPos < 4 ? finalout - currentPos : 4;
- for (int k = 0; k < howmany; ++k) {
- out[currentPos++] = (val << (7 * k + 4)) >>> 25;
- }
- break;
- }
- case 6: { // number : 3, bitwidth : 9
- final int howmany = finalout - currentPos < 3 ? finalout - currentPos : 3;
- for (int k = 0; k < howmany; ++k) {
- out[currentPos++] = (val << (9 * k + 5)) >>> 23;
- }
- break;
- }
- case 7: { // number : 2, bitwidth : 14
- final int howmany = finalout - currentPos < 2 ? finalout - currentPos : 2;
- for (int k = 0; k < howmany; ++k) {
- out[currentPos++] = (val << (14 * k + 4)) >>> 18;
- }
- break;
- }
- case 8: { // number : 1, bitwidth : 28
- out[currentPos++] = (val << 4) >>> 4;
- break;
- }
- default: {
- throw new RuntimeException("shouldn't happen");
- }
- }
- }
- outpos.set(currentPos);
- inpos.set(tmpinpos);
+ @Override
+ public void headlessUncompress(int[] in, IntWrapper inpos, int inlength, int[] out, IntWrapper outpos,
+ int outlength) {
+ int currentPos = outpos.get();
+ int tmpinpos = inpos.get();
+ final int finalout = currentPos + outlength;
+ while (currentPos < finalout - 28) {
+ int val = in[tmpinpos++];
+ int header = val >>> 28;
+ switch (header) {
+ case 0: { // number : 28, bitwidth : 1
+ out[currentPos++] = (val << 4) >>> 31;
+ out[currentPos++] = (val << 5) >>> 31;
+ out[currentPos++] = (val << 6) >>> 31;
+ out[currentPos++] = (val << 7) >>> 31;
+ out[currentPos++] = (val << 8) >>> 31;
+ out[currentPos++] = (val << 9) >>> 31;
+ out[currentPos++] = (val << 10) >>> 31;
+ out[currentPos++] = (val << 11) >>> 31;
+ out[currentPos++] = (val << 12) >>> 31;
+ out[currentPos++] = (val << 13) >>> 31; // 10
+ out[currentPos++] = (val << 14) >>> 31;
+ out[currentPos++] = (val << 15) >>> 31;
+ out[currentPos++] = (val << 16) >>> 31;
+ out[currentPos++] = (val << 17) >>> 31;
+ out[currentPos++] = (val << 18) >>> 31;
+ out[currentPos++] = (val << 19) >>> 31;
+ out[currentPos++] = (val << 20) >>> 31;
+ out[currentPos++] = (val << 21) >>> 31;
+ out[currentPos++] = (val << 22) >>> 31;
+ out[currentPos++] = (val << 23) >>> 31; // 20
+ out[currentPos++] = (val << 24) >>> 31;
+ out[currentPos++] = (val << 25) >>> 31;
+ out[currentPos++] = (val << 26) >>> 31;
+ out[currentPos++] = (val << 27) >>> 31;
+ out[currentPos++] = (val << 28) >>> 31;
+ out[currentPos++] = (val << 29) >>> 31;
+ out[currentPos++] = (val << 30) >>> 31;
+ out[currentPos++] = (val << 31) >>> 31;
+ break;
+ }
+ case 1: { // number : 14, bitwidth : 2
+ out[currentPos++] = (val << 4) >>> 30;
+ out[currentPos++] = (val << 6) >>> 30;
+ out[currentPos++] = (val << 8) >>> 30;
+ out[currentPos++] = (val << 10) >>> 30;
+ out[currentPos++] = (val << 12) >>> 30;
+ out[currentPos++] = (val << 14) >>> 30;
+ out[currentPos++] = (val << 16) >>> 30;
+ out[currentPos++] = (val << 18) >>> 30;
+ out[currentPos++] = (val << 20) >>> 30;
+ out[currentPos++] = (val << 22) >>> 30; // 10
+ out[currentPos++] = (val << 24) >>> 30;
+ out[currentPos++] = (val << 26) >>> 30;
+ out[currentPos++] = (val << 28) >>> 30;
+ out[currentPos++] = (val << 30) >>> 30;
+ break;
+ }
+ case 2: { // number : 9, bitwidth : 3
+ out[currentPos++] = (val << 5) >>> 29;
+ out[currentPos++] = (val << 8) >>> 29;
+ out[currentPos++] = (val << 11) >>> 29;
+ out[currentPos++] = (val << 14) >>> 29;
+ out[currentPos++] = (val << 17) >>> 29;
+ out[currentPos++] = (val << 20) >>> 29;
+ out[currentPos++] = (val << 23) >>> 29;
+ out[currentPos++] = (val << 26) >>> 29;
+ out[currentPos++] = (val << 29) >>> 29;
+ break;
+ }
+ case 3: { // number : 7, bitwidth : 4
+ out[currentPos++] = (val << 4) >>> 28;
+ out[currentPos++] = (val << 8) >>> 28;
+ out[currentPos++] = (val << 12) >>> 28;
+ out[currentPos++] = (val << 16) >>> 28;
+ out[currentPos++] = (val << 20) >>> 28;
+ out[currentPos++] = (val << 24) >>> 28;
+ out[currentPos++] = (val << 28) >>> 28;
+ break;
+ }
+ case 4: { // number : 5, bitwidth : 5
+ out[currentPos++] = (val << 7) >>> 27;
+ out[currentPos++] = (val << 12) >>> 27;
+ out[currentPos++] = (val << 17) >>> 27;
+ out[currentPos++] = (val << 22) >>> 27;
+ out[currentPos++] = (val << 27) >>> 27;
+ break;
+ }
+ case 5: { // number : 4, bitwidth : 7
+ out[currentPos++] = (val << 4) >>> 25;
+ out[currentPos++] = (val << 11) >>> 25;
+ out[currentPos++] = (val << 18) >>> 25;
+ out[currentPos++] = (val << 25) >>> 25;
+ break;
+ }
+ case 6: { // number : 3, bitwidth : 9
+ out[currentPos++] = (val << 5) >>> 23;
+ out[currentPos++] = (val << 14) >>> 23;
+ out[currentPos++] = (val << 23) >>> 23;
+ break;
+ }
+ case 7: { // number : 2, bitwidth : 14
+ out[currentPos++] = (val << 4) >>> 18;
+ out[currentPos++] = (val << 18) >>> 18;
+ break;
+ }
+ case 8: { // number : 1, bitwidth : 28
+ out[currentPos++] = (val << 4) >>> 4;
+ break;
+ }
+ default: {
+ throw new RuntimeException("shouldn't happen: limited to 28-bit integers");
+ }
+ }
+ }
+ while (currentPos < finalout) {
+ int val = in[tmpinpos++];
+ int header = val >>> 28;
+ switch (header) {
+ case 0: { // number : 28, bitwidth : 1
+ final int howmany = finalout - currentPos;
+ for (int k = 0; k < howmany; ++k) {
+ out[currentPos++] = (val << (k + 4)) >>> 31;
+ }
+ break;
+ }
+ case 1: { // number : 14, bitwidth : 2
+ final int howmany = finalout - currentPos < 14 ? finalout - currentPos : 14;
+ for (int k = 0; k < howmany; ++k) {
+ out[currentPos++] = (val << (2 * k + 4)) >>> 30;
+ }
+ break;
+ }
+ case 2: { // number : 9, bitwidth : 3
+ final int howmany = finalout - currentPos < 9 ? finalout - currentPos : 9;
+ for (int k = 0; k < howmany; ++k) {
+ out[currentPos++] = (val << (3 * k + 5)) >>> 29;
+ }
+ break;
+ }
+ case 3: { // number : 7, bitwidth : 4
+ final int howmany = finalout - currentPos < 7 ? finalout - currentPos : 7;
+ for (int k = 0; k < howmany; ++k) {
+ out[currentPos++] = (val << (4 * k + 4)) >>> 28;
+ }
+ break;
+ }
+ case 4: { // number : 5, bitwidth : 5
+ final int howmany = finalout - currentPos < 5 ? finalout - currentPos : 5;
+ for (int k = 0; k < howmany; ++k) {
+ out[currentPos++] = (val << (5 * k + 7)) >>> 27;
+ }
+ break;
+ }
+ case 5: { // number : 4, bitwidth : 7
+ final int howmany = finalout - currentPos < 4 ? finalout - currentPos : 4;
+ for (int k = 0; k < howmany; ++k) {
+ out[currentPos++] = (val << (7 * k + 4)) >>> 25;
+ }
+ break;
+ }
+ case 6: { // number : 3, bitwidth : 9
+ final int howmany = finalout - currentPos < 3 ? finalout - currentPos : 3;
+ for (int k = 0; k < howmany; ++k) {
+ out[currentPos++] = (val << (9 * k + 5)) >>> 23;
+ }
+ break;
+ }
+ case 7: { // number : 2, bitwidth : 14
+ final int howmany = finalout - currentPos < 2 ? finalout - currentPos : 2;
+ for (int k = 0; k < howmany; ++k) {
+ out[currentPos++] = (val << (14 * k + 4)) >>> 18;
+ }
+ break;
+ }
+ case 8: { // number : 1, bitwidth : 28
+ out[currentPos++] = (val << 4) >>> 4;
+ break;
+ }
+ default: {
+ throw new RuntimeException("shouldn't happen");
+ }
+ }
+ }
+ outpos.set(currentPos);
+ inpos.set(tmpinpos);
- }
+ }
- @Override
- public void compress(int[] in, IntWrapper inpos, int inlength, int[] out, IntWrapper outpos) {
- if (inlength == 0)
- return;
- out[outpos.get()] = inlength;
- outpos.increment();
- headlessCompress(in, inpos, inlength, out, outpos);
- }
+ @Override
+ public void compress(int[] in, IntWrapper inpos, int inlength, int[] out, IntWrapper outpos) {
+ if (inlength == 0)
+ return;
+ out[outpos.get()] = inlength;
+ outpos.increment();
+ headlessCompress(in, inpos, inlength, out, outpos);
+ }
- @Override
- public void uncompress(int[] in, IntWrapper inpos, int inlength, int[] out, IntWrapper outpos) {
- if (inlength == 0)
- return;
- final int outlength = in[inpos.get()];
- inpos.increment();
- headlessUncompress(in, inpos, inlength, out, outpos, outlength);
+ @Override
+ public void uncompress(int[] in, IntWrapper inpos, int inlength, int[] out, IntWrapper outpos) {
+ if (inlength == 0)
+ return;
+ final int outlength = in[inpos.get()];
+ inpos.increment();
+ headlessUncompress(in, inpos, inlength, out, outpos, outlength);
- }
+ }
- private final static int bitLength[] = { 1, 2, 3, 4, 5, 7, 9, 14, 28 };
+ private final static int bitLength[] = { 1, 2, 3, 4, 5, 7, 9, 14, 28 };
- private final static int codeNum[] = { 28, 14, 9, 7, 5, 4, 3, 2, 1 };
+ private final static int codeNum[] = { 28, 14, 9, 7, 5, 4, 3, 2, 1 };
- @Override
- public String toString() {
- return this.getClass().getSimpleName();
- }
+ @Override
+ public String toString() {
+ return this.getClass().getSimpleName();
+ }
}
diff --git a/src/main/java/me/lemire/integercompression/SkippableComposition.java b/src/main/java/me/lemire/integercompression/SkippableComposition.java
index a235c47..5faf7c2 100644
--- a/src/main/java/me/lemire/integercompression/SkippableComposition.java
+++ b/src/main/java/me/lemire/integercompression/SkippableComposition.java
@@ -54,7 +54,7 @@ public void headlessUncompress(int[] in, IntWrapper inpos, int inlength, int[] o
int init = inpos.get();
F1.headlessUncompress(in, inpos, inlength, out, outpos, num);
if (inpos.get() == init) {
- inpos.increment();
+ inpos.increment();
}
inlength -= inpos.get() - init;
num -= outpos.get();
diff --git a/src/main/java/me/lemire/integercompression/UncompressibleInputException.java b/src/main/java/me/lemire/integercompression/UncompressibleInputException.java
index c490946..c0ed41f 100644
--- a/src/main/java/me/lemire/integercompression/UncompressibleInputException.java
+++ b/src/main/java/me/lemire/integercompression/UncompressibleInputException.java
@@ -6,14 +6,14 @@
*/
public class UncompressibleInputException extends RuntimeException {
- /**
- * Create new exception
- * @param string explanation for the exception
- */
- public UncompressibleInputException(String string) {
- super(string);
- }
+ /**
+ * Create new exception
+ * @param string explanation for the exception
+ */
+ public UncompressibleInputException(String string) {
+ super(string);
+ }
- private static final long serialVersionUID = -798583799846489873L;
+ private static final long serialVersionUID = -798583799846489873L;
}
diff --git a/src/main/java/me/lemire/integercompression/Util.java b/src/main/java/me/lemire/integercompression/Util.java
index 346e3b2..63fc918 100644
--- a/src/main/java/me/lemire/integercompression/Util.java
+++ b/src/main/java/me/lemire/integercompression/Util.java
@@ -15,13 +15,13 @@
public final class Util {
-
- // check whether x is small than y as unsigned ints (supported by Java 8 natively);
- protected static final boolean smallerorequalthan(int x, int y) {
- return (x + Integer.MIN_VALUE) <= (y + Integer.MIN_VALUE);
- }
-
- /**
+
+ // check whether x is small than y as unsigned ints (supported by Java 8 natively);
+ protected static final boolean smallerorequalthan(int x, int y) {
+ return (x + Integer.MIN_VALUE) <= (y + Integer.MIN_VALUE);
+ }
+
+ /**
* Compute the maximum of the integer logarithms (ceil(log(x+1)) of a range
* of value
*
diff --git a/src/main/java/me/lemire/integercompression/benchmarktools/Benchmark.java b/src/main/java/me/lemire/integercompression/benchmarktools/Benchmark.java
index c5fee69..ef4a386 100644
--- a/src/main/java/me/lemire/integercompression/benchmarktools/Benchmark.java
+++ b/src/main/java/me/lemire/integercompression/benchmarktools/Benchmark.java
@@ -308,10 +308,10 @@ private static void testByteCodec(PrintWriter csvLog, int sparsity,
public static void main(String args[]) throws FileNotFoundException {
System.out
.println("# benchmark based on the ClusterData model from:");
- System.out.println("# Vo Ngoc Anh and Alistair Moffat. ");
- System.out.println("# Index compression using 64-bit words.");
+ System.out.println("# Vo Ngoc Anh and Alistair Moffat. ");
+ System.out.println("# Index compression using 64-bit words.");
System.out
- .println("# Softw. Pract. Exper.40, 2 (February 2010), 131-147. ");
+ .println("# Softw. Pract. Exper.40, 2 (February 2010), 131-147. ");
System.out.println();
PrintWriter writer = null;
diff --git a/src/main/java/me/lemire/integercompression/benchmarktools/BenchmarkSkippable.java b/src/main/java/me/lemire/integercompression/benchmarktools/BenchmarkSkippable.java
index 363b841..b930568 100644
--- a/src/main/java/me/lemire/integercompression/benchmarktools/BenchmarkSkippable.java
+++ b/src/main/java/me/lemire/integercompression/benchmarktools/BenchmarkSkippable.java
@@ -241,10 +241,10 @@ private static void testCodec(PrintWriter csvLog, int sparsity, Object c,
*/
public static void main(String args[]) throws FileNotFoundException {
System.out.println("# benchmark based on the ClusterData model from:");
- System.out.println("# Vo Ngoc Anh and Alistair Moffat. ");
- System.out.println("# Index compression using 64-bit words.");
+ System.out.println("# Vo Ngoc Anh and Alistair Moffat. ");
+ System.out.println("# Index compression using 64-bit words.");
System.out
- .println("# Softw. Pract. Exper.40, 2 (February 2010), 131-147. ");
+ .println("# Softw. Pract. Exper.40, 2 (February 2010), 131-147. ");
System.out.println();
PrintWriter writer = null;
diff --git a/src/main/java/me/lemire/integercompression/differential/IntegratedIntCompressor.java b/src/main/java/me/lemire/integercompression/differential/IntegratedIntCompressor.java
index 5808bdd..72159ba 100644
--- a/src/main/java/me/lemire/integercompression/differential/IntegratedIntCompressor.java
+++ b/src/main/java/me/lemire/integercompression/differential/IntegratedIntCompressor.java
@@ -43,12 +43,12 @@ public int[] compress(int[] input) {
compressed[0] = input.length;
IntWrapper outpos = new IntWrapper(1);
IntWrapper initvalue = new IntWrapper(0);
- try {
- codec.headlessCompress(input, new IntWrapper(0), input.length, compressed, outpos, initvalue);
- } catch (IndexOutOfBoundsException ioebe) {
- throw new UncompressibleInputException(
- "Your input is too poorly compressible with the current codec : " + codec);
- }
+ try {
+ codec.headlessCompress(input, new IntWrapper(0), input.length, compressed, outpos, initvalue);
+ } catch (IndexOutOfBoundsException ioebe) {
+ throw new UncompressibleInputException(
+ "Your input is too poorly compressible with the current codec : " + codec);
+ }
compressed = Arrays.copyOf(compressed,outpos.intValue());
return compressed;
}
diff --git a/src/main/java/me/lemire/integercompression/differential/SkippableIntegratedComposition.java b/src/main/java/me/lemire/integercompression/differential/SkippableIntegratedComposition.java
index 09c4dd8..abcc027 100644
--- a/src/main/java/me/lemire/integercompression/differential/SkippableIntegratedComposition.java
+++ b/src/main/java/me/lemire/integercompression/differential/SkippableIntegratedComposition.java
@@ -68,7 +68,7 @@ public void headlessUncompress(int[] in, IntWrapper inpos, int inlength,
int init = inpos.get();
F1.headlessUncompress(in, inpos, inlength, out, outpos,num,initvalue);
if (inpos.get() == init) {
- inpos.increment();
+ inpos.increment();
}
inlength -= inpos.get() - init;
diff --git a/src/main/java/me/lemire/longcompression/LongCODEC.java b/src/main/java/me/lemire/longcompression/LongCODEC.java
index 1068f9f..0951ffd 100644
--- a/src/main/java/me/lemire/longcompression/LongCODEC.java
+++ b/src/main/java/me/lemire/longcompression/LongCODEC.java
@@ -36,7 +36,7 @@ public interface LongCODEC {
* where to write in the output array
*/
public void compress(long[] in, IntWrapper inpos, int inlength,
- long[] out, IntWrapper outpos);
+ long[] out, IntWrapper outpos);
/**
* Uncompress data from an array to another array.
@@ -57,6 +57,6 @@ public void compress(long[] in, IntWrapper inpos, int inlength,
* where to start writing the uncompressed output in out
*/
public void uncompress(long[] in, IntWrapper inpos, int inlength,
- long[] out, IntWrapper outpos);
+ long[] out, IntWrapper outpos);
}
diff --git a/src/main/java/me/lemire/longcompression/LongComposition.java b/src/main/java/me/lemire/longcompression/LongComposition.java
index 1394a78..5111a51 100644
--- a/src/main/java/me/lemire/longcompression/LongComposition.java
+++ b/src/main/java/me/lemire/longcompression/LongComposition.java
@@ -37,7 +37,7 @@ public LongComposition(LongCODEC f1, LongCODEC f2) {
@Override
public void compress(long[] in, IntWrapper inpos, int inlength,
- long[] out, IntWrapper outpos) {
+ long[] out, IntWrapper outpos) {
if (inlength == 0) {
return;
}
@@ -54,7 +54,7 @@ public void compress(long[] in, IntWrapper inpos, int inlength,
@Override
public void uncompress(long[] in, IntWrapper inpos, int inlength,
- long[] out, IntWrapper outpos) {
+ long[] out, IntWrapper outpos) {
if (inlength == 0)
return;
final int init = inpos.get();
diff --git a/src/main/java/me/lemire/longcompression/LongJustCopy.java b/src/main/java/me/lemire/longcompression/LongJustCopy.java
index 7a5a67a..9b25f71 100644
--- a/src/main/java/me/lemire/longcompression/LongJustCopy.java
+++ b/src/main/java/me/lemire/longcompression/LongJustCopy.java
@@ -17,7 +17,7 @@ public final class LongJustCopy implements LongCODEC, SkippableLongCODEC {
@Override
public void headlessCompress(long[] in, IntWrapper inpos, int inlength,
- long[] out, IntWrapper outpos) {
+ long[] out, IntWrapper outpos) {
System.arraycopy(in, inpos.get(), out, outpos.get(), inlength);
inpos.add(inlength);
outpos.add(inlength);
@@ -25,7 +25,7 @@ public void headlessCompress(long[] in, IntWrapper inpos, int inlength,
@Override
public void uncompress(long[] in, IntWrapper inpos, int inlength,
- long[] out, IntWrapper outpos) {
+ long[] out, IntWrapper outpos) {
headlessUncompress(in,inpos,inlength,out,outpos,inlength);
}
@@ -36,7 +36,7 @@ public String toString() {
@Override
public void headlessUncompress(long[] in, IntWrapper inpos, int inlength,
- long[] out, IntWrapper outpos, int num) {
+ long[] out, IntWrapper outpos, int num) {
System.arraycopy(in, inpos.get(), out, outpos.get(), num);
inpos.add(num);
outpos.add(num);
@@ -45,7 +45,7 @@ public void headlessUncompress(long[] in, IntWrapper inpos, int inlength,
@Override
public void compress(long[] in, IntWrapper inpos, int inlength,
- long[] out, IntWrapper outpos) {
+ long[] out, IntWrapper outpos) {
headlessCompress(in,inpos,inlength,out,outpos);
}
diff --git a/src/main/java/me/lemire/longcompression/SkippableLongComposition.java b/src/main/java/me/lemire/longcompression/SkippableLongComposition.java
index 5568489..f2e9a55 100644
--- a/src/main/java/me/lemire/longcompression/SkippableLongComposition.java
+++ b/src/main/java/me/lemire/longcompression/SkippableLongComposition.java
@@ -55,7 +55,7 @@ public void headlessUncompress(long[] in, IntWrapper inpos, int inlength, long[]
int init = inpos.get();
F1.headlessUncompress(in, inpos, inlength, out, outpos, num);
if (inpos.get() == init) {
- inpos.increment();
+ inpos.increment();
}
inlength -= inpos.get() - init;
num -= outpos.get();
diff --git a/src/main/java/me/lemire/longcompression/differential/LongDelta.java b/src/main/java/me/lemire/longcompression/differential/LongDelta.java
index 2b0e077..184e53c 100644
--- a/src/main/java/me/lemire/longcompression/differential/LongDelta.java
+++ b/src/main/java/me/lemire/longcompression/differential/LongDelta.java
@@ -66,7 +66,7 @@ public static long delta(long[] data, int start, int length, int init) {
* @return next initial vale
*/
public static long delta(long[] data, int start, int length, int init,
- long[] out) {
+ long[] out) {
for (int i = length - 1; i > 0; --i) {
out[i] = data[start + i] - data[start + i - 1];
}
@@ -98,7 +98,7 @@ public static void fastinverseDelta(long[] data) {
int sz0 = data.length / 4 * 4;
int i = 1;
if (sz0 >= 4) {
- long a = data[0];
+ long a = data[0];
for (; i < sz0 - 4; i += 4) {
a = data[i] += a;
a = data[i + 1] += a;
@@ -132,7 +132,7 @@ public static long fastinverseDelta(long[] data, int start, int length,
int sz0 = length / 4 * 4;
int i = 1;
if (sz0 >= 4) {
- long a = data[start];
+ long a = data[start];
for (; i < sz0 - 4; i += 4) {
a = data[start + i] += a;
a = data[start + i + 1] += a;
diff --git a/src/test/java/me/lemire/integercompression/AdhocTest.java b/src/test/java/me/lemire/integercompression/AdhocTest.java
index 8fd4049..aa6718b 100644
--- a/src/test/java/me/lemire/integercompression/AdhocTest.java
+++ b/src/test/java/me/lemire/integercompression/AdhocTest.java
@@ -22,13 +22,48 @@
@SuppressWarnings({ "static-method" })
public class AdhocTest {
-
- /**
- *
- */
+ @Test
+ public void testIssue59() {
+ FastPFOR128 fastpfor = new FastPFOR128();
+
+ int N = 9984;
+ int[] data = new int[N];
+ for (var i = 0; i < N; i += 150) {
+ data[i] = i;
+ }
+
+ int[] compressedoutput1 = new int[N + 1024];
+
+ IntWrapper inputoffset1 = new IntWrapper(0);
+ IntWrapper outputoffset1 = new IntWrapper(0);
+
+ fastpfor.compress(data, inputoffset1, N, compressedoutput1, outputoffset1);
+ int compressedsize1 = outputoffset1.get();
+
+ int[] recovered1 = new int[N];
+ inputoffset1 = new IntWrapper(0);
+ outputoffset1 = new IntWrapper(0);
+ fastpfor.uncompress(compressedoutput1, outputoffset1, compressedsize1, recovered1, inputoffset1);
+ Assert.assertArrayEquals(data, recovered1);
+
+ int[] compressedoutput2 = new int[N + 1024];
+
+ IntWrapper inputoffset2 = new IntWrapper(0);
+ IntWrapper outputoffset2 = new IntWrapper(0);
+
+ fastpfor.compress(data, inputoffset2, N, compressedoutput2, outputoffset2);
+ int compressedsize2 = outputoffset2.get();
+
+ int[] recovered2 = new int[N];
+ inputoffset2 = new IntWrapper(0);
+ outputoffset2 = new IntWrapper(0);
+ fastpfor.uncompress(compressedoutput2, outputoffset2, compressedsize2, recovered2, inputoffset2);
+ Assert.assertArrayEquals(data, recovered2);
+ }
+
@Test
public void testIssue29() {
- for(int x = 0; x < 64; x++) {
+ for(int x = 0; x < 64; x++) {
int[] a = {2, 3, 4, 5};
int[] b = new int[90];
int[] c = new int[a.length];
@@ -42,7 +77,7 @@ public void testIssue29() {
IntWrapper cOffset = new IntWrapper(0);
codec.uncompress(b, bOffset, len, c, cOffset);
Assert.assertArrayEquals(a,c);
- }
+ }
}
/**
@@ -50,20 +85,20 @@ public void testIssue29() {
*/
@Test
public void testIssue29b() {
- for(int x = 0; x < 64; x++) {
- int[] a = {2, 3, 4, 5};
- int[] b = new int[90];
- int[] c = new int[a.length];
- SkippableIntegerCODEC codec = new SkippableComposition(new BinaryPacking(), new VariableByte());
- IntWrapper aOffset = new IntWrapper(0);
- IntWrapper bOffset = new IntWrapper(x);
- codec.headlessCompress(a, aOffset, a.length, b, bOffset);
- int len = bOffset.get() - x;
- bOffset.set(x);
- IntWrapper cOffset = new IntWrapper(0);
- codec.headlessUncompress(b, bOffset, len, c, cOffset, a.length);
- Assert.assertArrayEquals(a,c);
- }
+ for(int x = 0; x < 64; x++) {
+ int[] a = {2, 3, 4, 5};
+ int[] b = new int[90];
+ int[] c = new int[a.length];
+ SkippableIntegerCODEC codec = new SkippableComposition(new BinaryPacking(), new VariableByte());
+ IntWrapper aOffset = new IntWrapper(0);
+ IntWrapper bOffset = new IntWrapper(x);
+ codec.headlessCompress(a, aOffset, a.length, b, bOffset);
+ int len = bOffset.get() - x;
+ bOffset.set(x);
+ IntWrapper cOffset = new IntWrapper(0);
+ codec.headlessUncompress(b, bOffset, len, c, cOffset, a.length);
+ Assert.assertArrayEquals(a,c);
+ }
}
@@ -71,30 +106,27 @@ public void testIssue29b() {
*
*/
@Test
- public void testIssue41() {
- for (int x = 0; x < 64; x++) {
- int[] a = { 2, 3, 4, 5 };
- int[] b = new int[90];
- int[] c = new int[a.length];
- SkippableIntegratedIntegerCODEC codec = new SkippableIntegratedComposition(new IntegratedBinaryPacking(),
- new IntegratedVariableByte());
- IntWrapper aOffset = new IntWrapper(0);
- IntWrapper bOffset = new IntWrapper(x);
- IntWrapper initValue = new IntWrapper(0);
-
- codec.headlessCompress(a, aOffset, a.length, b, bOffset, initValue);
- int len = bOffset.get() - x;
- bOffset.set(x);
- IntWrapper cOffset = new IntWrapper(0);
- initValue = new IntWrapper(0);
- codec.headlessUncompress(b, bOffset, len, c, cOffset, a.length, initValue);
- Assert.assertArrayEquals(a, c);
- }
- }
+ public void testIssue41() {
+ for (int x = 0; x < 64; x++) {
+ int[] a = { 2, 3, 4, 5 };
+ int[] b = new int[90];
+ int[] c = new int[a.length];
+ SkippableIntegratedIntegerCODEC codec = new SkippableIntegratedComposition(new IntegratedBinaryPacking(),
+ new IntegratedVariableByte());
+ IntWrapper aOffset = new IntWrapper(0);
+ IntWrapper bOffset = new IntWrapper(x);
+ IntWrapper initValue = new IntWrapper(0);
+
+ codec.headlessCompress(a, aOffset, a.length, b, bOffset, initValue);
+ int len = bOffset.get() - x;
+ bOffset.set(x);
+ IntWrapper cOffset = new IntWrapper(0);
+ initValue = new IntWrapper(0);
+ codec.headlessUncompress(b, bOffset, len, c, cOffset, a.length, initValue);
+ Assert.assertArrayEquals(a, c);
+ }
+ }
- /**
- * a test
- */
@Test
public void biggerCompressedArray0() {
// No problem: for comparison.
@@ -102,12 +134,8 @@ public void biggerCompressedArray0() {
assertSymmetry(c, 0, 16384);
c = new Composition(new FastPFOR(), new VariableByte());
assertSymmetry(c, 0, 16384);
-
}
- /**
- * a test
- */
@Test
public void biggerCompressedArray1() {
// Compressed array is bigger than original, because of VariableByte.
@@ -115,9 +143,6 @@ public void biggerCompressedArray1() {
assertSymmetry(c, -1);
}
- /**
- * a test
- */
@Test
public void biggerCompressedArray2() {
// Compressed array is bigger than original, because of Composition.
diff --git a/src/test/java/me/lemire/integercompression/BasicTest.java b/src/test/java/me/lemire/integercompression/BasicTest.java
index b5f292e..b29ae0d 100644
--- a/src/test/java/me/lemire/integercompression/BasicTest.java
+++ b/src/test/java/me/lemire/integercompression/BasicTest.java
@@ -48,35 +48,35 @@ public class BasicTest {
new GroupSimple9(),
new Composition(new XorBinaryPacking(), new VariableByte()),
new Composition(new DeltaZigzagBinaryPacking(),
- new DeltaZigzagVariableByte()) };
+ new DeltaZigzagVariableByte()) };
- /**
+ /**
* This tests with a compressed array with various offset
*/
- @Test
- public void saulTest() {
- for (IntegerCODEC C : codecs) {
- for (int x = 0; x < 50; ++x) {
- int[] a = { 2, 3, 4, 5 };
- int[] b = new int[90];
- int[] c = new int[a.length];
-
- IntWrapper aOffset = new IntWrapper(0);
- IntWrapper bOffset = new IntWrapper(x);
- C.compress(a, aOffset, a.length, b, bOffset);
- int len = bOffset.get() - x;
-
- bOffset.set(x);
- IntWrapper cOffset = new IntWrapper(0);
- C.uncompress(b, bOffset, len, c, cOffset);
- if(!Arrays.equals(a, c)) {
- System.out.println("Problem with "+C);
- }
- assertArrayEquals(a, c);
-
- }
- }
- }
+ @Test
+ public void saulTest() {
+ for (IntegerCODEC C : codecs) {
+ for (int x = 0; x < 50; ++x) {
+ int[] a = { 2, 3, 4, 5 };
+ int[] b = new int[90];
+ int[] c = new int[a.length];
+
+ IntWrapper aOffset = new IntWrapper(0);
+ IntWrapper bOffset = new IntWrapper(x);
+ C.compress(a, aOffset, a.length, b, bOffset);
+ int len = bOffset.get() - x;
+
+ bOffset.set(x);
+ IntWrapper cOffset = new IntWrapper(0);
+ C.uncompress(b, bOffset, len, c, cOffset);
+ if(!Arrays.equals(a, c)) {
+ System.out.println("Problem with "+C);
+ }
+ assertArrayEquals(a, c);
+
+ }
+ }
+ }
/**
*
*/
diff --git a/src/test/java/me/lemire/integercompression/ByteBasicTest.java b/src/test/java/me/lemire/integercompression/ByteBasicTest.java
index 93112c3..2b2d4f1 100644
--- a/src/test/java/me/lemire/integercompression/ByteBasicTest.java
+++ b/src/test/java/me/lemire/integercompression/ByteBasicTest.java
@@ -28,32 +28,32 @@ public class ByteBasicTest {
new IntegratedVariableByte(),
};
- /**
+ /**
*
*/
- @Test
- public void saulTest() {
- for (ByteIntegerCODEC C : codecs) {
- for (int x = 0; x < 50 * 4; ++x) {
- int[] a = { 2, 3, 4, 5 };
- byte[] b = new byte[90*4];
- int[] c = new int[a.length];
+ @Test
+ public void saulTest() {
+ for (ByteIntegerCODEC C : codecs) {
+ for (int x = 0; x < 50 * 4; ++x) {
+ int[] a = { 2, 3, 4, 5 };
+ byte[] b = new byte[90*4];
+ int[] c = new int[a.length];
- IntWrapper aOffset = new IntWrapper(0);
- IntWrapper bOffset = new IntWrapper(x);
- C.compress(a, aOffset, a.length, b, bOffset);
- int len = bOffset.get() - x;
+ IntWrapper aOffset = new IntWrapper(0);
+ IntWrapper bOffset = new IntWrapper(x);
+ C.compress(a, aOffset, a.length, b, bOffset);
+ int len = bOffset.get() - x;
- bOffset.set(x);
- IntWrapper cOffset = new IntWrapper(0);
- C.uncompress(b, bOffset, len, c, cOffset);
- if(!Arrays.equals(a, c)) {
- System.out.println("Problem with "+C);
- }
- assertArrayEquals(a, c);
- }
- }
- }
+ bOffset.set(x);
+ IntWrapper cOffset = new IntWrapper(0);
+ C.uncompress(b, bOffset, len, c, cOffset);
+ if(!Arrays.equals(a, c)) {
+ System.out.println("Problem with "+C);
+ }
+ assertArrayEquals(a, c);
+ }
+ }
+ }
/**
*
*/
diff --git a/src/test/java/me/lemire/integercompression/ExampleTest.java b/src/test/java/me/lemire/integercompression/ExampleTest.java
index f6038b8..ce10d18 100644
--- a/src/test/java/me/lemire/integercompression/ExampleTest.java
+++ b/src/test/java/me/lemire/integercompression/ExampleTest.java
@@ -17,305 +17,305 @@
*
*/
public class ExampleTest {
- /**
- *
- */
- @Test
-
- public void superSimpleExample() {
- IntegratedIntCompressor iic = new IntegratedIntCompressor();
- int[] data = new int[2342351];
- for (int k = 0; k < data.length; ++k)
- data[k] = k;
- System.out.println("Compressing " + data.length + " integers using friendly interface");
- int[] compressed = iic.compress(data);
- int[] recov = iic.uncompress(compressed);
- System.out
- .println("compressed from " + data.length * 4 / 1024 + "KB to " + compressed.length * 4 / 1024 + "KB");
- if (!Arrays.equals(recov, data))
- throw new RuntimeException("bug");
- }
-
- /**
- *
- */
- @Test
-
- public void basicExample() {
- int[] data = new int[2342351];
- System.out.println("Compressing " + data.length + " integers in one go");
- // data should be sorted for best
- // results
- for (int k = 0; k < data.length; ++k)
- data[k] = k;
- // Very important: the data is in sorted order!!! If not, you
- // will get very poor compression with IntegratedBinaryPacking,
- // you should use another CODEC.
-
- // next we compose a CODEC. Most of the processing
- // will be done with binary packing, and leftovers will
- // be processed using variable byte
- IntegratedIntegerCODEC codec = new IntegratedComposition(new IntegratedBinaryPacking(),
- new IntegratedVariableByte());
- // output vector should be large enough...
- int[] compressed = new int[data.length + 1024];
- // compressed might not be large enough in some cases
- // if you get java.lang.ArrayIndexOutOfBoundsException, try
- // allocating more memory
-
- /**
- *
- * compressing
- *
- */
- IntWrapper inputoffset = new IntWrapper(0);
- IntWrapper outputoffset = new IntWrapper(0);
- codec.compress(data, inputoffset, data.length, compressed, outputoffset);
- // got it!
- // inputoffset should be at data.length but outputoffset tells
- // us where we are...
- System.out.println(
- "compressed from " + data.length * 4 / 1024 + "KB to " + outputoffset.intValue() * 4 / 1024 + "KB");
- // we can repack the data: (optional)
- compressed = Arrays.copyOf(compressed, outputoffset.intValue());
-
- /**
- *
- * now uncompressing
- *
- * This assumes that we otherwise know how many integers have been
- * compressed. See basicExampleHeadless for a more general case.
- */
- int[] recovered = new int[data.length];
- IntWrapper recoffset = new IntWrapper(0);
- codec.uncompress(compressed, new IntWrapper(0), compressed.length, recovered, recoffset);
- if (Arrays.equals(data, recovered))
- System.out.println("data is recovered without loss");
- else
- throw new RuntimeException("bug"); // could use assert
- System.out.println();
- }
-
- /**
- * Like the basicExample, but we store the input array size manually.
- */
- @Test
- public void basicExampleHeadless() {
- int[] data = new int[2342351];
- System.out.println("Compressing " + data.length + " integers in one go using the headless approach");
- // data should be sorted for best
- // results
- for (int k = 0; k < data.length; ++k)
- data[k] = k;
- // Very important: the data is in sorted order!!! If not, you
- // will get very poor compression with IntegratedBinaryPacking,
- // you should use another CODEC.
-
- // next we compose a CODEC. Most of the processing
- // will be done with binary packing, and leftovers will
- // be processed using variable byte
- SkippableIntegratedComposition codec = new SkippableIntegratedComposition(new IntegratedBinaryPacking(),
- new IntegratedVariableByte());
- // output vector should be large enough...
- int[] compressed = new int[data.length + 1024];
- // compressed might not be large enough in some cases
- // if you get java.lang.ArrayIndexOutOfBoundsException, try
- // allocating more memory
-
- /**
- *
- * compressing
- *
- */
- IntWrapper inputoffset = new IntWrapper(0);
- IntWrapper outputoffset = new IntWrapper(1);
- compressed[0] = data.length; // we manually store how many integers we
- codec.headlessCompress(data, inputoffset, data.length, compressed, outputoffset, new IntWrapper(0));
- // got it!
- // inputoffset should be at data.length but outputoffset tells
- // us where we are...
- System.out.println(
- "compressed from " + data.length * 4 / 1024 + "KB to " + outputoffset.intValue() * 4 / 1024 + "KB");
- // we can repack the data: (optional)
- compressed = Arrays.copyOf(compressed, outputoffset.intValue());
-
- /**
- *
- * now uncompressing
- *
- */
- int howmany = compressed[0];// we manually stored the number of
- // compressed integers
- int[] recovered = new int[howmany];
- IntWrapper recoffset = new IntWrapper(0);
- codec.headlessUncompress(compressed, new IntWrapper(1), compressed.length, recovered, recoffset, howmany, new IntWrapper(0));
- if (Arrays.equals(data, recovered))
- System.out.println("data is recovered without loss");
- else
- throw new RuntimeException("bug"); // could use assert
- System.out.println();
- }
-
- /**
- * This is an example to show you can compress unsorted integers as long as
- * most are small.
- */
- @Test
- public void unsortedExample() {
- final int N = 1333333;
- int[] data = new int[N];
- // initialize the data (most will be small
- for (int k = 0; k < N; k += 1)
- data[k] = 3;
- // throw some larger values
- for (int k = 0; k < N; k += 5)
- data[k] = 100;
- for (int k = 0; k < N; k += 533)
- data[k] = 10000;
- int[] compressed = new int[N + 1024];// could need more
- IntegerCODEC codec = new Composition(new FastPFOR(), new VariableByte());
- // compressing
- IntWrapper inputoffset = new IntWrapper(0);
- IntWrapper outputoffset = new IntWrapper(0);
- codec.compress(data, inputoffset, data.length, compressed, outputoffset);
- System.out.println("compressed unsorted integers from " + data.length * 4 / 1024 + "KB to "
- + outputoffset.intValue() * 4 / 1024 + "KB");
- // we can repack the data: (optional)
- compressed = Arrays.copyOf(compressed, outputoffset.intValue());
-
- int[] recovered = new int[N];
- IntWrapper recoffset = new IntWrapper(0);
- codec.uncompress(compressed, new IntWrapper(0), compressed.length, recovered, recoffset);
- if (Arrays.equals(data, recovered))
- System.out.println("data is recovered without loss");
- else
- throw new RuntimeException("bug"); // could use assert
- System.out.println();
-
- }
-
- /**
- * This is like the basic example, but we show how to process larger arrays
- * in chunks.
- *
- * Some of this code was written by Pavel Klinov.
- */
- @Test
- public void advancedExample() {
- int TotalSize = 2342351; // some arbitrary number
- int ChunkSize = 16384; // size of each chunk, choose a multiple of 128
- System.out.println("Compressing " + TotalSize + " integers using chunks of " + ChunkSize + " integers ("
- + ChunkSize * 4 / 1024 + "KB)");
- System.out.println("(It is often better for applications to work in chunks fitting in CPU cache.)");
- int[] data = new int[TotalSize];
- // data should be sorted for best
- // results
- for (int k = 0; k < data.length; ++k)
- data[k] = k;
- // next we compose a CODEC. Most of the processing
- // will be done with binary packing, and leftovers will
- // be processed using variable byte, using variable byte
- // only for the last chunk!
- IntegratedIntegerCODEC regularcodec = new IntegratedBinaryPacking();
- IntegratedVariableByte ivb = new IntegratedVariableByte();
- IntegratedIntegerCODEC lastcodec = new IntegratedComposition(regularcodec, ivb);
- // output vector should be large enough...
- int[] compressed = new int[TotalSize + 1024];
-
- /**
- *
- * compressing
- *
- */
- IntWrapper inputoffset = new IntWrapper(0);
- IntWrapper outputoffset = new IntWrapper(0);
- for (int k = 0; k < TotalSize / ChunkSize; ++k)
- regularcodec.compress(data, inputoffset, ChunkSize, compressed, outputoffset);
- lastcodec.compress(data, inputoffset, TotalSize % ChunkSize, compressed, outputoffset);
- // got it!
- // inputoffset should be at data.length but outputoffset tells
- // us where we are...
- System.out.println(
- "compressed from " + data.length * 4 / 1024 + "KB to " + outputoffset.intValue() * 4 / 1024 + "KB");
- // we can repack the data:
- compressed = Arrays.copyOf(compressed, outputoffset.intValue());
-
- /**
- *
- * now uncompressing
- *
- * We are *not* assuming that the original array length is known,
- * however we assume that the chunk size (ChunkSize) is known.
- *
- */
- int[] recovered = new int[ChunkSize];
- IntWrapper compoff = new IntWrapper(0);
- IntWrapper recoffset;
- int currentpos = 0;
-
- while (compoff.get() < compressed.length) {
- recoffset = new IntWrapper(0);
- regularcodec.uncompress(compressed, compoff, compressed.length - compoff.get(), recovered, recoffset);
-
- if (recoffset.get() < ChunkSize) {// last chunk detected
- ivb.uncompress(compressed, compoff, compressed.length - compoff.get(), recovered, recoffset);
- }
- for (int i = 0; i < recoffset.get(); ++i) {
- if (data[currentpos + i] != recovered[i])
- throw new RuntimeException("bug"); // could use assert
- }
- currentpos += recoffset.get();
- }
- System.out.println("data is recovered without loss");
- System.out.println();
-
- }
-
- /**
- * Demo of the headless approach where we must supply the array length
- */
- @Test
- public void headlessDemo() {
- System.out.println("Compressing arrays with minimal header...");
- int[] uncompressed1 = { 1, 2, 1, 3, 1 };
- int[] uncompressed2 = { 3, 2, 4, 6, 1 };
-
- int[] compressed = new int[uncompressed1.length + uncompressed2.length + 1024];
-
- SkippableIntegerCODEC codec = new SkippableComposition(new BinaryPacking(), new VariableByte());
-
- // compressing
- IntWrapper outPos = new IntWrapper();
-
- IntWrapper previous = new IntWrapper();
-
- codec.headlessCompress(uncompressed1, new IntWrapper(), uncompressed1.length, compressed, outPos);
- int length1 = outPos.get() - previous.get();
- previous = new IntWrapper(outPos.get());
- codec.headlessCompress(uncompressed2, new IntWrapper(), uncompressed2.length, compressed, outPos);
- int length2 = outPos.get() - previous.get();
-
- compressed = Arrays.copyOf(compressed, length1 + length2);
- System.out
- .println("compressed unsorted integers from " + uncompressed1.length * 4 + "B to " + length1 * 4 + "B");
- System.out
- .println("compressed unsorted integers from " + uncompressed2.length * 4 + "B to " + length2 * 4 + "B");
- System.out.println("Total compressed output " + compressed.length);
-
- int[] recovered1 = new int[uncompressed1.length];
- int[] recovered2 = new int[uncompressed1.length];
- IntWrapper inPos = new IntWrapper();
- System.out.println("Decoding first array starting at pos = " + inPos);
- codec.headlessUncompress(compressed, inPos, compressed.length, recovered1, new IntWrapper(0),
- uncompressed1.length);
- System.out.println("Decoding second array starting at pos = " + inPos);
- codec.headlessUncompress(compressed, inPos, compressed.length, recovered2, new IntWrapper(0),
- uncompressed2.length);
- if (!Arrays.equals(uncompressed1, recovered1))
- throw new RuntimeException("First array does not match.");
- if (!Arrays.equals(uncompressed2, recovered2))
- throw new RuntimeException("Second array does not match.");
- System.out.println("The arrays match, your code is probably ok.");
-
- }
+ /**
+ *
+ */
+ @Test
+
+ public void superSimpleExample() {
+ IntegratedIntCompressor iic = new IntegratedIntCompressor();
+ int[] data = new int[2342351];
+ for (int k = 0; k < data.length; ++k)
+ data[k] = k;
+ System.out.println("Compressing " + data.length + " integers using friendly interface");
+ int[] compressed = iic.compress(data);
+ int[] recov = iic.uncompress(compressed);
+ System.out
+ .println("compressed from " + data.length * 4 / 1024 + "KB to " + compressed.length * 4 / 1024 + "KB");
+ if (!Arrays.equals(recov, data))
+ throw new RuntimeException("bug");
+ }
+
+ /**
+ *
+ */
+ @Test
+
+ public void basicExample() {
+ int[] data = new int[2342351];
+ System.out.println("Compressing " + data.length + " integers in one go");
+ // data should be sorted for best
+ // results
+ for (int k = 0; k < data.length; ++k)
+ data[k] = k;
+ // Very important: the data is in sorted order!!! If not, you
+ // will get very poor compression with IntegratedBinaryPacking,
+ // you should use another CODEC.
+
+ // next we compose a CODEC. Most of the processing
+ // will be done with binary packing, and leftovers will
+ // be processed using variable byte
+ IntegratedIntegerCODEC codec = new IntegratedComposition(new IntegratedBinaryPacking(),
+ new IntegratedVariableByte());
+ // output vector should be large enough...
+ int[] compressed = new int[data.length + 1024];
+ // compressed might not be large enough in some cases
+ // if you get java.lang.ArrayIndexOutOfBoundsException, try
+ // allocating more memory
+
+ /**
+ *
+ * compressing
+ *
+ */
+ IntWrapper inputoffset = new IntWrapper(0);
+ IntWrapper outputoffset = new IntWrapper(0);
+ codec.compress(data, inputoffset, data.length, compressed, outputoffset);
+ // got it!
+ // inputoffset should be at data.length but outputoffset tells
+ // us where we are...
+ System.out.println(
+ "compressed from " + data.length * 4 / 1024 + "KB to " + outputoffset.intValue() * 4 / 1024 + "KB");
+ // we can repack the data: (optional)
+ compressed = Arrays.copyOf(compressed, outputoffset.intValue());
+
+ /**
+ *
+ * now uncompressing
+ *
+ * This assumes that we otherwise know how many integers have been
+ * compressed. See basicExampleHeadless for a more general case.
+ */
+ int[] recovered = new int[data.length];
+ IntWrapper recoffset = new IntWrapper(0);
+ codec.uncompress(compressed, new IntWrapper(0), compressed.length, recovered, recoffset);
+ if (Arrays.equals(data, recovered))
+ System.out.println("data is recovered without loss");
+ else
+ throw new RuntimeException("bug"); // could use assert
+ System.out.println();
+ }
+
+ /**
+ * Like the basicExample, but we store the input array size manually.
+ */
+ @Test
+ public void basicExampleHeadless() {
+ int[] data = new int[2342351];
+ System.out.println("Compressing " + data.length + " integers in one go using the headless approach");
+ // data should be sorted for best
+ // results
+ for (int k = 0; k < data.length; ++k)
+ data[k] = k;
+ // Very important: the data is in sorted order!!! If not, you
+ // will get very poor compression with IntegratedBinaryPacking,
+ // you should use another CODEC.
+
+ // next we compose a CODEC. Most of the processing
+ // will be done with binary packing, and leftovers will
+ // be processed using variable byte
+ SkippableIntegratedComposition codec = new SkippableIntegratedComposition(new IntegratedBinaryPacking(),
+ new IntegratedVariableByte());
+ // output vector should be large enough...
+ int[] compressed = new int[data.length + 1024];
+ // compressed might not be large enough in some cases
+ // if you get java.lang.ArrayIndexOutOfBoundsException, try
+ // allocating more memory
+
+ /**
+ *
+ * compressing
+ *
+ */
+ IntWrapper inputoffset = new IntWrapper(0);
+ IntWrapper outputoffset = new IntWrapper(1);
+ compressed[0] = data.length; // we manually store how many integers we
+ codec.headlessCompress(data, inputoffset, data.length, compressed, outputoffset, new IntWrapper(0));
+ // got it!
+ // inputoffset should be at data.length but outputoffset tells
+ // us where we are...
+ System.out.println(
+ "compressed from " + data.length * 4 / 1024 + "KB to " + outputoffset.intValue() * 4 / 1024 + "KB");
+ // we can repack the data: (optional)
+ compressed = Arrays.copyOf(compressed, outputoffset.intValue());
+
+ /**
+ *
+ * now uncompressing
+ *
+ */
+ int howmany = compressed[0];// we manually stored the number of
+ // compressed integers
+ int[] recovered = new int[howmany];
+ IntWrapper recoffset = new IntWrapper(0);
+ codec.headlessUncompress(compressed, new IntWrapper(1), compressed.length, recovered, recoffset, howmany, new IntWrapper(0));
+ if (Arrays.equals(data, recovered))
+ System.out.println("data is recovered without loss");
+ else
+ throw new RuntimeException("bug"); // could use assert
+ System.out.println();
+ }
+
+ /**
+ * This is an example to show you can compress unsorted integers as long as
+ * most are small.
+ */
+ @Test
+ public void unsortedExample() {
+ final int N = 1333333;
+ int[] data = new int[N];
+ // initialize the data (most will be small
+ for (int k = 0; k < N; k += 1)
+ data[k] = 3;
+ // throw some larger values
+ for (int k = 0; k < N; k += 5)
+ data[k] = 100;
+ for (int k = 0; k < N; k += 533)
+ data[k] = 10000;
+ int[] compressed = new int[N + 1024];// could need more
+ IntegerCODEC codec = new Composition(new FastPFOR(), new VariableByte());
+ // compressing
+ IntWrapper inputoffset = new IntWrapper(0);
+ IntWrapper outputoffset = new IntWrapper(0);
+ codec.compress(data, inputoffset, data.length, compressed, outputoffset);
+ System.out.println("compressed unsorted integers from " + data.length * 4 / 1024 + "KB to "
+ + outputoffset.intValue() * 4 / 1024 + "KB");
+ // we can repack the data: (optional)
+ compressed = Arrays.copyOf(compressed, outputoffset.intValue());
+
+ int[] recovered = new int[N];
+ IntWrapper recoffset = new IntWrapper(0);
+ codec.uncompress(compressed, new IntWrapper(0), compressed.length, recovered, recoffset);
+ if (Arrays.equals(data, recovered))
+ System.out.println("data is recovered without loss");
+ else
+ throw new RuntimeException("bug"); // could use assert
+ System.out.println();
+
+ }
+
+ /**
+ * This is like the basic example, but we show how to process larger arrays
+ * in chunks.
+ *
+ * Some of this code was written by Pavel Klinov.
+ */
+ @Test
+ public void advancedExample() {
+ int TotalSize = 2342351; // some arbitrary number
+ int ChunkSize = 16384; // size of each chunk, choose a multiple of 128
+ System.out.println("Compressing " + TotalSize + " integers using chunks of " + ChunkSize + " integers ("
+ + ChunkSize * 4 / 1024 + "KB)");
+ System.out.println("(It is often better for applications to work in chunks fitting in CPU cache.)");
+ int[] data = new int[TotalSize];
+ // data should be sorted for best
+ // results
+ for (int k = 0; k < data.length; ++k)
+ data[k] = k;
+ // next we compose a CODEC. Most of the processing
+ // will be done with binary packing, and leftovers will
+ // be processed using variable byte, using variable byte
+ // only for the last chunk!
+ IntegratedIntegerCODEC regularcodec = new IntegratedBinaryPacking();
+ IntegratedVariableByte ivb = new IntegratedVariableByte();
+ IntegratedIntegerCODEC lastcodec = new IntegratedComposition(regularcodec, ivb);
+ // output vector should be large enough...
+ int[] compressed = new int[TotalSize + 1024];
+
+ /**
+ *
+ * compressing
+ *
+ */
+ IntWrapper inputoffset = new IntWrapper(0);
+ IntWrapper outputoffset = new IntWrapper(0);
+ for (int k = 0; k < TotalSize / ChunkSize; ++k)
+ regularcodec.compress(data, inputoffset, ChunkSize, compressed, outputoffset);
+ lastcodec.compress(data, inputoffset, TotalSize % ChunkSize, compressed, outputoffset);
+ // got it!
+ // inputoffset should be at data.length but outputoffset tells
+ // us where we are...
+ System.out.println(
+ "compressed from " + data.length * 4 / 1024 + "KB to " + outputoffset.intValue() * 4 / 1024 + "KB");
+ // we can repack the data:
+ compressed = Arrays.copyOf(compressed, outputoffset.intValue());
+
+ /**
+ *
+ * now uncompressing
+ *
+ * We are *not* assuming that the original array length is known,
+ * however we assume that the chunk size (ChunkSize) is known.
+ *
+ */
+ int[] recovered = new int[ChunkSize];
+ IntWrapper compoff = new IntWrapper(0);
+ IntWrapper recoffset;
+ int currentpos = 0;
+
+ while (compoff.get() < compressed.length) {
+ recoffset = new IntWrapper(0);
+ regularcodec.uncompress(compressed, compoff, compressed.length - compoff.get(), recovered, recoffset);
+
+ if (recoffset.get() < ChunkSize) {// last chunk detected
+ ivb.uncompress(compressed, compoff, compressed.length - compoff.get(), recovered, recoffset);
+ }
+ for (int i = 0; i < recoffset.get(); ++i) {
+ if (data[currentpos + i] != recovered[i])
+ throw new RuntimeException("bug"); // could use assert
+ }
+ currentpos += recoffset.get();
+ }
+ System.out.println("data is recovered without loss");
+ System.out.println();
+
+ }
+
+ /**
+ * Demo of the headless approach where we must supply the array length
+ */
+ @Test
+ public void headlessDemo() {
+ System.out.println("Compressing arrays with minimal header...");
+ int[] uncompressed1 = { 1, 2, 1, 3, 1 };
+ int[] uncompressed2 = { 3, 2, 4, 6, 1 };
+
+ int[] compressed = new int[uncompressed1.length + uncompressed2.length + 1024];
+
+ SkippableIntegerCODEC codec = new SkippableComposition(new BinaryPacking(), new VariableByte());
+
+ // compressing
+ IntWrapper outPos = new IntWrapper();
+
+ IntWrapper previous = new IntWrapper();
+
+ codec.headlessCompress(uncompressed1, new IntWrapper(), uncompressed1.length, compressed, outPos);
+ int length1 = outPos.get() - previous.get();
+ previous = new IntWrapper(outPos.get());
+ codec.headlessCompress(uncompressed2, new IntWrapper(), uncompressed2.length, compressed, outPos);
+ int length2 = outPos.get() - previous.get();
+
+ compressed = Arrays.copyOf(compressed, length1 + length2);
+ System.out
+ .println("compressed unsorted integers from " + uncompressed1.length * 4 + "B to " + length1 * 4 + "B");
+ System.out
+ .println("compressed unsorted integers from " + uncompressed2.length * 4 + "B to " + length2 * 4 + "B");
+ System.out.println("Total compressed output " + compressed.length);
+
+ int[] recovered1 = new int[uncompressed1.length];
+ int[] recovered2 = new int[uncompressed1.length];
+ IntWrapper inPos = new IntWrapper();
+ System.out.println("Decoding first array starting at pos = " + inPos);
+ codec.headlessUncompress(compressed, inPos, compressed.length, recovered1, new IntWrapper(0),
+ uncompressed1.length);
+ System.out.println("Decoding second array starting at pos = " + inPos);
+ codec.headlessUncompress(compressed, inPos, compressed.length, recovered2, new IntWrapper(0),
+ uncompressed2.length);
+ if (!Arrays.equals(uncompressed1, recovered1))
+ throw new RuntimeException("First array does not match.");
+ if (!Arrays.equals(uncompressed2, recovered2))
+ throw new RuntimeException("Second array does not match.");
+ System.out.println("The arrays match, your code is probably ok.");
+
+ }
}
diff --git a/src/test/java/me/lemire/integercompression/ResourcedTest.java b/src/test/java/me/lemire/integercompression/ResourcedTest.java
index 34f1d05..8316129 100644
--- a/src/test/java/me/lemire/integercompression/ResourcedTest.java
+++ b/src/test/java/me/lemire/integercompression/ResourcedTest.java
@@ -24,65 +24,65 @@
*
*/
public class ResourcedTest {
- SkippableIntegerCODEC[] codecs = { new JustCopy(), new VariableByte(),
- new SkippableComposition(new BinaryPacking(), new VariableByte()),
- new SkippableComposition(new NewPFD(), new VariableByte()),
- new SkippableComposition(new NewPFDS9(), new VariableByte()),
- new SkippableComposition(new NewPFDS16(), new VariableByte()),
- new SkippableComposition(new OptPFD(), new VariableByte()),
- new SkippableComposition(new OptPFDS9(), new VariableByte()),
- new SkippableComposition(new OptPFDS16(), new VariableByte()),
- new SkippableComposition(new FastPFOR128(), new VariableByte()),
- new SkippableComposition(new FastPFOR(), new VariableByte()), new Simple9(), new Simple16() };
+ SkippableIntegerCODEC[] codecs = { new JustCopy(), new VariableByte(),
+ new SkippableComposition(new BinaryPacking(), new VariableByte()),
+ new SkippableComposition(new NewPFD(), new VariableByte()),
+ new SkippableComposition(new NewPFDS9(), new VariableByte()),
+ new SkippableComposition(new NewPFDS16(), new VariableByte()),
+ new SkippableComposition(new OptPFD(), new VariableByte()),
+ new SkippableComposition(new OptPFDS9(), new VariableByte()),
+ new SkippableComposition(new OptPFDS16(), new VariableByte()),
+ new SkippableComposition(new FastPFOR128(), new VariableByte()),
+ new SkippableComposition(new FastPFOR(), new VariableByte()), new Simple9(), new Simple16() };
- /**
- * @throws IOException
- * if the resource cannot be accessed (should be considered a
- * bug)
- *
- */
- @Test
- public void IntCompressorTest() throws IOException {
- // next line requires Java8?
- // int[] data =
- // Files.lines(Paths.get("integers.txt")).mapToInt(Integer::parseInt).toArray();
- File f = new File("src/test/resources/integers.txt");
- System.out.println("loading test data from "+ f.getAbsolutePath());
- BufferedReader bfr = new BufferedReader(new FileReader(f));
- String line;
- ArrayList ai = new ArrayList();
- while ((line = bfr.readLine()) != null) {
- ai.add(Integer.parseInt(line));
- }
- bfr.close();
- int[] data = new int[ai.size()];
- for (int k = 0; k < data.length; ++k)
- data[k] = ai.get(k).intValue();
- ai = null;
- // finally!
- {
- IntegratedIntCompressor iic = new IntegratedIntCompressor();
- int[] compressed = iic.compress(data);
- int[] recovered = iic.uncompress(compressed);
- Assert.assertArrayEquals(recovered, data);
- }
- for (SkippableIntegerCODEC C : codecs) {
- IntCompressor iic = new IntCompressor(C);
- int[] compressed = iic.compress(data);
- int[] recovered = iic.uncompress(compressed);
- Assert.assertArrayEquals(recovered, data);
+ /**
+ * @throws IOException
+ * if the resource cannot be accessed (should be considered a
+ * bug)
+ *
+ */
+ @Test
+ public void IntCompressorTest() throws IOException {
+ // next line requires Java8?
+ // int[] data =
+ // Files.lines(Paths.get("integers.txt")).mapToInt(Integer::parseInt).toArray();
+ File f = new File("src/test/resources/integers.txt");
+ System.out.println("loading test data from "+ f.getAbsolutePath());
+ BufferedReader bfr = new BufferedReader(new FileReader(f));
+ String line;
+ ArrayList ai = new ArrayList();
+ while ((line = bfr.readLine()) != null) {
+ ai.add(Integer.parseInt(line));
+ }
+ bfr.close();
+ int[] data = new int[ai.size()];
+ for (int k = 0; k < data.length; ++k)
+ data[k] = ai.get(k).intValue();
+ ai = null;
+ // finally!
+ {
+ IntegratedIntCompressor iic = new IntegratedIntCompressor();
+ int[] compressed = iic.compress(data);
+ int[] recovered = iic.uncompress(compressed);
+ Assert.assertArrayEquals(recovered, data);
+ }
+ for (SkippableIntegerCODEC C : codecs) {
+ IntCompressor iic = new IntCompressor(C);
+ int[] compressed = iic.compress(data);
+ int[] recovered = iic.uncompress(compressed);
+ Assert.assertArrayEquals(recovered, data);
- }
- for (SkippableIntegerCODEC C : codecs) {
- if (C instanceof SkippableIntegratedIntegerCODEC) {
- IntegratedIntCompressor iic = new IntegratedIntCompressor((SkippableIntegratedIntegerCODEC) C);
- int[] compressed = iic.compress(data);
- int[] recovered = iic.uncompress(compressed);
- Assert.assertArrayEquals(recovered, data);
- }
+ }
+ for (SkippableIntegerCODEC C : codecs) {
+ if (C instanceof SkippableIntegratedIntegerCODEC) {
+ IntegratedIntCompressor iic = new IntegratedIntCompressor((SkippableIntegratedIntegerCODEC) C);
+ int[] compressed = iic.compress(data);
+ int[] recovered = iic.uncompress(compressed);
+ Assert.assertArrayEquals(recovered, data);
+ }
- }
+ }
- }
+ }
}
diff --git a/src/test/java/me/lemire/integercompression/SkippableBasicTest.java b/src/test/java/me/lemire/integercompression/SkippableBasicTest.java
index 93c1784..9018229 100644
--- a/src/test/java/me/lemire/integercompression/SkippableBasicTest.java
+++ b/src/test/java/me/lemire/integercompression/SkippableBasicTest.java
@@ -19,7 +19,7 @@
*/
@SuppressWarnings({ "static-method" })
public class SkippableBasicTest {
- final SkippableIntegerCODEC[] codecs = {
+ final SkippableIntegerCODEC[] codecs = {
new JustCopy(),
new VariableByte(),
new SkippableComposition(new BinaryPacking(), new VariableByte()),
diff --git a/src/test/java/me/lemire/longcompression/LongBasicTest.java b/src/test/java/me/lemire/longcompression/LongBasicTest.java
index 1963246..8dc0c9b 100644
--- a/src/test/java/me/lemire/longcompression/LongBasicTest.java
+++ b/src/test/java/me/lemire/longcompression/LongBasicTest.java
@@ -34,33 +34,33 @@ public class LongBasicTest {
new LongComposition(new LongBinaryPacking(), new LongVariableByte()),
};
- /**
+ /**
* This tests with a compressed array with various offset
*/
- @Test
- public void saulTest() {
- for (LongCODEC C : codecs) {
- for (int x = 0; x < 50; ++x) {
- long[] a = { 2, 3, 4, 5 };
- long[] b = new long[90];
- long[] c = new long[a.length];
-
- IntWrapper aOffset = new IntWrapper(0);
- IntWrapper bOffset = new IntWrapper(x);
- C.compress(a, aOffset, a.length, b, bOffset);
- int len = bOffset.get() - x;
-
- bOffset.set(x);
- IntWrapper cOffset = new IntWrapper(0);
- C.uncompress(b, bOffset, len, c, cOffset);
- if(!Arrays.equals(a, c)) {
- System.out.println("Problem with "+C);
- }
- assertArrayEquals(a, c);
-
- }
- }
- }
+ @Test
+ public void saulTest() {
+ for (LongCODEC C : codecs) {
+ for (int x = 0; x < 50; ++x) {
+ long[] a = { 2, 3, 4, 5 };
+ long[] b = new long[90];
+ long[] c = new long[a.length];
+
+ IntWrapper aOffset = new IntWrapper(0);
+ IntWrapper bOffset = new IntWrapper(x);
+ C.compress(a, aOffset, a.length, b, bOffset);
+ int len = bOffset.get() - x;
+
+ bOffset.set(x);
+ IntWrapper cOffset = new IntWrapper(0);
+ C.uncompress(b, bOffset, len, c, cOffset);
+ if(!Arrays.equals(a, c)) {
+ System.out.println("Problem with "+C);
+ }
+ assertArrayEquals(a, c);
+
+ }
+ }
+ }
/**
*
*/
@@ -159,16 +159,16 @@ public void varyingLengthTest2() {
@Test
public void checkVariousCases() {
for (LongCODEC c : codecs) {
- testZeroInZeroOut(c);
- test(c, c, 5, 10);
- test(c, c, 5, 14);
- test(c, c, 2, 18);
- // TODO Unclear which codec should manage an empty output array or not
- // Some IntegerCodec does not output anything if the input is smaller than some block size
- // testSpurious(c);
- testUnsorted(c);
- testUnsorted2(c);
- testUnsorted3(c);
+ testZeroInZeroOut(c);
+ test(c, c, 5, 10);
+ test(c, c, 5, 14);
+ test(c, c, 2, 18);
+ // TODO Unclear which codec should manage an empty output array or not
+ // Some IntegerCodec does not output anything if the input is smaller than some block size
+ // testSpurious(c);
+ testUnsorted(c);
+ testUnsorted2(c);
+ testUnsorted3(c);
}
}
@@ -265,7 +265,7 @@ private static void testCodec(LongCODEC c, LongCODEC co,
buffer[0] = backupdata[0];
co.uncompress(dataout, inpos, thiscompsize - 1, buffer, outpos);
if (!(c instanceof IntegratedLongCODEC))
- LongDelta.fastinverseDelta(buffer);
+ LongDelta.fastinverseDelta(buffer);
// Check assertions.
assertEquals("length is not match", outpos.get(), data[k].length);
@@ -373,19 +373,19 @@ public void fastPforTest() {
@Test
public void fastPfor128Test() {
// proposed by Stefan Ackermann (https://github.com/Stivo)
- for (LongCODEC codec : codecs) {
- int N = FastPFOR128.BLOCK_SIZE;
- long[] data = new long[N];
- for (int i = 0; i < N; i++)
- data[i] = 0;
- data[126] = -1;
- long[] comp = LongTestUtils.compress(codec, Arrays.copyOf(data, N));
- long[] answer = LongTestUtils.uncompress(codec, comp, N);
- for (int k = 0; k < N; ++k)
- if (answer[k] != data[k])
- throw new RuntimeException("bug " + k + " " + answer[k]
- + " != " + data[k]);
- }
+ for (LongCODEC codec : codecs) {
+ int N = FastPFOR128.BLOCK_SIZE;
+ long[] data = new long[N];
+ for (int i = 0; i < N; i++)
+ data[i] = 0;
+ data[126] = -1;
+ long[] comp = LongTestUtils.compress(codec, Arrays.copyOf(data, N));
+ long[] answer = LongTestUtils.uncompress(codec, comp, N);
+ for (int k = 0; k < N; ++k)
+ if (answer[k] != data[k])
+ throw new RuntimeException("bug " + k + " " + answer[k]
+ + " != " + data[k]);
+ }
}
}
diff --git a/src/test/java/me/lemire/longcompression/LongTestUtils.java b/src/test/java/me/lemire/longcompression/LongTestUtils.java
index a44e665..4a30b41 100644
--- a/src/test/java/me/lemire/longcompression/LongTestUtils.java
+++ b/src/test/java/me/lemire/longcompression/LongTestUtils.java
@@ -127,7 +127,7 @@ protected static long[] uncompressHeadless(SkippableLongCODEC codec, long[] data
return Arrays.copyOf(outBuf, outPos.get());
}
- public static String longToBinaryWithLeading(long l) {
- return String.format("%64s", Long.toBinaryString(l)).replace(' ', '0');
- }
+ public static String longToBinaryWithLeading(long l) {
+ return String.format("%64s", Long.toBinaryString(l)).replace(' ', '0');
+ }
}
diff --git a/src/test/java/me/lemire/longcompression/SkippableLongBasicTest.java b/src/test/java/me/lemire/longcompression/SkippableLongBasicTest.java
index 24cb712..b317d4f 100644
--- a/src/test/java/me/lemire/longcompression/SkippableLongBasicTest.java
+++ b/src/test/java/me/lemire/longcompression/SkippableLongBasicTest.java
@@ -79,15 +79,15 @@ public void varyingLengthTest() {
for (SkippableLongCODEC c : codecs) {
System.out.println("[SkippeableBasicTest.varyingLengthTest] codec = "+c);
for (int L = 1; L <= 128; L++) {
- long[] comp = LongTestUtils.compressHeadless(c, Arrays.copyOf(data, L));
- long[] answer = LongTestUtils.uncompressHeadless(c, comp, L);
+ long[] comp = LongTestUtils.compressHeadless(c, Arrays.copyOf(data, L));
+ long[] answer = LongTestUtils.uncompressHeadless(c, comp, L);
for (int k = 0; k < L; ++k)
if (answer[k] != data[k])
throw new RuntimeException("bug "+c.toString()+" "+k+" "+answer[k]+" "+data[k]);
}
for (int L = 128; L <= N; L *= 2) {
- long[] comp = LongTestUtils.compressHeadless(c, Arrays.copyOf(data, L));
- long[] answer = LongTestUtils.uncompressHeadless(c, comp, L);
+ long[] comp = LongTestUtils.compressHeadless(c, Arrays.copyOf(data, L));
+ long[] answer = LongTestUtils.uncompressHeadless(c, comp, L);
for (int k = 0; k < L; ++k)
if (answer[k] != data[k])
throw new RuntimeException("bug");
@@ -124,16 +124,16 @@ public void varyingLengthTest2() {
e.printStackTrace();
}
for (int L = 1; L <= 128; L++) {
- long[] comp = LongTestUtils.compressHeadless(c, Arrays.copyOf(data, L));
- long[] answer = LongTestUtils.uncompressHeadless(c, comp, L);
+ long[] comp = LongTestUtils.compressHeadless(c, Arrays.copyOf(data, L));
+ long[] answer = LongTestUtils.uncompressHeadless(c, comp, L);
for (int k = 0; k < L; ++k)
if (answer[k] != data[k]) {
- throw new RuntimeException("L=" + L + ": bug at k = "+k+" "+answer[k]+" "+data[k]+" for "+c.toString());
+ throw new RuntimeException("L=" + L + ": bug at k = "+k+" "+answer[k]+" "+data[k]+" for "+c.toString());
}
}
for (int L = 128; L <= N; L *= 2) {
- long[] comp = LongTestUtils.compressHeadless(c, Arrays.copyOf(data, L));
- long[] answer = LongTestUtils.uncompressHeadless(c, comp, L);
+ long[] comp = LongTestUtils.compressHeadless(c, Arrays.copyOf(data, L));
+ long[] answer = LongTestUtils.uncompressHeadless(c, comp, L);
for (int k = 0; k < L; ++k)
if (answer[k] != data[k])
throw new RuntimeException("bug");
diff --git a/src/test/java/me/lemire/longcompression/TestLongAs2IntsCodec.java b/src/test/java/me/lemire/longcompression/TestLongAs2IntsCodec.java
index 5b8014e..bddff2a 100644
--- a/src/test/java/me/lemire/longcompression/TestLongAs2IntsCodec.java
+++ b/src/test/java/me/lemire/longcompression/TestLongAs2IntsCodec.java
@@ -23,9 +23,9 @@ public LongCODEC getCodec() {
return codec;
}
- @Test
- public void testCodec_intermediateHighPowerOfTwo() {
- Assert.assertEquals(3, LongTestUtils.compress((LongCODEC) codec, new long[] { 1L << 42 }).length);
- }
+ @Test
+ public void testCodec_intermediateHighPowerOfTwo() {
+ Assert.assertEquals(3, LongTestUtils.compress((LongCODEC) codec, new long[] { 1L << 42 }).length);
+ }
}
diff --git a/src/test/java/me/lemire/longcompression/synth/LongClusteredDataGenerator.java b/src/test/java/me/lemire/longcompression/synth/LongClusteredDataGenerator.java
index 5b90ee0..c964f6f 100644
--- a/src/test/java/me/lemire/longcompression/synth/LongClusteredDataGenerator.java
+++ b/src/test/java/me/lemire/longcompression/synth/LongClusteredDataGenerator.java
@@ -29,7 +29,7 @@ public LongClusteredDataGenerator() {
}
void fillUniform(long[] array, int offset, int length, long Min, long Max) {
- long[] v = this.unidg.generateUniform(length, Max - Min);
+ long[] v = this.unidg.generateUniform(length, Max - Min);
for (int k = 0; k < v.length; ++k)
array[k + offset] = Min + v[k];
}
@@ -70,7 +70,7 @@ void fillClustered(long[] array, int offset, int length, long Min, long Max) {
* @return array containing the integers
*/
public long[] generateClustered(int N, long Max) {
- long[] array = new long[N];
+ long[] array = new long[N];
fillClustered(array, 0, N, 0, Max);
return array;
}
@@ -82,7 +82,7 @@ public long[] generateClustered(int N, long Max) {
* arguments are ignored
*/
public static void main(final String[] args) {
- long[] example = (new LongClusteredDataGenerator())
+ long[] example = (new LongClusteredDataGenerator())
.generateClustered(20, 1000);
for (int k = 0; k < example.length; ++k)
System.out.println(example[k]);
diff --git a/src/test/java/me/lemire/longcompression/synth/LongUniformDataGenerator.java b/src/test/java/me/lemire/longcompression/synth/LongUniformDataGenerator.java
index 4d435f2..4aa797b 100644
--- a/src/test/java/me/lemire/longcompression/synth/LongUniformDataGenerator.java
+++ b/src/test/java/me/lemire/longcompression/synth/LongUniformDataGenerator.java
@@ -59,12 +59,12 @@ long[] generateUniformHash(int N, long Max) {
* output all longs from the range [0,Max) that are not in the array
*/
static long[] negate(long[] x, long Max) {
- int newLength = saturatedCast(Max - x.length);
- long[] ans = new long[newLength];
+ int newLength = saturatedCast(Max - x.length);
+ long[] ans = new long[newLength];
int i = 0;
int c = 0;
for (int j = 0; j < x.length; ++j) {
- long v = x[j];
+ long v = x[j];
for (; i < v; ++i)
ans[c++] = i;
++i;
@@ -74,13 +74,13 @@ static long[] negate(long[] x, long Max) {
return ans;
}
- private static int saturatedCast(long toInt) {
- if (toInt > Integer.MAX_VALUE) {
- return Integer.MAX_VALUE;
- } else {
- return (int) toInt;
- }
- }
+ private static int saturatedCast(long toInt) {
+ if (toInt > Integer.MAX_VALUE) {
+ return Integer.MAX_VALUE;
+ } else {
+ return (int) toInt;
+ }
+ }
/**
* generates randomly N distinct longs from 0 to Max.
@@ -92,7 +92,7 @@ private static int saturatedCast(long toInt) {
* @return an array containing randomly selected longs
*/
public long[] generateUniform(int N, long Max) {
- assert N >= 0;
+ assert N >= 0;
assert Max >= 0;
if (N * 2 > Max) {
return negate(generateUniform(saturatedCast(Max - N), Max), Max);