Skip to content

Commit 803faca

Browse files
committed
deal with snippet missing from include file
1 parent 2660423 commit 803faca

File tree

8 files changed

+26
-23
lines changed

8 files changed

+26
-23
lines changed

includes/remarks/System.IO.Compression/CompressionLevel/CompressionLevel.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,16 @@ Compression operations usually involve a tradeoff between the speed and the effe
33
The following methods of the <xref:System.IO.Compression.DeflateStream>, <xref:System.IO.Compression.GZipStream>, <xref:System.IO.Compression.ZipArchive>, <xref:System.IO.Compression.ZipFile>, and <xref:System.IO.Compression.ZipFileExtensions> classes include a parameter named `compressionLevel` that lets you specify the compression level:
44

55
- <xref:System.IO.Compression.DeflateStream.%23ctor%28System.IO.Stream%2CSystem.IO.Compression.CompressionLevel%29?displayProperty=nameWithType>
6-
76
- <xref:System.IO.Compression.DeflateStream.%23ctor%28System.IO.Stream%2CSystem.IO.Compression.CompressionLevel%2CSystem.Boolean%29?displayProperty=nameWithType>
8-
97
- <xref:System.IO.Compression.GZipStream.%23ctor%28System.IO.Stream%2CSystem.IO.Compression.CompressionLevel%29?displayProperty=nameWithType>
10-
118
- <xref:System.IO.Compression.GZipStream.%23ctor%28System.IO.Stream%2CSystem.IO.Compression.CompressionLevel%2CSystem.Boolean%29?displayProperty=nameWithType>
12-
139
- <xref:System.IO.Compression.ZipArchive.CreateEntry%28System.String%2CSystem.IO.Compression.CompressionLevel%29?displayProperty=nameWithType>
14-
1510
- <xref:System.IO.Compression.ZipFile.CreateFromDirectory%28System.String%2CSystem.String%2CSystem.IO.Compression.CompressionLevel%2CSystem.Boolean%29?displayProperty=nameWithType>
16-
1711
- <xref:System.IO.Compression.ZipFileExtensions.CreateEntryFromFile%28System.IO.Compression.ZipArchive%2CSystem.String%2CSystem.String%2CSystem.IO.Compression.CompressionLevel%29?displayProperty=nameWithType>
1812

1913
## Examples
2014

2115
The following example shows how to set the compression level when creating a zip archive by using the <xref:System.IO.Compression.ZipFile> class.
2216

2317
:::code language="csharp" source="~/snippets/csharp/System.IO.Compression/ZipFile/CreateFromDirectory/program3.cs" id="Snippet3":::
24-
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.io.compression.zipfile/vb/program3.vb" id="Snippet3":::
18+
:::code language="vb" source="~/snippets/visualbasic/System.IO.Compression/ZipFile/CreateFromDirectory/program3.vb" id="Snippet3":::

includes/remarks/System.IO.Compression/ZipArchive/.ctor_Stream_ZipArchiveMode_Boolean_Encoding.md

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,17 @@ If the `mode` parameter is set to <xref:System.IO.Compression.ZipArchiveMode.Rea
22

33
When you open a zip archive file for reading and `entryNameEncoding` is set to `null`, entry names and comments are decoded according to the following rules:
44

5-
- When the language encoding flag (in the general-purpose bit flag of the local file header) is not set, the current system default code page is used to decode the entry name and comment.
6-
7-
- When the language encoding flag is set, UTF-8 is used to decode the entry name and comment.
5+
- When the language encoding flag (in the general-purpose bit flag of the local file header) is not set, the current system default code page is used to decode the entry name and comment.
6+
- When the language encoding flag is set, UTF-8 is used to decode the entry name and comment.
87

98
When you open a zip archive file for reading and `entryNameEncoding` is set to a value other than `null`, entry names and comments are decoded according to the following rules:
109

11-
- When the language encoding flag is not set, the specified `entryNameEncoding` is used to decode the entry name and comment.
12-
13-
- When the language encoding flag is set, UTF-8 is used to decode the entry name and comment.
10+
- When the language encoding flag is not set, the specified `entryNameEncoding` is used to decode the entry name and comment.
11+
- When the language encoding flag is set, UTF-8 is used to decode the entry name and comment.
1412

1513
When you write to archive files and `entryNameEncoding` is set to `null`, entry names and comments are encoded according to the following rules:
1614

17-
- For entry names and comments that contain characters outside the ASCII range, the language encoding flag is set, and entry names and comments are encoded by using UTF-8.
18-
19-
- For entry names and comments that contain only ASCII characters, the language encoding flag is not set, and entry names and comments are encoded by using the current system default code page.
15+
- For entry names and comments that contain characters outside the ASCII range, the language encoding flag is set, and entry names and comments are encoded by using UTF-8.
16+
- For entry names and comments that contain only ASCII characters, the language encoding flag is not set, and entry names and comments are encoded by using the current system default code page.
2017

2118
When you write to archive files and `entryNameEncoding` is set to a value other than `null`, the specified `entryNameEncoding` is used to encode the entry names and comments into bytes. The language encoding flag (in the general-purpose bit flag of the local file header) is set only when the specified encoding is a UTF-8 encoding.

