geforkt von Mirrors/Velocity
Fix DataFormatException with java decompression (#195)
Dieser Commit ist enthalten in:
Ursprung
dc6613a328
Commit
961e3ece27
@ -28,7 +28,8 @@ public class JavaVelocityCompressor implements VelocityCompressor {
|
||||
ensureNotDisposed();
|
||||
|
||||
if (source.hasArray()) {
|
||||
inflater.setInput(source.array(), source.arrayOffset(), source.readableBytes());
|
||||
inflater.setInput(source.array(), source.arrayOffset() + source.readerIndex(),
|
||||
source.readableBytes());
|
||||
} else {
|
||||
byte[] inData = new byte[source.readableBytes()];
|
||||
source.readBytes(inData);
|
||||
@ -47,7 +48,8 @@ public class JavaVelocityCompressor implements VelocityCompressor {
|
||||
ensureNotDisposed();
|
||||
|
||||
if (source.hasArray()) {
|
||||
deflater.setInput(source.array(), source.arrayOffset(), source.readableBytes());
|
||||
deflater.setInput(source.array(), source.arrayOffset() + source.readerIndex(),
|
||||
source.readableBytes());
|
||||
} else {
|
||||
byte[] inData = new byte[source.readableBytes()];
|
||||
source.readBytes(inData);
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren