C Board  

Go Back   C Board > Community Boards > Contests Board

Reply
 
LinkBack Thread Tools Display Modes
Old 09-20-2009, 09:48 PM   #16
Guest
 
Sebastiani's Avatar
 
Join Date: Aug 2001
Posts: 4,923
Quote:
Originally Posted by abachler View Post
I'm going to go ahead and pass. I know how compression works, I know how Huffman works. You are mistaken if you think that no compressors modify the data prior to the Huffman compression stage.
I'm not saying that it isn't. But that's just not the job of a Huffman encoder. That would be like an RLE/LZW/Huffman encoder, or what have you. The fact is you would have more than one compression model to transmit, and thus it wouldn't be a strictly Huffman encoder. Obviously, if you were to make a compression *utility* you would probably employ a number of compression algorithms internally. Like I said though it's a matter of delegation. If my utility first passes the data through an RLE encoder and then on to a Huffman coder, would it make sense that the Huffman coder would try to also perform an RLE, and thus yet another compression model to append to the output stream? And what if this gets passed to an LZW encoder that then itself tries to apply a Huffman encoding to it? Every compression method generates overhead. By separating each algorithm clearly we ensure that only one model is generated per compression phase.
Sebastiani is offline   Reply With Quote
Old 09-22-2009, 10:41 PM   #17
Guest
 
Sebastiani's Avatar
 
Join Date: Aug 2001
Posts: 4,923
Okay, well, it looks like we don't have any contestants at this point, so...for now, at least, I'm officially cancelling the contest.

If anyone's interested in reopening it, just send me a PM.
Sebastiani is offline   Reply With Quote
Old 10-12-2009, 01:57 AM   #18
Registered User
 
Join Date: Oct 2009
Posts: 1
Quote:
Originally Posted by Sebastiani View Post
The input file can be queried with something like 'stat', or opening it and seeking the end, etc. The output file won't exist until your function creates it. The reason I didn't opt for using FILE* was just to be flexible, eg: in case you want to use std streams instead, for example.

EDIT: and just to clarify by "make no assumptions about the size of the input" I mean don't structure your implementation in such a way that requires a certain maximum input size
Can you give some more samples? How great your info is! It really useful for me. Thanks.
________________
Anime Watching
hcm2009 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump


All times are GMT -6. The time now is 04:46 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0 RC2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22