mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-09-22 06:54:40 +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
|
||||
|
||||
Reference in New Issue
Block a user