Robert Citek wrote:
>
> Hello all,
>
> Questions:
> How can I tell if a file is compressed (gzip or compress)?
> Can I use seek/tell on a pipe or fifo?
> If not, are there work-arounds?
>
here is a OS-independent way to check if a file is gzip or not:
#!/usr/bin/perl -w
use strict;
if(is_zi
On Sep 22, Robert Citek said:
>How can I tell if a file is compressed (gzip or compress)?
I believe the File::MMagic will do what you need.
>Can I use seek/tell on a pipe or fifo?
Doesn't look that way.
--
Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/
RPI Acaci
[EMAIL PROTECTED] wrote:
>
> Hi:
Hello,
>I'm trying Compression::Bzip2 to compress a file before upload it to
> a server via ftp, but Compression::Bzip2::compress is doing the file
> bigger, perldoc says:
>
> COMPRESSION FUNCTIONS
>$dest = Compress::Bzip2::compress($string)
>
>
Try Archive::Zip (to zip it into Zip format) or Compress:Zlib (GZip or
deflate/inflate compression schemes).
They are available from http://www.activestate.com and please use your PPM
to download the same.
- Original Message -
From: "Zhe Hong" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>