C++Talk.NET Forum Index C++Talk.NET
C++ language newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

huffman compression using c++

 
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ Language (Moderated)
View previous topic :: View next topic  
Author Message
tvsivakumar@gmail.com
Guest





PostPosted: Fri Jul 15, 2005 11:08 am    Post subject: huffman compression using c++ Reply with quote



I have done a project in huffman data compression. But i have few
queries regarding my design. I have a class which contains a map which
is nothing but the code for all the characters which it encounters
while reading a file. But should my reading and writing the decoded
version to be in the member function or should it be in the main? And
if you know any of the sites where there is code in c language and c++
language kindly give me the links to see the source code.


[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

Back to top
gmramaswamy@gmail.com
Guest





PostPosted: Sat Jul 16, 2005 11:45 pm    Post subject: Re: huffman compression using c++ Reply with quote



i dont know much about the algorithm here. But i believe these
operations should be in separate class which uses your map class and
has member functions that does encoding and decoding. This will make
the class complete and system object oriented. Moreover main can
written based on interface and not on implemention. So incase you
decide to ship it as library in future it will be easier.


[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

Back to top
NJS
Guest





PostPosted: Mon Jul 18, 2005 8:17 am    Post subject: Re: huffman compression using c++ Reply with quote



This isn't directly related to your design question, but the following
article may be of interest to you anyway:

Priority Queues and the STL
http://www.dogma.net/markn/articles/pq_stl/priority.htm

There is a pretty neat example applying priority queues to Huffman
compression near the bottom of the article.

- Niek Sanders


[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

Back to top
Display posts from previous:   
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ Language (Moderated) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.