Suppose you have used DeflaterOutputStream to create a compressed data file. Later you want to add more data by appending:
BinaryWriter writer = new BinaryWriter( new DeflaterOutputStream(new FileStream(openFileDialog1.FileName, FileMode.Append)));
Note FileMode.Append.
Is this supposed to work? It seems that this corrupts the file. How is this supposed to be done, assumed that data written is so large that there's no point in reading it back to memory and rewrite everything again.