Click here to Skip to main content
15,891,431 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I have a vector of numbers, and I wanted to do compression using Huffman coding. I saw a lot of code on the internet but any input that I can not be combined. I also have to decompress the output vector of numbers.

1 - void code(vector input , vector output);

2 - void decode(vector input , vector output);

//................................................. input = > vector in ;

output= > vector out1 , out2;

code(in,out1);

decode(out1,out2);

//.........................................

MY PROBLEM IS , How do I put in the input vector of numbers(float) ?
Posted
Updated 24-Dec-13 12:43pm
v3
Comments
Andreas Gieriet 24-Dec-13 17:35pm    
I read this as "quick quick quick gimme everything now".
What is the problem/question? I mean you grab an arbitrary code from the internet and expect us to solve your task?
Do you have any idea what huffman encoding is? Any test data to verify?
There are too many people around not knowing what they do... Are you one of these?
Sorry for my blunt comment - I could not hold back.
Cheers
Andi
PS: you seem to have the code from Nick Mascola, e.g. from here[^]. You might consider to ask the author directly or learn enough about huffmann encoding to solve it yourself.
CPallini 24-Dec-13 18:24pm    
My virtual 5.
Ghsoftco@gmail.com 24-Dec-13 18:31pm    
I want to use vector < float> instead of from file . what's your idea ?
Nelek 24-Dec-13 18:42pm    
his idea is that you need to learn and dodumentate, then come with a question and not with a "gimmecode"
Sergey Alexandrovich Kryukov 24-Dec-13 20:32pm    
Golden words... :-)
—SA

1 solution

In addition to Andreas good suggestion, I wonder if there is any article, here at Code Project, on the argument[^].
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 24-Dec-13 20:32pm    
5ed; and I wish I could up-vote the response by Andreas...
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900