I wanted to compress some data so i thought i'd run the stream by deflate
It went from 304 bytes to 578. Thats 1.9x larger. I was trying to compress it..... What am i doing wrong here?
using (MemoryStream ms2 = new MemoryStream())
using (var ms = new DeflateStream(ms2, CompressionMode.Compress, true))
{
ms.WriteByte(1);
ms.WriteShort((short)txtbuf.Length);
ms.Write(txtbuf, 0, txtbuf.Length);
ms.WriteShort((short)buf2.Length);
ms.Write(buf2, 0, buf2.Length);
ms.WriteShort((short)buf3.Length);
ms.Write(buf3, 0, buf3.Length);
ms.Flush();
result_buf = ms2.ToArray();
}