Use separate threads for decryption and decompression

This commit is contained in:
BruceChen 2022-08-30 17:37:46 +08:00
parent c941d086d9
commit 1a90b6d942
8 changed files with 47 additions and 37 deletions

View file

@ -410,7 +410,6 @@ namespace Ionic.Zlib
/// <param name="disposing">
/// indicates whether the Dispose method was invoked by user code.
/// </param>
[MethodImpl(MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization)]
protected override void Dispose(bool disposing)
{
try
@ -545,10 +544,9 @@ namespace Ionic.Zlib
/// <param name="count">the number of bytes to read.</param>
///
/// <returns>the number of bytes read</returns>
[MethodImpl(MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization)]
public override int Read(byte[] buffer, int offset, int count)
{
if (_disposed) throw new ObjectDisposedException("ZlibStream");
if (_disposed) throw new ObjectDisposedException("ZlibStream");
return _baseStream.Read(buffer, offset, count);
}