Skip to content

Commit a2938dc

Browse files
committed
add Compress Sample
1 parent 30c8a6f commit a2938dc

File tree

7 files changed

+70
-0
lines changed

7 files changed

+70
-0
lines changed

src/Compress/CompressSample/.idea/.idea.CompressSample/.idea/.gitignore

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Compress/CompressSample/.idea/.idea.CompressSample/.idea/encodings.xml

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Compress/CompressSample/.idea/.idea.CompressSample/.idea/indexLayout.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Compress/CompressSample/.idea/.idea.CompressSample/.idea/vcs.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>Exe</OutputType>
5+
<TargetFramework>net9.0</TargetFramework>
6+
<ImplicitUsings>enable</ImplicitUsings>
7+
<Nullable>enable</Nullable>
8+
</PropertyGroup>
9+
10+
<ItemGroup>
11+
<PackageReference Include="GeneralUpdate.Common" Version="9.0.0" />
12+
</ItemGroup>
13+
14+
</Project>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CompressSample", "CompressSample.csproj", "{C90A1CD9-12EE-431B-B8D0-22DBDD0298A6}"
4+
EndProject
5+
Global
6+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
7+
Debug|Any CPU = Debug|Any CPU
8+
Release|Any CPU = Release|Any CPU
9+
EndGlobalSection
10+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
11+
{C90A1CD9-12EE-431B-B8D0-22DBDD0298A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
12+
{C90A1CD9-12EE-431B-B8D0-22DBDD0298A6}.Debug|Any CPU.Build.0 = Debug|Any CPU
13+
{C90A1CD9-12EE-431B-B8D0-22DBDD0298A6}.Release|Any CPU.ActiveCfg = Release|Any CPU
14+
{C90A1CD9-12EE-431B-B8D0-22DBDD0298A6}.Release|Any CPU.Build.0 = Release|Any CPU
15+
EndGlobalSection
16+
EndGlobal
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
using System.Text;
2+
using GeneralUpdate.Common.Compress;
3+
using GeneralUpdate.Common.Shared.Object;
4+
5+
var source = @"D:\packet\release";
6+
var target = @"D:\packet\1.zip";
7+
CompressProvider.Compress(Format.ZIP,source,target, false, Encoding.UTF8);
8+
CompressProvider.Decompress(Format.ZIP,target,source, Encoding.UTF8);
9+
Console.WriteLine($"Done {File.Exists(target)}");

0 commit comments

Comments
 (0)