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

Original title: Decayfmt – a file format that corrupts itself a little every time you open it

> Hacker News story 49390206 · language: en · submitted 2026-08-21
> Web version: https://zeli.app/story/49390206
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 52 · by [unprovable](<https://news.ycombinator.com/user?id=unprovable>) · 💬 29
[original](<https://github.com/aravpanwar/decayfmt>) · [HN discussion](<https://news.ycombinator.com/item?id=49390206>)

## Summary

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.

## Key quote

> Corruption only ever swaps in printable characters, so text garbles into readable-looking nonsense rather than binary noise.

## HN discussion (29 comments)

### [BugsJustFindMe](<https://news.ycombinator.com/item?id=49392990>)

> 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](<https://news.ycombinator.com/item?id=49392717>)

> 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 :)
>
> [1] https://metacpan.org/pod/Tie::Hash::Cannabinol

### [fnordlord](<https://news.ycombinator.com/item?id=49394413>)

> 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.

---

## Cite

- Page: https://zeli.app/story/49390206
- Date: 2026-08-21
- Source: github.com (https://github.com/aravpanwar/decayfmt)
- Hacker News: https://news.ycombinator.com/item?id=49390206

## Other languages

- zh: https://zeli.app/zh/story/49390206 · markdown: https://zeli.app/zh/story/49390206.md
- ja: https://zeli.app/ja/story/49390206 · markdown: https://zeli.app/ja/story/49390206.md
- ko: https://zeli.app/ko/story/49390206 · markdown: https://zeli.app/ko/story/49390206.md
- de: https://zeli.app/de/story/49390206 · markdown: https://zeli.app/de/story/49390206.md
- es: https://zeli.app/es/story/49390206 · markdown: https://zeli.app/es/story/49390206.md
- ru: https://zeli.app/ru/story/49390206 · markdown: https://zeli.app/ru/story/49390206.md
