Para probar la perdida de los datos hice esta prueba:
Código
Imports System.IO, System.IO.Compression, System.Text, System.Security.Cryptography Module Module1 #Region " Algoritmo de DeCompresión Deflate " Public Function DeflateDeCompress(ByVal Data As Byte(), _ ByVal Action As CompressionMode) As Byte() DeflateDeCompress = Nothing Dim ResultStream As MemoryStream = Nothing Dim DeCompresser As DeflateStream = Nothing Dim A As Integer, B As New List(Of Byte) Try If Action = CompressionMode.Compress Then ResultStream = New MemoryStream DeCompresser = New DeflateStream(ResultStream, CompressionMode.Compress) DeCompresser.Write(Data, 0, Data.Length) ResultStream.Position = 0 DeflateDeCompress = ResultStream.ToArray Else ResultStream = New MemoryStream(Data) ResultStream.Position = 0 DeCompresser = New DeflateStream(ResultStream, CompressionMode.Decompress) DeflateDeCompress = New Byte() {} DeCompresser.ReadByte() : A = DeCompresser.ReadByte While A <> -1 B.Add(CByte(A)) A = DeCompresser.ReadByte End While DeflateDeCompress = B.ToArray : B.Clear() End If If DeCompresser IsNot Nothing Then DeCompresser.Dispose() End If If ResultStream IsNot Nothing Then ResultStream.Dispose() End If Catch ex As Exception Return Nothing End Try End Function #End Region Public Function MD5_String(ByVal Data As Byte()) As String Return BitConverter.ToString(MD5.Create.ComputeHash(Data)).Replace("-", "").ToLower End Function Sub Main() Dim x As String = "C:\ejemplo.txt" Dim z As Byte() = DeflateDeCompress(y, CompressionMode.Compress) Dim a As Byte() = DeflateDeCompress(z, CompressionMode.Decompress) Console.WriteLine("Archivo de Entrada: {0}", x) Console.WriteLine("Tamaño de Entrada: {0} bytes", y.Length) Console.WriteLine("MD5-{0}", MD5_String(y)) Console.WriteLine() Console.WriteLine("Tamaño Comprimido: {0} bytes ({1}%)", z.Length, Math.Round(z.Length / y.Length * 100 - 100, 2)) Console.WriteLine("MD5-{0}", MD5_String(z)) Console.WriteLine() Console.WriteLine("Tamaño Descomprimido: {0} bytes", a.Length) Console.WriteLine("MD5-{0}", MD5_String(a)) Console.WriteLine() Console.WriteLine("Perdida de {0} bytes", y.Length - a.Length) Erase y, z, a Console.Read() End Sub End Module
Gracias de antemano