How to Compress Folders With NTFS Compression on Windows 11
🔍 WiseChecker

How to Compress Folders With NTFS Compression on Windows 11

Quick fix: Right-click folder → Properties → Advanced button. Tick Compress contents to save disk space. Apply → choose “Apply to subfolders and files.” NTFS transparently compresses files. Read/write speed slightly slower but works seamlessly. Best for text, logs, source code; poor for media (already compressed).

NTFS includes built-in transparent compression. Files appear normal in File Explorer; physically smaller on disk. Saves space for compressible files (text, code, logs). Doesn’t help for already-compressed files (JPEG, MP4, ZIP).

Symptom: Want to save disk space by compressing folders with NTFS’s built-in compression.
Affects: Windows 11 (and Windows 10) with NTFS-formatted drives.
Fix time: ~10 minutes (initial compression).

ADVERTISEMENT

What causes this

NTFS compression is at the filesystem level. Compressed files use less physical disk space. Reads decompress on-the-fly; writes compress. Tradeoff: ~5-10% CPU overhead and slightly slower I/O. Best gains: text files (50-80% reduction), source code, logs, uncompressed images. Poor: video, already-compressed archives, encrypted files.

Method 1: Compress via File Explorer Properties

The standard route.

  1. Right-click folder → Properties.
  2. Click Advanced button.
  3. Tick Compress contents to save disk space.
  4. Click OK on Advanced dialog. Apply on Properties.
  5. Confirm: Apply changes to this folder, subfolders and files. Click OK.
  6. Compression runs in background. For large folders: takes minutes to hours.
  7. Compressed files appear with blue arrows (indicates compression) in File Explorer.
  8. Open file size shown in Explorer matches uncompressed. Right-click → Properties shows: Size = uncompressed; Size on disk = compressed.

This is the standard compression.

ADVERTISEMENT

Method 2: Compress via PowerShell for scripting

For automated setup.

  1. Open Terminal (Admin).
  2. Compress folder:
    compact /c /s /i "C:\Path\to\folder"

    Flags: /c compress, /s subfolders, /i ignore errors.

  3. Decompress:
    compact /u /s /i "C:\Path\to\folder"
  4. For modern LZX compression (Windows 10+, better ratio at higher CPU cost):
    compact /c /s /a /i /exe:lzx "C:\Path\to\folder"

    LZX compresses ~10-20% more than default LZNT1 but slower.

  5. Other algorithms: xpress4k (best speed), xpress8k, xpress16k, lzx (best compression).
  6. For compact /q to query current compression: compact /q in folder.

PowerShell is the right approach for scripting.

Method 3: Choose what to compress for best results

For maximizing space savings.

  1. Best compression candidates:
    • Text files: .txt, .log, .csv, .json, .xml. 70-90% reduction.
    • Source code: .py, .js, .c, .cpp, .html. 60-80% reduction.
    • Office docs: .docx, .xlsx are already compressed; minimal gain.
    • Database files: .sqlite, .mdb. Often compressible.
    • Configuration files: .ini, .conf, .yaml.
  2. Poor candidates:
    • Video: .mp4, .mkv, .avi. Already compressed. 0% gain.
    • Compressed archives: .zip, .rar, .7z. 0% gain.
    • JPEG/PNG images: already compressed. Minimal gain.
    • Encrypted files: essentially incompressible.
  3. For Visual Studio projects: source folders compress well; obj, bin folders contain mostly executables that don’t benefit.
  4. For Documents folders: mostly text-based; compress well. ~30-50% overall savings.
  5. Don’t compress system folders (C:\Windows, Program Files); Windows handles compression internally for these. Don’t risk corruption.

This is the right path for targeted compression.

How to verify the fix worked

  • Right-click compressed folder → Properties. Size on disk shows reduced value.
  • Compressed files have blue arrows in Explorer (small badge).
  • Disk Cleanup or WizTree shows reduced total usage in that folder.

If none of these work

If compression doesn’t save space: Already-compressed content: video, JPEG, archives don’t compress further. For drive that won’t compress: NTFS compression only on NTFS volumes. Check FS type: fsutil fsinfo volumeinfo C:\. For sparse files: already minimally allocated; compression adds little. For System32 attempts: protected; can’t compress safely. For TRIM-enabled SSDs: compression reduces writes (helpful for SSD wear). Use with normal TRIM. For performance-critical folders: don’t compress. CPU overhead on every read/write affects responsiveness.

Bottom line: Right-click folder → Properties → Advanced → tick “Compress contents.” Best for text, code, logs (70-90% savings). Poor for video, archives, images. PowerShell compact /c /s for scripted compression.

ADVERTISEMENT