summaryrefslogtreecommitdiffstats
path: root/lib/gui/lodepng.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gui/lodepng.c')
-rw-r--r--lib/gui/lodepng.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/gui/lodepng.c b/lib/gui/lodepng.c
index 78a34db473..82fa90ab23 100644
--- a/lib/gui/lodepng.c
+++ b/lib/gui/lodepng.c
@@ -822,7 +822,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];
@@ -1678,7 +1678,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").
*/
@@ -1690,7 +1690,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
@@ -1828,7 +1828,7 @@ static unsigned deflateDynamic(ucvector* out, size_t* bp, Hash* hash,
if(!uivector_resize(&bitlen_cl, NUM_CODE_LENGTH_CODES)) ERROR_BREAK(83 /*alloc fail*/);
for(i = 0; i < NUM_CODE_LENGTH_CODES; 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)
@@ -1844,7 +1844,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)
@@ -1865,10 +1865,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]),
@@ -5608,7 +5608,7 @@ const char* lodepng_error_text(unsigned code)
/*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";