EOF not detected

J

jk

Hi there,

I'm trying to decompress a compressed file by applying
"DeflateStream.Read()" from the beginning to the end of the stream. I've
tested this with many files both compressed and not. In the latter case you
normally get an "InvalidDataException" on the first call to "Read()" but not
always. I'm not sure why it doesn't always result in that exception but in
any case, I just tried testing it on an arbitrary ".ncb" file (the same one
created by Visual Studio and sitting in my solution's folder) and
"DeflateStream.Read()" never even detects an EOF condition. It always
returns non-zero so my "Read()" loop never exits. For other invalid files
I've tried this doesn't happen. This is flaky and presumably broken
behaviour to say the least. Any ideas? Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top