diff --git a/.github/workflows/publish-code-coverage.yml b/.github/workflows/publish-code-coverage.yml
deleted file mode 100644
index 4f3b4d18..00000000
--- a/.github/workflows/publish-code-coverage.yml
+++ /dev/null
@@ -1,26 +0,0 @@
-name: Publish Code Coverage
-
-on:
- push:
- branches: [ main ]
-jobs:
- build:
-
- runs-on: ubuntu-latest
-
- steps:
- - uses: actions/checkout@v2
- with:
- fetch-depth: 0
- - name: Setup .NET Core
- uses: actions/setup-dotnet@v1
- with:
- dotnet-version: 3.1.301
- - name: Install dependencies
- run: dotnet restore
- - name: Test
- run: dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat=lcov /p:CoverletOutput=./coverage/lcov.info
- - name: Coveralls
- uses: coverallsapp/github-action@master
- with:
- github-token: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/publish-wasm-to-gh-pages.yml b/.github/workflows/publish-wasm-to-gh-pages.yml
deleted file mode 100644
index 8a91180d..00000000
--- a/.github/workflows/publish-wasm-to-gh-pages.yml
+++ /dev/null
@@ -1,31 +0,0 @@
-name: Publish Blazor
-
-on:
- push:
- branches: [ main ]
-jobs:
- build:
-
- runs-on: ubuntu-latest
-
- steps:
- - uses: actions/checkout@v2
- with:
- fetch-depth: 0
- - name: Setup .NET Core
- uses: actions/setup-dotnet@v1
- with:
- dotnet-version: 8.0.x
- # Include wasm-tools to optimize build
- - name: wasm-tools
- run: dotner workload install wasm-tools
- - name: Install dependencies
- run: dotnet restore
- - name: Build
- run: dotnet publish RecursiveExtractor.Blazor --configuration Release --no-restore -o blazorOut
- - name: GitHub Pages action
- uses: peaceiris/actions-gh-pages@v3
- with:
- github_token: ${{ secrets.GITHUB_TOKEN }}
- publish_branch: gh-pages
- publish_dir: blazorOut/wwwroot
diff --git a/Pipelines/recursive-extractor-pr.yml b/Pipelines/recursive-extractor-pr.yml
index 5e9f334f..45a6becf 100644
--- a/Pipelines/recursive-extractor-pr.yml
+++ b/Pipelines/recursive-extractor-pr.yml
@@ -13,7 +13,7 @@ resources:
- repository: templates
type: git
name: SecurityEngineering/OSS-Tools-Pipeline-Templates
- ref: refs/tags/v1.1.0
+ ref: refs/tags/v1.1.1
variables:
BuildConfiguration: 'Release'
@@ -27,13 +27,13 @@ stages:
parameters:
jobName: 'lib_dotnet_test_windows'
dotnetVersions: ['6.0.x','7.0.x','8.0.x']
- vmImage: 'oss-tools-win2022_1es-managed'
+ vmImage: 'win2022-image-base'
projectPath: 'RecursiveExtractor.Tests/RecursiveExtractor.Tests.csproj'
- template: dotnet-test-job.yml@templates
parameters:
jobName: 'cli_dotnet_test_windows'
dotnetVersions: ['6.0.x','7.0.x','8.0.x']
- vmImage: 'oss-tools-win2022_1es-managed'
+ vmImage: 'win2022-image-base'
projectPath: 'RecursiveExtractor.Cli.Tests/RecursiveExtractor.Cli.Tests.csproj'
- stage: SDL
diff --git a/Pipelines/recursive-extractor-release.yml b/Pipelines/recursive-extractor-release.yml
index 65bf8aa1..f6cefe92 100644
--- a/Pipelines/recursive-extractor-release.yml
+++ b/Pipelines/recursive-extractor-release.yml
@@ -18,7 +18,7 @@ resources:
- repository: templates
type: git
name: SecurityEngineering/OSS-Tools-Pipeline-Templates
- ref: refs/tags/v1.1.0
+ ref: refs/tags/v1.1.1
variables:
BuildConfiguration: 'Release'
@@ -32,13 +32,13 @@ stages:
parameters:
jobName: 'lib_dotnet_test_windows'
dotnetVersions: ['6.0.x','7.0.x','8.0.x']
- vmImage: 'oss-tools-win2022_1es-managed'
+ vmImage: 'win2022-image-base'
projectPath: 'RecursiveExtractor.Tests/RecursiveExtractor.Tests.csproj'
- template: dotnet-test-job.yml@templates
parameters:
jobName: 'cli_dotnet_test_windows'
dotnetVersions: ['6.0.x','7.0.x','8.0.x']
- vmImage: 'oss-tools-win2022_1es-managed'
+ vmImage: 'win2022-image-base'
projectPath: 'RecursiveExtractor.Cli.Tests/RecursiveExtractor.Cli.Tests.csproj'
- stage: SDL
@@ -87,7 +87,7 @@ stages:
displayName: Code Sign, Generate Hashes, Publish Public Releases
pool:
name: 'OSS-Tools-1ESPool'
- vmImage: 'oss-tools-win2022_1es-managed'
+ vmImage: 'win2022-image-base'
steps:
- task: UseDotNet@2 # For ESRP. Do not use variable.
inputs:
diff --git a/README.md b/README.md
index bea11e15..a23ced16 100644
--- a/README.md
+++ b/README.md
@@ -7,17 +7,18 @@ Recursive Extractor is a Cross-Platform [.NET Standard 2.0 Library](#library) an
| | | |
|-|-|-|
| 7zip+ | ar | bzip2 |
-| deb | gzip | iso |
-| rar^ | tar | vhd |
-| vhdx | vmdk | wim* |
-| xzip | zip+ | |
+| deb | dmg** | gzip |
+| iso | rar^ | tar |
+| vhd | vhdx | vmdk |
+| wim* | xzip | zip+ |
Details
* Windows only
+ Encryption Supported
-^ Rar version 4 Encryption supported
+^ Encryption supported for Rar version 4 only
+** Limited support. Unencrypted HFS+ volumes with certain compression schemes.
# Variants
@@ -25,9 +26,9 @@ Recursive Extractor is a Cross-Platform [.NET Standard 2.0 Library](#library) an
## Command Line
### Installing
1. Ensure you have the latest [.NET SDK](https://dotnet.microsoft.com/download).
-2. run `dotnet tool install -g Microsoft.CST.RecursiveExtractor.Cli`
+2. Run `dotnet tool install -g Microsoft.CST.RecursiveExtractor.Cli`
-This adds `RecursiveExtractor` to your path so you can run it directly from the shell.
+This adds `RecursiveExtractor` to your path so you can run it directly from your shell.
### Running
Basic usage is: `RecursiveExtractor --input archive.ext --output outputDirectory`
@@ -57,7 +58,7 @@ Run `RecursiveExtractor --help` for more details.
## .NET Standard Library
-Recursive Extractor is available on NuGet as [Microsoft.CST.RecursiveExtractor](https://www.nuget.org/packages/Microsoft.CST.RecursiveExtractor/). Recursive Extractor targets netstandard2.0+ and the latest .NET, currently .NET 6.0 and .NET 7.0.
+Recursive Extractor is available on NuGet as [Microsoft.CST.RecursiveExtractor](https://www.nuget.org/packages/Microsoft.CST.RecursiveExtractor/). Recursive Extractor targets netstandard2.0+ and the latest .NET, currently .NET 6.0, .NET 7.0 and .NET 8.0.
### Usage
@@ -77,8 +78,7 @@ foreach(var file in extractor.Extract(path))
Extracting to Disk
-This code adapted from the Cli extracts the contents of given archive located at `options.Input`
-to a directory located at `options.Output`, including extracting failed archives as themselves.
+This code adapted from the Cli extracts the contents of given archive located at `options.Input` to a directory located at `options.Output`, including extracting failed archives as themselves.
```csharp
using Microsoft.CST.RecursiveExtractor;
@@ -166,12 +166,12 @@ catch(OverflowException)
RecursiveExtractor protects against [ZipSlip](https://snyk.io/research/zip-slip-vulnerability), [Quines, and Zip Bombs](https://en.wikipedia.org/wiki/Zip_bomb).
Calls to Extract will throw an `OverflowException` when a Quine or Zip bomb is detected and a `TimeOutException` if `EnableTiming` is set and the specified time period has elapsed before completion.
-Otherwise, invalid files found while crawling will emit a logger message and be skipped. RecursiveExtractor uses NLog for logging.
+Otherwise, invalid files found while crawling will emit a logger message and be skipped. You can also enable `ExtractSelfOnFail` to return the original archive file on an extraction failure.
## Notes on Enumeration
### Multiple Enumeration
-You should not iterate the Enumeration returned from the `Extract` and `ExtractAsync` interfaces multiple times, if you need to do so, convert the Enumeration to the collection of your choice first.
+You should not iterate the Enumeration returned from the `Extract` and `ExtractAsync` interfaces multiple times, if you need to do so, convert the Enumeration to an in memory collection first.
### Parallel Enumeration
If you want to enumerate the output with parallelization you should use a batching mechanism, for example:
@@ -208,7 +208,7 @@ while (moreAvailable)
```
### Disposing During Enumeration
-If you are working with a very large archive or in particularly constrained environment you can reduce memory/file handle usage for the Content streams in each FileEntry by disposing as you iterate.
+If you are working with a very large archive or in particularly constrained environment you can reduce memory and file handle usage for the Content streams in each FileEntry by disposing as you iterate.
```csharp
var results = extractor.Extract(path);
@@ -217,7 +217,7 @@ foreach(var file in results)
using var theStream = file.Content;
// Do something with the stream.
_ = theStream.ReadByte();
- // The stream is disposed here from the using statement
+// The stream is disposed here by the using statement
}
```
@@ -229,11 +229,11 @@ If you are having trouble parsing a specific archive of one of the supported for
# Dependencies
-Recursive Extractor uses a number of libraries to parse archives.
+Recursive Extractor aims to provide a unified interface to extract arbitrary archives and relies on a number of libraries to parse the archives.
* [SharpZipLib](https://github.com/icsharpcode/SharpZipLib)
* [SharpCompress](https://github.com/adamhathcock/sharpcompress)
-* [DiscUtils](https://github.com/discutils/discutils)
+* [LTRData/DiscUtils](https://github.com/LTRData/discutils)
# Contributing
diff --git a/RecursiveExtractor.Blazor/RecursiveExtractor.Blazor.csproj b/RecursiveExtractor.Blazor/RecursiveExtractor.Blazor.csproj
index 6dc8a452..76442f27 100644
--- a/RecursiveExtractor.Blazor/RecursiveExtractor.Blazor.csproj
+++ b/RecursiveExtractor.Blazor/RecursiveExtractor.Blazor.csproj
@@ -7,8 +7,8 @@
-
-
+
+
diff --git a/RecursiveExtractor.Cli.Tests/RecursiveExtractor.Cli.Tests.csproj b/RecursiveExtractor.Cli.Tests/RecursiveExtractor.Cli.Tests.csproj
index a3b22db1..732733ff 100644
--- a/RecursiveExtractor.Cli.Tests/RecursiveExtractor.Cli.Tests.csproj
+++ b/RecursiveExtractor.Cli.Tests/RecursiveExtractor.Cli.Tests.csproj
@@ -11,8 +11,8 @@
-
-
+
+ allruntime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/RecursiveExtractor.Tests/ExtractorTests/ExpectedNumFilesTests.cs b/RecursiveExtractor.Tests/ExtractorTests/ExpectedNumFilesTests.cs
index f8763dbb..0736deca 100644
--- a/RecursiveExtractor.Tests/ExtractorTests/ExpectedNumFilesTests.cs
+++ b/RecursiveExtractor.Tests/ExtractorTests/ExpectedNumFilesTests.cs
@@ -42,7 +42,8 @@ public static IEnumerable