Table of Contents

Class ZipArchive

Namespace
SharpCompress.Archives.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

CreateReaderForSolidExtraction()

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>)

protected override IEnumerable<ZipVolume> LoadVolumes(IEnumerable<Stream> streams)

Parameters

streams IEnumerable<Stream>

Returns

IEnumerable<ZipVolume>

LoadVolumes(FileInfo)

protected override IEnumerable<ZipVolume> LoadVolumes(FileInfo file)

Parameters

file FileInfo

Returns

IEnumerable<ZipVolume>

Open(FileInfo, ReaderOptions)

public static ZipArchive Open(FileInfo fileInfo, ReaderOptions readerOptions = null)

Parameters

fileInfo FileInfo
readerOptions ReaderOptions

Returns

ZipArchive

Open(Stream, ReaderOptions)

public static ZipArchive Open(Stream stream, ReaderOptions readerOptions = null)

Parameters

stream Stream
readerOptions ReaderOptions

Returns

ZipArchive

Open(string, ReaderOptions)

public static ZipArchive Open(string filePath, ReaderOptions readerOptions = null)

Parameters

filePath string
readerOptions ReaderOptions

Returns

ZipArchive

SaveTo(Stream)

public void SaveTo(Stream stream)

Parameters

stream Stream

SaveTo(Stream, WriterOptions, IEnumerable<ZipArchiveEntry>, IEnumerable<ZipArchiveEntry>)

protected override void SaveTo(Stream stream, WriterOptions options, IEnumerable<ZipArchiveEntry> oldEntries, IEnumerable<ZipArchiveEntry> newEntries)

Parameters

stream Stream
options WriterOptions
oldEntries IEnumerable<ZipArchiveEntry>
newEntries IEnumerable<ZipArchiveEntry>