Пример #1
0
        public override void Decompress(DecompressedBuffer buffer, DecompressionState state)
        {
            var decompressedChunk = new DecompressedChunk(new byte[] { Data });

            buffer.Add(decompressedChunk);

            ++state.DecompressedCurrent;
            ++state.CompressedCurrent;
        }
Пример #2
0
        public void DecompressRawChunk(DecompressedBuffer buffer, DecompressionState state, Byte[] Data)
        {
            throw new NotImplementedException();

            Byte[] append = new Byte[4096];
            //Array.Copy(state.OriginalData, state.CompressedCurrent, append, 0, header.CompressedChunkSize);

            //int nCopy = Math.Min(4096, state.OriginalData.Length-state.CompressedCurrent);
            //Array.Copy(state.OriginalData, state.CompressedCurrent, append, 0, nCopy);
            Array.Copy(this.Data, 0, append, 0, 4096); // todo: maybe copy from original data?
            state.DecompressedCurrent += 4096;
            state.CompressedCurrent   += 4096;

            var x = new DecompressedChunk(append);

            buffer.Add(x);
        }
Пример #3
0
 public void Add(DecompressedChunk Chunk)
 {
     this._Data.AddRange(Chunk.Data);
 }