On Wed, 12 Mar 2008 23:09:53 -0700 (PDT),
lo******@gmail.com wrote:
Dear,
I have one .gz(gzip) file. I want to coping all contents
of .gz file into character buffer.
I tried, but at end of buffer i am getting '0xcd' extra one byte in
buffer.Please tell, how I wrote C language program that will give the
extract content of file in buffer.
Are you by any chance working on (MS) Windows, in debug mode?
And (if so) how did you determine the length of the data you read?
The Windows debug runtime fills malloc'ed space with 0xCD
<caveatas a feature, this isn't required by the standard </>
so if you read actually N bytes into a buffer but try to use N+1,
you'll get an 'extra' byte of 0xCD.
- formerly david.thompson1 || achar(64) || worldnet.att.net