Skip to content

Commit b26dae2

Browse files
Remove unused zlib exports (#84603)
1 parent 4ebecb0 commit b26dae2

File tree

7 files changed

+0
-72
lines changed

7 files changed

+0
-72
lines changed

src/libraries/Common/src/Interop/Interop.zlib.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@ internal static unsafe partial ZLibNative.ErrorCode DeflateInit2_(
2020
[LibraryImport(Libraries.CompressionNative, EntryPoint = "CompressionNative_Deflate")]
2121
internal static unsafe partial ZLibNative.ErrorCode Deflate(ZLibNative.ZStream* stream, ZLibNative.FlushCode flush);
2222

23-
[LibraryImport(Libraries.CompressionNative, EntryPoint = "CompressionNative_DeflateReset")]
24-
internal static unsafe partial ZLibNative.ErrorCode DeflateReset(ZLibNative.ZStream* stream);
25-
2623
[LibraryImport(Libraries.CompressionNative, EntryPoint = "CompressionNative_DeflateEnd")]
2724
internal static unsafe partial ZLibNative.ErrorCode DeflateEnd(ZLibNative.ZStream* stream);
2825

@@ -32,9 +29,6 @@ internal static unsafe partial ZLibNative.ErrorCode DeflateInit2_(
3229
[LibraryImport(Libraries.CompressionNative, EntryPoint = "CompressionNative_Inflate")]
3330
internal static unsafe partial ZLibNative.ErrorCode Inflate(ZLibNative.ZStream* stream, ZLibNative.FlushCode flush);
3431

35-
[LibraryImport(Libraries.CompressionNative, EntryPoint = "CompressionNative_InflateReset")]
36-
internal static unsafe partial ZLibNative.ErrorCode InflateReset(ZLibNative.ZStream* stream);
37-
3832
[LibraryImport(Libraries.CompressionNative, EntryPoint = "CompressionNative_InflateEnd")]
3933
internal static unsafe partial ZLibNative.ErrorCode InflateEnd(ZLibNative.ZStream* stream);
4034

src/libraries/Common/src/System/IO/Compression/ZLibNative.cs

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -286,17 +286,6 @@ public unsafe ErrorCode Deflate(FlushCode flush)
286286
}
287287

288288

289-
public unsafe ErrorCode DeflateReset()
290-
{
291-
EnsureNotDisposed();
292-
EnsureState(State.InitializedForDeflate);
293-
294-
fixed (ZStream* stream = &_zStream)
295-
{
296-
return Interop.ZLib.DeflateReset(stream);
297-
}
298-
}
299-
300289
public unsafe ErrorCode DeflateEnd()
301290
{
302291
EnsureNotDisposed();
@@ -339,17 +328,6 @@ public unsafe ErrorCode Inflate(FlushCode flush)
339328
}
340329

341330

342-
public unsafe ErrorCode InflateReset()
343-
{
344-
EnsureNotDisposed();
345-
EnsureState(State.InitializedForInflate);
346-
347-
fixed (ZStream* stream = &_zStream)
348-
{
349-
return Interop.ZLib.InflateReset(stream);
350-
}
351-
}
352-
353331
public unsafe ErrorCode InflateEnd()
354332
{
355333
EnsureNotDisposed();

src/native/libs/System.IO.Compression.Native/System.IO.Compression.Native.def

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@ EXPORTS
1515
CompressionNative_Crc32
1616
CompressionNative_Deflate
1717
CompressionNative_DeflateEnd
18-
CompressionNative_DeflateReset
1918
CompressionNative_DeflateInit2_
2019
CompressionNative_Inflate
2120
CompressionNative_InflateEnd
22-
CompressionNative_InflateReset
2321
CompressionNative_InflateInit2_

src/native/libs/System.IO.Compression.Native/System.IO.Compression.Native_unixexports.src

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@ BrotliEncoderSetParameter
1515
CompressionNative_Crc32
1616
CompressionNative_Deflate
1717
CompressionNative_DeflateEnd
18-
CompressionNative_DeflateReset
1918
CompressionNative_DeflateInit2_
2019
CompressionNative_Inflate
2120
CompressionNative_InflateEnd
22-
CompressionNative_InflateReset
2321
CompressionNative_InflateInit2_

src/native/libs/System.IO.Compression.Native/entrypoints.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,9 @@ static const Entry s_compressionNative[] =
2626
DllImportEntry(CompressionNative_Crc32)
2727
DllImportEntry(CompressionNative_Deflate)
2828
DllImportEntry(CompressionNative_DeflateEnd)
29-
DllImportEntry(CompressionNative_DeflateReset)
3029
DllImportEntry(CompressionNative_DeflateInit2_)
3130
DllImportEntry(CompressionNative_Inflate)
3231
DllImportEntry(CompressionNative_InflateEnd)
33-
DllImportEntry(CompressionNative_InflateReset)
3432
DllImportEntry(CompressionNative_InflateInit2_)
3533
};
3634

src/native/libs/System.IO.Compression.Native/pal_zlib.c

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -137,17 +137,6 @@ int32_t CompressionNative_Deflate(PAL_ZStream* stream, int32_t flush)
137137
return result;
138138
}
139139

140-
int32_t CompressionNative_DeflateReset(PAL_ZStream* stream)
141-
{
142-
assert(stream != NULL);
143-
144-
z_stream* zStream = GetCurrentZStream(stream);
145-
int32_t result = deflateReset(zStream);
146-
TransferStateToPalZStream(zStream, stream);
147-
148-
return result;
149-
}
150-
151140
int32_t CompressionNative_DeflateEnd(PAL_ZStream* stream)
152141
{
153142
assert(stream != NULL);
@@ -185,17 +174,6 @@ int32_t CompressionNative_Inflate(PAL_ZStream* stream, int32_t flush)
185174
return result;
186175
}
187176

188-
int32_t CompressionNative_InflateReset(PAL_ZStream* stream)
189-
{
190-
assert(stream != NULL);
191-
192-
z_stream* zStream = GetCurrentZStream(stream);
193-
int32_t result = inflateReset(zStream);
194-
TransferStateToPalZStream(zStream, stream);
195-
196-
return result;
197-
}
198-
199177
int32_t CompressionNative_InflateEnd(PAL_ZStream* stream)
200178
{
201179
assert(stream != NULL);

src/native/libs/System.IO.Compression.Native/pal_zlib.h

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -95,14 +95,6 @@ Returns a PAL_ErrorCode indicating success or an error number on failure.
9595
*/
9696
FUNCTIONEXPORT int32_t FUNCTIONCALLINGCONVENCTION CompressionNative_Deflate(PAL_ZStream* stream, int32_t flush);
9797

98-
/*
99-
This function is equivalent to DeflateEnd followed by DeflateInit, but does not free and reallocate
100-
the internal compression state. The stream will leave the compression level and any other attributes that may have been set unchanged.
101-
102-
Returns a PAL_ErrorCode indicating success or an error number on failure.
103-
*/
104-
FUNCTIONEXPORT int32_t FUNCTIONCALLINGCONVENCTION CompressionNative_DeflateReset(PAL_ZStream* stream);
105-
10698
/*
10799
All dynamically allocated data structures for this stream are freed.
108100
@@ -125,14 +117,6 @@ Returns a PAL_ErrorCode indicating success or an error number on failure.
125117
*/
126118
FUNCTIONEXPORT int32_t FUNCTIONCALLINGCONVENCTION CompressionNative_Inflate(PAL_ZStream* stream, int32_t flush);
127119

128-
/*
129-
This function is equivalent to InflateEnd followed by InflateInit, but does not free and reallocate
130-
the internal decompression state. The stream will keep attributes that may have been set by InflateInit.
131-
132-
Returns a PAL_ErrorCode indicating success or an error number on failure.
133-
*/
134-
FUNCTIONEXPORT int32_t FUNCTIONCALLINGCONVENCTION CompressionNative_InflateReset(PAL_ZStream* stream);
135-
136120
/*
137121
All dynamically allocated data structures for this stream are freed.
138122

0 commit comments

Comments
 (0)