Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/kornelski/7z.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'C/HuffEnc.c')
-rw-r--r--C/HuffEnc.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/C/HuffEnc.c b/C/HuffEnc.c
index db41e8d2..55b497e5 100644
--- a/C/HuffEnc.c
+++ b/C/HuffEnc.c
@@ -1,5 +1,5 @@
/* HuffEnc.c -- functions for Huffman encoding
-2009-09-02 : Igor Pavlov : Public domain */
+2016-05-16 : Igor Pavlov : Public domain */
#include "Precomp.h"
@@ -121,8 +121,8 @@ void Huffman_Generate(const UInt32 *freqs, UInt32 *p, Byte *lens, UInt32 numSymb
i = 0;
for (len = maxLen; len != 0; len--)
{
- UInt32 num;
- for (num = lenCounters[len]; num != 0; num--)
+ UInt32 k;
+ for (k = lenCounters[len]; k != 0; k--)
lens[p[i++] & MASK] = (Byte)len;
}
}
@@ -138,9 +138,9 @@ void Huffman_Generate(const UInt32 *freqs, UInt32 *p, Byte *lens, UInt32 numSymb
/* if (code + lenCounters[kMaxLen] - 1 != (1 << kMaxLen) - 1) throw 1; */
{
- UInt32 i;
- for (i = 0; i < numSymbols; i++)
- p[i] = nextCodes[lens[i]]++;
+ UInt32 k;
+ for (k = 0; k < numSymbols; k++)
+ p[k] = nextCodes[lens[k]]++;
}
}
}