
Public Class Compresion
    Public Shared Function ComprimirCadena(Cadena As String) As Byte()
        Dim ms As New IO.MemoryStream
        Dim gz As New System.IO.Compression.GZipStream(ms, IO.Compression.CompressionMode.Compress)
        Dim sw As New IO.BinaryWriter(gz)
        sw.Write(System.Text.Encoding.UTF8.GetBytes(Cadena))
        sw.Close()
        Return ms.ToArray()
    End Function



End Class
