public Stream Decompress(Stream stream) { using (var reader = new FileReader(stream, true)) { if (isType11) { uint decomp_size = reader.ReadUInt32(); var sub = new SubStream(stream, 16); return(new MemoryStream(LZ77_WII.Decompress11(sub.ToArray(), (int)decomp_size))); } else { return(new MemoryStream()); } } }
public Stream Decompress(Stream stream) { using (var reader = new FileReader(stream, true)) { reader.SeekBegin(12); byte type = reader.ReadByte(); if (type == 0x11) { uint decomp_size = reader.ReadUInt32(); var sub = new SubStream(stream, 16); return(new MemoryStream(LZ77_WII.Decompress11(sub.ToArray(), (int)decomp_size))); } else { return(new MemoryStream()); } } }