Files
sharpcompress/src/SharpCompress/Common
Matt Kotsenas bebccaae28 Avoid throwing NotSupportedException in ReaderFactory hot path
`ReaderFactory.Open()` calls `ZipArchive.IsZipFile()` to determine if
the `Stream` is a zip archive, which calls into
`ZipHeaderFactory.ReadHeader()`, which throws a `NotSupportedException`
when the `Stream` is not a zip archive.

To be clear, this exception is caught and `IsZipFile()` returns `false`,
but when called in a hot-path, these exceptions can become expensive.

To address this issue, `ReadHeader` now returns `null` in the default
cause instead of throwing. All callsites were already checking for and
handling `null`, so no behavior changes.
2018-07-09 18:44:46 -07:00
..
2018-05-06 08:59:00 +01:00
2018-05-06 08:59:00 +01:00
2015-12-30 11:19:42 +00:00
2015-12-30 11:19:42 +00:00
2018-06-08 11:27:43 +08:00
2015-12-30 11:19:42 +00:00
2018-05-06 08:59:00 +01:00
2015-12-30 11:19:42 +00:00
2015-12-30 11:19:42 +00:00
2018-05-06 08:59:00 +01:00