Hello,
i have a Project where i want to compress / decompress with gzipstream
at decompress i have a problem:
now i have B2 as byte array and i have to convert this into Filestream!
i tried to convert it first to Memory stream, that works
bt i cant convert memory stream to filestream!
what should i do?
here are the errors:
Fehler 1 Der Wert vom Typ "System.IO.MemoryStream" kann nicht in "System.IO.FileStream" konvertiert werden.
or:
Fehler 1 Der Wert vom Typ "1-dimensionales Array von Byte" kann nicht in "System.IO.FileStream" konvertiert werden.
was tun?
i have a Project where i want to compress / decompress with gzipstream
at decompress i have a problem:
VB.NET:
'blabla much more code...
'Read the size of compressed stream.
ZIPFSI.Position = ZIPFSI.Length - 4
ZIPFSI.Read(sizeBytes, 0, 4)
Dim iOutputSize As Integer = BitConverter.ToInt32(sizeBytes, 0)
'Posistion the to point at beginning of the memory stream to read
'compressed stream for decompression.
ZIPFSI.Position = 0
Dim B2(iOutputSize - 1) As Byte
'Read the decompress bytes and write it into result byte array.
Dim BytesRead2 As Integer = GZipStream2.Read(B2, 0, iOutputSize)
now i have B2 as byte array and i have to convert this into Filestream!
i tried to convert it first to Memory stream, that works
bt i cant convert memory stream to filestream!
what should i do?
here are the errors:
Fehler 1 Der Wert vom Typ "System.IO.MemoryStream" kann nicht in "System.IO.FileStream" konvertiert werden.
or:
Fehler 1 Der Wert vom Typ "1-dimensionales Array von Byte" kann nicht in "System.IO.FileStream" konvertiert werden.
was tun?