Skip to content

Commit

Permalink
Fix rare bug with uncompressed block conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
NeRdTheNed committed Aug 21, 2023
1 parent 92e9b18 commit 80a56a8
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,11 @@ private static DeflateBlock optimiseBlock(DeflateBlock toOptimise, long position

if (toOptimise.getDeflateBlockType() != DeflateBlockType.STORED) {
// Uncompressed
callback.accept(new Pair<>(toOptimise.asUncompressed(), "uncompressed"));
final DeflateBlockUncompressed stored = toOptimise.asUncompressed();

if (stored.getUncompressedData().length <= 65535) {
callback.accept(new Pair<>(stored, "uncompressed"));
}
}

DeflateBlockHuffman toOptimiseHuffman = null;
Expand Down

0 comments on commit 80a56a8

Please sign in to comment.