Uncompressing Files Compact’ed on Windows 10 – How to Guide

compressionntfswindows-10-preview

I'm testing Windows 10 and one very interesting thing I found is new switches for compact:

Displays or alters the compression of files on NTFS partitions.

COMPACT [/C | /U] [/S[:dir]] [/A] [/I] [/F] [/Q] [/EXE[:algorithm]]
    [filename [...]]

<cut>

  /EXE      Use compression optimized for executable files which are read
    frequently and not modified.  Supported algorithms are:
    XPRESS4K  (fastest) (default)
    XPRESS8K
    XPRESS16K
    LZX       (most compact)

I've conducted an experiment:

compression type        | size (bytes)
––––––––––––––––––––––––+–––––––––––––
pre-win10:
no compression          |  46 652 204
LZNT1 (NTFS default)    |  26 230 789

new ones:
LZX                     |  15 749 125
XPRESS16K               |  20 094 981
XPRESS8K                |  21 131 269
XPRESS4K (/EXE default) |  23 011 333

non-transparent archivers:
7z 9.38 -tzip -mx=9     |  15 254 240
7z 9.38 -t7z -mx=9      |   7 522 003

as you can see, /EXE:LZX does really good, and, comparing to zip, there's no real tradeoff anymore by compression ration, but NTFS compression has much better availability (it's on-line).

Unfortunately (but unsurprisingly), these files cannot be opened on Windows 8.1 or any previous ones (checked it).

So, my question is, how to decompress files compressed with these "new methods" on previous Windowses? Just copying compact.exe from latest Windows 10 build does not work, unfortunately (but, again, unsurprisingly).

If there's none, then these new methods are basically limited to internal disk, and I'll need bootable Windows 10 media for files salvaging (in emergency).

Best Answer

These new compression methods are (claimed to be) implemented outside of NTFS, implemented as reparse points - leaving it to new (for Windows 10/Server 2016) filesystem filter driver(s) to handle them.

System compression, also known as "Compact OS", is a Windows feature that allows rarely modified files to be compressed using the XPRESS or LZX compression formats. It is not built directly into NTFS but rather is implemented using reparse points. This feature appeared in Windows 10 and it appears that many Windows 10 systems have been using it by default.

This repository contains a plugin which enables the NTFS-3G FUSE driver to transparently read from system-compressed files. It must be built against NTFS-3G version 2016.2.22AR.1 or later, since that was the first version to include support for reparse point plugins.

ntfs-3g-system-compression - README.md

Related Question