示例#1
0
        public byte[] GetEntryBytes(LhaEntry entry)
        {
            byte[] buffer = new byte[entry.GetOriginalSize()];
            LhaDecoderInputStream inputStream = GetInputStream(entry);

            inputStream.Read(buffer, 0, buffer.Length);
            return(buffer);
        }
示例#2
0
 /**
  * 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();
 }