mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-09-23 23:45:14 +00:00
rar5: unpack wip
This commit is contained in:
@@ -405,6 +405,7 @@ namespace SharpCompress.Common.Rar.Headers
|
||||
// 4 - good compression
|
||||
// 5 - best compression
|
||||
internal byte CompressionMethod { get; private set; }
|
||||
internal bool IsStored { get { return CompressionMethod == 0; } }
|
||||
|
||||
// eg (see DoUnpack())
|
||||
//case 15: // rar 1.5 compression
|
||||
|
||||
@@ -18,23 +18,20 @@ namespace SharpCompress.Compressors.Rar.UnpackV2017
|
||||
this.fileHeader = fileHeader;
|
||||
this.readStream = readStream;
|
||||
this.writeStream = writeStream;
|
||||
// if (!fileHeader.IsSolid)
|
||||
// {
|
||||
// Init(null);
|
||||
// }
|
||||
fileHeader.
|
||||
Init(size_t WinSize, fileHeader.IsSolid)
|
||||
if (!fileHeader.IsStored) {
|
||||
Init(fileHeader.WindowSize, fileHeader.IsSolid);
|
||||
}
|
||||
Suspended = false;
|
||||
DoUnpack();
|
||||
}
|
||||
|
||||
public void DoUnpack()
|
||||
{
|
||||
if (this.fileHeader.CompressionMethod == 0)
|
||||
if (this.fileHeader.IsStored)
|
||||
{
|
||||
UnstoreFile();
|
||||
} else {
|
||||
DoUnpack(uint Method,bool Solid);
|
||||
DoUnpack(this.fileHeader.CompressionMethod, this.fileHeader.IsSolid);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user