Do you mean that the system will try to compress whatever gigabytes of random data?
> secrets.txt
the file is truncated, freeing blocks 1-999 (usually block 0 is zero-filled.) If you proceed to write random data it will go to newly-allocated blocks. Then a raw read of the original blocks will expose your secret data.With dd and notrunc, the random data goes to the original blocks, overwriting your secrets.