Skip to content
Draft
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -373,3 +373,4 @@ test:.cs
*.tempLog.xml
*.testResults.xml
*.testStats.csv
*.md
34 changes: 32 additions & 2 deletions src/libraries/System.IO.Compression/ref/System.IO.Compression.cs
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,9 @@ internal ZipArchiveEntry() { }
public string Name { get { throw null; } }
public void Delete() { }
public System.IO.Stream Open() { throw null; }
public System.IO.Stream Open(FileAccess access) { throw null; }
public System.Threading.Tasks.Task<System.IO.Stream> OpenAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public System.IO.Stream Open(System.IO.FileAccess access) { throw null; }
public System.Threading.Tasks.Task<System.IO.Stream> OpenAsync(System.IO.FileAccess access, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public System.Threading.Tasks.Task<System.IO.Stream> OpenAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public override string ToString() { throw null; }
}
public enum ZipArchiveMode
Expand All @@ -144,6 +144,36 @@ public enum ZipCompressionMethod
Deflate = 8,
Deflate64 = 9,
}
public sealed partial class ZipForwardReadEntry
{
internal ZipForwardReadEntry() { }
public long CompressedLength { get { throw null; } }
public System.IO.Compression.ZipCompressionMethod CompressionMethod { get { throw null; } }
[System.CLSCompliantAttribute(false)]
public uint Crc32 { get { throw null; } }
public System.IO.Stream? DataStream { get { throw null; } }
public string FullName { get { throw null; } }
[System.CLSCompliantAttribute(false)]
public ushort GeneralPurposeBitFlags { get { throw null; } }
public bool IsDirectory { get { throw null; } }
public bool IsEncrypted { get { throw null; } }
public System.DateTimeOffset LastModified { get { throw null; } }
public long Length { get { throw null; } }
public string Name { get { throw null; } }
[System.CLSCompliantAttribute(false)]
public ushort VersionNeeded { get { throw null; } }
public void ExtractToFile(string destinationFileName, bool overwrite) { }
public System.Threading.Tasks.Task ExtractToFileAsync(string destinationFileName, bool overwrite, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
}
public sealed partial class ZipStreamReader : System.IAsyncDisposable, System.IDisposable
{
public ZipStreamReader(System.IO.Stream stream, bool leaveOpen = false) { }
public ZipStreamReader(System.IO.Stream stream, System.Text.Encoding? entryNameEncoding, bool leaveOpen = false) { }
public void Dispose() { }
public System.Threading.Tasks.ValueTask DisposeAsync() { throw null; }
public System.IO.Compression.ZipForwardReadEntry? GetNextEntry(bool copyData = false) { throw null; }
public System.Threading.Tasks.ValueTask<System.IO.Compression.ZipForwardReadEntry?> GetNextEntryAsync(bool copyData = false, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
}
public sealed partial class ZLibCompressionOptions
{
public ZLibCompressionOptions() { }
Expand Down
12 changes: 12 additions & 0 deletions src/libraries/System.IO.Compression/src/Resources/Strings.resx
Original file line number Diff line number Diff line change
Expand Up @@ -371,10 +371,22 @@
<data name="IO_SeekBeforeBegin" xml:space="preserve">
<value>An attempt was made to move the position before the beginning of the stream.</value>
</data>
<data name="ZipStreamStoredDataDescriptorNotSupported" xml:space="preserve">
<value>Stored compression entries with data descriptors cannot be read in forward-only mode because the compressed size is unknown.</value>
</data>
<data name="CrcMismatch" xml:space="preserve">
<value>The CRC32 checksum of the extracted data does not match the expected value from the archive.</value>
</data>
<data name="UnexpectedStreamLength" xml:space="preserve">
<value>The decompressed data length does not match the expected value from the archive.</value>
</data>
<data name="ZipStreamEncryptedDataDescriptorNotSupported" xml:space="preserve">
<value>Encrypted entries with data descriptors cannot be read in forward-only mode because the compressed size is unknown.</value>
</data>
<data name="ZipStreamEntryNoDataToExtract" xml:space="preserve">
<value>Cannot extract a directory entry or an entry with no data to a file. Check IsDirectory and DataStream before calling ExtractToFile.</value>
</data>
<data name="ZipStreamInvalidLocalFileHeader" xml:space="preserve">
<value>The ZIP archive contains an invalid local file header signature.</value>
</data>
</root>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-unix;$(NetCoreAppCurrent)-browser;$(NetCoreAppCurrent)-wasi;$(NetCoreAppCurrent)</TargetFrameworks>
Expand Down Expand Up @@ -41,12 +41,9 @@
<Compile Include="System\IO\Compression\DeflateZLib\DeflateStream.cs" />
<Compile Include="System\IO\Compression\DeflateZLib\Inflater.cs" />
<Compile Include="System\IO\Compression\DeflateZLib\ZLibException.cs" />
<Compile Include="$(CommonPath)System\IO\Compression\ZLibNative.cs"
Link="Common\System\IO\Compression\ZLibNative.cs" />
<Compile Include="$(CommonPath)System\IO\Compression\ZLibNative.CompressionLevel.cs"
Link="Common\System\IO\Compression\ZLibNative.CompressionLevel.cs" />
<Compile Include="$(CommonPath)System\IO\Compression\ZLibNative.ZStream.cs"
Link="Common\System\IO\Compression\ZLibNative.ZStream.cs" />
<Compile Include="$(CommonPath)System\IO\Compression\ZLibNative.cs" Link="Common\System\IO\Compression\ZLibNative.cs" />
<Compile Include="$(CommonPath)System\IO\Compression\ZLibNative.CompressionLevel.cs" Link="Common\System\IO\Compression\ZLibNative.CompressionLevel.cs" />
<Compile Include="$(CommonPath)System\IO\Compression\ZLibNative.ZStream.cs" Link="Common\System\IO\Compression\ZLibNative.ZStream.cs" />
<Compile Include="System\IO\Compression\CompressionLevel.cs" />
<Compile Include="System\IO\Compression\CompressionMode.cs" />
<Compile Include="System\IO\Compression\Crc32Helper.ZLib.cs" />
Expand All @@ -55,28 +52,25 @@
<Compile Include="System\IO\Compression\ZLibCompressionOptions.cs" />
<Compile Include="System\IO\Compression\ZLibStream.cs" />
<Compile Include="System\IO\Compression\ZipCompressionMethod.cs" />
<Compile Include="$(CommonPath)System\Obsoletions.cs"
Link="Common\System\Obsoletions.cs" />
<Compile Include="$(CommonPath)System\Obsoletions.cs" Link="Common\System\Obsoletions.cs" />
<Compile Include="System\IO\Compression\ZipForwardReadEntry.cs" />
<Compile Include="System\IO\Compression\ZipStreamReader.cs" />
</ItemGroup>

<!-- Windows specific files -->
<ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
<Compile Include="System\IO\Compression\ZipArchiveEntry.Windows.cs" />
<Compile Include="$(CommonPath)System\IO\Compression\ZipArchiveEntryConstants.Windows.cs" />
<Compile Include="$(CommonPath)Interop\Windows\Interop.Libraries.cs"
Link="Common\Interop\Windows\Interop.Libraries.cs" />
<Compile Include="$(CommonPath)Interop\Windows\Interop.Libraries.cs" Link="Common\Interop\Windows\Interop.Libraries.cs" />
</ItemGroup>

<!-- Unix specific files -->
<ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'unix' or '$(TargetPlatformIdentifier)' == 'browser' or '$(TargetPlatformIdentifier)' == 'wasi'">
<Compile Include="System\IO\Compression\ZipArchiveEntry.Unix.cs" />
<Compile Include="$(CommonPath)System\IO\Compression\ZipArchiveEntryConstants.Unix.cs" />
<Compile Include="$(CommonPath)Interop\Unix\Interop.Libraries.cs"
Link="Common\Interop\Unix\Interop.Libraries.cs" />
<Compile Include="$(CommonPath)Interop\Unix\System.Native\Interop.PathConf.cs"
Link="Common\Interop\Unix\System.Native\Interop.PathConf.cs" />
<Compile Include="$(CommonPath)Interop\Unix\System.Native\Interop.Stat.cs"
Link="Common\Interop\Unix\System.Native\Interop.Stat.cs" />
<Compile Include="$(CommonPath)Interop\Unix\Interop.Libraries.cs" Link="Common\Interop\Unix\Interop.Libraries.cs" />
<Compile Include="$(CommonPath)Interop\Unix\System.Native\Interop.PathConf.cs" Link="Common\Interop\Unix\System.Native\Interop.PathConf.cs" />
<Compile Include="$(CommonPath)Interop\Unix\System.Native\Interop.Stat.cs" Link="Common\Interop\Unix\System.Native\Interop.Stat.cs" />
</ItemGroup>

<!-- Zstandard files (not supported on browser/wasi) -->
Expand Down
Loading
Loading