INFO: Copying Compressed Files

ID: Q130331


The information in this article applies to:
  • Microsoft Win32 Application Programming Interface (API), used with:
    • Microsoft Windows NT versions 3.5, 3.51, 4.0
    • Microsoft Windows 2000


SUMMARY

It is not possible to copy NTFS compressed files without uncompressing them. This functionality is not available in Windows NT versions 3.5 and 3.51; however, this feature may be included in a future version of Windows NT.

Compressed files are expanded via memory-mapped files. This minimizes the performance hit of expanding the file.


MORE INFORMATION

One of the new features found in Windows NT 3.51 is file compression. Files or directories can be compressed or decompressed by calling DeviceIoControl() with one of the following compression flags:


   FSCTL_SET_COMPRESSION : Sets the compression state of a file or
                           directory.

   FSCTL_GET_COMPRESSION : Obtains the compression state of a file
                           or directory. 
Two additional FSCTL codes are documented in the Win32 SDK as "not implemented in this release." They are FSCTL_READ_COMPRESSION and FSCTL_WRITE_COMPRESSION. These additional FSCTL codes will be part of the functionality that will allow you to read and write files on an NTFS compressed drive without having to decompress them first. Again, this functionality may be included in a future release of Windows NT.

Additional query words: 3.50 NTFS File Compression

Keywords : kbFileIO kbKernBase kbWinOS2000 kbDSupport kbGrpKernBase
Version : winnt:3.5,3.51,4.0
Platform : winnt
Issue type : kbinfo


Last Reviewed: January 5, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.