コード例 #1
0
ファイル: SubArray.cs プロジェクト: klightspeed/RS5-Extractor
 protected OffsettableStream Decompress(Stream stream, long offset, int allocsize)
 {
     stream.Seek(offset, SeekOrigin.Begin);
     using (ZlibStream zstream = new ZlibStream(stream, CompressionMode.Decompress, true))
     {
         OffsettableMemoryStream outstrm = new OffsettableMemoryStream(allocsize);
         zstream.CopyTo(outstrm);
         outstrm.Position = 0;
         TotalSize = (int)zstream.TotalOut;
         CompressedSize = (int)zstream.TotalIn;
         this.DataLength = TotalSize;
         return outstrm;
     }
 }
コード例 #2
0
ファイル: SubArray.cs プロジェクト: klightspeed/RS5-Extractor
 protected OffsettableStream Decompress(Stream stream, long offset, int allocsize)
 {
     stream.Seek(offset, SeekOrigin.Begin);
     using (ZlibStream zstream = new ZlibStream(stream, CompressionMode.Decompress, true))
     {
         OffsettableMemoryStream outstrm = new OffsettableMemoryStream(allocsize);
         zstream.CopyTo(outstrm);
         outstrm.Position = 0;
         TotalSize        = (int)zstream.TotalOut;
         CompressedSize   = (int)zstream.TotalIn;
         this.DataLength  = TotalSize;
         return(outstrm);
     }
 }