• HomeBoards
  • RulesRules
  • HelpHelp
  • WikiWiki
  • Donate

Author Topic: Anyone used gzopen in zlib?  (Read 6641 times)

clach04 (OP)

  • Posts: 257
Anyone used gzopen in zlib?
« on: January 11, 2011, 05:04:04 am »
Anyone used gzopen in zlib in the native SDK?

I'm getting hangs/crashes when it gets called :(

Thanks!

clach04 (OP)

  • Posts: 257
Re: Anyone used gzopen in zlib?
« Reply #1 on: January 12, 2011, 03:27:21 am »
Update on progress, no fixes yet.

zlib works fine for png and zip files. However none of these use the gzopen (etc.) routines.

Checking the source for gzopen, it appears that open, read, etc. is used NOT fopen. The open, read, etc. code in the SDK appears to wrap around fopen, fread.

My hunch is that the open, read, write code is broken (either subtly or badly), however I've not researched this further so this is not definitive. Any thoughts?

flatmush

  • Posts: 288
Re: Anyone used gzopen in zlib?
« Reply #2 on: January 13, 2011, 09:09:45 pm »
I've analysed the open/close/read/write functions and though I haven't tested them fully, they look pretty sane.

I unfortunately don't have much spare time to look at this at the minute (at least not before next week), I'd suggest you write a simple test program that opens a file and writes it to another file (filecopy), if that breaks then it's likely that there's an error, otherwise it's probably something else.

Not all the open/close flags and functionality are supported, it it's using weird features or odd file paths (file path parsing is still a bit simple) then that could cause it.