You've already forked linux-packaging-mono
Imported Upstream version 6.4.0.137
Former-commit-id: 943baa9f16a098c33e129777827f3a9d20da00d6
This commit is contained in:
parent
e9207cf623
commit
ef583813eb
@@ -5,14 +5,17 @@ include ../../build/rules.make
|
||||
LIBRARY = System.IO.Compression.dll
|
||||
LIB_REFS = System
|
||||
KEYFILE = ../ecma.pub
|
||||
LIB_MCS_FLAGS =
|
||||
LIB_MCS_FLAGS = -unsafe
|
||||
TEST_RESOURCE_FILES = Test/resources/archive.zip Test/resources/test.nupkg
|
||||
TEST_MCS_FLAGS = $(foreach r, $(TEST_RESOURCE_FILES), -resource:$(r),$(r))
|
||||
TEST_LIB_REFS = System System.Core
|
||||
LIBRARY_WARN_AS_ERROR = yes
|
||||
|
||||
XTEST_LIB_REFS = System System.Core Facades/System.Threading.Tasks
|
||||
|
||||
RESX_RESOURCE_STRING = \
|
||||
../../../external/corefx/src/System.IO.Compression/src/Resources/Strings.resx
|
||||
../../../external/corefx/src/System.IO.Compression/src/Resources/Strings.resx \
|
||||
../../../external/corefx/src/System.IO.Compression.Brotli/src/Resources/Strings.resx
|
||||
|
||||
EXTRA_DISTFILES = $(TEST_RESOURCE_FILES)
|
||||
|
||||
|
||||
@@ -36,3 +36,11 @@ corefx/SR.cs
|
||||
../../../external/corefx/src/System.IO.Compression/src/System/IO/Compression/DeflateManaged/MatchState.cs
|
||||
../../../external/corefx/src/System.IO.Compression/src/System/IO/Compression/DeflateManaged/OutputBuffer.cs
|
||||
../../../external/corefx/src/System.IO.Compression/src/System/IO/Compression/DeflateManaged/OutputWindow.cs
|
||||
|
||||
# Brotli
|
||||
../../../external/corefx/src/System.IO.Compression.Brotli/src/System/IO/Compression/dec/*.cs
|
||||
../../../external/corefx/src/System.IO.Compression.Brotli/src/System/IO/Compression/enc/*.cs
|
||||
../../../external/corefx/src/System.IO.Compression.Brotli/src/System/IO/Compression/*.cs
|
||||
../../../external/corefx/src/System.IO.Compression.Brotli/src/Interop/*.cs
|
||||
../../../external/corefx/src/Common/src/Microsoft/Win32/SafeHandles/SafeBrotliHandle.cs
|
||||
corefx/Interop.Libraries.cs
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
../../../external/corefx/src/CoreFx.Private.TestUtilities/src/System/AssertExtensions.cs
|
||||
../../../external/corefx/src/System.IO.Compression.Brotli/tests/BrotliEncoderTests.cs
|
||||
../../../external/corefx/src/Common/tests/System/IO/Compression/CompressionStreamUnitTestBase.cs
|
||||
../../../external/corefx/src/Common/tests/System/IO/Compression/CompressionStreamTestBase.cs
|
||||
../../../external/corefx/src/Common/tests/System/IO/Compression/LocalMemoryStream.cs
|
||||
../../../external/corefx/src/Common/tests/System/IO/Compression/StreamHelpers.cs
|
||||
../../../external/corefx/src/Common/tests/System/IO/TempFile.cs
|
||||
../../../external/corefx/src/Common/src/System/Threading/Tasks/TaskToApm.cs
|
||||
52
mcs/class/System.IO.Compression/corefx/BrotliStubs.cs
Normal file
52
mcs/class/System.IO.Compression/corefx/BrotliStubs.cs
Normal file
@@ -0,0 +1,52 @@
|
||||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.IO.Compression;
|
||||
using Microsoft.Win32.SafeHandles;
|
||||
using size_t = System.IntPtr;
|
||||
|
||||
internal static partial class Interop
|
||||
{
|
||||
internal static partial class Brotli
|
||||
{
|
||||
internal static SafeBrotliEncoderHandle BrotliEncoderCreateInstance(IntPtr allocFunc, IntPtr freeFunc, IntPtr opaque) =>
|
||||
throw new PlatformNotSupportedException();
|
||||
|
||||
internal static bool BrotliEncoderSetParameter(SafeBrotliEncoderHandle state, BrotliEncoderParameter parameter, UInt32 value) =>
|
||||
throw new PlatformNotSupportedException();
|
||||
|
||||
internal static unsafe bool BrotliEncoderCompressStream(
|
||||
SafeBrotliEncoderHandle state, BrotliEncoderOperation op, ref size_t availableIn,
|
||||
byte** nextIn, ref size_t availableOut, byte** nextOut, out size_t totalOut) =>
|
||||
throw new PlatformNotSupportedException();
|
||||
|
||||
internal static bool BrotliEncoderHasMoreOutput(SafeBrotliEncoderHandle state) =>
|
||||
throw new PlatformNotSupportedException();
|
||||
|
||||
internal static void BrotliEncoderDestroyInstance(IntPtr state) =>
|
||||
throw new PlatformNotSupportedException();
|
||||
|
||||
internal static unsafe bool BrotliEncoderCompress(int quality, int window, int v, size_t availableInput, byte* inBytes, ref size_t availableOutput, byte* outBytes) =>
|
||||
throw new PlatformNotSupportedException();
|
||||
|
||||
internal static SafeBrotliDecoderHandle BrotliDecoderCreateInstance(IntPtr allocFunc, IntPtr freeFunc, IntPtr opaque) =>
|
||||
throw new PlatformNotSupportedException();
|
||||
|
||||
internal static unsafe int BrotliDecoderDecompressStream(
|
||||
SafeBrotliDecoderHandle state, ref size_t availableIn, byte** nextIn,
|
||||
ref size_t availableOut, byte** nextOut, out size_t totalOut) =>
|
||||
throw new PlatformNotSupportedException();
|
||||
|
||||
internal static unsafe bool BrotliDecoderDecompress(size_t availableInput, byte* inBytes, ref size_t availableOutput, byte* outBytes) =>
|
||||
throw new PlatformNotSupportedException();
|
||||
|
||||
internal static void BrotliDecoderDestroyInstance(IntPtr state) =>
|
||||
throw new PlatformNotSupportedException();
|
||||
|
||||
internal static bool BrotliDecoderIsFinished(SafeBrotliDecoderHandle state) =>
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
}
|
||||
11
mcs/class/System.IO.Compression/corefx/Interop.Libraries.cs
Normal file
11
mcs/class/System.IO.Compression/corefx/Interop.Libraries.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
internal static partial class Interop
|
||||
{
|
||||
internal static partial class Libraries
|
||||
{
|
||||
internal const string CompressionNative = "System.Native";
|
||||
}
|
||||
}
|
||||
@@ -25,10 +25,6 @@ partial class SR
|
||||
public const string ZLibErrorNotEnoughMemory = "The underlying compression routine could not reserve sufficient memory.";
|
||||
public const string ZLibErrorVersionMismatch = "The version of the underlying compression routine does not match expected version.";
|
||||
public const string ZLibErrorUnexpected = "The underlying compression routine returned an unexpected error code.";
|
||||
public const string CorruptedGZipHeader = "The magic number in GZip header is not correct. Make sure you are passing in a GZip stream.";
|
||||
public const string UnknownCompressionMode = "The compression mode specified in GZip header is unknown.";
|
||||
public const string InvalidCRC = "The CRC in GZip footer does not match the CRC calculated from the decompressed data.";
|
||||
public const string InvalidStreamSize = "The stream size in GZip footer does not match the real stream size.";
|
||||
public const string ArgumentNeedNonNegative = "The argument must be non-negative.";
|
||||
public const string CannotBeEmpty = "String cannot be empty.";
|
||||
public const string CDCorrupt = "Central Directory corrupt.";
|
||||
@@ -72,6 +68,20 @@ partial class SR
|
||||
public const string UpdateModeOneStream = "Entries cannot be opened multiple times in Update mode.";
|
||||
public const string WritingNotSupported = "This stream from ZipArchiveEntry does not support writing.";
|
||||
public const string Zip64EOCDNotWhereExpected = "Zip 64 End of Central Directory Record not where indicated.";
|
||||
public const string Argument_InvalidPathChars = "Illegal characters in path.";
|
||||
public const string FileNameContainsInvalidCharacters = "An entry in the ZipArchive has a path that contains invalid characters.";
|
||||
public const string Argument_InvalidPathChars = "Illegal characters in path '{0}'.";
|
||||
public const string Stream_FalseCanRead = "Stream does not support reading.";
|
||||
public const string Stream_FalseCanWrite = "Stream does not support writing.";
|
||||
public const string BrotliEncoder_Create = "Failed to create BrotliEncoder instance";
|
||||
public const string BrotliEncoder_Disposed = "Can not access a closed Encoder.";
|
||||
public const string BrotliEncoder_Quality = "Provided BrotliEncoder Quality of {0} is not between the minimum value of {1} and the maximum value of {2}";
|
||||
public const string BrotliEncoder_Window = "Provided BrotliEncoder Window of {0} is not between the minimum value of {1} and the maximum value of {2}";
|
||||
public const string BrotliEncoder_InvalidSetParameter = "The BrotliEncoder {0} can not be changed at current encoder state.";
|
||||
public const string BrotliDecoder_Create = "Failed to create BrotliDecoder instance";
|
||||
public const string BrotliDecoder_Error = "Decoder threw unexpected error: {0}";
|
||||
public const string BrotliDecoder_Disposed = "Can not access a closed Decoder.";
|
||||
public const string BrotliStream_Compress_UnsupportedOperation = "Can not perform Read operations on a BrotliStream constructed with CompressionMode.Compress.";
|
||||
public const string BrotliStream_Compress_InvalidData = "Encoder ran into invalid data.";
|
||||
public const string BrotliStream_Decompress_UnsupportedOperation = "Can not perform Write operations on a BrotliStream constructed with CompressionMode.Decompress.";
|
||||
public const string BrotliStream_Decompress_InvalidData = "Decoder ran into invalid data.";
|
||||
public const string BrotliStream_Decompress_InvalidStream = "BrotliStream.BaseStream returned more bytes than requested in Read.";
|
||||
}
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
corefx/Interop.Libraries.cs
|
||||
../../../external/corefx/src/System.IO.Compression.Brotli/src/Interop/Interop.Brotli.Decoder.cs
|
||||
../../../external/corefx/src/System.IO.Compression.Brotli/src/Interop/Interop.Brotli.Encoder.cs
|
||||
@@ -0,0 +1,5 @@
|
||||
#include System.IO.Compression.dll.sources
|
||||
corefx/BrotliStubs.cs
|
||||
|
||||
# for clrcompression.dll (instead of BrotliStubs for Windows)
|
||||
#../../../external/corefx/src/Common/src/Interop/Windows/Interop.Libraries.cs
|
||||
@@ -0,0 +1 @@
|
||||
../../../external/corefx/src/System.IO.Compression.Brotli/tests/BrotliEncoderTests.cs
|
||||
@@ -0,0 +1,3 @@
|
||||
corefx/Interop.Libraries.cs
|
||||
../../../external/corefx/src/System.IO.Compression.Brotli/src/Interop/Interop.Brotli.Decoder.cs
|
||||
../../../external/corefx/src/System.IO.Compression.Brotli/src/Interop/Interop.Brotli.Encoder.cs
|
||||
@@ -0,0 +1 @@
|
||||
#include win32_net_4_x_System.IO.Compression.dll.sources
|
||||
Reference in New Issue
Block a user