add check compressor's byte size when finish compress

This commit is contained in:
zzq09494 2017-09-26 09:54:03 +08:00
parent d0b2c5850b
commit 64ff30f360
1 changed files with 1 additions and 1 deletions

View File

@ -135,7 +135,7 @@ public class BlockCompressorStream extends CompressorStream {
@Override
public void finish() throws IOException {
if (!compressor.finished()) {
if (!compressor.finished() && compressor.getBytesRead() > 0) {
rawWriteInt((int)compressor.getBytesRead());
compressor.finish();
while (!compressor.finished()) {