mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-15 21:22:53 +00:00
# Conflicts: # src/SharpCompress/Common/Zip/Headers/LocalEntryHeader.cs # src/SharpCompress/Common/Zip/Headers/ZipFileEntry.cs
24 lines
677 B
C#
24 lines
677 B
C#
using System.IO;
|
|
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace SharpCompress.Common;
|
|
|
|
public abstract class FilePart
|
|
{
|
|
protected FilePart(IArchiveEncoding archiveEncoding) => ArchiveEncoding = archiveEncoding;
|
|
|
|
internal IArchiveEncoding ArchiveEncoding { get; }
|
|
|
|
internal abstract string? FilePartName { get; }
|
|
public int Index { get; set; }
|
|
|
|
internal abstract Stream? GetCompressedStream();
|
|
internal abstract Stream? GetRawStream();
|
|
internal bool Skipped { get; set; }
|
|
|
|
internal virtual ValueTask<Stream?> GetCompressedStreamAsync(
|
|
CancellationToken cancellationToken = default
|
|
) => new(GetCompressedStream());
|
|
}
|