Corne van Biljon wrote:
> Hello
>
> I would like to zip a file, specified by the user, from within a C
> program. Currently I use the system() command to invoke gzip. Is there a
> compression library or routenes out there somewhere, or is there a
> better way of doing this ?
>
> Thanks
There are compression libraries, but I don't see their advantage in
this case, nor do I know if they will produce a true "gzip" format
file. If the problem is waiting for system() to complete on a long
gzipping, consider forking a process to do it.
Another possibility is to use popen() with the appropriate flags to
gzip to deal with stdin/stdout.
Dave
--