-
Notifications
You must be signed in to change notification settings - Fork 20
/
compiledLzma.js
3697 lines (3367 loc) · 135 KB
/
compiledLzma.js
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
Copyright (c) 2013 Nathan Rugg <nmrugg@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
var LZMA,
action_compress = 1,
action_decompress = 2,
action_update = 3;
function update_progress(percent, callback_num)
{
///TODO: Calculate ETA.
postMessage({
action: 3,
callback_num: callback_num,
result: percent
});
}
LZMA = (function ()
{
var $gwt_version = "1.7.0";
var $moduleName, $moduleBase;
var _, N8000000000000000_longLit = [0, -9223372036854775808], N1_longLit = [4294967295, -4294967296], P0_longLit = [0, 0], P1_longLit = [1, 0], P4_longLit = [4, 0], P1000_longLit = [4096, 0], Pffffff_longLit = [16777215, 0], P1000000_longLit = [16777216, 0], Pff000000_longLit = [4278190080, 0], Pffffffff_longLit = [4294967295, 0], P7fffffffffffffff_longLit = [4294967295, 9223372032559808512];
function getClass_18(){
return Ljava_lang_Object_2_classLit;
}
function Object_0(){
}
_ = Object_0.prototype = {};
_.getClass$ = getClass_18;
_.typeMarker$ = nullMethod;
_.typeId$ = 1;
function getClass_22(){
return Ljava_lang_Throwable_2_classLit;
}
function Throwable(){
}
_ = Throwable.prototype = new Object_0();
_.getClass$ = getClass_22;
_.typeId$ = 3;
_.detailMessage = null;
function getClass_13(){
return Ljava_lang_Exception_2_classLit;
}
function Exception(){
}
_ = Exception.prototype = new Throwable();
_.getClass$ = getClass_13;
_.typeId$ = 4;
function $RuntimeException(this$static, message){
this$static.detailMessage = message;
return this$static;
}
function getClass_19(){
return Ljava_lang_RuntimeException_2_classLit;
}
function RuntimeException(){
}
_ = RuntimeException.prototype = new Exception();
_.getClass$ = getClass_19;
_.typeId$ = 5;
function $JavaScriptException(this$static, e){
return this$static;
}
function getClass_0(){
return Lcom_google_gwt_core_client_JavaScriptException_2_classLit;
}
function JavaScriptException(){
}
_ = JavaScriptException.prototype = new RuntimeException();
_.getClass$ = getClass_0;
_.typeId$ = 6;
function $append(a, x){
a[a.explicitLength++] = x;
}
function $appendNonNull(a, x){
a[a.explicitLength++] = x;
}
function $toString(a){
var s_0, s;
s_0 = (s = a.join('') , a.length = a.explicitLength = 0 , s);
a[a.explicitLength++] = s_0;
return s_0;
}
function createFromSeed(seedType, length_0){
var array = new Array(length_0);
if (seedType > 0) {
var value = [null, 0, false, [0, 0]][seedType];
for (var i = 0; i < length_0; ++i) {
array[i] = value;
}
}
return array;
}
function getClass_2(){
return this.arrayClass$;
}
function initDim(arrayClass, typeId, queryId, length_0, seedType){
var result;
result = createFromSeed(seedType, length_0);
$clinit_4();
wrapArray(result, expandoNames_0, expandoValues_0);
result.arrayClass$ = arrayClass;
result.typeId$ = typeId;
result.queryId$ = queryId;
return result;
}
function initValues(arrayClass, typeId, queryId, array){
$clinit_4();
wrapArray(array, expandoNames_0, expandoValues_0);
array.arrayClass$ = arrayClass;
array.typeId$ = typeId;
array.queryId$ = queryId;
return array;
}
function setCheck(array, index, value){
if (value != null) {
if (array.queryId$ > 0 && !canCastUnsafe(value.typeId$, array.queryId$)) {
throw new ArrayStoreException();
}
if (array.queryId$ < 0 && (value.typeMarker$ == nullMethod || value.typeId$ == 2)) {
throw new ArrayStoreException();
}
}
return array[index] = value;
}
function Array_0(){
}
_ = Array_0.prototype = new Object_0();
_.getClass$ = getClass_2;
_.typeId$ = 0;
_.arrayClass$ = null;
_.length = 0;
_.queryId$ = 0;
function $clinit_4(){
$clinit_4 = nullMethod;
expandoNames_0 = [];
expandoValues_0 = [];
initExpandos(new Array_0(), expandoNames_0, expandoValues_0);
}
function initExpandos(protoType, expandoNames, expandoValues){
var i = 0, value;
for (var name_0 in protoType) {
if (value = protoType[name_0]) {
expandoNames[i] = name_0;
expandoValues[i] = value;
++i;
}
}
}
function wrapArray(array, expandoNames, expandoValues){
$clinit_4();
for (var i = 0, c = expandoNames.length; i < c; ++i) {
array[expandoNames[i]] = expandoValues[i];
}
}
var expandoNames_0, expandoValues_0;
function canCast(srcId, dstId){
return srcId && !!typeIdArray[srcId][dstId];
}
function canCastUnsafe(srcId, dstId){
return srcId && typeIdArray[srcId][dstId];
}
function dynamicCast(src, dstId){
if (src != null && !canCastUnsafe(src.typeId$, dstId)) {
throw new ClassCastException();
}
return src;
}
function instanceOf(src, dstId){
return src != null && canCast(src.typeId$, dstId);
}
function round_int(x){
return ~~Math.max(Math.min(x, 2147483647), -2147483648);
}
var typeIdArray = [{}, {}, {1:1}, {2:1}, {2:1}, {2:1}, {2:1}, {2:1, 10:1}, {2:1}, {2:1}, {2:1}, {2:1}, {2:1}, {2:1, 11:1}, {2:1}, {2:1}, {2:1}, {4:1}, {5:1}, {6:1}, {7:1}, {8:1}, {9:1}];
function caught(e){
if (e != null && canCast(e.typeId$, 2)) {
return e;
}
return $JavaScriptException(new JavaScriptException(), e);
}
function add(a, b){
var newHigh, newLow;
newHigh = a[1] + b[1];
newLow = a[0] + b[0];
return create(newLow, newHigh);
}
function addTimes(accum, a, b){
if (a == 0) {
return accum;
}
if (b == 0) {
return accum;
}
return add(accum, create(a * b, 0));
}
function and(a, b){
return makeFromBits(~~Math.max(Math.min(a[1] / 4294967296, 2147483647), -2147483648) & ~~Math.max(Math.min(b[1] / 4294967296, 2147483647), -2147483648), lowBits_0(a) & lowBits_0(b));
}
function compare(a, b){
var nega, negb;
if (a[0] == b[0] && a[1] == b[1]) {
return 0;
}
nega = a[1] < 0;
negb = b[1] < 0;
if (nega && !negb) {
return -1;
}
if (!nega && negb) {
return 1;
}
if (sub(a, b)[1] < 0) {
return -1;
}
else {
return 1;
}
}
function create(valueLow, valueHigh){
var diffHigh, diffLow;
valueHigh %= 1.8446744073709552E19;
valueLow %= 1.8446744073709552E19;
diffHigh = valueHigh % 4294967296;
diffLow = Math.floor(valueLow / 4294967296) * 4294967296;
valueHigh = valueHigh - diffHigh + diffLow;
valueLow = valueLow - diffLow + diffHigh;
while (valueLow < 0) {
valueLow += 4294967296;
valueHigh -= 4294967296;
}
while (valueLow > 4294967295) {
valueLow -= 4294967296;
valueHigh += 4294967296;
}
valueHigh = valueHigh % 1.8446744073709552E19;
while (valueHigh > 9223372032559808512) {
valueHigh -= 1.8446744073709552E19;
}
while (valueHigh < -9223372036854775808) {
valueHigh += 1.8446744073709552E19;
}
return [valueLow, valueHigh];
}
function div(a, b){
var approx, deltaRem, deltaResult, halfa, rem, result;
if (b[0] == 0 && b[1] == 0) {
throw $ArithmeticException(new ArithmeticException(), '/ by zero');
}
if (a[0] == 0 && a[1] == 0) {
return $clinit_10() , ZERO;
}
if (eq(a, ($clinit_10() , MIN_VALUE))) {
if (eq(b, ONE) || eq(b, NEG_ONE)) {
return MIN_VALUE;
}
halfa = shr(a, 1);
approx = shl(div(halfa, b), 1);
rem = sub(a, mul(b, approx));
return add(approx, div(rem, b));
}
if (eq(b, MIN_VALUE)) {
return ZERO;
}
if (a[1] < 0) {
if (b[1] < 0) {
return div(neg(a), neg(b));
}
else {
return neg(div(neg(a), b));
}
}
if (b[1] < 0) {
return neg(div(a, neg(b)));
}
result = ZERO;
rem = a;
while (compare(rem, b) >= 0) {
deltaResult = fromDouble(Math.floor(toDoubleRoundDown(rem) / toDoubleRoundUp(b)));
if (deltaResult[0] == 0 && deltaResult[1] == 0) {
deltaResult = ONE;
}
deltaRem = mul(deltaResult, b);
result = add(result, deltaResult);
rem = sub(rem, deltaRem);
}
return result;
}
function eq(a, b){
return a[0] == b[0] && a[1] == b[1];
}
function fromDouble(value){
if (isNaN(value)) {
return $clinit_10() , ZERO;
}
if (value < -9223372036854775808) {
return $clinit_10() , MIN_VALUE;
}
if (value >= 9223372036854775807) {
return $clinit_10() , MAX_VALUE;
}
if (value > 0) {
return create(Math.floor(value), 0);
}
else {
return create(Math.ceil(value), 0);
}
}
function fromInt(value){
var rebase, result;
if (value > -129 && value < 128) {
rebase = value + 128;
result = ($clinit_9() , boxedValues)[rebase];
if (result == null) {
result = boxedValues[rebase] = internalFromInt(value);
}
return result;
}
return internalFromInt(value);
}
function internalFromInt(value){
if (value >= 0) {
return [value, 0];
}
else {
return [value + 4294967296, -4294967296];
}
}
function lowBits_0(a){
if (a[0] >= 2147483648) {
return ~~Math.max(Math.min(a[0] - 4294967296, 2147483647), -2147483648);
}
else {
return ~~Math.max(Math.min(a[0], 2147483647), -2147483648);
}
}
function makeFromBits(highBits, lowBits){
var high, low;
high = highBits * 4294967296;
low = lowBits;
if (lowBits < 0) {
low += 4294967296;
}
return [low, high];
}
function mul(a, b){
var a1, a2, a3, a4, b1, b2, b3, b4, res;
if (a[0] == 0 && a[1] == 0) {
return $clinit_10() , ZERO;
}
if (b[0] == 0 && b[1] == 0) {
return $clinit_10() , ZERO;
}
if (eq(a, ($clinit_10() , MIN_VALUE))) {
return multByMinValue(b);
}
if (eq(b, MIN_VALUE)) {
return multByMinValue(a);
}
if (a[1] < 0) {
if (b[1] < 0) {
return mul(neg(a), neg(b));
}
else {
return neg(mul(neg(a), b));
}
}
if (b[1] < 0) {
return neg(mul(a, neg(b)));
}
if (compare(a, TWO_PWR_24) < 0 && compare(b, TWO_PWR_24) < 0) {
return create((a[1] + a[0]) * (b[1] + b[0]), 0);
}
a3 = a[1] % 281474976710656;
a4 = a[1] - a3;
a1 = a[0] % 65536;
a2 = a[0] - a1;
b3 = b[1] % 281474976710656;
b4 = b[1] - b3;
b1 = b[0] % 65536;
b2 = b[0] - b1;
res = ZERO;
res = addTimes(res, a4, b1);
res = addTimes(res, a3, b2);
res = addTimes(res, a3, b1);
res = addTimes(res, a2, b3);
res = addTimes(res, a2, b2);
res = addTimes(res, a2, b1);
res = addTimes(res, a1, b4);
res = addTimes(res, a1, b3);
res = addTimes(res, a1, b2);
res = addTimes(res, a1, b1);
return res;
}
function multByMinValue(a){
if ((lowBits_0(a) & 1) == 1) {
return $clinit_10() , MIN_VALUE;
}
else {
return $clinit_10() , ZERO;
}
}
function neg(a){
var newHigh, newLow;
if (eq(a, ($clinit_10() , MIN_VALUE))) {
return MIN_VALUE;
}
newHigh = -a[1];
newLow = -a[0];
if (newLow > 4294967295) {
newLow -= 4294967296;
newHigh += 4294967296;
}
if (newLow < 0) {
newLow += 4294967296;
newHigh -= 4294967296;
}
return [newLow, newHigh];
}
function pwrAsDouble(n){
if (n <= 30) {
return 1 << n;
}
else {
return pwrAsDouble(30) * pwrAsDouble(n - 30);
}
}
function shl(a, n){
var diff, newHigh, newLow, twoToN;
n &= 63;
if (eq(a, ($clinit_10() , MIN_VALUE))) {
if (n == 0) {
return a;
}
else {
return ZERO;
}
}
if (a[1] < 0) {
return neg(shl(neg(a), n));
}
twoToN = pwrAsDouble(n);
newHigh = a[1] * twoToN % 1.8446744073709552E19;
newLow = a[0] * twoToN;
diff = newLow - newLow % 4294967296;
newHigh += diff;
newLow -= diff;
if (newHigh >= 9223372036854775807) {
newHigh -= 1.8446744073709552E19;
}
return [newLow, newHigh];
}
function shr(a, n){
var newHigh, newLow, shiftFact;
n &= 63;
shiftFact = pwrAsDouble(n);
newHigh = a[1] / shiftFact;
newLow = Math.floor(a[0] / shiftFact);
return create(newLow, newHigh);
}
function shru(a, n){
var sr;
n &= 63;
sr = shr(a, n);
if (a[1] < 0) {
sr = add(sr, shl(($clinit_10() , TWO), 63 - n));
}
return sr;
}
function sub(a, b){
var newHigh, newLow;
newHigh = a[1] - b[1];
newLow = a[0] - b[0];
return create(newLow, newHigh);
}
function toDoubleRoundDown(a){
var diff, magnitute, toSubtract;
magnitute = round_int(Math.log(a[1]) / ($clinit_10() , LN_2));
if (magnitute <= 48) {
return a[1] + a[0];
}
else {
diff = magnitute - 48;
toSubtract = (1 << diff) - 1;
return a[1] + (a[0] - toSubtract);
}
}
function toDoubleRoundUp(a){
var diff, magnitute, toAdd;
magnitute = round_int(Math.log(a[1]) / ($clinit_10() , LN_2));
if (magnitute <= 48) {
return a[1] + a[0];
}
else {
diff = magnitute - 48;
toAdd = (1 << diff) - 1;
return a[1] + (a[0] + toAdd);
}
}
function toString_0(a){
var digits, rem, remDivTenPower, res, tenPowerLong, zeroesNeeded;
if (a[0] == 0 && a[1] == 0) {
return '0';
}
if (eq(a, ($clinit_10() , MIN_VALUE))) {
return '-9223372036854775808';
}
if (a[1] < 0) {
return '-' + toString_0(neg(a));
}
rem = a;
res = '';
while (!(rem[0] == 0 && rem[1] == 0)) {
tenPowerLong = fromInt(1000000000);
remDivTenPower = div(rem, tenPowerLong);
digits = '' + lowBits_0(sub(rem, mul(remDivTenPower, tenPowerLong)));
rem = remDivTenPower;
if (!(rem[0] == 0 && rem[1] == 0)) {
zeroesNeeded = 9 - digits.length;
for (; zeroesNeeded > 0; --zeroesNeeded) {
digits = '0' + digits;
}
}
res = digits + res;
}
return res;
}
function $clinit_9(){
$clinit_9 = nullMethod;
boxedValues = initDim(_3_3D_classLit, 0, 9, 256, 0);
}
var boxedValues;
function $clinit_10(){
$clinit_10 = nullMethod;
LN_2 = Math.log(2);
MAX_VALUE = P7fffffffffffffff_longLit;
MIN_VALUE = N8000000000000000_longLit;
NEG_ONE = fromInt(-1);
ONE = fromInt(1);
TWO = fromInt(2);
TWO_PWR_24 = P1000000_longLit;
ZERO = fromInt(0);
}
var LN_2, MAX_VALUE, MIN_VALUE, NEG_ONE, ONE, TWO, TWO_PWR_24, ZERO;
function getClass_6(){
return Ljava_io_InputStream_2_classLit;
}
function InputStream(){
}
_ = InputStream.prototype = new Object_0();
_.getClass$ = getClass_6;
_.typeId$ = 0;
function $ByteArrayInputStream(this$static, buf){
$ByteArrayInputStream_0(this$static, buf, 0, buf.length);
return this$static;
}
function $ByteArrayInputStream_0(this$static, buf, off, len){
this$static.buf = buf;
this$static.pos = off;
this$static.count = off + len;
if (this$static.count > buf.length)
this$static.count = buf.length;
return this$static;
}
function $read(this$static){
if (this$static.pos >= this$static.count)
return -1;
return this$static.buf[this$static.pos++] & 255;
}
function $read_0(this$static, buf, off, len){
if (this$static.pos >= this$static.count)
return -1;
len = min(len, this$static.count - this$static.pos);
arraycopy(this$static.buf, this$static.pos, buf, off, len);
this$static.pos += len;
return len;
}
function getClass_3(){
return Ljava_io_ByteArrayInputStream_2_classLit;
}
function ByteArrayInputStream(){
}
_ = ByteArrayInputStream.prototype = new InputStream();
_.getClass$ = getClass_3;
_.typeId$ = 0;
_.buf = null;
_.count = 0;
_.pos = 0;
function getClass_7(){
return Ljava_io_OutputStream_2_classLit;
}
function OutputStream(){
}
_ = OutputStream.prototype = new Object_0();
_.getClass$ = getClass_7;
_.typeId$ = 0;
function $ByteArrayOutputStream(this$static){
this$static.buf = initDim(_3B_classLit, 0, -1, 32, 1);
return this$static;
}
function $ensureCapacity(this$static, len){
var newbuf;
if (len <= this$static.buf.length)
return;
len = max(len, this$static.buf.length * 2);
newbuf = initDim(_3B_classLit, 0, -1, len, 1);
arraycopy(this$static.buf, 0, newbuf, 0, this$static.buf.length);
this$static.buf = newbuf;
}
function $toByteArray(this$static){
var data;
data = initDim(_3B_classLit, 0, -1, this$static.count, 1);
arraycopy(this$static.buf, 0, data, 0, this$static.count);
return data;
}
function $write(this$static, b){
$ensureCapacity(this$static, this$static.count + 1);
this$static.buf[this$static.count++] = b << 24 >> 24;
}
function $write_0(this$static, buf, off, len){
$ensureCapacity(this$static, this$static.count + len);
arraycopy(buf, off, this$static.buf, this$static.count, len);
this$static.count += len;
}
function getClass_4(){
return Ljava_io_ByteArrayOutputStream_2_classLit;
}
function ByteArrayOutputStream(){
}
_ = ByteArrayOutputStream.prototype = new OutputStream();
_.getClass$ = getClass_4;
_.typeId$ = 0;
_.buf = null;
_.count = 0;
function $IOException(this$static, message){
this$static.detailMessage = message;
return this$static;
}
function getClass_5(){
return Ljava_io_IOException_2_classLit;
}
function IOException(){
}
_ = IOException.prototype = new Exception();
_.getClass$ = getClass_5;
_.typeId$ = 7;
function $ArithmeticException(this$static, explanation){
this$static.detailMessage = explanation;
return this$static;
}
function getClass_8(){
return Ljava_lang_ArithmeticException_2_classLit;
}
function ArithmeticException(){
}
_ = ArithmeticException.prototype = new RuntimeException();
_.getClass$ = getClass_8;
_.typeId$ = 8;
function $ArrayStoreException(this$static, message){
this$static.detailMessage = message;
return this$static;
}
function getClass_9(){
return Ljava_lang_ArrayStoreException_2_classLit;
}
function ArrayStoreException(){
}
_ = ArrayStoreException.prototype = new RuntimeException();
_.getClass$ = getClass_9;
_.typeId$ = 9;
function createForArray(packageName, className){
var clazz;
clazz = new Class();
clazz.typeName = packageName + className;
return clazz;
}
function createForClass(packageName, className){
var clazz;
clazz = new Class();
clazz.typeName = packageName + className;
return clazz;
}
function createForEnum(packageName, className){
var clazz;
clazz = new Class();
clazz.typeName = packageName + className;
return clazz;
}
function getClass_11(){
return Ljava_lang_Class_2_classLit;
}
function Class(){
}
_ = Class.prototype = new Object_0();
_.getClass$ = getClass_11;
_.typeId$ = 0;
_.typeName = null;
function getClass_10(){
return Ljava_lang_ClassCastException_2_classLit;
}
function ClassCastException(){
}
_ = ClassCastException.prototype = new RuntimeException();
_.getClass$ = getClass_10;
_.typeId$ = 12;
function getClass_12(){
return Ljava_lang_Enum_2_classLit;
}
function Enum(){
}
_ = Enum.prototype = new Object_0();
_.getClass$ = getClass_12;
_.typeId$ = 0;
function $IllegalArgumentException(this$static, message){
this$static.detailMessage = message;
return this$static;
}
function getClass_14(){
return Ljava_lang_IllegalArgumentException_2_classLit;
}
function IllegalArgumentException(){
}
_ = IllegalArgumentException.prototype = new RuntimeException();
_.getClass$ = getClass_14;
_.typeId$ = 13;
function getClass_15(){
return Ljava_lang_IllegalStateException_2_classLit;
}
function IllegalStateException(){
}
_ = IllegalStateException.prototype = new RuntimeException();
_.getClass$ = getClass_15;
_.typeId$ = 14;
function getClass_16(){
return Ljava_lang_IndexOutOfBoundsException_2_classLit;
}
function IndexOutOfBoundsException(){
}
_ = IndexOutOfBoundsException.prototype = new RuntimeException();
_.getClass$ = getClass_16;
_.typeId$ = 15;
function max(x, y){
return x > y?x:y;
}
function min(x, y){
return x < y?x:y;
}
function getClass_17(){
return Ljava_lang_NullPointerException_2_classLit;
}
function NullPointerException(){
}
_ = NullPointerException.prototype = new RuntimeException();
_.getClass$ = getClass_17;
_.typeId$ = 16;
function $equals(this$static, other){
if (other == null) {
return false;
}
return String(this$static) == other;
}
function $getChars(this$static, srcBegin, srcEnd, dst, dstBegin){
var srcIdx;
for (srcIdx = srcBegin; srcIdx < srcEnd; ++srcIdx) {
dst[dstBegin++] = this$static.charCodeAt(srcIdx);
}
}
function getClass_21(){
return Ljava_lang_String_2_classLit;
}
_ = String.prototype;
_.getClass$ = getClass_21;
_.typeId$ = 2;
function $StringBuilder(this$static){
var array;
this$static.data = (array = [] , array.explicitLength = 0 , array);
return this$static;
}
function getClass_20(){
return Ljava_lang_StringBuilder_2_classLit;
}
function StringBuilder(){
}
_ = StringBuilder.prototype = new Object_0();
_.getClass$ = getClass_20;
_.typeId$ = 0;
function arraycopy(src, srcOfs, dest, destOfs, len) {
var destArray, destEnd, destTypeName, destlen, i, srcArray, srcTypeName, srclen;
if (src == null || dest == null) {
throw new NullPointerException();
}
srcTypeName = (src.typeMarker$ == nullMethod || src.typeId$ == 2 ? src.getClass$() : Lcom_google_gwt_core_client_JavaScriptObject_2_classLit).typeName;
destTypeName = (dest.typeMarker$ == nullMethod || dest.typeId$ == 2 ? dest.getClass$() : Lcom_google_gwt_core_client_JavaScriptObject_2_classLit).typeName;
if (srcTypeName.charCodeAt(0) != 91 || destTypeName.charCodeAt(0) != 91) {
throw $ArrayStoreException(new ArrayStoreException(), 'Must be array types');
}
if (srcTypeName.charCodeAt(1) != destTypeName.charCodeAt(1)) {
throw $ArrayStoreException(new ArrayStoreException(), 'Array types must match');
}
srclen = src.length;
destlen = dest.length;
if (srcOfs < 0 || destOfs < 0 || len < 0 || srcOfs + len > srclen || destOfs + len > destlen) {
throw new IndexOutOfBoundsException();
}
if ((srcTypeName.charCodeAt(1) == 76 || srcTypeName.charCodeAt(1) == 91) && !$equals(srcTypeName, destTypeName)) {
srcArray = dynamicCast(src, 3);
destArray = dynamicCast(dest, 3);
if ((src == null ? null : src) === (dest == null ? null : dest) && srcOfs < destOfs) {
srcOfs += len;
for (destEnd = destOfs + len; destEnd-- > destOfs;) {
setCheck(destArray, destEnd, srcArray[--srcOfs]);
}
} else {
for (destEnd = destOfs + len; destOfs < destEnd;) {
setCheck(destArray, destOfs++, srcArray[srcOfs++]);
}
}
} else {
for (i = 0; i < len; ++i) {
dest[destOfs + i] = src[srcOfs + i]
}
}
}
function $configure(this$static, encoder){
if (!$SetDictionarySize_0(encoder, 1 << this$static.dictionarySize))
throw $RuntimeException(new RuntimeException(), 'unexpected failure');
if (!$SetNumFastBytes(encoder, this$static.fb))
throw $RuntimeException(new RuntimeException(), 'unexpected failure');
if (!$SetMatchFinder(encoder, this$static.matchFinder))
throw $RuntimeException(new RuntimeException(), 'unexpected failure');
if (!$SetLcLpPb_0(encoder, this$static.lc, this$static.lp, this$static.pb))
throw $RuntimeException(new RuntimeException(), 'unexpected failure');
}
function getClass_23(){
return Lorg_dellroad_lzma_client_CompressionMode_2_classLit;
}
function CompressionMode(){
}
_ = CompressionMode.prototype = new Enum();
_.getClass$ = getClass_23;
_.typeId$ = 0;
_.dictionarySize = 0;
_.fb = 0;
_.lc = 0;
_.lp = 0;
_.matchFinder = 0;
_.pb = 0;
function $execute(this$static){
var $e0;
try {
return $processChunk(this$static.chunker);
}
catch ($e0) {
$e0 = caught($e0);
if (instanceOf($e0, 10)) {
return false;
}
else
throw $e0;