24 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
1
vote
1
answer
140
views
Huffman classical and canonical version
I am writing a simple encoder and decoder of a Huffman tree that produces classical and canonical codes after the tree is built.
But no matter what, given an input, it produces always the same result ...
1
vote
2
answers
116
views
Order of Huffman List when there are many characters with the same frequency
I am running into a very interesting dilemma while learning Huffman compression. I am currently studying in a course that uses zyBooks and the examples are absolutely terrible in my opinion. In 2 ...
0
votes
1
answer
90
views
Why is the tree constructed this way incorrect?
The result of decoding the tree constructed using the first write-up is correct, but the tree constructed using the second write-up is decoded incorrectly, why? I thought they were equivalent but they ...
0
votes
1
answer
56
views
Huffman implementation reduce decompression time
I'm trying to improve the computational speed of this huffman. For small input hex strings its fine but the bigger the input string is the time increments considerably with a large enough string speed ...
-1
votes
1
answer
123
views
Huffman Coding Java
I have this question:
Consider a DMS with seven possible symbols Xi, i = 1, 2, ... , 7 and
the corresponding probabilities p1 = 0.37, p2 = 0.33, p3 = 0.16, p4 =
0.07, p5 = 0.04, p6 = 0.02, and p7 = 0....
3
votes
2
answers
239
views
Depth of a Huffman tree
I'm reading Algorithms by Jeff Erickson, and I have trouble in solving the exercise in Greedy Algorithms:
(b) Suppose the total length N of the unencoded message is bounded by a polynomial in the ...
1
vote
1
answer
79
views
Can't build huffman tree in C, qsort fails
I try to implement huffman code in C. I have two arrays, one storing all the nodes and one that contains pointers to certain nodes. The second one contains the unfinished trees that I want to combine. ...
0
votes
0
answers
17
views
Huffman Coding Error When Passing Parameter
code:
typedef struct
{
int weight;
char c;
int parent, lchild, rchild;
} Node, *HTree;
void findmin(HTree ht, int len, int *p1, int *p2)
void CreateHTree(HTree ht, int n)
void print(...
0
votes
0
answers
50
views
Huffman encyption coding program runs for too long
I have a c program that attempts implementing Huffman encryption. The problem is that the program runs indefinity after asking for the file containing the string to be encrypted is entered.
i'm not ...
0
votes
2
answers
751
views
Huffman coding rules and optimization
All sources i've read quote the below process to get Huffman codes:
Arrange the elements in ascending order of their frequencies.
Create a binary tree by repeatedly combining the two least frequent ...
1
vote
1
answer
121
views
How can one correctly extract Huffman Tree from a dynamic compressed block?
My problem is similar to the one solved HERE, with few differences.
So the a Deflated block with dynamic Huffman codes is structured like this:
|Block Header|compressed block|end of block|
Then Block ...
0
votes
1
answer
64
views
Is it possible match initial bytes of Deflate compressed data using knowledge of first portion of uncompressed data?
So my obsession with deflate compression is leading me no where but i feel like there is something i can do the process better.
Here is what i understood so far:
def lz77(uncompressed):
#find ...
0
votes
1
answer
119
views
How does a decompressor know the huffman tree that was used by the compressor?
From what i understood Deflate is LZ77 and Huffman encoding but i have been looking at the structure of .zip file but i haven't seen where to extract information about Huffman tree that was used in ...
0
votes
1
answer
49
views
Index Out of Range error when Huffman Coding
I was trying to encode and decode an image using Huffman codes. I am encountering an issue when calling the methods from this class in the main method:
using System;
using System.Collections.Generic;
...
0
votes
1
answer
46
views
Does the BRCI algorithm work for *all* Huffman Trees?
I'm trying to create a height-limited Huffman Tree. One algorithm proposed for this is the BRCI Algorithm, which promises a comparatively fast and simple to implement solution.
This means that the ...