Skip to content

Commit

Permalink
#127 Call Inflater end after extracting the current entry
Browse files Browse the repository at this point in the history
  • Loading branch information
srikanth-lingala committed Jan 18, 2020
1 parent 08b6db2 commit 548e18c
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import java.io.EOFException;
import java.io.IOException;
import java.io.InputStream;
import java.io.PushbackInputStream;
import java.util.zip.DataFormatException;
import java.util.zip.Inflater;
Expand Down Expand Up @@ -55,6 +56,14 @@ public int read(byte[] b, int off, int len) throws IOException {
}
}

@Override
public void endOfEntryReached(InputStream inputStream) throws IOException {
if (inflater != null) {
inflater.end();
}
super.endOfEntryReached(inputStream);
}

@Override
public void pushBackInputStreamIfNecessary(PushbackInputStream pushbackInputStream) throws IOException {
int n = inflater.getRemaining();
Expand Down

0 comments on commit 548e18c

Please sign in to comment.