I new at this .Im using SharpZip to descompress a .bz file.I looked at the sample.The compressing works fine but when i try to decompress something i get an error
fsBZ2Archive = File.OpenRead(txtFileName.Text)
strOutputFilename = Path.GetDirectoryName(txtFileName.Text) & _
Path.GetFileNameWithoutExtension(txtFileName.Text)
fsOutput = File.Create(strOutputFilename)
BZip2.Decompress(fsBZ2Archive, fsOutput)
fsBZ2Archive.Close()
fsOutput.Flush() ------ Cannot access a closed file
fsOutput.Close()
Im using Visual Studio 2008
Thanks in advance
Hi,
Read the documentation. The bzip2 class is a simple wrapper that closes the stream you pass in. If you want to use the stream afterwards write another wrapper.
hth, -jr-