SmartCompress FS monitors available disk space and automatically compresses your least-used files before storage runs out — losslessly, intelligently, with full restoration support.
Capabilities
Every component is purpose-built: monitoring, prioritisation, compression, metadata, and restoration — fully integrated.
Polls disk usage every 10 seconds via psutil. Triggers compression automatically when available space drops below a configurable threshold (default 85%).
Ranks candidate files by last-access time and size. Large files untouched for weeks are compressed first, maximising space recovered per cycle.
Gzip and Zlib are both supported. Every compressed file can be restored byte-for-byte to its original state — no data is ever discarded.
Original file paths, access timestamps, and algorithm choice are persisted in a JSON store. Decompression restores files to their exact original locations.
A Tkinter-based GUI provides manual compress and decompress controls, a live compressed-file registry, and a real-time disk usage display.
All compression and decompression events are timestamped and written to a log file, providing full auditability of every system action.
Interactive Demo
Press Run SmartCompress to simulate a full compression cycle — disk detection, file prioritisation, and lossless compression, step by step.
Architecture
SmartCompress FS runs as a self-managing loop. Once started, it requires no interaction unless you choose to intervene via the GUI.
A background loop polls disk usage every 10 seconds via psutil.disk_usage(). The threshold defaults to 85% but is fully configurable.
When usage exceeds the threshold, candidate files are collected and sorted by last-access time and size. System files are automatically excluded.
Top-ranked files are compressed with Gzip or Zlib. The original file's access and modification timestamps are recorded before compression begins.
Metadata is persisted to compression_metadata.json. Any compressed file can be restored to its exact original path and timestamp at any time.
Stack
The entire system runs on Python's standard library plus one external package. No frameworks, no build steps, no overhead.
Get it
Packaged as a standalone Windows executable. No Python installation required. Source available on GitHub.
Requires Windows 10 or 11 · Python 3.8+ for running from source