I have an application which I can not change, that writes to a big 250 GB plain text file. After compressing with GZ it is only 30 GB.
This application has no option of compressing it's output, and it can only write to a file name (not to stdout).
Is there a way that I can set up for the output to be compressed immediately, without first storing the 250 GB file on my disk?
I also need the other way around, to fool the application so that it reads a plaintext file which in reality is compressed.

chattrA file with the `c' attribute set is automatically compressed on the disk by the kernel. A read from this file returns uncompressed data. A write to this file compresses data before storing them on the disk. Note: please make sure to read the bugs and limitations section at the end of this document. – xenoterracide♦ Nov 6 '10 at 20:38chattrand the underlying kernel code. There's just no special behavior (such as changing the way the contents of the file is stored) in the Linux kernel if you use it. – Gilles Nov 7 '10 at 16:18