interdimensionalmeme@lemmy.ml to Linux@lemmy.ml • 15 hours agozcat shouldn't error out if you try to zcat an uncompressed file, it should just output the damned file !message-squaremessage-square9 fedilinkarrow-up127file-text
arrow-up127message-squarezcat shouldn't error out if you try to zcat an uncompressed file, it should just output the damned file !interdimensionalmeme@lemmy.ml to Linux@lemmy.ml • 15 hours agomessage-square9 Commentsfedilinkfile-text
minus-squareMalfeasant@lemm.eehexbear2·3 hours agoHow do you propose zcat tell the difference between an uncompressed file and a corrupted compressed file? Or are you saying if it doesn't recognize it as compressed, just dump the source file regardless? Because that could be annoying. linkfedilink
minus-squareinterdimensionalmeme@lemmy.mlhexagonhexbear2·2 hours agoEven a corrupt compressed files has a very different structure relative to plain text. "file" already has the code to detect exactly which. Still, failing on corrupted compression instead of failing on plaintext would be an improvement. linkfedilink
How do you propose zcat tell the difference between an uncompressed file and a corrupted compressed file? Or are you saying if it doesn't recognize it as compressed, just dump the source file regardless? Because that could be annoying.
Even a corrupt compressed files has a very different structure relative to plain text. "file" already has the code to detect exactly which.
Still, failing on corrupted compression instead of failing on plaintext would be an improvement.