Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

If one turns on drive compression in Windows Server 2003 (ignoring dire warnings of performance), how does random access to that file work? Does Windows create a temporary uncompressed version of the file? Or does it uncompress it on the fly (yikes performance!). If the later, for a 5GB file, would it have to uncompress the entire file just to get at the last few bytes? Or is the compression algorithm such that large files are not compressed in one long stream but broken down into blocks?

Cheers, Rob.

share|improve this question

The compression Algorithm used by NTFS provides compressed seeks and reads so only the portion you want to read needs to be decompressed see Reading from Compressed Files

share|improve this answer
Having implemented the LZW compression algorithm in the past, I can see how this would work. However, that article states using specific LZ API calls which one assumes the application has to implement itself. I'm thinking here of your normal application which isn't aware the file is compressed so will issue normal file seek operations. However, as you've made me aware of LZSEEK, the operating system could potentially use these itself behind the scenes. – Rob Nicholson Apr 7 '11 at 7:48
yes application are unaware of whether a file is stored as compressed on the disk – Jim B Apr 7 '11 at 13:42

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.