I was thinking of a way to go about compressing and decompressing files with a PHP script. You'd simply upload your script to the webserver, it'd automatically unpackage them to a temporary place (filesystem or database). Then it would delete them when you were done using them.
This was my original thought:
a pattern 10 characters long could be compressed down to 6 characters. This would reduce the size of the file by almost half (40% smaller). Then I realized that would cause problems with the program confusing certain data with other data...
Anyone have any idea of a compression algorithm to use?
Note: This post was probably confusing as hell... sorry
PHP File Packager
Moderator: General Moderators
http://pear.php.net/pepr/pepr-proposal-show.php?id=88 might be of some interest too.
I don't think you guys get me exactly... I'm wanting to create my own compression algorithm. I don't want to use an Open Source one or anything like that.
This is mostly just to create a crazy compression. I have one idea, which will be good and bad. If you have an extremely small file (3 characters) your package will end up being bigger. However, if you have a really big file, you will end up reducing the size by at least 50%
This is mostly just to create a crazy compression. I have one idea, which will be good and bad. If you have an extremely small file (3 characters) your package will end up being bigger. However, if you have a really big file, you will end up reducing the size by at least 50%
-
d3ad1ysp0rk
- Forum Donator
- Posts: 1661
- Joined: Mon Oct 20, 2003 8:31 pm
- Location: Maine, USA
Check filesize before compression. If the file is already small enough, don't compress it.This is mostly just to create a crazy compression. I have one idea, which will be good and bad. If you have an extremely small file (3 characters) your package will end up being bigger. However, if you have a really big file, you will end up reducing the size by at least 50%