diff --git a/java/com/google/turbine/zip/Zip.java b/java/com/google/turbine/zip/Zip.java index 95ebb3f..3698d59 100644 --- a/java/com/google/turbine/zip/Zip.java +++ b/java/com/google/turbine/zip/Zip.java @@ -342,10 +342,9 @@ private byte[] getBytes( byte[] bytes = new byte[(int) size]; fc.get(bytes); if (deflate) { - bytes = - new InflaterInputStream( - new ByteArrayInputStream(bytes), new Inflater(/* nowrap= */ true)) - .readAllBytes(); + Inflater inf = new Inflater(/* nowrap= */ true); + bytes = new InflaterInputStream(new ByteArrayInputStream(bytes), inf).readAllBytes(); + inf.end(); } return bytes; } catch (IOException e) {