mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-11-16 17:31:10 +00:00
fmt
This commit is contained in:
@@ -43,7 +43,10 @@ public class GZipEntry : Entry
|
||||
yield return new GZipEntry(GZipFilePart.Create(stream, options.ArchiveEncoding));
|
||||
}
|
||||
|
||||
internal static async IAsyncEnumerable<GZipEntry> GetEntriesAsync(Stream stream, OptionsBase options)
|
||||
internal static async IAsyncEnumerable<GZipEntry> GetEntriesAsync(
|
||||
Stream stream,
|
||||
OptionsBase options
|
||||
)
|
||||
{
|
||||
yield return new GZipEntry(await GZipFilePart.CreateAsync(stream, options.ArchiveEncoding));
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ public abstract class Factory : IFactory
|
||||
{
|
||||
RegisterFactory(new ZipFactory());
|
||||
RegisterFactory(new RarFactory());
|
||||
RegisterFactory(new TarFactory());//put tar before most
|
||||
RegisterFactory(new TarFactory()); //put tar before most
|
||||
RegisterFactory(new GZipFactory());
|
||||
RegisterFactory(new ArcFactory());
|
||||
RegisterFactory(new ArjFactory());
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
|
||||
namespace SharpCompress.Readers.GZip;
|
||||
|
||||
public partial class GZipReader
|
||||
public partial class GZipReader
|
||||
#if NET8_0_OR_GREATER
|
||||
: IReaderOpenable
|
||||
: IReaderOpenable
|
||||
#endif
|
||||
{
|
||||
public static IAsyncReader OpenAsyncReader(
|
||||
@@ -51,6 +50,7 @@ public partial class GZipReader
|
||||
fileInfo.NotNull(nameof(fileInfo));
|
||||
return OpenReader(fileInfo.OpenRead(), readerOptions);
|
||||
}
|
||||
|
||||
public static IReader OpenReader(Stream stream, ReaderOptions? options = null)
|
||||
{
|
||||
stream.NotNull(nameof(stream));
|
||||
|
||||
@@ -14,7 +14,9 @@ public partial class GZipReader : AbstractReader<GZipEntry, GZipVolume>
|
||||
|
||||
protected override IEnumerable<GZipEntry> GetEntries(Stream stream) =>
|
||||
GZipEntry.GetEntries(stream, Options);
|
||||
protected override IAsyncEnumerable<GZipEntry> GetEntriesAsync(Stream stream) {
|
||||
|
||||
protected override IAsyncEnumerable<GZipEntry> GetEntriesAsync(Stream stream)
|
||||
{
|
||||
return GZipEntry.GetEntriesAsync(stream, Options);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user