Questions tagged [huffman-encoding]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
170 views

Binary Tree and Variable Length Codes for given Alphabets using Huffman Encoding (Confusion)

Last week our teacher gave us a question about Huffman Encoding Algorithm described as below. HUFFMAN ENCODING ALGORITHM: Consider all pairs: . Choose the two lowest frequencies, and make them ...
5
votes
2answers
230 views

finding optimal token definitions for compression

I have a collection of strings which have a lot of common substrings, and I'm trying to find a good way to define tokens to compress them. For instance, if my strings are: s1 = "String" s2 = "Bool" ...
1
vote
0answers
1k views

Calculating uncompressed file size without uncompressing file in zlib

I am writing a python program which parses zip (currently only zlib, using DEFLATE compression) files and verifies the correctness of their headers and data. One of the things I'm trying to achieve is ...
1
vote
3answers
5k views

Reconstructing a huffman tree using minimal information in the header

I'm writing a huffman encoding program in C. I'm trying to include the least amount of information in the header as possible, I know the simplest way to decompress the file in the header would be to ...
1
vote
0answers
164 views

Encode Optimal Huffman code

I have given message encoded with non-optimal Huffman code. I need to decode the message and encode it again, but this time with optimal Huffman code, so after that I can find ...
2
votes
2answers
19k views

How do I find average bits per symbol using huffman code?

I'm trying to write a program in c for Huffman coding, but I am stuck. For input I have: Sample input: 4 // here I scan how many letters I have A 00 // and for everyone I scan how they are ...
0
votes
0answers
40 views

how to find average bits per symbol using huffman code? [duplicate]

I'm trying to write a program in c for Huffman coding, but i stack.In input i have: Sample input: 4 //here i scan how many letters i have A 00 // and for everyone i scan how they are coded in ...
1
vote
1answer
1k views

How should I compress a file with multiple bytes that are the same with Huffman coding?

On my great quest for compressing/decompressing files with a Java implementation of Huffman coding (http://en.wikipedia.org/wiki/Huffman_coding) for a school assignment, I am now at the point of ...
6
votes
5answers
9k views

How to discriminate from two nodes with identical frequencies in a Huffman's tree?

Still on my quest to compress/decompress files with a Java implementation of Huffman's coding (http://en.wikipedia.org/wiki/Huffman_coding) for a school assignment. From the Wikipedia page, I quote: ...
2
votes
1answer
1k views

Does it matter the direction of a Huffman's tree child node?

So, I'm on my quest about creating a Java implementation of Huffman's algorithm for compressing/decompressing files (as you might know, ever since Why create a Huffman tree per character instead of a ...
2
votes
1answer
477 views

Why create a Huffman tree per character instead of a Node?

For a school assignment we're supposed to make a Java implementation of a compressor/decompresser using Huffman's algorithm. I've been reading a bit about it, specially this C++ tutorial: http://www....