move to 0.9.2 lzf

This commit is contained in:
Shay Banon 2012-01-04 20:44:39 +02:00
parent 1b68f99449
commit 7d0af6a345
2 changed files with 7 additions and 7 deletions

View File

@ -163,7 +163,7 @@ public abstract class ChunkDecoder {
++blockNr; ++blockNr;
} }
// one more sanity check: // one more sanity check:
if (ptr != data.length) { if (ptr != end) {
throw new IOException("Corrupt input data: block #" + blockNr + " extends " + (data.length - ptr) + " beyond end of input"); throw new IOException("Corrupt input data: block #" + blockNr + " extends " + (data.length - ptr) + " beyond end of input");
} }
return uncompressedSize; return uncompressedSize;

View File

@ -37,19 +37,19 @@ public class LZFDecoder {
return decode(inputBuffer, 0, inputBuffer.length); return decode(inputBuffer, 0, inputBuffer.length);
} }
public static byte[] decode(final byte[] inputBuffer, int inputPtr, int inputLen) throws IOException { public static byte[] decode(final byte[] inputBuffer, int offset, int length) throws IOException {
return ChunkDecoderFactory.optimalInstance().decode(inputBuffer); return ChunkDecoderFactory.optimalInstance().decode(inputBuffer, offset, length);
} }
public static int decode(final byte[] inputBuffer, final byte[] targetBuffer) throws IOException { public static int decode(final byte[] inputBuffer, final byte[] targetBuffer) throws IOException {
return decode(inputBuffer, 0, inputBuffer.length, targetBuffer); return decode(inputBuffer, 0, inputBuffer.length, targetBuffer);
} }
public static int decode(final byte[] sourceBuffer, int inPtr, int inLength, final byte[] targetBuffer) throws IOException { public static int decode(final byte[] sourceBuffer, int offset, int length, final byte[] targetBuffer) throws IOException {
return ChunkDecoderFactory.optimalInstance().decode(sourceBuffer, inPtr, inLength, targetBuffer); return ChunkDecoderFactory.optimalInstance().decode(sourceBuffer, offset, length, targetBuffer);
} }
public static int calculateUncompressedSize(byte[] data, int ptr, int length) throws IOException { public static int calculateUncompressedSize(byte[] data, int offset, int length) throws IOException {
return ChunkDecoder.calculateUncompressedSize(data, ptr, length); return ChunkDecoder.calculateUncompressedSize(data, offset, length);
} }
} }