473,385 Members | 1,855 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

fgets & zlib

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

thank

Jan 29 '07 #1
2 2225
In article <11**********************@v45g2000cwv.googlegroups .com>,
<gi***************@gmail.comwrote:
>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
You mean something like the gzgets() function that is
documented in zlib.h -- documentation that is referred to on
the zlib manual page, and in the zlib README file at the top
level of the zlib distribution?

If so, then the question falls outside the scope of what is
defined in the C language standard, and is thus not
appropriate for comp.lang.c; you should consult
documentation specific to your implementation.
--
Is there any thing whereof it may be said, See, this is new? It hath
been already of old time, which was before us. -- Ecclesiastes
Jan 29 '07 #2
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
Jan 29 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Alan Toppen | last post by:
I was unable to use the ZipFile class in the zipfile module in Python2.4. I got an error that zlib could not be found. Comparing my Python 2.2 installation I noticed Python 2.4 was missing a...
1
by: Dennis Powell | last post by:
Does anyone have a successful implementaion of the zlib.dll in VB. Net they can show me. I'm writting a class encaplsulating zlib functionality and I keep getting a System.NullReferenceException...
0
by: Jan Prochazka | last post by:
Hi, I need to decompress zip archive. I wrote a parser of zip file, i obtain the compressed data, but when i call zlib.decompress(data) on them, it throws this error: decbuf =...
7
by: giuseppe.cannella | last post by:
i need to read a row on a bzip2 file like the fgets function does on a text file can you help me to find this function thank
4
by: shamzz | last post by:
Hi, I've compiled (configure/make/make install) Python 2.4.4 from source on Suse Linux Enterprise Server 9 (x64). I need Python to be compiled with Zlib so that I can compile and use Zope. ...
285
by: Sheth Raxit | last post by:
Machine 1 : bash-3.00$ uname -a SunOS <hostname5.10 Generic_118822-30 sun4u sparc SUNW,Sun-Fire-280R bash-3.00$ gcc -v Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/2.95.3/...
4
by: MZ | last post by:
Hello! I`ve tried to instal zlib library to use zip functions to pack files into zip archive. I don`t know how I have to configure zlib to make it work. I have built up php.ini file and...
6
by: Gert Kok | last post by:
When fgets() reads a string that ands with <<<EOT, the string is truncated after << and a lot of following input is discarded. When <<<EOT is changed to <<< EOT, behaviour is as I expect it. ...
2
by: rajevar | last post by:
hi, i have seen various post related to this topic but i couldnt resolve my issue yet. Im using python version 2.5 on Linux environment this is the error im getting if i try to import zlib ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.