.net - DotNetZip extracting to stream problems using provided code sample -
I am trying to open a zip file and extract a password and 256 AES encrypted text file in a stream without which I Put a copy of the text on the drive you can read if I understand what I want to do correctly, then using a stream I have to complete it. I am not experianced with a lot of code, so im using the example I found on DontNetZip site which is bellow. Problems 2 times, it throws 2 errors when processing, I expected that someone can help with these
1 occure the first error on the 3 line - "As the CrcCalculatorStream = e1.OpenReader uses the" error 'object reference is not set for an instance of an object,' I have tried declearing and new and still it crashes on that line 2 second error is after a line on a loop - "If (s.Crc32
is the code that has been copied from this link
PS I made reference to a file in your real program and edit the ZIP name, the only additional password.
Thankyou
New zipfile (ZipFileToRead) as ZipEntry = zip.Item ("Elevation.mp3") as Dim E1 using the form of buffer byte as zip Use Dim Dim as the Ionic.Zlib.CrcCalculatorStream = e1.OpenReader (password) in the form of diminished integer () = new byte (4096) {} dim total Read bytes as integer = 0 N = s .Read (buffer, 0, buffer length); Totalbiered = (Total Bytes Reed + N) while loop (n> gt; 0), then (s.Crc32
end use
I managed to organize it out, just think I could be useful to anyone. Use the StreamReader = New StreamReader as the Ionic .Crc.CrcCalculatorStream = e.OpenReader (password) as the
string as a string
Str = sr.ReadToEnd () ending using sr sr
Comments
Post a Comment