Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
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?
[Discipulus]: floating was the keyword and.. to use supersearch is plus sign not a (plus) sin
Discipulus wonders if just numbers less than 18 are really floating..( chemical humor)
[Lady_Aleena]: Hello.

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (6)
As of 2017-06-26 21:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (594 votes). Check out past polls.