Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (7)
As of 2014-10-26 08:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (152 votes), past polls