I'm trying to read from a Stream and write to another Stream. The output stream is a disk file, whereas the input stream is one provided by SharpZip (http://www.icsharpcode.net/OpenSource/SharpZipLib/Default.aspx
I've put a BinaryReader on the SharpZip Stream and a BinaryWriter on the disk file's handle.
Whenever the stream data is copied I run into glitches that result in truncated files, 0-byte files, files that are closed before they've started to be written, etc. In general it appears that BinaryWriter is executing in a different, slower thread than the read operations. However, I haven't put any multithreading code into my app.
Here is applicable code:
Outfile = new FileStream((UT2004Location
+ en.Value.ToString()), ((bOverwrite) ? (FileMode.Create) : (FileMode.CreateNew)), FileAccess.Write);
Output = new BinaryWriter(Outfile);
// Read in data
Instream = Infile.GetInputStream(Infi
Input = new BinaryReader(Instream);
Size = 2048;
Size = Input.Read(Buffer, 0, Buffer.Length);
if (Size > 0)
Thanks in advance,