Exemplo n.º 1
0
        /// <exception cref="System.IO.IOException"></exception>
        private byte[] Delta(byte[] @base, byte[] dest)
        {
            ByteArrayOutputStream tmp = new ByteArrayOutputStream();
            DeltaEncoder          de  = new DeltaEncoder(tmp, @base.Length, dest.Length);

            de.Insert(dest, 0, 1);
            de.Copy(1, @base.Length - 1);
            return(tmp.ToByteArray());
        }
Exemplo n.º 2
0
            internal override IEnumerable <byte> Encode()
            {
                int nd = DeltaEncoder.EncodeNd(mNd);

                (int fx, int fy, int fz) = DeltaEncoder.EncodeFd(mFd);

                yield return((byte)(0b00000001 | (nd << 3)));

                yield return((byte)(0b00000000 | (fx << 0)));

                yield return((byte)(0b00000000 | (fy << 0)));

                yield return((byte)(0b00000000 | (fz << 0)));
            }
Exemplo n.º 3
0
        private void bCompessing_Click(object sender, EventArgs e)
        {
            DeltaEncoder delta = new DeltaEncoder();

            _wavCompress = delta.Encode(_wav);
            if (Draw.DrawWave(_wavCompress, chartCompressing))
            {
                chartCompressing.ChartAreas[0].AxisX.ScaleView.Zoomable = true;
                chartCompressing.MouseWheel += new MouseEventHandler(chData_MouseWheel);
            }
            else
            {
                chartCompressing.ChartAreas[0].AxisX.ScaleView.Zoomable = false;
                chartCompressing.MouseWheel -= new MouseEventHandler(chData_MouseWheel);
            }
        }
Exemplo n.º 4
0
            internal override IEnumerable <byte> Encode()
            {
                int nd = DeltaEncoder.EncodeNd(mNd);

                yield return((byte)(0b00000110 | (nd << 3)));
            }