Добрый день, есть функция архивации и разархивации строки на c#; вот из этой статьи ht t p: //b ade vla d.li vejourn al.co m/39 585.h tml Как переписать функции разархивации на php?
public static string DecompressString(Byte[] value)
{
string resultString = string.Empty;
if (value != null && value.Length > 0)
{
using (MemoryStream stream = new MemoryStream(value))
using (GZipStream zip = new GZipStream(stream, CompressionMode.Decompress))
using (StreamReader reader = new StreamReader(zip))
{
resultString = reader.ReadToEnd();
}
}
return resultString;
}
Спасибо
public static string DecompressString(Byte[] value)
{
string resultString = string.Empty;
if (value != null && value.Length > 0)
{
using (MemoryStream stream = new MemoryStream(value))
using (GZipStream zip = new GZipStream(stream, CompressionMode.Decompress))
using (StreamReader reader = new StreamReader(zip))
{
resultString = reader.ReadToEnd();
}
}
return resultString;
}
Спасибо