Skip to content

Commit

Permalink
Minor performance improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
NeRdTheNed committed Oct 10, 2023
1 parent c8d6a67 commit 93ed1a6
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ private static DeflateBlockHuffman optimiseBlockHelper(DeflateBlockHuffman block
private static final boolean[] TRUE_FALSE = {true, false};
private static final boolean[] FALSE_TRUE = {false, true};
private static final boolean[] FALSE = {false};
private static final boolean[] TRUE = {true};
private static final boolean[] ALT_8_ARR = TRY_ALT_8 ? new boolean[] {DEFAULT_8, ALT_8} : new boolean[] {DEFAULT_8};

private static void addOptimisedRecoded(Consumer<? super Pair<? extends DeflateBlockHuffman, String>> callback, DeflateBlockHuffman toOptimise, String baseName, long position) {
Expand All @@ -280,7 +281,7 @@ private static void addOptimisedRecoded(Consumer<? super Pair<? extends DeflateB
for (final boolean noRepZeros : FALSE_TRUE) {
for (final boolean prune : FALSE_TRUE) {
for (final boolean noRep : noRepZeros ? FALSE : FALSE_TRUE) {
for (final boolean noZRep : FALSE_TRUE) {
for (final boolean noZRep : noRepZeros ? TRUE : FALSE_TRUE) {
for (final boolean noZRep2 : FALSE_TRUE) {
for (final boolean ohh : TRUE_FALSE) {
if (ohh) {
Expand Down

0 comments on commit 93ed1a6

Please sign in to comment.