summaryrefslogtreecommitdiff
path: root/huffman.c
diff options
context:
space:
mode:
Diffstat (limited to 'huffman.c')
-rw-r--r--huffman.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/huffman.c b/huffman.c
index e9b1e0d..cccb07b 100644
--- a/huffman.c
+++ b/huffman.c
@@ -52,8 +52,6 @@ static clock_t DoHuffIteration(char *plaintext, char *comparray, char *decomparr
static void SetCompBit(uint8_t *comparray, uint32_t bitoffset, char bitchar);
static int GetCompBit(uint8_t *comparray, uint32_t bitoffset);
-static double results;
-
/**************
** DoHuffman **
***************
@@ -63,7 +61,7 @@ static double results;
** Also, the compression cycle includes building the
** Huffman tree.
*/
-void
+double
DoHuffman(void)
{
const char* context = "CPU:Huffman";
@@ -157,7 +155,7 @@ DoHuffman(void)
free(decomparray);
free(hufftree);
- results = (double)(iterations * CLOCKS_PER_SEC) / (double)total_time;
+ return (double)(iterations * CLOCKS_PER_SEC) / (double)total_time;
}
/*********************
@@ -501,9 +499,3 @@ bitnumb=bitoffset % 8;
*/
return((1<<bitnumb) & comparray[byteoffset] );
}
-
-double
-getHuffmanScore(void)
-{
- return results;
-}