mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-09-21 22:45:14 +00:00
moved namespaces
This commit is contained in:
@@ -85,6 +85,8 @@ using (var archive = ArchiveFactory.OpenArchive(parts))
|
||||
|
||||
`InspectArchive` enumerates metadata and returns `ArchiveInformation`. It reports `Partial` status for missing volumes or encrypted headers without a password; malformed archives and incorrect passwords throw. ZIP-specific metadata is exposed through `ArchiveInformation.Zip`.
|
||||
|
||||
Detection and inspection result types are in the `SharpCompress.Detection` namespace.
|
||||
|
||||
The stream overloads of `DetectArchive` and `InspectArchive` preserve the supplied stream's position and leave it open, including when `ReaderOptions.LeaveStreamOpen` is `false`.
|
||||
|
||||
#### Migrating from `GetArchiveInformation`
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
4. The 7Zip format doesn't allow for reading as a forward-only stream, so 7Zip read support is only through the Archive API. Writing is supported through SevenZipWriter for non-solid archives with LZMA/LZMA2 and requires a seekable output stream. See [7Zip Format Notes](#7zip-format-notes) for details on async extraction behavior.
|
||||
5. LZip has no support for extra data like the file name or timestamp. There is a default filename used when looking at the entry Key on the archive.
|
||||
|
||||
`ArchiveFactory.DetectArchive(...)` reports which APIs in this table are available through `ArchiveDetection.SupportedApis`. Reader-only formats include Ace, Arc, Arj, and standalone LZW. Compressed TAR wrappers are detected as a TAR container with an outer compression type and support the Reader API, not the Archive API. Use `ArchiveFactory.InspectArchive(...)` when complete archive metadata is required.
|
||||
`ArchiveFactory.DetectArchive(...)` reports which APIs in this table are available through `SharpCompress.Detection.ArchiveDetection.SupportedApis`. Reader-only formats include Ace, Arc, Arj, and standalone LZW. Compressed TAR wrappers are detected as a TAR container with an outer compression type and support the Reader API, not the Archive API. Use `ArchiveFactory.InspectArchive(...)` when complete archive metadata is required.
|
||||
|
||||
### Zip Format Notes
|
||||
|
||||
|
||||
@@ -230,6 +230,8 @@ using (var archive = ArchiveFactory.OpenArchive("archive.zip"))
|
||||
### Detect the format and choose the right API
|
||||
|
||||
```C#
|
||||
using SharpCompress.Detection;
|
||||
|
||||
var archivePath = "archive.arc";
|
||||
var detection = ArchiveFactory.DetectArchive(archivePath);
|
||||
if (detection is null)
|
||||
@@ -264,6 +266,8 @@ if (information is not null)
|
||||
|
||||
`InspectArchive` parses archive metadata, which can require a complete sequential scan for TAR and compressed TAR files. It returns partial information for encrypted headers without a password or missing archive parts; inspect `Status` and `Limitations` before using nullable metadata values.
|
||||
|
||||
Detection and inspection result types are in the `SharpCompress.Detection` namespace.
|
||||
|
||||
The stream overload preserves the caller's current position and leaves the supplied stream open.
|
||||
|
||||
### Open multi-volume archives
|
||||
|
||||
@@ -4,6 +4,7 @@ using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using SharpCompress.Archives.Tar;
|
||||
using SharpCompress.Common;
|
||||
using SharpCompress.Detection;
|
||||
using SharpCompress.Factories;
|
||||
using SharpCompress.IO;
|
||||
using SharpCompress.Providers;
|
||||
|
||||
@@ -11,6 +11,7 @@ using SharpCompress.Common;
|
||||
using SharpCompress.Common.Ace.Headers;
|
||||
using SharpCompress.Common.Rar;
|
||||
using SharpCompress.Common.Zip;
|
||||
using SharpCompress.Detection;
|
||||
using SharpCompress.IO;
|
||||
using SharpCompress.Readers;
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ using SharpCompress.Common;
|
||||
using SharpCompress.Common.Rar;
|
||||
using SharpCompress.Common.Zip;
|
||||
using SharpCompress.Common.Zip.Headers;
|
||||
using SharpCompress.Detection;
|
||||
using SharpCompress.IO;
|
||||
using SharpCompress.Readers;
|
||||
using AceMainHeader = SharpCompress.Common.Ace.Headers.AceMainHeader;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System;
|
||||
|
||||
namespace SharpCompress.Archives;
|
||||
namespace SharpCompress.Detection;
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the APIs available for an archive format.
|
||||
@@ -1,6 +1,6 @@
|
||||
using SharpCompress.Common;
|
||||
|
||||
namespace SharpCompress.Archives;
|
||||
namespace SharpCompress.Detection;
|
||||
|
||||
/// <summary>
|
||||
/// Identifies an archive format without enumerating its entries.
|
||||
@@ -1,6 +1,6 @@
|
||||
using System;
|
||||
|
||||
namespace SharpCompress.Archives;
|
||||
namespace SharpCompress.Detection;
|
||||
|
||||
/// <summary>
|
||||
/// Identifies which archive data is encrypted.
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace SharpCompress.Archives;
|
||||
namespace SharpCompress.Detection;
|
||||
|
||||
/// <summary>
|
||||
/// Contains metadata collected by fully inspecting an archive.
|
||||
@@ -1,6 +1,6 @@
|
||||
using System;
|
||||
|
||||
namespace SharpCompress.Archives;
|
||||
namespace SharpCompress.Detection;
|
||||
|
||||
/// <summary>
|
||||
/// Identifies conditions that prevented complete archive metadata inspection.
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace SharpCompress.Archives;
|
||||
namespace SharpCompress.Detection;
|
||||
|
||||
/// <summary>
|
||||
/// Describes whether archive metadata could be collected completely.
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace SharpCompress.Archives;
|
||||
namespace SharpCompress.Detection;
|
||||
|
||||
/// <summary>
|
||||
/// Contains ZIP-specific metadata.
|
||||
@@ -4,6 +4,7 @@ using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using SharpCompress.Archives;
|
||||
using SharpCompress.Common;
|
||||
using SharpCompress.Detection;
|
||||
using SharpCompress.Factories;
|
||||
using SharpCompress.Readers;
|
||||
using SharpCompress.Test.Mocks;
|
||||
|
||||
Reference in New Issue
Block a user