milani_lucie
asked on
How to compress a string using GZIP in VB.NET ?
Hi,
I do have the following string : "<Child><Name>Ram</Name></ Child>". I want to compress the string using GZIP in VB.NET. Can you please provide me the code ?
Thanks
I do have the following string : "<Child><Name>Ram</Name></
Thanks
ASKER
Dim bytes() As Byte = System.Text.ASCIIEncoding. ASCII.GetB ytes("<Chi ld><Name>R am</Name>< /Child>")
Dim memoryStream As New System.IO.MemoryStream()
Dim zStream As New System.IO.Compression.GZip Stream(mem oryStream, IO.Compression.Compression Mode.Compr ess, True)
zStream.Write(bytes, 0, bytes.Length)
Is this correct ? Please do let me know.
Thanks
Dim memoryStream As New System.IO.MemoryStream()
Dim zStream As New System.IO.Compression.GZip
zStream.Write(bytes, 0, bytes.Length)
Is this correct ? Please do let me know.
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Open in new window