performance
This commit is contained in:
parent
9d00b0181e
commit
448bb11ad4
13 changed files with 204 additions and 125 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue