Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

docs: fix simple typo, lenghts -> lengths #268

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions deps/lodepng/lodepng.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down Expand Up @@ -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").
*/

Expand All @@ -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
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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]),
Expand Down Expand Up @@ -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)";
Expand Down