Stream GetStreamToUse(Stream input) { using (var br = new BinaryReaderX(input, true)) { var magic = br.ReadString(4); br.BaseStream.Position = 0; if (magic == "LIMG") { return(input); } else { var decomp = Nintendo.Decompress(br.BaseStream); br.Dispose(); _compressed = true; return(new MemoryStream(decomp)); } } }
public void Close() { br?.Dispose(); br = null; }
public void Dispose() { _stringBr.Dispose(); }