wabbajack/SevenZipExtractor/ArchiveStreamCallback.cs

45 lines
1.1 KiB
C#
Raw Normal View History

2019-07-21 04:40:54 +00:00
using System.IO;
namespace SevenZipExtractor
{
internal class ArchiveStreamCallback : IArchiveExtractCallback
{
private readonly uint fileNumber;
private readonly Stream stream;
public ArchiveStreamCallback(uint fileNumber, Stream stream)
{
this.fileNumber = fileNumber;
this.stream = stream;
}
public void SetTotal(ulong total)
{
}
public void SetCompleted(ref ulong completeValue)
{
}
public int GetStream(uint index, out ISequentialOutStream outStream, AskMode askExtractMode)
{
if ((index != this.fileNumber) || (askExtractMode != AskMode.kExtract))
{
outStream = null;
return 0;
}
outStream = new OutStreamWrapper(this.stream);
return 0;
}
public void PrepareOperation(AskMode askExtractMode)
{
}
public void SetOperationResult(OperationResult resultEOperationResult)
{
}
}
}