public void FlushStoredBlock(byte[] stored, int stored_offset, int stored_len, bool lastBlock) { // if (DeflaterConstants.DEBUGGING) { // Console.WriteLine("Flushing stored block "+ stored_len); // } pending.WriteBits((DeflaterConstants.STORED_BLOCK << 1) + (lastBlock ? 1 : 0), 3); pending.AlignToByte(); pending.WriteShort(stored_len); pending.WriteShort(~stored_len); pending.WriteBlock(stored, stored_offset, stored_len); Reset(); }