source: josm/trunk/src/org/tukaani/xz/delta/DeltaCoder.java@ 15851

Last change on this file since 15851 was 13350, checked in by stoecker, 7 years ago

see #15816 - add XZ support

File size: 653 bytes
Line 
1/*
2 * DeltaCoder
3 *
4 * Author: Lasse Collin <lasse.collin@tukaani.org>
5 *
6 * This file has been put into the public domain.
7 * You can do whatever you want with this file.
8 */
9
10package org.tukaani.xz.delta;
11
12abstract class DeltaCoder {
13 static final int DISTANCE_MIN = 1;
14 static final int DISTANCE_MAX = 256;
15 static final int DISTANCE_MASK = DISTANCE_MAX - 1;
16
17 final int distance;
18 final byte[] history = new byte[DISTANCE_MAX];
19 int pos = 0;
20
21 DeltaCoder(int distance) {
22 if (distance < DISTANCE_MIN || distance > DISTANCE_MAX)
23 throw new IllegalArgumentException();
24
25 this.distance = distance;
26 }
27}
Note: See TracBrowser for help on using the repository browser.