fileName is a valid XML file. I verified that the file stream is loading the file properly, and there is a zero-byte file being created for destination. However, this line: while ((bytesRead = sourceStream.Read(buffer, 0, buffer.Length)) > 0) raises this error: This CompressedStream object does not support reading or decompressing.
What am I missing?
Imported from legacy forums. Posted by Michael (had 1144 views)
I think you did a mistake when copying the code from the StreamDemo project.
The DoCompress() and DoDecompress() methods in the project are slightly different. The creation of the sourceStream and destStream are the same, but the compStream and the call to StreamCopy are different. You seem to have use the StreamCopy call from DoDecompress() but with the compStream code from DoCompress().
Imported from legacy forums. Posted by Diane [Xceed] (had 308 views)