Imported Upstream version 5.0.0.42

Former-commit-id: fd56571888259555122d8a0f58c68838229cea2b
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2017-04-10 11:41:01 +00:00
parent 1190d13a04
commit 6bdd276d05
19939 changed files with 3099680 additions and 93811 deletions

View File

@ -35,10 +35,6 @@ using System.IO;
using System.Runtime.InteropServices;
using System.Runtime.Remoting.Messaging;
#if MONOTOUCH || MOBILE_STATIC
using MonoTouch;
#endif
namespace System.IO.Compression
{
public class DeflateStream : Stream
@ -62,6 +58,11 @@ namespace System.IO.Compression
{
}
internal DeflateStream (Stream stream, CompressionMode mode, bool leaveOpen, int windowsBits) :
this (stream, mode, leaveOpen, true)
{
}
internal DeflateStream (Stream compressedStream, CompressionMode mode, bool leaveOpen, bool gzip)
{
if (compressedStream == null)
@ -90,6 +91,11 @@ namespace System.IO.Compression
{
}
internal DeflateStream (Stream stream, CompressionLevel compressionLevel, bool leaveOpen, int windowsBits)
: this (stream, compressionLevel, leaveOpen, true)
{
}
internal DeflateStream (Stream stream, CompressionLevel compressionLevel, bool leaveOpen, bool gzip)
: this (stream, CompressionMode.Compress, leaveOpen, gzip)
{
@ -383,9 +389,7 @@ namespace System.IO.Compression
CheckResult (res, "WriteInternal");
}
#if MONOTOUCH || MOBILE_STATIC
[MonoPInvokeCallback (typeof (UnmanagedReadOrWrite))]
#endif
[Mono.Util.MonoPInvokeCallback (typeof (UnmanagedReadOrWrite))]
static int UnmanagedRead (IntPtr buffer, int length, IntPtr data)
{
GCHandle s = GCHandle.FromIntPtr (data);
@ -408,9 +412,7 @@ namespace System.IO.Compression
return n;
}
#if MONOTOUCH || MOBILE_STATIC
[MonoPInvokeCallback (typeof (UnmanagedReadOrWrite))]
#endif
[Mono.Util.MonoPInvokeCallback (typeof (UnmanagedReadOrWrite))]
static int UnmanagedWrite (IntPtr buffer, int length, IntPtr data)
{
GCHandle s = GCHandle.FromIntPtr (data);