diff --git a/src/libraries/Common/src/Interop/Interop.zlib.cs b/src/libraries/Common/src/Interop/Interop.zlib.cs index ba4326dfed0d94..64114d36b30967 100644 --- a/src/libraries/Common/src/Interop/Interop.zlib.cs +++ b/src/libraries/Common/src/Interop/Interop.zlib.cs @@ -20,9 +20,6 @@ internal static unsafe partial ZLibNative.ErrorCode DeflateInit2_( [LibraryImport(Libraries.CompressionNative, EntryPoint = "CompressionNative_Deflate")] internal static unsafe partial ZLibNative.ErrorCode Deflate(ZLibNative.ZStream* stream, ZLibNative.FlushCode flush); - [LibraryImport(Libraries.CompressionNative, EntryPoint = "CompressionNative_DeflateReset")] - internal static unsafe partial ZLibNative.ErrorCode DeflateReset(ZLibNative.ZStream* stream); - [LibraryImport(Libraries.CompressionNative, EntryPoint = "CompressionNative_DeflateEnd")] internal static unsafe partial ZLibNative.ErrorCode DeflateEnd(ZLibNative.ZStream* stream); @@ -32,9 +29,6 @@ internal static unsafe partial ZLibNative.ErrorCode DeflateInit2_( [LibraryImport(Libraries.CompressionNative, EntryPoint = "CompressionNative_Inflate")] internal static unsafe partial ZLibNative.ErrorCode Inflate(ZLibNative.ZStream* stream, ZLibNative.FlushCode flush); - [LibraryImport(Libraries.CompressionNative, EntryPoint = "CompressionNative_InflateReset")] - internal static unsafe partial ZLibNative.ErrorCode InflateReset(ZLibNative.ZStream* stream); - [LibraryImport(Libraries.CompressionNative, EntryPoint = "CompressionNative_InflateEnd")] internal static unsafe partial ZLibNative.ErrorCode InflateEnd(ZLibNative.ZStream* stream); diff --git a/src/libraries/Common/src/System/IO/Compression/ZLibNative.cs b/src/libraries/Common/src/System/IO/Compression/ZLibNative.cs index ad4e9583d880fb..00851ee1048d5e 100644 --- a/src/libraries/Common/src/System/IO/Compression/ZLibNative.cs +++ b/src/libraries/Common/src/System/IO/Compression/ZLibNative.cs @@ -286,17 +286,6 @@ public unsafe ErrorCode Deflate(FlushCode flush) } - public unsafe ErrorCode DeflateReset() - { - EnsureNotDisposed(); - EnsureState(State.InitializedForDeflate); - - fixed (ZStream* stream = &_zStream) - { - return Interop.ZLib.DeflateReset(stream); - } - } - public unsafe ErrorCode DeflateEnd() { EnsureNotDisposed(); @@ -339,17 +328,6 @@ public unsafe ErrorCode Inflate(FlushCode flush) } - public unsafe ErrorCode InflateReset() - { - EnsureNotDisposed(); - EnsureState(State.InitializedForInflate); - - fixed (ZStream* stream = &_zStream) - { - return Interop.ZLib.InflateReset(stream); - } - } - public unsafe ErrorCode InflateEnd() { EnsureNotDisposed(); diff --git a/src/native/libs/System.IO.Compression.Native/System.IO.Compression.Native.def b/src/native/libs/System.IO.Compression.Native/System.IO.Compression.Native.def index aecd0dd974618a..6821d0e538f51f 100644 --- a/src/native/libs/System.IO.Compression.Native/System.IO.Compression.Native.def +++ b/src/native/libs/System.IO.Compression.Native/System.IO.Compression.Native.def @@ -15,9 +15,7 @@ EXPORTS CompressionNative_Crc32 CompressionNative_Deflate CompressionNative_DeflateEnd - CompressionNative_DeflateReset CompressionNative_DeflateInit2_ CompressionNative_Inflate CompressionNative_InflateEnd - CompressionNative_InflateReset CompressionNative_InflateInit2_ diff --git a/src/native/libs/System.IO.Compression.Native/System.IO.Compression.Native_unixexports.src b/src/native/libs/System.IO.Compression.Native/System.IO.Compression.Native_unixexports.src index 2ac827035f271b..08dd1700a52f21 100644 --- a/src/native/libs/System.IO.Compression.Native/System.IO.Compression.Native_unixexports.src +++ b/src/native/libs/System.IO.Compression.Native/System.IO.Compression.Native_unixexports.src @@ -15,9 +15,7 @@ BrotliEncoderSetParameter CompressionNative_Crc32 CompressionNative_Deflate CompressionNative_DeflateEnd -CompressionNative_DeflateReset CompressionNative_DeflateInit2_ CompressionNative_Inflate CompressionNative_InflateEnd -CompressionNative_InflateReset CompressionNative_InflateInit2_ diff --git a/src/native/libs/System.IO.Compression.Native/entrypoints.c b/src/native/libs/System.IO.Compression.Native/entrypoints.c index 6b6cc64ad0d3bd..05a8c228eb785b 100644 --- a/src/native/libs/System.IO.Compression.Native/entrypoints.c +++ b/src/native/libs/System.IO.Compression.Native/entrypoints.c @@ -26,11 +26,9 @@ static const Entry s_compressionNative[] = DllImportEntry(CompressionNative_Crc32) DllImportEntry(CompressionNative_Deflate) DllImportEntry(CompressionNative_DeflateEnd) - DllImportEntry(CompressionNative_DeflateReset) DllImportEntry(CompressionNative_DeflateInit2_) DllImportEntry(CompressionNative_Inflate) DllImportEntry(CompressionNative_InflateEnd) - DllImportEntry(CompressionNative_InflateReset) DllImportEntry(CompressionNative_InflateInit2_) }; diff --git a/src/native/libs/System.IO.Compression.Native/pal_zlib.c b/src/native/libs/System.IO.Compression.Native/pal_zlib.c index f5d25d66106b02..fce7e2d43f760c 100644 --- a/src/native/libs/System.IO.Compression.Native/pal_zlib.c +++ b/src/native/libs/System.IO.Compression.Native/pal_zlib.c @@ -137,17 +137,6 @@ int32_t CompressionNative_Deflate(PAL_ZStream* stream, int32_t flush) return result; } -int32_t CompressionNative_DeflateReset(PAL_ZStream* stream) -{ - assert(stream != NULL); - - z_stream* zStream = GetCurrentZStream(stream); - int32_t result = deflateReset(zStream); - TransferStateToPalZStream(zStream, stream); - - return result; -} - int32_t CompressionNative_DeflateEnd(PAL_ZStream* stream) { assert(stream != NULL); @@ -185,17 +174,6 @@ int32_t CompressionNative_Inflate(PAL_ZStream* stream, int32_t flush) return result; } -int32_t CompressionNative_InflateReset(PAL_ZStream* stream) -{ - assert(stream != NULL); - - z_stream* zStream = GetCurrentZStream(stream); - int32_t result = inflateReset(zStream); - TransferStateToPalZStream(zStream, stream); - - return result; -} - int32_t CompressionNative_InflateEnd(PAL_ZStream* stream) { assert(stream != NULL); diff --git a/src/native/libs/System.IO.Compression.Native/pal_zlib.h b/src/native/libs/System.IO.Compression.Native/pal_zlib.h index fc2f2107ee8ca4..b317091b843f62 100644 --- a/src/native/libs/System.IO.Compression.Native/pal_zlib.h +++ b/src/native/libs/System.IO.Compression.Native/pal_zlib.h @@ -95,14 +95,6 @@ Returns a PAL_ErrorCode indicating success or an error number on failure. */ FUNCTIONEXPORT int32_t FUNCTIONCALLINGCONVENCTION CompressionNative_Deflate(PAL_ZStream* stream, int32_t flush); -/* -This function is equivalent to DeflateEnd followed by DeflateInit, but does not free and reallocate -the internal compression state. The stream will leave the compression level and any other attributes that may have been set unchanged. - -Returns a PAL_ErrorCode indicating success or an error number on failure. -*/ -FUNCTIONEXPORT int32_t FUNCTIONCALLINGCONVENCTION CompressionNative_DeflateReset(PAL_ZStream* stream); - /* All dynamically allocated data structures for this stream are freed. @@ -125,14 +117,6 @@ Returns a PAL_ErrorCode indicating success or an error number on failure. */ FUNCTIONEXPORT int32_t FUNCTIONCALLINGCONVENCTION CompressionNative_Inflate(PAL_ZStream* stream, int32_t flush); -/* -This function is equivalent to InflateEnd followed by InflateInit, but does not free and reallocate -the internal decompression state. The stream will keep attributes that may have been set by InflateInit. - -Returns a PAL_ErrorCode indicating success or an error number on failure. -*/ -FUNCTIONEXPORT int32_t FUNCTIONCALLINGCONVENCTION CompressionNative_InflateReset(PAL_ZStream* stream); - /* All dynamically allocated data structures for this stream are freed.