Copying Compressed Files

Last reviewed: September 25, 1995
Article ID: Q130331
The information in this article applies to:
  • Microsoft Win32 Application Programming Interface (API) included with:

        - Microsoft Windows NT versions 3.5 and 3.51
    

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 reference words: 3.50 NTFS File Compression
KBCategory: kbprg kbusage
KBSubcategory: BseFileIo


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: September 25, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.