Ever open a .bin file in Notepad and get unreadable garbage? That’s not corruption, that’s the whole point.
BinaryWriter paired with FileStream lets you write raw bytes straight to disk, skipping the text-encoding tax completely. An int stays 4 bytes, not a string of digits you have to parse back later.
using(var writer = new BinaryWriter(fs))
{
writer.Write(1985); // <<< writes raw int bytes, not text
writer.Write(”Skynet”);
}This combo has been in .NET since version 1.0, back when disk space was precious and nobody wanted text fluff bloating their files.
Basically it’s how Skynet would store data - efficient, cold, and completely unreadable to humans.
Try it yourself (no setup required): https://dotnetfiddle.net/eB5d8F

