-
Reading compressed files
Hi,
Does anyone know of a library on Solaris that has functions to allow you to read from a compressed file? I have a large number of compressed files that I need to process. I could write a wrapper script that uncompresses the file, passes the uncompressed file as an argument to my program and recompresses it again. But it would be nicer if I could do it all within the program, just passing the compressed file as the argument. Does anyone know of such a library?
Thanks
Pete
-
There's a zillion and one compressed file formats. Are you referring to files that were compressed with the 'compress' program or something else? Have you tried zlib?
-
Read from stdin:
Code:
zcat file.Z | myprogram
..or .
uncompress <filename> | myprogram
-
Yes, compressed with the compress utility to produce a .Z file. Have not tried zlib, but I have had a look and there is a zlib.h in /usr/include. I will do a google search and see if I can turn up a function list and maybe some examples of its use.
Thanks
Pete
-