From 084c3dd9cd740ed14714f80d496e268223207cf2 Mon Sep 17 00:00:00 2001 From: Tim Gates Date: Wed, 14 Oct 2020 05:23:51 +1100 Subject: [PATCH] docs: fix simple typo, lenghts -> lengths There is a small typo in deps/lodepng/lodepng.c. Should read `lengths` rather than `lenghts`. --- deps/lodepng/lodepng.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/deps/lodepng/lodepng.c b/deps/lodepng/lodepng.c index b4a9f68cb..67270704a 100644 --- a/deps/lodepng/lodepng.c +++ b/deps/lodepng/lodepng.c @@ -844,7 +844,7 @@ unsigned lodepng_huffman_code_lengths(unsigned* lengths, const unsigned* frequen if(!error) { - /*calculate the lenghts of each symbol, as the amount of times a coin of each symbol is used*/ + /*calculate the lengths of each symbol, as the amount of times a coin of each symbol is used*/ for(i = 0; i < numpresent - 1; i++) { Coin* coin = &coins[i]; @@ -1694,7 +1694,7 @@ static unsigned deflateDynamic(ucvector* out, size_t* bp, Hash* hash, another huffman tree is used for the dist values ("d"). These two trees are stored using their code lengths, and to compress even more these code lengths are also run-length encoded and huffman compressed. This gives a huffman tree - of code lengths "cl". The code lenghts used to describe this third tree are + of code lengths "cl". The code lengths used to describe this third tree are the code length code lengths ("clcl"). */ @@ -1706,7 +1706,7 @@ static unsigned deflateDynamic(ucvector* out, size_t* bp, Hash* hash, uivector frequencies_ll; /*frequency of lit,len codes*/ uivector frequencies_d; /*frequency of dist codes*/ uivector frequencies_cl; /*frequency of code length codes*/ - uivector bitlen_lld; /*lit,len,dist code lenghts (int bits), literally (without repeat codes).*/ + uivector bitlen_lld; /*lit,len,dist code lengths (int bits), literally (without repeat codes).*/ uivector bitlen_lld_e; /*bitlen_lld encoded with repeat codes (this is a rudemtary run length compression)*/ /*bitlen_cl is the code length code lengths ("clcl"). The bit lengths of codes to represent tree_cl (these are written as is in the file, it would be crazy to compress these using yet another huffman @@ -1847,7 +1847,7 @@ static unsigned deflateDynamic(ucvector* out, size_t* bp, Hash* hash, if(!uivector_resize(&bitlen_cl, tree_cl.numcodes)) ERROR_BREAK(83 /*alloc fail*/); for(i = 0; i < tree_cl.numcodes; i++) { - /*lenghts of code length tree is in the order as specified by deflate*/ + /*lengths of code length tree is in the order as specified by deflate*/ bitlen_cl.data[i] = HuffmanTree_getLength(&tree_cl, CLCL_ORDER[i]); } while(bitlen_cl.data[bitlen_cl.size - 1] == 0 && bitlen_cl.size > 4) @@ -1863,7 +1863,7 @@ static unsigned deflateDynamic(ucvector* out, size_t* bp, Hash* hash, After the BFINAL and BTYPE, the dynamic block consists out of the following: - 5 bits HLIT, 5 bits HDIST, 4 bits HCLEN - (HCLEN+4)*3 bits code lengths of code length alphabet - - HLIT + 257 code lenghts of lit/length alphabet (encoded using the code length + - HLIT + 257 code lengths of lit/length alphabet (encoded using the code length alphabet, + possible repetition codes 16, 17, 18) - HDIST + 1 code lengths of distance alphabet (encoded using the code length alphabet, + possible repetition codes 16, 17, 18) @@ -1886,10 +1886,10 @@ static unsigned deflateDynamic(ucvector* out, size_t* bp, Hash* hash, addBitsToStream(bp, out, HDIST, 5); addBitsToStream(bp, out, HCLEN, 4); - /*write the code lenghts of the code length alphabet*/ + /*write the code lengths of the code length alphabet*/ for(i = 0; i < HCLEN + 4; i++) addBitsToStream(bp, out, bitlen_cl.data[i], 3); - /*write the lenghts of the lit/len AND the dist alphabet*/ + /*write the lengths of the lit/len AND the dist alphabet*/ for(i = 0; i < bitlen_lld_e.size; i++) { addHuffmanSymbol(bp, out, HuffmanTree_getCode(&tree_cl, bitlen_lld_e.data[i]), @@ -5992,7 +5992,7 @@ const char* lodepng_error_text(unsigned code) case 54: return "repeat symbol in tree while there was no value symbol yet"; /*jumped past tree while generating huffman tree, this could be when the tree will have more leaves than symbols after generating it out of the - given lenghts. They call this an oversubscribed dynamic bit lengths tree in zlib.*/ + given lengths. They call this an oversubscribed dynamic bit lengths tree in zlib.*/ case 55: return "jumped past tree while generating huffman tree"; case 56: return "given output image colortype or bitdepth not supported for color conversion"; case 57: return "invalid CRC encountered (checking CRC can be disabled)";