If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Pkzip..exellant!!

Goodday ppl,

Well this is something small but still had to share it anyway..My wife works with a program called panacea which is used in the medical profession
and she asked me to help her make backups of her work within the program so..I obviously thought ya..just another backup..This program uses pkzip and get this it compressed +-60meg,s into two 1,44 meg stiffies..I could not believe it so i went out into windows ,used winace and unzipped it guess what "60 odd meg!!!
My question though is this:Was this always the case because i know pkzip has been around since when or is it just because it is straight data that was compressed??

I've seen PKZip shrink data files of over 10 MB into something smaler than 5 kilobytes. Then again, those files only contained zeroes as data. Nothing else. Basically, what PKZip has to store is that the file contains 10 MB of zeroes...
If your wife is using Windows 2000 or XP (and an NTFS-formatted harddisk), she could gain a lot of diskspace by going to the folder containing the datafiles. Right-click on the folder to select the properties. In the properties page you click on 'Advanced'. Then check the setting 'Compress contents to save disk space' and Poof! She should gain about 55 MB more disk space.
The drawback could be that the computer will slow down if you have a fast harddisk and slow processor. The processor will have to lose some time to decompress those files when they are read or written. On the other hand, reading data from a compressed file means that you read smaller amounts of data and thus you have less reads/write with the harddisk. With a slow disk and fast processor, your computer might actually become faster after compression.

One thing is clear. That medical application is reserving a lot of diskspace which probably helps to speed it up. Most of those data files are probably filled with zeroes. The compression rate will drop once you start adding more data to the system though. It might compress to less than 2 MB now, but in the future, the backup might require more space because there are less recognisable patterns in them...

Text files are often limited to a small amount of characters. Often just linebreaks, spaces, the alphabet in upper and lower case, numbers and some other special characters. In general, a textfile will use about 100 of the 256 possible values that a character can have. Basically, since a character is 8 bits and only the lower 7 bits are used in textfiles, the compression algorithm can already remove 1/8th of the file size by storing the data in 7-bit format. That already reduces it by 12.5%.

Media and audio files tend to be compressed by default already. In uncompressed format, a single minute of spoken text could easily be several megabytes in size, depending on the quality. (*.WAV files tend to be stored uncompressed this way.) However, many of the file formats used will do some compression on the data to reduce the file size and they tend to have pretty big compression rates too. A WAV file of 50 MB could be reduced to a tenth of it's original size or even less by storing it as an *.MP3 or *.WMA file.

Compare compression with folding a piece of paper. Normally, you'd need a large surface to store a piece of paper. By folding it several times, you reduce the size (but make it thicker) so it's surface gets smaller. But you will get at one point where you can't fold the paper anymore because it gets too thick. (Somewhere around folding it 9 times or so.) The same is true with data compression. A file can be 'folded' up to a certain size but it won't get any smaller than that.

I would urge caution regarding using HDD compression tools. If anything goes wrong you may find data recovery rather difficult. The same can happen with encryption tools...................you need to be particularly dilligent with your backups

If you cannot do someone any good: don't do them any harm....
As long as you did this to one of these, the least of my little ones............you did it unto Me.
What profiteth a man if he gains the entire World at the expense of his immortal soul?

Originally posted here by nihil I would urge caution regarding using HDD compression tools. If anything goes wrong you may find data recovery rather difficult. The same can happen with encryption tools...................you need to be particularly dilligent with your backups

I fully support what nihil has said about using normal hdd compression tools.It is dangerous because the more compression you use the better the chances are of some files getting corrupted..The one i mentioned in the beginning is the one that the program itself uses at it,s own compression rate which i cannot alter..

Was this always the case because i know pkzip has been around since when or is it just because it is straight data that was compressed??

Well to make a long story short and to avoid all the technical explanations above, some data formats compress better than others. Bitmaps are a good example, which easily compress to 1/10 of thier original size, or better. A compression ratio like what you have seen is not unheard of, although it is uncommon. You apparently have found a data format which compresses better than most.

Government is like fire - a handy servant, but a dangerous master - George Washington
Government is not reason, it is not eloquence - it is force. - George Washington.