A file compressor is great for shrinking stored files, but it depresses me whenever I see a file grow instead of shrink. So what I am looking for is a file compression algorithm that never inflates any files, although it is allowed that some files (not all of course!) have the same length after "compression". Ideally it should work on files of all sizes, but I would be satisfied with a compressor that operates only on files larger than 1MB.
Can you provide such an algorithm? No programming knowledge is required for this problem.
I don't think such a zipper is possible without resorting to loopholes or other lateral thinking.
So here's one:
The zipper program creates an external file, and moves all memory there. What's left is only the information of where to find this external file--certainly less than 1 MB.
A similar solution would be to have a whole set of zipping algorithms, and look for the one that optimally zips the file, and then create an external file identifying which algorithm was used.
I also like FK's solution, which relies on the fact that no real file will be labeled as a zip file by accident.
Edited on October 22, 2006, 5:24 pm
|
Posted by Tristan
on 2006-10-22 17:22:30 |