Skip to content

Commit

Permalink
Minor performance improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
NeRdTheNed committed Nov 10, 2023
1 parent 73972e1 commit 30fe169
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1257,11 +1257,10 @@ public DeflateBlock merge(DeflateBlock append) {
final LitLen eob = merged.litlens.remove(merged.litlens.size() - 1);
merged.litlens.addAll(otherFixed.litlens);
merged.sizeBits -= merged.litlenSizeBits;

for (final LitLen litlenThis : otherFixed.litlens) {
/*for (final LitLen litlenThis : otherFixed.litlens) {
merged.litlenSizeBits += getLitLenSize(litlenThis, merged.litlenDec, merged.distDec);
}

}*/
merged.litlenSizeBits += otherFixed.litlenSizeBits;
merged.litlenSizeBits -= getLitLenSize(eob, merged.litlenDec, merged.distDec);
merged.sizeBits += merged.litlenSizeBits;
return merged;
Expand Down

0 comments on commit 30fe169

Please sign in to comment.