public override Stream GetStream(bool decompress = true) { if (decompress && IsCompressed) { if (mDecompressedStream == null) { var compression = new LBCompression(); mDecompressedStream = compression.Decompress(new StreamView(mBaseStream, Offset, Length), DecompressedLength); } return(mDecompressedStream); } else { return(new StreamView(mBaseStream, Offset, Length)); } }
public override Stream GetStream(bool decompress = true) { var stream = mStream; if (IsCompressed && decompress) { if (mDecompressedStream == null) { var compression = new LBCompression(); mDecompressedStream = compression.Decompress(mStream); } stream = mDecompressedStream; } return(new StreamView(stream, 0, stream.Length)); }