1
2
3
4
5
6
7 package org.htmlunit.util.brotli;
8
9 import java.io.InputStream;
10
11 final class State {
12 byte[] ringBuffer;
13 byte[] contextModes;
14 byte[] contextMap;
15 byte[] distContextMap;
16 byte[] distExtraBits;
17 byte[] output;
18 byte[] byteBuffer;
19
20 short[] shortBuffer;
21
22 int[] intBuffer;
23 int[] rings;
24 int[] blockTrees;
25 int[] literalTreeGroup;
26 int[] commandTreeGroup;
27 int[] distanceTreeGroup;
28 int[] distOffset;
29
30 long accumulator64;
31
32 int runningState;
33 int nextRunningState;
34 int accumulator32;
35 int bitOffset;
36 int halfOffset;
37 int tailBytes;
38 int endOfStreamReached;
39 int metaBlockLength;
40 int inputEnd;
41 int isUncompressed;
42 int isMetadata;
43 int literalBlockLength;
44 int numLiteralBlockTypes;
45 int commandBlockLength;
46 int numCommandBlockTypes;
47 int distanceBlockLength;
48 int numDistanceBlockTypes;
49 int pos;
50 int maxDistance;
51 int distRbIdx;
52 int trivialLiteralContext;
53 int literalTreeIdx;
54 int commandTreeIdx;
55 int j;
56 int insertLength;
57 int contextMapSlice;
58 int distContextMapSlice;
59 int contextLookupOffset1;
60 int contextLookupOffset2;
61 int distanceCode;
62 int numDirectDistanceCodes;
63 int distancePostfixBits;
64 int distance;
65 int copyLength;
66 int maxBackwardDistance;
67 int maxRingBufferSize;
68 int ringBufferSize;
69 int expectedTotalSize;
70 int outputOffset;
71 int outputLength;
72 int outputUsed;
73 int ringBufferBytesWritten;
74 int ringBufferBytesReady;
75 int isEager;
76 int isLargeWindow;
77
78
79 int cdNumChunks;
80 int cdTotalSize;
81 int cdBrIndex;
82 int cdBrOffset;
83 int cdBrLength;
84 int cdBrCopied;
85 byte[][] cdChunks;
86 int[] cdChunkOffsets;
87 int cdBlockBits;
88 byte[] cdBlockMap;
89
90 InputStream input = Utils.makeEmptyInput();
91
92 State() {
93 this.ringBuffer = new byte[0];
94 this.rings = new int[10];
95 this.rings[0] = 16;
96 this.rings[1] = 15;
97 this.rings[2] = 11;
98 this.rings[3] = 4;
99 }
100 }