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 11, 2023
1 parent 30fe169 commit af43297
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ private static Map<Integer, List<Integer>> buildCodeMap(List<Integer> codes, int

public Huffman(HuffmanTable table) {
this.table = table;
codes = new ArrayList<>();
final int len = this.table.code.length;
codes = new ArrayList<>(len);

for (int i = 0; i < len; i++) {
// Janky hack mate!
Expand Down

0 comments on commit af43297

Please sign in to comment.