Skip to content

Commit b8c5687

Browse files
committed
move to 0.9.2 on LZF
1 parent d6436f3 commit b8c5687

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

modules/elasticsearch/src/main/java/org/elasticsearch/common/compress/lzf/ChunkDecoder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ public static int calculateUncompressedSize(byte[] data, int ptr, int length) th
163163
++blockNr;
164164
}
165165
// one more sanity check:
166-
if (ptr != data.length) {
166+
if (ptr != end) {
167167
throw new IOException("Corrupt input data: block #" + blockNr + " extends " + (data.length - ptr) + " beyond end of input");
168168
}
169169
return uncompressedSize;

modules/elasticsearch/src/main/java/org/elasticsearch/common/compress/lzf/LZFDecoder.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,19 +37,19 @@ public static byte[] decode(final byte[] inputBuffer) throws IOException {
3737
return decode(inputBuffer, 0, inputBuffer.length);
3838
}
3939

40-
public static byte[] decode(final byte[] inputBuffer, int inputPtr, int inputLen) throws IOException {
41-
return ChunkDecoderFactory.optimalInstance().decode(inputBuffer);
40+
public static byte[] decode(final byte[] inputBuffer, int offset, int length) throws IOException {
41+
return ChunkDecoderFactory.optimalInstance().decode(inputBuffer, offset, length);
4242
}
4343

4444
public static int decode(final byte[] inputBuffer, final byte[] targetBuffer) throws IOException {
4545
return decode(inputBuffer, 0, inputBuffer.length, targetBuffer);
4646
}
4747

48-
public static int decode(final byte[] sourceBuffer, int inPtr, int inLength, final byte[] targetBuffer) throws IOException {
49-
return ChunkDecoderFactory.optimalInstance().decode(sourceBuffer, inPtr, inLength, targetBuffer);
48+
public static int decode(final byte[] sourceBuffer, int offset, int length, final byte[] targetBuffer) throws IOException {
49+
return ChunkDecoderFactory.optimalInstance().decode(sourceBuffer, offset, length, targetBuffer);
5050
}
5151

52-
public static int calculateUncompressedSize(byte[] data, int ptr, int length) throws IOException {
53-
return ChunkDecoder.calculateUncompressedSize(data, ptr, length);
52+
public static int calculateUncompressedSize(byte[] data, int offset, int length) throws IOException {
53+
return ChunkDecoder.calculateUncompressedSize(data, offset, length);
5454
}
5555
}

0 commit comments

Comments
 (0)