And I thought you'd just suggesting running file(1) on the file. So between a call to file(1) and just reading the first two bytes which are going to be read anyway... I don't see how that's particularly expensive. But then all this only applies if you want to detect GZip/compress files which don't use a .gz/.Z extension.
__SIG__ use B; printf "You are here %08x\n", unpack "L!", unpack "P4", pack "L!", B::svref_2object(sub{})->OUTSIDE;
In reply to Re^6: Compressed content module
by diotalevi
in thread Compressed content module
by simon.proctor
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |