/** * Creates a new lha input stream. * * @param in * the actual input stream * @param entry * the lha entry of current input stream */ public LhaDecoderInputStream(BinaryReader @in, LhaEntry entry) : base(@in.BaseStream) { this.entry = entry; this.crc = new CRC16(); this.skipBuffer = new byte[512]; this.entryCount = entry.GetOriginalSize(); this.decoder = CreateDecoder(@in, entryCount, entry.GetMethod()); crc.Reset(); }
/** * Closes the input stream. * * @throws IOException * if an I/O error has occured */ public override void Close() { if (decoder != null) { decoder.Close(); decoder = null; entry = null; crc = null; } }