Dear All,
I use System.IO.Compression namespace for compressing file
give me overflow for streamObj.Length when file size more then 3 GB.
following my code:
Dim streamObj As Stream = File.OpenRead(GZipFileName)
Dim buffer(streamObj.Length) As Byte
streamObj.Read(buffer, 0, buffer.Length)
streamObj.Close()
Dim compFile As System.IO.FileStream =
File.Create((Path.ChangeExtension(GZipFileName, "GZip")))
Dim zipStreamObj As New GZipStream(compFile,
CompressionMode.Compress)
zipStreamObj.Write(buffer, 0, buffer.Length)
zipStreamObj.Close()
Thanks,
Harshad
Kevin Spencer - 29 Jan 2008 12:45 GMT
Try reading the file in chunks instead of all at once.

Signature
HTH,
Kevin Spencer
Chicken Salad Surgeon
Microsoft MVP
> Dear All,
>
[quoted text clipped - 20 lines]
>
> Harshad