performance

This commit is contained in:
Arndt 2016-09-10 16:03:15 +02:00
parent 9d00b0181e
commit 448bb11ad4
13 changed files with 204 additions and 125 deletions

View file

@ -15,6 +15,21 @@ public class BitCoderContext
this.ab = ab;
idxMax = ab.length-1;
}
public final void reset( byte[] ab )
{
this.ab = ab;
idxMax = ab.length-1;
reset();
}
public final void reset()
{
idx = -1;
bm = 0x100;
bits = 0;
b = 0;
}
/**
* encode a distance with a variable bit length

View file

@ -24,6 +24,14 @@ public class ByteDataReader
aboffset = offset;
aboffsetEnd = ab == null ? 0 : ab.length;
}
public final void reset( byte[] byteArray )
{
ab = byteArray;
aboffset = 0;
aboffsetEnd = ab == null ? 0 : ab.length;
}
public final int readInt()
{