• Forum
  • Lounge
  • Why size is smaller than size on disk on

 
Why size is smaller than size on disk on windows 7

Hi all:
i just spotted this strange phenomenon when i checked out the properties of my normal doc file
size 156KB
size on disk 136KB


at first glance,this really struck me,i knew there is allocation unit size in the windows system which specifies the minimum allocation unit size when storing a file,but consider in what case can size on disk be smaller than size(actual size ? Is it?).

Thanks in advance!
in what case can size
on disk be smaller than size
When the file is compressed with NTFS compression.
How is it compressed? That's always bothered me, how can you compress txt files?? It's just characters.
Go do some research on file compression. One of the most simple methods, for example, is to search for large sequences of repeating bytes and represent them with said byte and a counter (eg. 69 69 69 69 becomes 69 04).
Very interesting, thank you I'll look into it.
@NULL,yes,my current file system is indeed ntfs,but is the ntfs compression executed automatically since i dont remember i have asked the computer to do it for me.If that is the case,how can i stop the auto file compression process? thanks
Last edited on
i already know how to disable the compression,simply right click your partition icon and you will see.Anyway,thank you very much.
Why would you want to do that?
Maybe marginally faster file loading?
And transfer. File system compression renders DMA unusable. Any data coming from or going to a compressed file system has to go through the CPU.
so, i made a right decision.
closed account (EzwRko23)

And transfer. File system compression renders DMA unusable.


ANY file has to go to the CPU at some time. DMA works regardless filesystem is compressed or not. DMA is used to avoid bothering CPU while reasonably slow disk is reading and transferring its data.
When raw data isfinally transferred to RAM, the CPU reads it and decompresses it in a fraction of time required for the transfer. Compression accelerates reading data - because less data needs to be transferred. How do you think, why serious data-warehouse vendors use compression by default? Or why database systems mostly count IO cost, not CPU cost in their query cost estimates?


Last edited on
Topic archived. No new replies allowed.