3 ms·
Back in the olden days, when people were using protocols like Kermit and XModem to download their questionable images from BBS's, You would often get a file who
by 13of40 4y ago
Back in the olden days, when people were using protocols like Kermit and XModem to download their questionable images from BBS's, You would often get a file whose size was rounded up to the nearest block size. In that situation, failing for extra data at the end would have been a fatal move for someone implementing an image decoder, and I think PNG might be just barely old enough that the designers remembered that.
- Dalewyn 4y agoFrom a usability perspective, it's preferable to recover from and workaround any data stream errors rather than crash with an exception error. Why? Because users have stuff to do. They don't know about and don't care for errors. The most prominent example are web browsers. Browsers are supposed to crash when fed invalid HTML, and this was even mandated when XHTML was trying to replace HTML. Users fucking hated it, and XHTML crashed and burned and HTML with its error-safe handling has stayed to this day.