示例#1
0
        public static IArchive Open(Stream stream, FileAccess fileAccess = FileAccess.ReadWrite, bool leaveOpen = false, IArchiveOptions options = null)
        {
            // #todo Detect the type of the archive from the first bytes of the stream.

            return(CompressionPluginLoader.GetArchiveDecoders().First()
                   .Decode(stream, fileAccess, leaveOpen, options));
        }
 public static IArchiveDecoder FromFileFormat(IFileFormat fileFormat)
 {
     return(CompressionPluginLoader.GetArchiveDecoders().FirstOrDefault(decoder => decoder.IsSupportedFileFormat(fileFormat)));
 }