T
Tony Johansson
Hello!
This program compress the string test.
The variable document is 8 bytes long after having done this statement
byte[] document = new UnicodeEncoding().GetBytes("test");
If I look at the variable result it is 111 bytes long.
So my question is if I have missed something here or is the overhead so
great when compressing very small amout of data ?
static void Main(string[] args)
{
byte[] document = new UnicodeEncoding().GetBytes("test");
MemoryStream strm = new MemoryStream();
DeflateStream deflate = new DeflateStream(strm,
CompressionMode.Compress);
deflate.Write(document, 0, document.Length);
deflate.Close();
byte[] result = strm.ToArray();
}
//Tony
This program compress the string test.
The variable document is 8 bytes long after having done this statement
byte[] document = new UnicodeEncoding().GetBytes("test");
If I look at the variable result it is 111 bytes long.
So my question is if I have missed something here or is the overhead so
great when compressing very small amout of data ?
static void Main(string[] args)
{
byte[] document = new UnicodeEncoding().GetBytes("test");
MemoryStream strm = new MemoryStream();
DeflateStream deflate = new DeflateStream(strm,
CompressionMode.Compress);
deflate.Write(document, 0, document.Length);
deflate.Close();
byte[] result = strm.ToArray();
}
//Tony