It is quite easy yo program a normal compression program for text..
It is quite easy yo program a normal compression program for text..
Any examples? How would you create a text file compresser? I have some ideas...
a text file compressor is a lossless compressor where some aspects of its algorithm are altered in favor of text compression. Some aspects of text:
- text uses a smaller character set than the 256 choices availiable.
- text often has words or phrases that repeat, allowing more compression
where data can be random, or can vary greatly from data type to data type, text is pretty much uniform.
i don't have any examples with me... here's an example of text substitution in text compression:
assign each word to a numberit's not what your country can do for you it's what you can do for your country
then you recreate the message:it's 1
not 2
what 3
your 4
country 5
can 6
do 7
for 8
you 9
this message is more compressed. of course, you'll have to attach the dictionary to the file, and that costs a lot of bytes. but as the message gets longer, the efficiency of th ecompression gets higher.1 2 3 4 5 6 7 8 9 1 3 9 6 7 8 4 5
the internet can show you a better explanation
that's a horrid example...it doesn't even compress...it just makes things bigger...lol...
as i said before the compression goes up the bigger the compressed item.
ARGX! We lots my big ol' post explaining why that was a bad compression scheme and citing points to make it better...
::goes to shoot himself::