Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Zip Files - End of File before the true EOF.

Status
Not open for further replies.

PowerNuke

Programmer
Oct 7, 2001
10
0
0
US
Hi,

I am working with zipfiles to get familiar with C. I've written a program that uses fread to process each local header file, then use fseek to skip to the next local header file. My goal is to print out the filenames of each file in the zipfile.

Unfortunately, after processing multiple files, I hit an EOF. It is far from the true end of file. I processed as many as 36 files in a 299 file zip, but then I trap an end of file. Anyone had experience with this, or has some debugging advice?
 
hi,
have u opened it in the binary mode??.i donno much abt zip files structure,but that can be a reason,if u r opening a binary file in ascii mode.hop this helps.correct me if i am wrong.bye
-- neo13
 
You are so right! I've been fighting that for a week. :( Thanks for your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top