Class ZipArchive
- Namespace
- SharpCompress.Archive.Zip
- Assembly
- SharpCompress.dll
public class ZipArchive : AbstractWritableArchive<ZipArchiveEntry, ZipVolume>, IWritableArchive, IArchive, IDisposable
- Inheritance
-
ZipArchive
- Implements
-
- Inherited Members
-
- Extension Methods
-
Properties
DeflateCompressionLevel
public CompressionLevel DeflateCompressionLevel { get; set; }
Property Value
- CompressionLevel
Methods
Create()
public static ZipArchive Create()
Returns
- ZipArchive
CreateEntryInternal(string, Stream, long, DateTime?, bool)
protected override ZipArchiveEntry CreateEntryInternal(string filePath, Stream source, long size, DateTime? modified, bool closeStream)
Parameters
filePath
string
source
Stream
size
long
modified
DateTime?
closeStream
bool
Returns
- ZipArchiveEntry
protected override IReader CreateReaderForSolidExtraction()
Returns
- IReader
IsZipFile(FileInfo, string)
public static bool IsZipFile(FileInfo fileInfo, string password = null)
Parameters
fileInfo
FileInfo
password
string
Returns
- bool
IsZipFile(Stream, string)
public static bool IsZipFile(Stream stream, string password = null)
Parameters
stream
Stream
password
string
Returns
- bool
IsZipFile(string, string)
public static bool IsZipFile(string filePath, string password = null)
Parameters
filePath
string
password
string
Returns
- bool
LoadEntries(IEnumerable<ZipVolume>)
protected override IEnumerable<ZipArchiveEntry> LoadEntries(IEnumerable<ZipVolume> volumes)
Parameters
volumes
IEnumerable<ZipVolume>
Returns
- IEnumerable<ZipArchiveEntry>
LoadVolumes(IEnumerable<Stream>, Options)
protected override IEnumerable<ZipVolume> LoadVolumes(IEnumerable<Stream> streams, Options options)
Parameters
streams
IEnumerable<Stream>
options
Options
Returns
- IEnumerable<ZipVolume>
LoadVolumes(FileInfo, Options)
protected override IEnumerable<ZipVolume> LoadVolumes(FileInfo file, Options options)
Parameters
file
FileInfo
options
Options
Returns
- IEnumerable<ZipVolume>
Open(FileInfo, Options, string)
public static ZipArchive Open(FileInfo fileInfo, Options options, string password = null)
Parameters
fileInfo
FileInfo
options
Options
password
string
Returns
- ZipArchive
Open(FileInfo, string)
public static ZipArchive Open(FileInfo fileInfo, string password = null)
Parameters
fileInfo
FileInfo
password
string
Returns
- ZipArchive
Open(Stream, Options, string)
public static ZipArchive Open(Stream stream, Options options, string password = null)
Parameters
stream
Stream
options
Options
password
string
Returns
- ZipArchive
Open(Stream, string)
public static ZipArchive Open(Stream stream, string password = null)
Parameters
stream
Stream
password
string
Returns
- ZipArchive
Open(string, Options, string)
public static ZipArchive Open(string filePath, Options options, string password = null)
Parameters
filePath
string
options
Options
password
string
Returns
- ZipArchive
Open(string, string)
public static ZipArchive Open(string filePath, string password = null)
Parameters
filePath
string
password
string
Returns
- ZipArchive
SaveTo(Stream, CompressionInfo, IEnumerable<ZipArchiveEntry>, IEnumerable<ZipArchiveEntry>)
protected override void SaveTo(Stream stream, CompressionInfo compressionInfo, IEnumerable<ZipArchiveEntry> oldEntries, IEnumerable<ZipArchiveEntry> newEntries)
Parameters
stream
Stream
compressionInfo
CompressionInfo
oldEntries
IEnumerable<ZipArchiveEntry>
newEntries
IEnumerable<ZipArchiveEntry>