includes/remarks/System.IO.Compression/ZipFile/Open.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,16 @@ When you set the `mode` parameter to <xref:System.IO.Compression.ZipArchiveMode.
77
When you open a zip archive file for reading and `entryNameEncoding` is set to `null`, entry names and comments are decoded according to the following rules:
88

99
- When the language encoding flag (in the general-purpose bit flag of the local file header) is not set, the current system default code page is used to decode the entry name and comment.
10-
1110
- When the language encoding flag is set, UTF-8 is used to decode the entry name and comment.
1211

1312
When you open a zip archive file for reading and `entryNameEncoding` is set to a value other than `null`, entry names and comments are decoded according to the following rules:
1413

1514
- When the language encoding flag is not set, the specified `entryNameEncoding` is used to decode the entry name and comment.
16-
1715
- When the language encoding flag is set, UTF-8 is used to decode the entry name and comment.
1816

1917
When you write to archive files and `entryNameEncoding` is set to `null`, entry names and comments are encoded according to the following rules:
2018

2119
- For entry names or comments that contain characters outside the ASCII range, the language encoding flag is set, and entry names and comments are encoded by using UTF-8.
22-
2320
- For entry names or comments that contain only ASCII characters, the language encoding flag is not set, and entry names and comments are encoded by using the current system default code page.
2421

2522
When you write to archive files and `entryNameEncoding` is set to a value other than `null`, the specified `entryNameEncoding` is used to encode the entry names and comments into bytes. The language encoding flag (in the general-purpose bit flag of the local file header) is set only when the specified encoding is a UTF-8 encoding.

includes/remarks/System.IO.Compression/ZipFile/ZipFile.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ The methods for manipulating zip archives and their files are spread across thre
1818
This example shows how to create and extract a zip archive by using the <xref:System.IO.Compression.ZipFile> class. It compresses the contents of a folder into a zip archive, and then extracts that content to a new folder.
1919

2020
:::code language="csharp" source="~/snippets/csharp/System.IO.Compression/ZipFile/CreateFromDirectory/program1.cs" id="Snippet1":::
21-
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.io.compression.zipfile/vb/program1.vb" id="Snippet1":::
21+
:::code language="vb" source="~/snippets/visualbasic/System.IO.Compression/ZipFile/CreateFromDirectory/program1.vb" id="Snippet1":::
File renamed without changes.
File renamed without changes.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
' <snippet3>
2+
Imports System.IO
3+
Imports System.IO.Compression
4+
5+
Module Module1
6+
7+
Sub Main()
8+
Dim startPath As String = "c:\example\start"
9+
Dim zipPath As String = "c:\example\result.zip"
10+
11+
ZipFile.CreateFromDirectory(startPath, zipPath, CompressionLevel.Fastest, True)
12+
End Sub
13+
14+
End Module
15+
' </snippet3>

xml/System.IO.Compression/ZipFile.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ An I/O error occurred while opening a file to be archived.</exception>
178178
179179
:::code language="csharp" source="~/snippets/csharp/System.IO.Compression/ZipFile/CreateFromDirectory/program1.cs" id="Snippet1":::
180180
:::code language="fsharp" source="~/snippets/fsharp/System.IO.Compression/ZipFile/CreateFromDirectory/program1.fs" id="Snippet1":::
181-
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.io.compression.zipfile/vb/program1.vb" id="Snippet1":::
181+
:::code language="vb" source="~/snippets/visualbasic/System.IO.Compression/ZipFile/CreateFromDirectory/program1.vb" id="Snippet1":::
182182
183183
]]></format>
184184
</remarks>
@@ -334,7 +334,7 @@ An I/O error occurred while opening a file to be archived.</exception>
334334
335335
:::code language="csharp" source="~/snippets/csharp/System.IO.Compression/ZipFile/CreateFromDirectory/program2.cs" id="Snippet2":::
336336
:::code language="fsharp" source="~/snippets/fsharp/System.IO.Compression/ZipFile/CreateFromDirectory/program2.fs" id="Snippet2":::
337-
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.io.compression.zipfile/vb/program2.vb" id="Snippet2":::
337+
:::code language="vb" source="~/snippets/visualbasic/System.IO.Compression/ZipFile/CreateFromDirectory/program2.vb" id="Snippet2":::
338338
339339
]]></format>
340340
</remarks>
@@ -894,7 +894,7 @@ An archive entry was compressed by using a compression method that is not suppor
894894
895895
:::code language="csharp" source="~/snippets/csharp/System.IO.Compression/ZipFile/CreateFromDirectory/program1.cs" id="Snippet1":::
896896
:::code language="fsharp" source="~/snippets/fsharp/System.IO.Compression/ZipFile/CreateFromDirectory/program1.fs" id="Snippet1":::
897-
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.io.compression.zipfile/vb/program1.vb" id="Snippet1":::
897+
:::code language="vb" source="~/snippets/visualbasic/System.IO.Compression/ZipFile/CreateFromDirectory/program1.vb" id="Snippet1":::
898898
899899
]]></format>
900900
</remarks>

0 commit comments

Comments
 (0)