• Api Documentation
  • Source Code
Search Results for

    Show / Hide Table of Contents
    • SharpSevenZip
      • ArchiveFileInfo
      • ArchiveFormatInfo
      • ArchiveProperty
      • CompressionLevel
      • CompressionMethod
      • CompressionMode
      • EventSynchronizationStrategy
      • ExtractFileCallback
      • Formats
      • ICancellable
      • InArchiveFormat
      • LibraryFeature
      • OperationResult
      • OutArchiveFormat
      • SfxModule
      • SfxTarget
      • SharpSevenZipArchiveFormat
      • SharpSevenZipBase
      • SharpSevenZipCompressor
      • SharpSevenZipExtractor
      • SharpSevenZipSfx
      • StreamWithAttributes
      • ZipEncryptionMethod
    • SharpSevenZip.EventArguments
      • ExtractFileCallbackArgs
      • ExtractFileCallbackReason
      • FileInfoEventArgs
      • FileNameEventArgs
      • FileOverwriteEventArgs
      • IntEventArgs
      • OpenEventArgs
      • PercentDoneEventArgs
      • ProgressEventArgs
    • SharpSevenZip.Exceptions
      • CompressionFailedException
      • ExtractionFailedException
      • LzmaException
      • SharpSevenZipArchiveException
      • SharpSevenZipCompressionFailedException
      • SharpSevenZipConfigurationException
      • SharpSevenZipException
      • SharpSevenZipExtractionFailedException
      • SharpSevenZipInvalidFileNamesException
      • SharpSevenZipLibraryException
      • SharpSevenZipSfxValidationException
    • SharpSevenZip.Lzma
      • LzmaDecodeStream
      • LzmaEncodeStream
    • SharpSevenZip.Sdk
      • CoderPropId
      • ICodeProgress
      • ICoder
    • SharpSevenZip.Sdk.Compression.Lzma
      • Decoder
      • Encoder

    Class SharpSevenZipArchiveFormat

    Check the format of archives.

    Inheritance
    object
    SharpSevenZipArchiveFormat
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: SharpSevenZip
    Assembly: SharpSevenZip.dll
    Syntax
    public static class SharpSevenZipArchiveFormat

    Methods

    | Edit this page View Source

    CheckFormat(Stream)

    Gets the InArchiveFormat for a specific extension.

    Declaration
    public static InArchiveFormat CheckFormat(Stream stream)
    Parameters
    Type Name Description
    Stream stream

    The stream to identify.

    Returns
    Type Description
    InArchiveFormat

    Corresponding InArchiveFormat.

    | Edit this page View Source

    CheckFormat(Stream, out int, out bool)

    Gets the InArchiveFormat for a specific extension.

    Declaration
    public static InArchiveFormat CheckFormat(Stream stream, out int offset, out bool isExecutable)
    Parameters
    Type Name Description
    Stream stream

    The stream to identify.

    int offset

    The archive beginning offset.

    bool isExecutable

    True if the original format of the stream is PE; otherwise, false.

    Returns
    Type Description
    InArchiveFormat

    Corresponding InArchiveFormat.

    | Edit this page View Source

    CheckFormat(string)

    Gets the InArchiveFormat for a specific file name.

    Declaration
    public static InArchiveFormat CheckFormat(string fileName)
    Parameters
    Type Name Description
    string fileName

    The archive file name.

    Returns
    Type Description
    InArchiveFormat

    Corresponding InArchiveFormat.

    Exceptions
    Type Condition
    ArgumentException
    | Edit this page View Source

    CheckFormat(string, out int, out bool)

    Gets the InArchiveFormat for a specific file name.

    Declaration
    public static InArchiveFormat CheckFormat(string fileName, out int offset, out bool isExecutable)
    Parameters
    Type Name Description
    string fileName

    The archive file name.

    int offset

    The archive beginning offset.

    bool isExecutable

    True if the original format of the file is PE; otherwise, false.

    Returns
    Type Description
    InArchiveFormat

    Corresponding InArchiveFormat.

    Exceptions
    Type Condition
    ArgumentException
    | Edit this page View Source

    TryCheckFormat(Stream, out ArchiveFormatInfo)

    Probes a stream for its archive format without throwing when it is not a recognised archive.

    Declaration
    public static bool TryCheckFormat(Stream stream, out ArchiveFormatInfo info)
    Parameters
    Type Name Description
    Stream stream

    The stream to identify.

    ArchiveFormatInfo info

    The full detection result (format, offset and executable flag).

    Returns
    Type Description
    bool

    True when a recognised archive format was found; otherwise, false.

    | Edit this page View Source

    TryCheckFormat(string, out ArchiveFormatInfo)

    Probes a file for its archive format without throwing when it is not a recognised archive.

    Declaration
    public static bool TryCheckFormat(string fileName, out ArchiveFormatInfo info)
    Parameters
    Type Name Description
    string fileName

    The archive file name.

    ArchiveFormatInfo info

    The full detection result (format, offset and executable flag). Pass it to SharpSevenZipExtractor(string, ArchiveFormatInfo) to open the archive without detecting the signature again.

    Returns
    Type Description
    bool

    True when a recognised archive format was found; otherwise, false.

    • Edit this page
    • View Source
    In this article
    Back to top Copyright (C) Markovtsev Vadim 2009, 2010, Jérémy Ansel 2024