blob: 7bcf0705d33f28bccba87f53a66208fae197e681 (
plain)
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
|
/* Copyright 2015 Google Inc. All Rights Reserved.
Distributed under MIT license.
See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
*/
package org.brotli.dec;
import java.io.InputStream;
final class State {
byte[] ringBuffer;
byte[] contextModes;
byte[] contextMap;
byte[] distContextMap;
byte[] distExtraBits;
byte[] output;
byte[] byteBuffer; // BitReader
short[] shortBuffer; // BitReader
int[] intBuffer; // BitReader
int[] rings;
int[] blockTrees;
int[] literalTreeGroup;
int[] commandTreeGroup;
int[] distanceTreeGroup;
int[] distOffset;
long accumulator64; // BitReader: pre-fetched bits.
int runningState; // Default value is 0 == Decode.UNINITIALIZED
int nextRunningState;
int accumulator32; // BitReader: pre-fetched bits.
int bitOffset; // BitReader: bit-reading position in accumulator.
int halfOffset; // BitReader: offset of next item in intBuffer/shortBuffer.
int tailBytes; // BitReader: number of bytes in unfinished half.
int endOfStreamReached; // BitReader: input stream is finished.
int metaBlockLength;
int inputEnd;
int isUncompressed;
int isMetadata;
int literalBlockLength;
int numLiteralBlockTypes;
int commandBlockLength;
int numCommandBlockTypes;
int distanceBlockLength;
int numDistanceBlockTypes;
int pos;
int maxDistance;
int distRbIdx;
int trivialLiteralContext;
int literalTreeIdx;
int commandTreeIdx;
int j;
int insertLength;
int contextMapSlice;
int distContextMapSlice;
int contextLookupOffset1;
int contextLookupOffset2;
int distanceCode;
int numDirectDistanceCodes;
int distancePostfixBits;
int distance;
int copyLength;
int maxBackwardDistance;
int maxRingBufferSize;
int ringBufferSize;
int expectedTotalSize;
int outputOffset;
int outputLength;
int outputUsed;
int ringBufferBytesWritten;
int ringBufferBytesReady;
int isEager;
int isLargeWindow;
// Compound dictionary
int cdNumChunks;
int cdTotalSize;
int cdBrIndex;
int cdBrOffset;
int cdBrLength;
int cdBrCopied;
byte[][] cdChunks;
int[] cdChunkOffsets;
int cdBlockBits;
byte[] cdBlockMap;
InputStream input; // BitReader
State() {
this.ringBuffer = new byte[0];
this.rings = new int[10];
this.rings[0] = 16;
this.rings[1] = 15;
this.rings[2] = 11;
this.rings[3] = 4;
}
}
|