Unix Programming - compressing multiple buffers

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > January 2006 > compressing multiple buffers





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author compressing multiple buffers
nike

2006-01-16, 7:50 am

Hi,

can anyone please point me to a library that provides interfaces for
compressing multiple buffers/streams into a single buffer using
standard algorithms.

Thanks in advance,

Pascal Bourguignon

2006-01-16, 6:05 pm

"nike" <arun.ccjl@gmail.com> writes:
> can anyone please point me to a library that provides interfaces for
> compressing multiple buffers/streams into a single buffer using
> standard algorithms.


http://www.gzip.org/

--
__Pascal Bourguignon__ http://www.informatimago.com/

"Logiciels libres : nourris au code source sans farine animale."
nike

2006-01-16, 6:05 pm

Thanks for your reply.

But what exactly I need is an interface which will be capable of
compressing multiple buffers into a single buffer.

AFAIK, gzip takes one file; compresses it.

Pascal Bourguignon

2006-01-16, 8:51 pm

"nike" <arun.ccjl@gmail.com> writes:

> Thanks for your reply.
>
> But what exactly I need is an interface which will be capable of
> compressing multiple buffers into a single buffer.
>
> AFAIK, gzip takes one file; compresses it.


You can concatenate several files into one compressed file:
cat *.buffer|gzip>compressed.buffer.gz


Behind gzip, there's zlib http://www.zlib.net/, the library which you
can use to implement your function, if you want to do the compression
in memory. Read: http://www.zlib.net/manual.html

--
__Pascal Bourguignon__ http://www.informatimago.com/

"Klingon function calls do not have "parameters" -- they have
"arguments" and they ALWAYS WIN THEM."
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com