gi***************@gmail.com wrote:
i need to read a row on a gzipped file like the fgets function does on
a text file
can you help me to find this function
I hope I understand you correctly when I assume that you want
to read a line from a file that is currently zipped and don't
want to unpack it to a file on disk before reading the line.
In that case you will have to use a third-party library since
the C language doesn't come with support for dealing with zip-
ped files. I don't know if a library exists that allows you to
read lines from zipped files, but a good starting point for a
search for something like this might be
http://zlib.net.
There you also find a link to a mailing list dedicated to zlib,
perhaps someone there will be able to tell you more.
<OT>
If you are on a system that has something like the (non-C-stand-
ard but POSIX) function popen() and you don't care about porta-
bility to systems that don't you could use that function to start
the 'unzip' program to extract the zipped file to stdout and then
use fgets() on the FILE pointer popen() returns on success.
</OT>
Regards, Jens
--
\ Jens Thoms Toerring ___
jt@toerring.de
\__________________________
http://toerring.de