-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Implementation of multi-volume archive support, RAR test case
- Loading branch information
Showing
11 changed files
with
114 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
v0.1.4 - Jun 28 2023 | ||
|
||
- Add support for multi-volume archives | ||
|
||
v0.1.3 - Dec 23 2022 | ||
|
||
- Add optional argument to LibArchiveReader to configure blocksize, default 1MiB | ||
|
||
v0.1.2 - Oct 27 2022 | ||
|
||
- Fix memory leak on Linux in musl-libc malloc | ||
|
||
v0.1.1 - Sep 22 2022 | ||
|
||
- First full release, supporting Linux, Windows and MacOS x64 plus MacOS ARM64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
using System.Security.Cryptography; | ||
using System.Text; | ||
using LibArchive.Net; | ||
using NUnit.Framework; | ||
|
||
namespace Test.LibArchive.Net; | ||
|
||
public class SevenZipTests | ||
{ | ||
private readonly SHA256 hash = SHA256.Create(); | ||
|
||
[Test] | ||
public void Test7z() | ||
{ | ||
using var lar = new LibArchiveReader("7ztest.7z"); | ||
foreach (var e in lar.Entries()) | ||
{ | ||
using var s = e.Stream; | ||
StringBuilder sb = new(e.Name,e.Name.Length+33); | ||
sb.Append(' '); | ||
foreach (var d in hash.ComputeHash(s)) | ||
{ | ||
sb.Append(d.ToString("x2")); | ||
} | ||
Console.WriteLine(sb); | ||
} | ||
Assert.Pass(); | ||
} | ||
|
||
[Test] | ||
public void TestMultiRar() | ||
{ | ||
var files = Directory.GetFiles(TestContext.CurrentContext.TestDirectory, "rartest*.rar"); | ||
Array.Sort(files); | ||
Assert.That(files, Has.Length.EqualTo(4), "Expected 4 RAR segments"); | ||
using var rar = new LibArchiveReader(files); | ||
foreach (var e in rar.Entries()) | ||
{ | ||
using var s = e.Stream; | ||
StringBuilder sb = new(e.Name, e.Name.Length + 33); | ||
sb.Append(' '); | ||
foreach (var d in hash.ComputeHash(s)) | ||
{ | ||
sb.Append(d.ToString("x2")); | ||
} | ||
Console.WriteLine(sb); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.