Hacker News new | ask | show | jobs
by netsharc 29 days ago
But relying on them to tell the OS what type a file is, or allowing them to change the extension, isn't good either. lena.jpg doesn't become lena.pdf by changing the last 3 letters of the filename..
2 comments

It gets really complicated when you get into overlapping file types, like with ISOBMFF. An .mp4 can also, simultaneously, be a valid .3gp because those are profiles of ISOBMFF. On the other extreme, JPEG is secretly two different incompatible formats (JFIF and Exif), and a video file with a different codec in the same container, or even a different track layout, might as well be a different format.
> allowing them to change the extension, isn't good either

why not?

power to the people. At worst it just breaks. At best you get filetype chamelions that are straight up cool, yet harmless