Sometimes the "size on disk" of a file is much larger than the "size" of the
file.
In fact, almost always.
It can't.
In other words, what should be done so the
"size on disk" is about the same as the "size"?
To understand the difference between "size" and "size on disk," and
why they differ, you need to understand how disk space is allocated to
files. It's done in units called "clusters." The size of the cluster
varies, depending on what file system is used (NTFS or FAT32) and the
size of the partition. With NTFS, the cluster size is normally
4Kbytes; with FAT32, it varies up to 64KB.
That means that the amount of disk space a file uses (size on disk) is
always a multiple of its cluster size. Assuming for example that you
are using NTFS, with a 4K cluster size, any file between 1 byte and
4096 bytes uses an entire cluster; any file between 4097 and 8192
bytes uses two clusters; and so on.
So any file with a size that is not an exact multiple of the drive's
cluster size wastes a portion of its last cluster, and that's why size
on disk is almost always more than size. That wasted space is known as
"cluster overhang" or "slack." Assuming a random distribution of file
sizes (not quite true, but close enough for our purposes here), on the
average each file wastes an amount of disk space equal to half the
cluster size. So the total waste due to slack is roughly equal to the
number of files on the drive multiplied by half the cluster size.
Now that you understand the difference between "size" and "size on
disk," let me point out that in today's world of very low priced hard
drives, the amount of space wasted to slack is insignificant. If you
have 100,000 files on an 80GB NTFS drive (substitute your own numbers
and redo the calculation, if those aren't accurate), you will waste
100,000 times 2048 bytes, or about 200MB of disk space. 200MB may seem
like a lot of bytes, but considering that that 80GB drive probably
cost something around $80US, it's only about 20 cents worth--certainly
not something to get excited about.