Пример #1
0
        virtual public void WriteData(byte[] data, int stride)
        {
            MemoryStream          stream = new MemoryStream();
            ZDeflaterOutputStream zip    = new ZDeflaterOutputStream(stream, 5);
            int k;

            for (k = 0; k < data.Length - stride; k += stride)
            {
                zip.WriteByte(0);
                zip.Write(data, k, stride);
            }
            int remaining = data.Length - k;

            if (remaining > 0)
            {
                zip.WriteByte(0);
                zip.Write(data, k, remaining);
            }
            zip.Close();
            WriteChunk(IDAT, stream.ToArray());
        }
Пример #2
0
        public void WriteData(byte[] data, int stride)
        {
            MemoryStream          stream = new MemoryStream();
            ZDeflaterOutputStream zip    = new ZDeflaterOutputStream(stream, 5);

            for (int k = 0; k < data.Length; k += stride)
            {
                zip.WriteByte(0);
                zip.Write(data, k, stride);
            }
            zip.Finish();
            WriteChunk(IDAT, stream.ToArray());
        }
Пример #3
0
 public override void WriteByte(
     byte b)
 {
     _out.WriteByte(b);
 }