decayfmt: a Rust file format that corrupts itself a little every time you open it
Decayfmt – a file format that corrupts itself a little every time you open it

decayfmt is a Rust file format that makes decay a first-class property: every time you open a file, it permanently corrupts a little more of the data on disk, with the corruption rate set by a number in the filename. It supports images (.idcy) and text (.tdcy), where higher instability values mean faster degradation. The corruption is honest and unrecoverable without a backup, and the project emphasizes that it's a social contract, not cryptography or DRM. The README includes examples, installation instructions, and details on the corruption algorithm.
Corruption only ever swaps in printable characters, so text garbles into readable-looking nonsense rather than binary noise.
- BugsJustFindMe
This is NOT a file format that corrupts itself. This is a file reader that corrupts files. There's a big difference. Nothing about the format itself causes or requires corruption. A better tagline would be "decayfmt is a social contract enforced by pinky promise".
- jasonpeacock
Reminds me of Tie::Hash::Cannabinol:
Tie::Hash::Cannabinol is a completely useless demonstration of how to use Tie::StdHash to
pervert the behaviour of Perl hashes. Once a hash has been tied to Tie::Hash::Cannabinol,
there is a 25% chance that it will forget anything that you tell it immediately and a
further 25% chance that it won't be able to retrieve any information you ask it for. Any
information that it does return will be pulled at random from its keys.
Oh, and the return value from exists isn't to be trusted either :)
- fnordlord
From what I remember, MS Paint do something similar when you would save the image as a jpeg. It would apply the algorithm each save and the image would degrade a bit each time. It was super fun.