public byte[] GetEntryBytes(LhaEntry entry) { byte[] buffer = new byte[entry.GetOriginalSize()]; LhaDecoderInputStream inputStream = GetInputStream(entry); inputStream.Read(buffer, 0, buffer.Length); return(buffer); }
/** * 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(); }