Hacker News new | ask | show | jobs
by RetroTechie 398 days ago
> Back in the day there were a bunch of `x2y` programs[1], like html2pdf, xls2csv, rst2odt, jpg2png, png2jpg, etc...

They're still around. A problem is loss of information on each conversion. For example, wav->mp3 loses info. Converting back (mp3->wav) won't get you the exact .wav you started with. Similar thing with file types supporting different resolution graphics, vector vs. bitmap, metadata being stripped, features in format A not supported in format B, etc.

Another problem is the explosion of M:N file format combinations. A possible fix would be a universal (?) in-between format, functioning as a container for [portions of a file] + whatever metadata was extracted from original. That way you can at least do conversions along the lines of video container formats, where container type is changed but video inside does not get decompressed/re-encoded. Or simular operations like extracting/shuffling pages in a pdf document.

All in all this is not an easy problem & therefore unlikely to be solved anytime soon.