我有两种方法在sql server中压缩和解压缩base64图像数据
我的解压缩方法读取数据在sql它的工作,但压缩返回错误的数据,请帮助我...
public static Byte[] BinaryCompress(Byte[] InputStream)
{
using (MemoryStream ms = new MemoryStream())
{
using (GZipStream x = new GZipStream(ms, CompressionMode.Compress, true))
{
byte[] inputBytes = (byte[])InputStream;
x.Write(inputBytes, 0, inputBytes.Length);
}
return ms.ToArray();
}
}
2条答案
按热度按时间oknrviil1#
wnvonmuf2#
您能否使用以下代码提供更具体的异常?