parent
f070e2d064
commit
4872075bf7
@ -64,7 +64,7 @@ public class JavaZlib implements BungeeZlib
|
|||||||
{
|
{
|
||||||
inflater.setInput( inData );
|
inflater.setInput( inData );
|
||||||
|
|
||||||
while ( !inflater.finished() )
|
while ( !inflater.finished() && inflater.getTotalIn() < inData.length )
|
||||||
{
|
{
|
||||||
int count = inflater.inflate( buffer );
|
int count = inflater.inflate( buffer );
|
||||||
out.writeBytes( buffer, 0, count );
|
out.writeBytes( buffer, 0, count );
|
||||||
|
@ -44,7 +44,7 @@ public class NativeZlib implements BungeeZlib
|
|||||||
out.memoryAddress();
|
out.memoryAddress();
|
||||||
Preconditions.checkState( ctx != 0, "Invalid pointer to compress!" );
|
Preconditions.checkState( ctx != 0, "Invalid pointer to compress!" );
|
||||||
|
|
||||||
while ( !nativeCompress.finished )
|
while ( !nativeCompress.finished && ( compress || in.isReadable() ) )
|
||||||
{
|
{
|
||||||
out.ensureWritable( 8192 );
|
out.ensureWritable( 8192 );
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user