From 7ca8577c04479b40f9109f5df50b830885af0d37 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Tue, 12 Nov 2019 00:42:57 -0500 Subject: spelling: huffman --- liblodepng/lodepng.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/liblodepng/lodepng.cpp b/liblodepng/lodepng.cpp index 6e28587..f5f5940 100644 --- a/liblodepng/lodepng.cpp +++ b/liblodepng/lodepng.cpp @@ -435,7 +435,7 @@ static unsigned HuffmanTree_make2DTree(HuffmanTree* tree) if(!uivector_resize(&tree->tree2d, tree->numcodes * 2)) return 9901; /*if failed return not enough memory error*/ /*convert tree1d[] to tree2d[][]. In the 2D array, a value of 32767 means uninited, a value >= numcodes is an address to another bit, a value < numcodes is a code. The 2 rows are the 2 possible bit values (0 or 1), there are as many columns as codes - 1 - a good huffmann tree has N * 2 - 1 nodes, of which N - 1 are internal nodes. Here, the internal nodes are stored (what their 0 and 1 option point to). There is only memory for such good tree currently, if there are more nodes (due to too long length codes), error 55 will happen*/ + a good huffman tree has N * 2 - 1 nodes, of which N - 1 are internal nodes. Here, the internal nodes are stored (what their 0 and 1 option point to). There is only memory for such good tree currently, if there are more nodes (due to too long length codes), error 55 will happen*/ for(n = 0; n < tree->numcodes * 2; n++) tree->tree2d.data[n] = 32767; /*32767 here means the tree2d isn't filled there yet*/ for(n = 0; n < tree->numcodes; n++) /*the codes*/ -- cgit v0.12