forward → len (12.938)forward
...
323: */
324: public int getByte(int forward, int backward) {
325: return buf[readPos + forward - backward] & 0xFF;
326: }
...
niceLen ([-1, '', ':call:len'])
...
29: BT4(int dictSize, int beforeSizeMin, int readAheadMax,
30: int niceLen, int matchLenMax, int depthLimit,
31: ArrayCache arrayCache) {
32: super(dictSize, beforeSizeMin, readAheadMax, niceLen, matchLenMax,
33: arrayCache);
...
43: // space for one-byte matches.
44: matches = new Matches(niceLen - 1);
45:
46: this.depthLimit = depthLimit > 0 ? depthLimit : 16 + niceLen / 2;
47: }
...
...
121: int dictSize, int extraSizeBefore, int extraSizeAfter,
122: int niceLen, int matchLenMax, int mf, int depthLimit,
123: ArrayCache arrayCache) {
...
130: return new BT4(dictSize, extraSizeBefore, extraSizeAfter,
131: niceLen, matchLenMax, depthLimit, arrayCache);
132: }
...
...
67: options.getMode(),
68: dictSize, 0, options.getNiceLen(),
69: options.getMatchFinder(), options.getDepthLimit(),
...
...
94: int dictSize, int extraSizeBefore,
95: int niceLen, int mf, int depthLimit,
96: ArrayCache arrayCache) {
...
100: dictSize, extraSizeBefore,
101: niceLen, mf, depthLimit,
102: arrayCache);
...
...
31: int dictSize, int extraSizeBefore,
32: int niceLen, int mf, int depthLimit,
33: ArrayCache arrayCache) {
...
37: EXTRA_SIZE_AFTER,
38: niceLen, MATCH_LEN_MAX,
39: mf, depthLimit, arrayCache),
...
...
434: for (int rep = 0; rep < REPS; ++rep) {
435: int len = lz.getMatchLen(opts[optCur].reps[rep], lenLimit);
436: if (len < MATCH_LEN_MIN)
...
466: // Literal
467: int curByte = lz.getByte(len, 0);
468: int matchByte = lz.getByte(0); // lz.getByte(len, len)
...
...
323: */
324: public int getByte(int forward, int backward) {
325: return buf[readPos + forward - backward] & 0xFF;
326: }
...
len ([-1, '', ':ref_var:len'])
...
206:
207: public int read(byte[] buf, int off, int len) throws IOException {
208: if (endReached)
...
210:
211: int ret = filterChain.read(buf, off, len);
212:
...
234: // let it read end of payload marker(s).
235: if (ret < len || uncompressedSize == uncompressedSizeInHeader) {
236: if (filterChain.read() != -1)
...
...
825:
826: int ret = blockDecoder.read(buf, off, len);
827:
...
...
323: */
324: public int getByte(int forward, int backward) {
325: return buf[readPos + forward - backward] & 0xFF;
326: }
...
...
543: int matchByte = lz.getByte(0); // lz.getByte(len, len)
544: int prevByte = lz.getByte(len, 1);
545: int price = matchAndLenPrice
...
len ([-2, ':call:len', '#this:ref_field:lz'])
...
712:
713: int getPrice(int len, int posState) {
714: return prices[posState][len - MATCH_LEN_MIN];
715: }
...
...
534: int len2Limit = Math.min(niceLen, avail - len - 1);
535: int len2 = lz.getMatchLen(len + 1, dist, len2Limit);
536:
...
...
434: for (int rep = 0; rep < REPS; ++rep) {
435: int len = lz.getMatchLen(opts[optCur].reps[rep], lenLimit);
436: if (len < MATCH_LEN_MIN)
...
in → buf (5.189)in
...
16:
17: public void encode(byte[] in, int in_off, int len, byte[] out) {
18: for (int i = 0; i < len; ++i) {
19: byte tmp = history[(distance + pos) & DISTANCE_MASK];
20: history[pos-- & DISTANCE_MASK] = in[in_off + i];
21: out[i] = (byte)(in[in_off + i] - tmp);
22: }
...
buf ([-1, '', ':ref_field:temp'])
...
206:
207: public int read(byte[] buf, int off, int len) throws IOException {
208: if (endReached)
...
210:
211: int ret = filterChain.read(buf, off, len);
212:
...
214: if (verifyCheck)
215: check.update(buf, off, ret);
216:
...
...
762: public int read() throws IOException {
763: return read(tempBuf, 0, 1) == -1 ? -1 : (tempBuf[0] & 0xFF);
764: }
...
796: */
797: public int read(byte[] buf, int off, int len) throws IOException {
798: if (off < 0 || len < 0 || off + len < 0 || off + len > buf.length)
...
825:
826: int ret = blockDecoder.read(buf, off, len);
827:
...
...
37: tempBuf[0] = (byte)b;
38: write(tempBuf, 0, 1);
39: }
40:
41: public void write(byte[] buf, int off, int len) throws IOException {
42: if (off < 0 || len < 0 || off + len < 0 || off + len > buf.length)
...
58:
59: delta.encode(buf, off, len, filterBuf);
60: out.write(filterBuf, 0, len);
...
...
16:
17: public void encode(byte[] in, int in_off, int len, byte[] out) {
18: for (int i = 0; i < len; ++i) {
...
20: history[pos-- & DISTANCE_MASK] = in[in_off + i];
21: out[i] = (byte)(in[in_off + i] - tmp);
22: }
...
buf ([-1, '', ':ref_var:buf'])
...
206:
207: public int read(byte[] buf, int off, int len) throws IOException {
208: if (endReached)
...
210:
211: int ret = filterChain.read(buf, off, len);
212:
...
214: if (verifyCheck)
215: check.update(buf, off, ret);
216:
...
...
52: while (true) {
53: int size = System.in.read(buf, 0, Math.min(buf.length, left));
54: if (size == -1)
...
...
52: while (len > FILTER_BUF_SIZE) {
53: delta.encode(buf, off, FILTER_BUF_SIZE, filterBuf);
54: out.write(filterBuf);
...
...
16:
17: public void encode(byte[] in, int in_off, int len, byte[] out) {
18: for (int i = 0; i < len; ++i) {
...
20: history[pos-- & DISTANCE_MASK] = in[in_off + i];
21: out[i] = (byte)(in[in_off + i] - tmp);
22: }
...
buf ([-1, '', ':ref_field:buf'])
...
206:
207: public int read(byte[] buf, int off, int len) throws IOException {
208: if (endReached)
...
210:
211: int ret = filterChain.read(buf, off, len);
212:
...
214: if (verifyCheck)
215: check.update(buf, off, ret);
216:
...
...
762: public int read() throws IOException {
763: return read(tempBuf, 0, 1) == -1 ? -1 : (tempBuf[0] & 0xFF);
764: }
...
796: */
797: public int read(byte[] buf, int off, int len) throws IOException {
798: if (off < 0 || len < 0 || off + len < 0 || off + len > buf.length)
...
825:
826: int ret = blockDecoder.read(buf, off, len);
827:
...
...
37: tempBuf[0] = (byte)b;
38: write(tempBuf, 0, 1);
39: }
40:
41: public void write(byte[] buf, int off, int len) throws IOException {
42: if (off < 0 || len < 0 || off + len < 0 || off + len > buf.length)
...
58:
59: delta.encode(buf, off, len, filterBuf);
60: out.write(filterBuf, 0, len);
...
...
16:
17: public void encode(byte[] in, int in_off, int len, byte[] out) {
18: for (int i = 0; i < len; ++i) {
...
20: history[pos-- & DISTANCE_MASK] = in[in_off + i];
21: out[i] = (byte)(in[in_off + i] - tmp);
22: }
...
in → buf (4.519)in
...
196: */
197: public int fillWindow(byte[] in, int off, int len) {
198: assert !finishing;
...
208:
209: System.arraycopy(in, off, buf, writePos, len);
210: writePos += len;
...
buf ([-1, '', ':ref_field:temp'])
...
206:
207: public int read(byte[] buf, int off, int len) throws IOException {
208: if (endReached)
...
210:
211: int ret = filterChain.read(buf, off, len);
212:
...
214: if (verifyCheck)
215: check.update(buf, off, ret);
216:
...
...
762: public int read() throws IOException {
763: return read(tempBuf, 0, 1) == -1 ? -1 : (tempBuf[0] & 0xFF);
764: }
...
796: */
797: public int read(byte[] buf, int off, int len) throws IOException {
798: if (off < 0 || len < 0 || off + len < 0 || off + len > buf.length)
...
825:
826: int ret = blockDecoder.read(buf, off, len);
827:
...
...
232: tempBuf[0] = (byte)b;
233: write(tempBuf, 0, 1);
234: }
235:
236: public void write(byte[] buf, int off, int len) throws IOException {
237: if (off < 0 || len < 0 || off + len < 0 || off + len > buf.length)
...
254: while (len > 0) {
255: int used = lz.fillWindow(buf, off, len);
256: off += used;
...
...
196: */
197: public int fillWindow(byte[] in, int off, int len) {
198: assert !finishing;
...
208:
209: System.arraycopy(in, off, buf, writePos, len);
210: writePos += len;
...
buf ([-1, '', ':ref_var:buf'])
...
206:
207: public int read(byte[] buf, int off, int len) throws IOException {
208: if (endReached)
...
210:
211: int ret = filterChain.read(buf, off, len);
212:
...
214: if (verifyCheck)
215: check.update(buf, off, ret);
216:
...
...
52: while (true) {
53: int size = System.in.read(buf, 0, Math.min(buf.length, left));
54: if (size == -1)
...
...
51: while ((size = System.in.read(buf)) != -1)
52: encoder.write(buf, 0, size);
53:
...
...
235:
236: public void write(byte[] buf, int off, int len) throws IOException {
237: if (off < 0 || len < 0 || off + len < 0 || off + len > buf.length)
...
254: while (len > 0) {
255: int used = lz.fillWindow(buf, off, len);
256: off += used;
...
...
196: */
197: public int fillWindow(byte[] in, int off, int len) {
198: assert !finishing;
...
208:
209: System.arraycopy(in, off, buf, writePos, len);
210: writePos += len;
...
buf ([-1, '', ':ref_field:buf'])
...
206:
207: public int read(byte[] buf, int off, int len) throws IOException {
208: if (endReached)
...
210:
211: int ret = filterChain.read(buf, off, len);
212:
...
214: if (verifyCheck)
215: check.update(buf, off, ret);
216:
...
...
762: public int read() throws IOException {
763: return read(tempBuf, 0, 1) == -1 ? -1 : (tempBuf[0] & 0xFF);
764: }
...
796: */
797: public int read(byte[] buf, int off, int len) throws IOException {
798: if (off < 0 || len < 0 || off + len < 0 || off + len > buf.length)
...
825:
826: int ret = blockDecoder.read(buf, off, len);
827:
...
...
232: tempBuf[0] = (byte)b;
233: write(tempBuf, 0, 1);
234: }
235:
236: public void write(byte[] buf, int off, int len) throws IOException {
237: if (off < 0 || len < 0 || off + len < 0 || off + len > buf.length)
...
254: while (len > 0) {
255: int used = lz.fillWindow(buf, off, len);
256: off += used;
...
...
196: */
197: public int fillWindow(byte[] in, int off, int len) {
198: assert !finishing;
...
208:
209: System.arraycopy(in, off, buf, writePos, len);
210: writePos += len;
...
file → name (4.477)file
...
30: */
31: public SeekableFileInputStream(File file) throws FileNotFoundException {
32: randomAccessFile = new RandomAccessFile(file, "r");
33: }
...
name ([1, '', '#arg0:new:file'])
...
22: byte[] buf = new byte[8192];
23: String name = null;
24:
...
26: if (args.length == 0) {
27: name = "standard input";
28:
...
39: for (int i = 0; i < args.length; ++i) {
40: name = args[i];
41: InputStream in = new FileInputStream(name);
42:
...
64: } catch (FileNotFoundException e) {
65: System.err.println("LZMADecDemo: Cannot open " + name + ": "
66: + e.getMessage());
...
70: System.err.println("LZMADecDemo: Unexpected end of input on "
71: + name);
72: System.exit(1);
...
75: System.err.println("LZMADecDemo: Error decompressing from "
76: + name + ": " + e.getMessage());
77: System.exit(1);
...
...
31: public SeekableFileInputStream(File file) throws FileNotFoundException {
32: randomAccessFile = new RandomAccessFile(file, "r");
33: }
...
name ([1, '', '#arg0:new:access'])
...
38: */
39: public SeekableFileInputStream(String name) throws FileNotFoundException {
40: randomAccessFile = new RandomAccessFile(name, "r");
41: }
...
...
31: public SeekableFileInputStream(File file) throws FileNotFoundException {
32: randomAccessFile = new RandomAccessFile(file, "r");
33: }
...
name ([2, '#arg0:new:file', 'R:op_assign:='])
...
38: */
39: public SeekableFileInputStream(String name) throws FileNotFoundException {
40: randomAccessFile = new RandomAccessFile(name, "r");
41: }
...
...
31: public SeekableFileInputStream(File file) throws FileNotFoundException {
32: randomAccessFile = new RandomAccessFile(file, "r");
33: }
...
in → data / in (3.514)in
...
34:
35: public void prepareInputBuffer(DataInputStream in, int len)
36: throws IOException {
...
39:
40: if (in.readUnsignedByte() != 0x00)
41: throw new CorruptedInputException();
42:
43: code = in.readInt();
44: range = 0xFFFFFFFF;
...
51: pos = buf.length - len;
52: in.readFully(buf, pos, len);
53: }
...
inData ([1, '', '#this:call:fully'])
...
452: this.in = in;
453: DataInputStream inData = new DataInputStream(in);
454:
...
458: byte[] buf = new byte[XZ.HEADER_MAGIC.length];
459: inData.readFully(buf);
460: if (!Arrays.equals(buf, XZ.HEADER_MAGIC))
...
479: in.seek(pos - DecoderUtil.STREAM_HEADER_SIZE);
480: inData.readFully(buf);
481:
...
548: // Decode the Stream Header.
549: inData.readFully(buf);
550: StreamFlags streamHeader = DecoderUtil.decodeStreamHeader(buf);
...
...
51: pos = buf.length - len;
52: in.readFully(buf, pos, len);
53: }
...
inData ([1, '', '#this:call:unsigned'])
...
295: ArrayCache arrayCache) throws IOException {
296: DataInputStream inData = new DataInputStream(in);
297:
298: // Properties byte (lc, lp, and pb)
299: byte propsByte = inData.readByte();
300:
...
303: for (int i = 0; i < 4; ++i)
304: dictSize |= inData.readUnsignedByte() << (8 * i);
305:
...
311: for (int i = 0; i < 8; ++i)
312: uncompSize |= (long)inData.readUnsignedByte() << (8 * i);
313:
...
...
39:
40: if (in.readUnsignedByte() != 0x00)
41: throw new CorruptedInputException();
...
inData ([-2, ':ref_field:in', ':catchjoin'])
...
112:
113: public void copyUncompressed(DataInputStream inData, int len)
114: throws IOException {
115: int copySize = Math.min(bufSize - pos, len);
116: inData.readFully(buf, pos, copySize);
117: pos += copySize;
...
...
210:
211: int ret = filterChain.read(buf, off, len);
212:
...
...
210:
211: int ret = filterChain.read(buf, off, len);
212:
...
ret → size (3.338)ret
...
36: public int read(byte[] b, int off, int len) throws IOException {
37: int ret = in.read(b, off, len);
38: if (ret > 0 && size >= 0)
39: size += ret;
40:
41: return ret;
42: }
...
size ([1, '', 'R:op_assign:+='])
...
50: int size;
51: while ((size = System.in.read(buf)) != -1)
52: encoder.write(buf, 0, size);
53:
...
...
235:
236: public void write(byte[] buf, int off, int len) throws IOException {
237: if (off < 0 || len < 0 || off + len < 0 || off + len > buf.length)
...
250:
251: currentUncompressedSize += len;
252:
...
...
38: if (ret > 0 && size >= 0)
39: size += ret;
40:
...
size ([-2, ':call:read', '#arg0:ref_var:b'])
...
29: int ret = in.read();
30: if (ret != -1 && size >= 0)
31: ++size;
32:
...
36: public int read(byte[] b, int off, int len) throws IOException {
37: int ret = in.read(b, off, len);
38: if (ret > 0 && size >= 0)
39: size += ret;
40:
...
44: public long getSize() {
45: return size;
46: }
...
...
36: public int read(byte[] b, int off, int len) throws IOException {
37: int ret = in.read(b, off, len);
38: if (ret > 0 && size >= 0)
...
size ([-2, ':call:read', '#arg1:ref_var:off'])
...
29: int ret = in.read();
30: if (ret != -1 && size >= 0)
31: ++size;
32:
...
36: public int read(byte[] b, int off, int len) throws IOException {
37: int ret = in.read(b, off, len);
38: if (ret > 0 && size >= 0)
39: size += ret;
40:
...
44: public long getSize() {
45: return size;
46: }
...
...
36: public int read(byte[] b, int off, int len) throws IOException {
37: int ret = in.read(b, off, len);
38: if (ret > 0 && size >= 0)
...
is / rep / long → match (3.213)isRep0Long
...
102: if (rc.decodeBit(isRep0, state.get()) == 0) {
103: if (rc.decodeBit(isRep0Long[state.get()], posState) == 0) {
104: state.updateShortRep();
...
...
355: rc.encodeBit(isRep0, state.get(), 0);
356: rc.encodeBit(isRep0Long[state.get()], posState, len == 1 ? 0 : 1);
357: } else {
...
423: + RangeEncoder.getBitPrice(
424: isRep0Long[state.get()][posState], 1);
425: } else {
...
...
78:
79: for (int i = 0; i < isRep0Long.length; ++i)
80: RangeCoder.initProbs(isRep0Long[i]);
81:
...
isMatch ([1, '', 'array:ref_array:%[S'])
...
233: int posState = (lz.getPos() - readAhead) & posMask;
234: rc.encodeBit(isMatch[state.get()], posState, 1);
235: rc.encodeBit(isRep, state.get(), 0);
...
269: skip(1);
270: rc.encodeBit(isMatch[state.get()], 0, 0);
271: literalEncoder.encodeInit();
...
293: assert len == 1;
294: rc.encodeBit(isMatch[state.get()], posState, 0);
295: literalEncoder.encode();
...
297: // Some type of match
298: rc.encodeBit(isMatch[state.get()], posState, 1);
299: if (back < REPS) {
...
397: int getAnyMatchPrice(State state, int posState) {
398: return RangeEncoder.getBitPrice(isMatch[state.get()][posState], 1);
399: }
...
568: int price = RangeEncoder.getBitPrice(
569: isMatch[state.get()][pos & posMask], 0);
570:
...
...
70:
71: for (int i = 0; i < isMatch.length; ++i)
72: RangeCoder.initProbs(isMatch[i]);
73:
...
...
54:
55: if (rc.decodeBit(isMatch[state.get()], posState) == 0) {
56: literalDecoder.decode();
...
...
79: for (int i = 0; i < isRep0Long.length; ++i)
80: RangeCoder.initProbs(isRep0Long[i]);
81:
...
isMatch ([3, '#arg0:call:bit', 'L:op_infix:=='])
...
233: int posState = (lz.getPos() - readAhead) & posMask;
234: rc.encodeBit(isMatch[state.get()], posState, 1);
235: rc.encodeBit(isRep, state.get(), 0);
...
269: skip(1);
270: rc.encodeBit(isMatch[state.get()], 0, 0);
271: literalEncoder.encodeInit();
...
293: assert len == 1;
294: rc.encodeBit(isMatch[state.get()], posState, 0);
295: literalEncoder.encode();
...
297: // Some type of match
298: rc.encodeBit(isMatch[state.get()], posState, 1);
299: if (back < REPS) {
...
397: int getAnyMatchPrice(State state, int posState) {
398: return RangeEncoder.getBitPrice(isMatch[state.get()][posState], 1);
399: }
...
568: int price = RangeEncoder.getBitPrice(
569: isMatch[state.get()][pos & posMask], 0);
570:
...
...
70:
71: for (int i = 0; i < isMatch.length; ++i)
72: RangeCoder.initProbs(isMatch[i]);
73:
...
...
54:
55: if (rc.decodeBit(isMatch[state.get()], posState) == 0) {
56: literalDecoder.decode();
...
...
102: if (rc.decodeBit(isRep0, state.get()) == 0) {
103: if (rc.decodeBit(isRep0Long[state.get()], posState) == 0) {
104: state.updateShortRep();
...
MATCH_LEN_MIN ([-1, '', 'obj:ref_field:len'])
...
123: int avail = Math.min(lz.getAvail(), MATCH_LEN_MAX);
124: if (avail < MATCH_LEN_MIN)
125: return 1;
...
131:
132: if (repLens[rep] < MATCH_LEN_MIN) {
133: repLens[rep] = 0;
...
169: // to have the byte encoded as a literal.
170: if (mainLen < MATCH_LEN_MIN && curByte != matchByte
171: && repLens[repBest] < MATCH_LEN_MIN)
172: return 1;
...
200: optEnd = Math.max(mainLen, repLens[repBest]);
201: if (optEnd < MATCH_LEN_MIN) {
202: assert optEnd == 0 : optEnd;
...
219: // Initialize the prices for latter opts that will be used below.
220: for (int i = optEnd; i >= MATCH_LEN_MIN; --i)
221: opts[i].reset();
...
225: int repLen = repLens[rep];
226: if (repLen < MATCH_LEN_MIN)
227: continue;
...
235: opts[repLen].set1(price, 0, rep);
236: } while (--repLen >= MATCH_LEN_MIN);
237: }
...
240: {
241: int len = Math.max(repLens[0] + 1, MATCH_LEN_MIN);
242: if (len <= mainLen) {
...
290:
291: if (avail >= MATCH_LEN_MIN) {
292: int startLen = calcLongRepPrices(pos, posState,
...
403: // try literal + long rep0.
404: if (!nextIsByte && matchByte != curByte && avail > MATCH_LEN_MIN) {
405: int lenLimit = Math.min(niceLen, avail - 1);
...
407:
408: if (len >= MATCH_LEN_MIN) {
409: nextState.set(opts[optCur].state);
...
430: int avail, int anyRepPrice) {
431: int startLen = MATCH_LEN_MIN;
432: int lenLimit = Math.min(avail, niceLen);
...
435: int len = lz.getMatchLen(opts[optCur].reps[rep], lenLimit);
436: if (len < MATCH_LEN_MIN)
437: continue;
...
444:
445: for (int i = len; i >= MATCH_LEN_MIN; --i) {
446: int price = longRepPrice
...
458:
459: if (len2 >= MATCH_LEN_MIN) {
460: // Rep
461: int price = longRepPrice
462: + repLenEncoder.getPrice(len, posState);
463: nextState.set(opts[optCur].state);
...
536:
537: if (len2 >= MATCH_LEN_MIN) {
538: nextState.set(opts[optCur].state);
...
...
188: if (rc.decodeBit(choice, 0) == 0)
189: return rc.decodeBitTree(low[posState]) + MATCH_LEN_MIN;
190:
...
192: return rc.decodeBitTree(mid[posState])
193: + MATCH_LEN_MIN + LOW_SYMBOLS;
194:
195: return rc.decodeBitTree(high)
196: + MATCH_LEN_MIN + LOW_SYMBOLS + MID_SYMBOLS;
197: }
...
...
60: int avail = Math.min(lz.getAvail(), MATCH_LEN_MAX);
61: if (avail < MATCH_LEN_MIN)
62: return 1;
...
68: int len = lz.getMatchLen(reps[rep], avail);
69: if (len < MATCH_LEN_MIN)
70: continue;
...
108:
109: if (mainLen == MATCH_LEN_MIN && mainDist >= 0x80)
110: mainLen = 1;
...
112:
113: if (bestRepLen >= MATCH_LEN_MIN) {
114: if (bestRepLen + 1 >= mainLen
...
122:
123: if (mainLen < MATCH_LEN_MIN || avail <= MATCH_LEN_MIN)
124: return 1;
...
138: || (newLen + 1 >= mainLen
139: && mainLen >= MATCH_LEN_MIN + 1
140: && changePair(newDist, mainDist)))
...
143:
144: int limit = Math.max(mainLen - 1, MATCH_LEN_MIN);
145: for (int rep = 0; rep < REPS; ++rep)
...
...
54: static final int getDistState(int len) {
55: return len < DIST_STATES + MATCH_LEN_MIN
56: ? len - MATCH_LEN_MIN
57: : DIST_STATES - 1;
...
...
235: rc.encodeBit(isRep, state.get(), 0);
236: encodeMatch(-1, MATCH_LEN_MIN, posState);
237: }
...
676: // usually needed anyway if niceLen < 18.
677: int lenSymbols = Math.max(niceLen - MATCH_LEN_MIN + 1,
678: LOW_SYMBOLS + MID_SYMBOLS);
...
691: void encode(int len, int posState) throws IOException {
692: len -= MATCH_LEN_MIN;
693:
...
713: int getPrice(int len, int posState) {
714: return prices[posState][len - MATCH_LEN_MIN];
715: }
...
...
34: literalDecoder.reset();
35: matchLenDecoder.reset();
36: repLenDecoder.reset();
...
...
79: for (int i = 0; i < isRep0Long.length; ++i)
80: RangeCoder.initProbs(isRep0Long[i]);
81:
...
required / for / flushing → len (2.933)requiredForFlushing
...
402: */
403: int movePos(int requiredForFlushing, int requiredForFinishing) {
404: assert requiredForFlushing >= requiredForFinishing;
...
408:
409: if (avail < requiredForFlushing) {
410: if (avail < requiredForFinishing || !finishing) {
...
matchLenMax ([-1, '', ':ref_field:len'])
...
29: BT4(int dictSize, int beforeSizeMin, int readAheadMax,
30: int niceLen, int matchLenMax, int depthLimit,
31: ArrayCache arrayCache) {
32: super(dictSize, beforeSizeMin, readAheadMax, niceLen, matchLenMax,
33: arrayCache);
...
...
121: int dictSize, int extraSizeBefore, int extraSizeAfter,
122: int niceLen, int matchLenMax, int mf, int depthLimit,
123: ArrayCache arrayCache) {
...
130: return new BT4(dictSize, extraSizeBefore, extraSizeAfter,
131: niceLen, matchLenMax, depthLimit, arrayCache);
132: }
...
...
49: EXTRA_SIZE_AFTER,
50: niceLen, MATCH_LEN_MAX,
51: mf, depthLimit, arrayCache),
...
...
402: */
403: int movePos(int requiredForFlushing, int requiredForFinishing) {
404: assert requiredForFlushing >= requiredForFinishing;
...
408:
409: if (avail < requiredForFlushing) {
410: if (avail < requiredForFinishing || !finishing) {
...
...
55: private int movePos() {
56: int avail = movePos(niceLen, 4);
57:
...
niceLenLimit ([-1, '', ':ref_field:nice'])
...
76: int matchLenLimit = matchLenMax;
77: int niceLenLimit = niceLen;
78: int avail = movePos();
...
84: matchLenLimit = avail;
85: if (niceLenLimit > avail)
86: niceLenLimit = avail;
87: }
...
128: // the dictionary).
129: if (lenBest >= niceLenLimit) {
130: skip(niceLenLimit, currentMatch);
131: return matches;
...
173:
174: if (len >= niceLenLimit) {
175: tree[ptr1] = tree[pair];
...
...
402: */
403: int movePos(int requiredForFlushing, int requiredForFinishing) {
404: assert requiredForFlushing >= requiredForFinishing;
...
408:
409: if (avail < requiredForFlushing) {
410: if (avail < requiredForFinishing || !finishing) {
...
...
55: private int movePos() {
56: int avail = movePos(niceLen, 4);
57:
...
niceLenLimit ([-2, ':ref_field:len', 'obj:ref_field:lz'])
...
76: int matchLenLimit = matchLenMax;
77: int niceLenLimit = niceLen;
78: int avail = movePos();
...
84: matchLenLimit = avail;
85: if (niceLenLimit > avail)
86: niceLenLimit = avail;
87: }
...
128: // the dictionary).
129: if (lenBest >= niceLenLimit) {
130: skip(niceLenLimit, currentMatch);
131: return matches;
...
173:
174: if (len >= niceLenLimit) {
175: tree[ptr1] = tree[pair];
...
...
386: ++readAhead;
387: Matches matches = lz.getMatches();
388: assert lz.verifyMatches(matches);
...
...
393: readAhead += len;
394: lz.skip(len);
395: }
...
empty → buf (2.476)empty
...
20: public byte[] finish() {
21: byte[] empty = new byte[0];
22: return empty;
23: }
...
buf ([2, ':return', '#arg0:call:equals'])
...
25: long value = state.getValue();
26: byte[] buf = { (byte)(value),
27: (byte)(value >>> 8),
28: (byte)(value >>> 16),
29: (byte)(value >>> 24) };
30: state.reset();
31: return buf;
32: }
...
...
82: || stored.indexListSize != indexListSize
83: || !Arrays.equals(stored.hash.finish(), hash.finish()))
84: throw new CorruptedInputException("XZ Index is corrupt");
...
...
82: || stored.indexListSize != indexListSize
83: || !Arrays.equals(stored.hash.finish(), hash.finish()))
84: throw new CorruptedInputException("XZ Index is corrupt");
...
buf ([2, ':return', '#arg1:call:equals'])
...
25: long value = state.getValue();
26: byte[] buf = { (byte)(value),
27: (byte)(value >>> 8),
28: (byte)(value >>> 16),
29: (byte)(value >>> 24) };
30: state.reset();
31: return buf;
32: }
...
...
82: || stored.indexListSize != indexListSize
83: || !Arrays.equals(stored.hash.finish(), hash.finish()))
84: throw new CorruptedInputException("XZ Index is corrupt");
...
...
82: || stored.indexListSize != indexListSize
83: || !Arrays.equals(stored.hash.finish(), hash.finish()))
84: throw new CorruptedInputException("XZ Index is corrupt");
...
buf ([-1, '', ':valueset:0'])
...
21: public static void main(String[] args) {
22: byte[] buf = new byte[8192];
23: String name = null;
...
33: int size;
34: while ((size = in.read(buf)) != -1)
35: System.out.write(buf, 0, size);
36:
...
53: int size;
54: while ((size = in.read(buf)) != -1)
55: System.out.write(buf, 0, size);
56:
...
...
20: public byte[] finish() {
21: byte[] empty = new byte[0];
22: return empty;
23: }
...
outbuf → buf / filter (1.824)outbuf
...
60: testdata, 0, testdataSize);
61: byte[] outbuf = new byte[8192];
62:
...
65: XZInputStream in = new XZInputStream(byteStream);
66: while (in.read(outbuf) > 0) {}
67: }
...
buf ([-1, '', ':valueset:0'])
...
21: public static void main(String[] args) {
22: byte[] buf = new byte[8192];
23: String name = null;
...
33: int size;
34: while ((size = in.read(buf)) != -1)
35: System.out.write(buf, 0, size);
36:
...
53: int size;
54: while ((size = in.read(buf)) != -1)
55: System.out.write(buf, 0, size);
56:
...
...
60: testdata, 0, testdataSize);
61: byte[] outbuf = new byte[8192];
62:
...
65: XZInputStream in = new XZInputStream(byteStream);
66: while (in.read(outbuf) > 0) {}
67: }
...
buf ([1, '', '#arg0:call:read'])
...
21: public static void main(String[] args) {
22: byte[] buf = new byte[8192];
23: String name = null;
...
33: int size;
34: while ((size = in.read(buf)) != -1)
35: System.out.write(buf, 0, size);
36:
...
53: int size;
54: while ((size = in.read(buf)) != -1)
55: System.out.write(buf, 0, size);
56:
...
...
65: XZInputStream in = new XZInputStream(byteStream);
66: while (in.read(outbuf) > 0) {}
67: }
...
buf ([2, '#arg0:call:read', 'L:op_infix:>'])
...
47:
48: byte[] buf = new byte[8192];
49: if (args.length == 1) {
50: int size;
51: while ((size = in.read(buf)) != -1)
52: System.out.write(buf, 0, size);
53: } else {
...
60: while (len > 0) {
61: int size = Math.min(len, buf.length);
62: size = in.read(buf, 0, size);
63:
...
68:
69: System.out.write(buf, 0, size);
70: len -= size;
...
...
430:
431: int ret = blockDecoder.read(buf, off, len);
432:
433: if (ret > 0) {
434: size += ret;
...
...
65: XZInputStream in = new XZInputStream(byteStream);
66: while (in.read(outbuf) > 0) {}
67: }
...
backward → uncompressed / size (1.801)backward
...
280:
281: public void copyUncompressed(OutputStream out, int backward, int len)
282: throws IOException {
283: out.write(buf, readPos + 1 - backward, len);
284: }
...
uncompressedSize ([-1, '', ':ref_var:uncompressed'])
...
126: if (compressedSize + 2 < uncompressedSize) {
127: writeLZMA(uncompressedSize, compressedSize);
128: } else {
...
139:
140: private void writeLZMA(int uncompressedSize, int compressedSize)
141: throws IOException {
...
155:
156: control |= (uncompressedSize - 1) >>> 16;
157: outData.writeByte(control);
158:
159: outData.writeShort(uncompressedSize - 1);
160: outData.writeShort(compressedSize - 1);
...
...
176: outData.writeShort(chunkSize - 1);
177: lz.copyUncompressed(out, uncompressedSize, chunkSize);
178: uncompressedSize -= chunkSize;
...
...
280:
281: public void copyUncompressed(OutputStream out, int backward, int len)
282: throws IOException {
283: out.write(buf, readPos + 1 - backward, len);
284: }
...
uncompressedSize ([2, 'R:op_infix:-', '#arg1:call:write'])
...
171:
172: private void writeUncompressed(int uncompressedSize) throws IOException {
173: while (uncompressedSize > 0) {
174: int chunkSize = Math.min(uncompressedSize, COMPRESSED_SIZE_MAX);
175: outData.writeByte(dictResetNeeded ? 0x01 : 0x02);
176: outData.writeShort(chunkSize - 1);
177: lz.copyUncompressed(out, uncompressedSize, chunkSize);
178: uncompressedSize -= chunkSize;
179: dictResetNeeded = false;
...
...
282: throws IOException {
283: out.write(buf, readPos + 1 - backward, len);
284: }
...
...
282: throws IOException {
283: out.write(buf, readPos + 1 - backward, len);
284: }
...
uncompressedSize ([-3, ':begin', 'init:ref_var:uncompressed'])
...
131: assert uncompressedSize > 0 : uncompressedSize;
132: writeUncompressed(uncompressedSize);
133: }
...
171:
172: private void writeUncompressed(int uncompressedSize) throws IOException {
173: while (uncompressedSize > 0) {
174: int chunkSize = Math.min(uncompressedSize, COMPRESSED_SIZE_MAX);
175: outData.writeByte(dictResetNeeded ? 0x01 : 0x02);
176: outData.writeShort(chunkSize - 1);
177: lz.copyUncompressed(out, uncompressedSize, chunkSize);
178: uncompressedSize -= chunkSize;
179: dictResetNeeded = false;
...
...
131: assert uncompressedSize > 0 : uncompressedSize;
132: writeUncompressed(uncompressedSize);
133: }
...
171:
172: private void writeUncompressed(int uncompressedSize) throws IOException {
173: while (uncompressedSize > 0) {
...
full / distances → dist / price (1.770)FULL_DISTANCES
...
451:
452: if (dist < FULL_DISTANCES) {
453: price += fullDistPrices[distState][dist];
...
DIST_MODEL_END ([-1, '', 'obj:ref_field:lzma'])
...
331:
332: if (distSlot < DIST_MODEL_END) {
333: rc.encodeReverseBitTree(
...
473:
474: for (int distSlot = DIST_MODEL_END; distSlot < distSlotPricesSize;
475: ++distSlot) {
...
486: int dist = DIST_MODEL_START;
487: for (int distSlot = DIST_MODEL_START; distSlot < DIST_MODEL_END;
488: ++distSlot) {
...
...
87:
88: if (distSlot < DIST_MODEL_END) {
89: reps[0] |= rc.decodeReverseBitTree(
...
...
224: while (pendingSize > 0) {
225: lzma.encodeForLZMA2();
226: writeChunk();
...
...
224: while (pendingSize > 0) {
225: lzma.encodeForLZMA2();
226: writeChunk();
...
...
451:
452: if (dist < FULL_DISTANCES) {
453: price += fullDistPrices[distState][dist];
...
DIST_MODEL_END ([-2, 'obj:ref_field:lzma', ':call:lzma'])
...
331:
332: if (distSlot < DIST_MODEL_END) {
333: rc.encodeReverseBitTree(
...
473:
474: for (int distSlot = DIST_MODEL_END; distSlot < distSlotPricesSize;
475: ++distSlot) {
...
486: int dist = DIST_MODEL_START;
487: for (int distSlot = DIST_MODEL_START; distSlot < DIST_MODEL_END;
488: ++distSlot) {
...
...
87:
88: if (distSlot < DIST_MODEL_END) {
89: reps[0] |= rc.decodeReverseBitTree(
...
...
45: OutputStream out = new BufferedOutputStream(System.out);
46: LZMAOutputStream encoder = new LZMAOutputStream(out, options,
47: inputSize);
48:
...
...
129: throws IOException {
130: this(out, options, inputSize, ArrayCache.getDefaultCache());
131: }
...
...
45: OutputStream out = new BufferedOutputStream(System.out);
46: LZMAOutputStream encoder = new LZMAOutputStream(out, options,
47: inputSize);
48:
...
...
129: throws IOException {
130: this(out, options, inputSize, ArrayCache.getDefaultCache());
131: }
...
DIST_MODEL_END ([-2, 'obj:ref_field:lzma', ':call:output'])
...
331:
332: if (distSlot < DIST_MODEL_END) {
333: rc.encodeReverseBitTree(
...
473:
474: for (int distSlot = DIST_MODEL_END; distSlot < distSlotPricesSize;
475: ++distSlot) {
...
486: int dist = DIST_MODEL_START;
487: for (int distSlot = DIST_MODEL_START; distSlot < DIST_MODEL_END;
488: ++distSlot) {
...
...
87:
88: if (distSlot < DIST_MODEL_END) {
89: reps[0] |= rc.decodeReverseBitTree(
...
...
45: OutputStream out = new BufferedOutputStream(System.out);
46: LZMAOutputStream encoder = new LZMAOutputStream(out, options,
47: inputSize);
48:
...
...
129: throws IOException {
130: this(out, options, inputSize, ArrayCache.getDefaultCache());
131: }
...
...
45: OutputStream out = new BufferedOutputStream(System.out);
46: LZMAOutputStream encoder = new LZMAOutputStream(out, options,
47: inputSize);
48:
...
...
129: throws IOException {
130: this(out, options, inputSize, ArrayCache.getDefaultCache());
131: }
...
top / mask → range (1.653)TOP_MASK
...
114:
115: if ((range & TOP_MASK) == 0) {
116: range <<= SHIFT_BITS;
...
189:
190: if ((range & TOP_MASK) == 0) {
191: range <<= SHIFT_BITS;
...
...
59: public void normalize() throws IOException {
60: if ((range & TOP_MASK) == 0) {
61: try {
...
...
35: public void normalize() throws IOException {
36: if ((range & TOP_MASK) == 0) {
37: code = (code << SHIFT_BITS) | inData.readUnsignedByte();
...
range ([-1, '', 'obj:ref_field:rc'])
...
25: int prob = probs[index];
26: int bound = (range >>> BIT_MODEL_TOTAL_BITS) * prob;
27: int bit;
...
30: if ((code ^ 0x80000000) < (bound ^ 0x80000000)) {
31: range = bound;
32: probs[index] = (short)(
...
35: } else {
36: range -= bound;
37: code -= bound;
...
74:
75: range >>>= 1;
76: int t = (code - range) >>> 31;
77: code -= range & (t - 1);
78: result = (result << 1) | (1 - t);
...
...
27: code = inData.readInt();
28: range = 0xFFFFFFFF;
29: }
...
35: public void normalize() throws IOException {
36: if ((range & TOP_MASK) == 0) {
37: code = (code << SHIFT_BITS) | inData.readUnsignedByte();
38: range <<= SHIFT_BITS;
39: }
...
...
43: code = in.readInt();
44: range = 0xFFFFFFFF;
45:
...
59: public void normalize() throws IOException {
60: if ((range & TOP_MASK) == 0) {
61: try {
...
64: code = (code << SHIFT_BITS) | (buf[pos++] & 0xFF);
65: range <<= SHIFT_BITS;
66: } catch (ArrayIndexOutOfBoundsException e) {
...
...
91: } else {
92: reps[0] |= rc.decodeDirectBits(limit - ALIGN_BITS)
93: << ALIGN_BITS;
...
...
91: } else {
92: reps[0] |= rc.decodeDirectBits(limit - ALIGN_BITS)
93: << ALIGN_BITS;
...
...
59: public void normalize() throws IOException {
60: if ((range & TOP_MASK) == 0) {
61: try {
...
range ([4, 'cond:join', ':ref_field:code'])
...
25: int prob = probs[index];
26: int bound = (range >>> BIT_MODEL_TOTAL_BITS) * prob;
27: int bit;
...
30: if ((code ^ 0x80000000) < (bound ^ 0x80000000)) {
31: range = bound;
32: probs[index] = (short)(
...
35: } else {
36: range -= bound;
37: code -= bound;
...
72: do {
73: normalize();
74:
75: range >>>= 1;
76: int t = (code - range) >>> 31;
77: code -= range & (t - 1);
78: result = (result << 1) | (1 - t);
...
...
27: code = inData.readInt();
28: range = 0xFFFFFFFF;
29: }
...
35: public void normalize() throws IOException {
36: if ((range & TOP_MASK) == 0) {
37: code = (code << SHIFT_BITS) | inData.readUnsignedByte();
38: range <<= SHIFT_BITS;
39: }
...
...
43: code = in.readInt();
44: range = 0xFFFFFFFF;
45:
...
59: public void normalize() throws IOException {
60: if ((range & TOP_MASK) == 0) {
61: try {
...
64: code = (code << SHIFT_BITS) | (buf[pos++] & 0xFF);
65: range <<= SHIFT_BITS;
66: } catch (ArrayIndexOutOfBoundsException e) {
...
...
72: do {
73: normalize();
74:
75: range >>>= 1;
76: int t = (code - range) >>> 31;
77: code -= range & (t - 1);
...
range ([4, 'cond:join', 'L:op_assign:>>>='])
...
25: int prob = probs[index];
26: int bound = (range >>> BIT_MODEL_TOTAL_BITS) * prob;
27: int bit;
...
30: if ((code ^ 0x80000000) < (bound ^ 0x80000000)) {
31: range = bound;
32: probs[index] = (short)(
...
35: } else {
36: range -= bound;
37: code -= bound;
...
72: do {
73: normalize();
74:
75: range >>>= 1;
76: int t = (code - range) >>> 31;
77: code -= range & (t - 1);
78: result = (result << 1) | (1 - t);
...
...
27: code = inData.readInt();
28: range = 0xFFFFFFFF;
29: }
...
35: public void normalize() throws IOException {
36: if ((range & TOP_MASK) == 0) {
37: code = (code << SHIFT_BITS) | inData.readUnsignedByte();
38: range <<= SHIFT_BITS;
39: }
...
...
43: code = in.readInt();
44: range = 0xFFFFFFFF;
45:
...
59: public void normalize() throws IOException {
60: if ((range & TOP_MASK) == 0) {
61: try {
...
64: code = (code << SHIFT_BITS) | (buf[pos++] & 0xFF);
65: range <<= SHIFT_BITS;
66: } catch (ArrayIndexOutOfBoundsException e) {
...
...
72: do {
73: normalize();
74:
75: range >>>= 1;
76: int t = (code - range) >>> 31;
...
bit / model / total / bits → range (1.634)BIT_MODEL_TOTAL_BITS
...
25: int prob = probs[index];
26: int bound = (range >>> BIT_MODEL_TOTAL_BITS) * prob;
27: int bit;
...
...
101: int prob = probs[index];
102: int bound = (range >>> BIT_MODEL_TOTAL_BITS) * prob;
103:
...
range ([3, 'L:op_infix:*', ':assign_var:bound'])
...
25: int prob = probs[index];
26: int bound = (range >>> BIT_MODEL_TOTAL_BITS) * prob;
27: int bit;
...
30: if ((code ^ 0x80000000) < (bound ^ 0x80000000)) {
31: range = bound;
32: probs[index] = (short)(
...
35: } else {
36: range -= bound;
37: code -= bound;
...
74:
75: range >>>= 1;
76: int t = (code - range) >>> 31;
77: code -= range & (t - 1);
78: result = (result << 1) | (1 - t);
...
...
27: code = inData.readInt();
28: range = 0xFFFFFFFF;
29: }
...
35: public void normalize() throws IOException {
36: if ((range & TOP_MASK) == 0) {
37: code = (code << SHIFT_BITS) | inData.readUnsignedByte();
38: range <<= SHIFT_BITS;
39: }
...
...
43: code = in.readInt();
44: range = 0xFFFFFFFF;
45:
...
59: public void normalize() throws IOException {
60: if ((range & TOP_MASK) == 0) {
61: try {
...
64: code = (code << SHIFT_BITS) | (buf[pos++] & 0xFF);
65: range <<= SHIFT_BITS;
66: } catch (ArrayIndexOutOfBoundsException e) {
...
...
101: int prob = probs[index];
102: int bound = (range >>> BIT_MODEL_TOTAL_BITS) * prob;
103:
...
range ([3, 'L:op_infix:*', 'R:op_assign:='])
...
25: int prob = probs[index];
26: int bound = (range >>> BIT_MODEL_TOTAL_BITS) * prob;
27: int bit;
...
30: if ((code ^ 0x80000000) < (bound ^ 0x80000000)) {
31: range = bound;
32: probs[index] = (short)(
...
35: } else {
36: range -= bound;
37: code -= bound;
...
74:
75: range >>>= 1;
76: int t = (code - range) >>> 31;
77: code -= range & (t - 1);
78: result = (result << 1) | (1 - t);
...
...
27: code = inData.readInt();
28: range = 0xFFFFFFFF;
29: }
...
35: public void normalize() throws IOException {
36: if ((range & TOP_MASK) == 0) {
37: code = (code << SHIFT_BITS) | inData.readUnsignedByte();
38: range <<= SHIFT_BITS;
39: }
...
...
43: code = in.readInt();
44: range = 0xFFFFFFFF;
45:
...
59: public void normalize() throws IOException {
60: if ((range & TOP_MASK) == 0) {
61: try {
...
64: code = (code << SHIFT_BITS) | (buf[pos++] & 0xFF);
65: range <<= SHIFT_BITS;
66: } catch (ArrayIndexOutOfBoundsException e) {
...
...
101: int prob = probs[index];
102: int bound = (range >>> BIT_MODEL_TOTAL_BITS) * prob;
103:
...
105: if (bit == 0) {
106: range = bound;
107: probs[index] = (short)(
...
range ([3, 'L:op_infix:*', 'R:op_assign:-='])
...
25: int prob = probs[index];
26: int bound = (range >>> BIT_MODEL_TOTAL_BITS) * prob;
27: int bit;
...
30: if ((code ^ 0x80000000) < (bound ^ 0x80000000)) {
31: range = bound;
32: probs[index] = (short)(
...
35: } else {
36: range -= bound;
37: code -= bound;
38: probs[index] = (short)(prob - (prob >>> MOVE_BITS));
...
74:
75: range >>>= 1;
76: int t = (code - range) >>> 31;
77: code -= range & (t - 1);
78: result = (result << 1) | (1 - t);
...
...
27: code = inData.readInt();
28: range = 0xFFFFFFFF;
29: }
...
35: public void normalize() throws IOException {
36: if ((range & TOP_MASK) == 0) {
37: code = (code << SHIFT_BITS) | inData.readUnsignedByte();
38: range <<= SHIFT_BITS;
39: }
...
...
43: code = in.readInt();
44: range = 0xFFFFFFFF;
45:
...
59: public void normalize() throws IOException {
60: if ((range & TOP_MASK) == 0) {
61: try {
...
64: code = (code << SHIFT_BITS) | (buf[pos++] & 0xFF);
65: range <<= SHIFT_BITS;
66: } catch (ArrayIndexOutOfBoundsException e) {
...
...
101: int prob = probs[index];
102: int bound = (range >>> BIT_MODEL_TOTAL_BITS) * prob;
103:
...
110: low += bound & 0xFFFFFFFFL;
111: range -= bound;
112: probs[index] = (short)(prob - (prob >>> MOVE_BITS));
...
len → size (1.466)len
...
36:
37: public void write(byte[] b, int off, int len) throws IOException {
38: out.write(b, off, len);
39: if (size >= 0)
40: size += len;
41: }
...
size ([1, '', '#arg2:call:write'])
...
53: int size;
54: while ((size = in.read(buf)) != -1)
55: System.out.write(buf, 0, size);
56:
...
...
37: public void write(byte[] b, int off, int len) throws IOException {
38: out.write(b, off, len);
39: if (size >= 0)
...
size ([1, '', 'R:op_assign:+='])
...
50: int size;
51: while ((size = System.in.read(buf)) != -1)
52: encoder.write(buf, 0, size);
53:
...
...
235:
236: public void write(byte[] buf, int off, int len) throws IOException {
237: if (off < 0 || len < 0 || off + len < 0 || off + len > buf.length)
...
250:
251: currentUncompressedSize += len;
252:
...
...
39: if (size >= 0)
40: size += len;
41: }
...
size ([2, 'R:op_assign:+=', ':assign_field:size'])
...
35: int size;
36: while ((size = System.in.read(buf)) != -1)
37: out.write(buf, 0, size);
38:
...
...
95: check.update(buf, off, len);
96: uncompressedSize += len;
97: validate();
...
...
39: if (size >= 0)
40: size += len;
41: }
...
prob / init → off (1.179)PROB_INIT
...
23: public static final void initProbs(short[] probs) {
24: Arrays.fill(probs, PROB_INIT);
25: }
...
off ([1, '', '#arg1:call:fill'])
...
90:
91: public void write(byte[] buf, int off, int len) throws IOException {
92: if (off < 0 || len < 0 || off + len < 0 || off + len > buf.length)
93: throw new IndexOutOfBoundsException();
...
102: while (len > 0) {
103: int used = lz.fillWindow(buf, off, len);
104: off += used;
105: len -= used;
...
...
23: public static final void initProbs(short[] probs) {
24: Arrays.fill(probs, PROB_INIT);
25: }
...
len → size / len (0.723)len
...
52: */
53: public void write(byte[] buf, int off, int len) throws IOException {
54: out.write(buf, off, len);
55: }
...
size ([1, '', '#arg2:call:write'])
...
53: int size;
54: while ((size = in.read(buf)) != -1)
55: System.out.write(buf, 0, size);
56:
...
...
53: public void write(byte[] buf, int off, int len) throws IOException {
54: out.write(buf, off, len);
55: }
...
in → chain / filter (0.561)in
...
89: */
90: public InputStream getInputStream(InputStream in) throws IOException {
91: return getInputStream(in, ArrayCache.getDefaultCache());
92: }
...
filterChain ([1, '', '#arg0:new:lzma'])
...
197: // Initialize the filter chain.
198: filterChain = inCounted;
199: for (int i = filters.length - 1; i >= 0; --i)
200: filterChain = filters[i].getInputStream(filterChain, arrayCache);
201: }
...
210:
211: int ret = filterChain.read(buf, off, len);
212:
...
235: if (ret < len || uncompressedSize == uncompressedSizeInHeader) {
236: if (filterChain.read() != -1)
237: throw new CorruptedInputException();
...
274: public int available() throws IOException {
275: return filterChain.available();
276: }
...
284: try {
285: filterChain.close();
286: } catch (IOException e) {
...
294:
295: filterChain = null;
296: }
...
...
31:
32: public InputStream getInputStream(InputStream in, ArrayCache arrayCache) {
33: return new LZMA2InputStream(in, dictSize, null, arrayCache);
34: }
...
...
565:
566: public InputStream getInputStream(InputStream in, ArrayCache arrayCache)
567: throws IOException {
568: return new LZMA2InputStream(in, dictSize, presetDict, arrayCache);
569: }
...
...
90: public InputStream getInputStream(InputStream in) throws IOException {
91: return getInputStream(in, ArrayCache.getDefaultCache());
92: }
...
filterChain ([2, '#arg0:call:stream', ':return'])
...
37: outCounted = new CountingOutputStream(out);
38: filterChain = outCounted;
39: for (int i = filters.length - 1; i >= 0; --i)
40: filterChain = filters[i].getOutputStream(filterChain, arrayCache);
41:
...
93: public void write(byte[] buf, int off, int len) throws IOException {
94: filterChain.write(buf, off, len);
95: check.update(buf, off, len);
...
100: public void flush() throws IOException {
101: filterChain.flush();
102: validate();
...
106: // Finish the Compressed Data field.
107: filterChain.finish();
108: validate();
...
...
34: ArrayCache arrayCache) {
35: return options.getOutputStream(out, arrayCache);
36: }
...
...
90: public InputStream getInputStream(InputStream in) throws IOException {
91: return getInputStream(in, ArrayCache.getDefaultCache());
92: }
...
filterChain ([2, '#arg0:new:stream', ':return'])
...
197: // Initialize the filter chain.
198: filterChain = inCounted;
199: for (int i = filters.length - 1; i >= 0; --i)
200: filterChain = filters[i].getInputStream(filterChain, arrayCache);
201: }
...
210:
211: int ret = filterChain.read(buf, off, len);
212:
...
235: if (ret < len || uncompressedSize == uncompressedSizeInHeader) {
236: if (filterChain.read() != -1)
237: throw new CorruptedInputException();
...
274: public int available() throws IOException {
275: return filterChain.available();
276: }
...
284: try {
285: filterChain.close();
286: } catch (IOException e) {
...
294:
295: filterChain = null;
296: }
...
...
59:
60: return new SimpleInputStream(in, simpleFilter);
61: }
...
...
567: throws IOException {
568: return new LZMA2InputStream(in, dictSize, presetDict, arrayCache);
569: }
...
in → chain / in (0.417)in
...
86:
87: public InputStream getInputStream(InputStream in, ArrayCache arrayCache) {
88: return new DeltaInputStream(in, distance);
89: }
...
filterChain ([1, '', '#arg0:new:delta'])
...
197: // Initialize the filter chain.
198: filterChain = inCounted;
199: for (int i = filters.length - 1; i >= 0; --i)
200: filterChain = filters[i].getInputStream(filterChain, arrayCache);
201: }
...
210:
211: int ret = filterChain.read(buf, off, len);
212:
...
235: if (ret < len || uncompressedSize == uncompressedSizeInHeader) {
236: if (filterChain.read() != -1)
237: throw new CorruptedInputException();
...
274: public int available() throws IOException {
275: return filterChain.available();
276: }
...
284: try {
285: filterChain.close();
286: } catch (IOException e) {
...
294:
295: filterChain = null;
296: }
...
...
28:
29: public InputStream getInputStream(InputStream in, ArrayCache arrayCache) {
30: return new DeltaInputStream(in, distance);
31: }
...
...
87: public InputStream getInputStream(InputStream in, ArrayCache arrayCache) {
88: return new DeltaInputStream(in, distance);
89: }
...
filterChain ([2, '#arg0:new:stream', ':return'])
...
197: // Initialize the filter chain.
198: filterChain = inCounted;
199: for (int i = filters.length - 1; i >= 0; --i)
200: filterChain = filters[i].getInputStream(filterChain, arrayCache);
201: }
...
210:
211: int ret = filterChain.read(buf, off, len);
212:
...
235: if (ret < len || uncompressedSize == uncompressedSizeInHeader) {
236: if (filterChain.read() != -1)
237: throw new CorruptedInputException();
...
274: public int available() throws IOException {
275: return filterChain.available();
276: }
...
284: try {
285: filterChain.close();
286: } catch (IOException e) {
...
294:
295: filterChain = null;
296: }
...
...
59:
60: return new SimpleInputStream(in, simpleFilter);
61: }
...
...
87: public InputStream getInputStream(InputStream in, ArrayCache arrayCache) {
88: return new DeltaInputStream(in, distance);
89: }
...
filterChain ([1, '', '#arg0:new:stream'])
...
197: // Initialize the filter chain.
198: filterChain = inCounted;
199: for (int i = filters.length - 1; i >= 0; --i)
200: filterChain = filters[i].getInputStream(filterChain, arrayCache);
201: }
...
210:
211: int ret = filterChain.read(buf, off, len);
212:
...
235: if (ret < len || uncompressedSize == uncompressedSizeInHeader) {
236: if (filterChain.read() != -1)
237: throw new CorruptedInputException();
...
274: public int available() throws IOException {
275: return filterChain.available();
276: }
...
284: try {
285: filterChain.close();
286: } catch (IOException e) {
...
294:
295: filterChain = null;
296: }
...
...
41:
42: public InputStream getInputStream(InputStream in, ArrayCache arrayCache) {
43: SimpleFilter simpleFilter = null;
...
59:
60: return new SimpleInputStream(in, simpleFilter);
61: }
...
...
87: public InputStream getInputStream(InputStream in, ArrayCache arrayCache) {
88: return new DeltaInputStream(in, distance);
89: }
...
close / input → zeros / with / fill (0.402)closeInput
...
519: */
520: public void close(boolean closeInput) throws IOException {
521: if (in != null) {
...
527: try {
528: if (closeInput)
529: in.close();
...
fillWithZeros ([-1, '', ':value:false'])
...
133: */
134: public byte[] getByteArray(int size, boolean fillWithZeros) {
135: return new byte[size];
...
...
45:
46: public byte[] getByteArray(int size, boolean fillWithZeros) {
47: byte[] array = arrayCache.getByteArray(size, fillWithZeros);
48:
...
...
26: // a bigger-than-requested array, we still want to use buf.length.
27: buf = arrayCache.getByteArray(inputSizeMax - INIT_SIZE, false);
28: pos = buf.length;
...
...
519: */
520: public void close(boolean closeInput) throws IOException {
521: if (in != null) {
...
527: try {
528: if (closeInput)
529: in.close();
...
...
514: if (xzIn != null) {
515: xzIn.close(false);
516: xzIn = null;
...
fillWithZeros ([-1, '', ':value:true'])
...
160: */
161: public int[] getIntArray(int size, boolean fillWithZeros) {
162: return new int[size];
...
...
71:
72: public int[] getIntArray(int size, boolean fillWithZeros) {
73: int[] array = arrayCache.getIntArray(size, fillWithZeros);
74:
...
...
57: hash4Size = getHash4Size(dictSize);
58: hash4Table = arrayCache.getIntArray(hash4Size, true);
59: hash4Mask = hash4Size - 1;
...
...
493: public void close() throws IOException {
494: close(true);
495: }
...
519: */
520: public void close(boolean closeInput) throws IOException {
521: if (in != null) {
...
527: try {
528: if (closeInput)
529: in.close();
...