Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

1 Answer 1

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

 
discard

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.