Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Re: Different compression behaviours with Compress::Zlib

by bikeNomad (Priest)
on Sep 12, 2001 at 02:02 UTC ( #111817=note: print w/replies, xml ) Need Help??

in reply to Different compression behaviours with Compress::Zlib

Yes. There is more to a gzipped file than a gzipped data stream. There's also a file header and footer, as you've found out.

If you do the in-memory compression without using gzopen() etc. you will need to do in-memory decompression to read it.

Or you could just write the header and footer yourself.

You might consider trying afio, which is like cpio but can compress individual files. It also knows about tapes. When combined with reasonable buffering (like Kbackup's Multibuf), you won't see any slowdown from its spawning gzip to compress streams.

In general, the answer to streaming tape drives is good buffering; this may be difficult to do in a single Perl process. You may want to put a dual-buffer or buffer-pool program in between your program and the tape. If you use Multibuf, it will also detect end-of-medium conditions and allow you to change tapes so you can have multiple volumes.

  • Comment on Re: Different compression behaviours with Compress::Zlib

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://111817]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2021-04-13 02:25 GMT
Find Nodes?
    Voting Booth?

    No recent polls found