mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
[Symbian Installation File] Implement GetUncompressedSize().
This commit is contained in:
@@ -79,5 +79,17 @@ public sealed partial class Symbian
|
||||
return _files[entryNumber].length;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public long GetUncompressedSize(int entryNumber)
|
||||
{
|
||||
if(!_opened)
|
||||
return -1;
|
||||
|
||||
if(entryNumber < 0 || entryNumber >= _files.Count)
|
||||
return -1;
|
||||
|
||||
return _compressed ? _files[entryNumber].originalLength : _files[entryNumber].length;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
@@ -162,8 +162,13 @@ public sealed partial class Symbian
|
||||
_files = filesWithFixedFilenames;
|
||||
|
||||
_features = ArchiveSupportedFeature.SupportsFilenames | ArchiveSupportedFeature.SupportsSubdirectories;
|
||||
|
||||
if(_release6 && !sh.options.HasFlag(SymbianOptions.NoCompress))
|
||||
_features |= ArchiveSupportedFeature.SupportsCompression;
|
||||
{
|
||||
_features |= ArchiveSupportedFeature.SupportsCompression;
|
||||
_compressed = true;
|
||||
}
|
||||
|
||||
if(_files.Any(t => t.mime is not null))
|
||||
_features |= ArchiveSupportedFeature.SupportsXAttrs;
|
||||
|
||||
|
||||
@@ -42,6 +42,7 @@ namespace Aaru.Archives;
|
||||
public sealed partial class Symbian : IArchive
|
||||
{
|
||||
const string MODULE_NAME = "Symbian Installation File Plugin";
|
||||
bool _compressed;
|
||||
Encoding _encoding;
|
||||
ArchiveSupportedFeature _features;
|
||||
List<DecodedFileRecord> _files;
|
||||
|
||||
@@ -45,9 +45,6 @@ public sealed partial class Symbian
|
||||
{
|
||||
#region IArchive Members
|
||||
|
||||
/// <inheritdoc />
|
||||
public long GetUncompressedSize(int entryNumber) => throw new NotImplementedException();
|
||||
|
||||
/// <inheritdoc />
|
||||
public FileAttributes GetAttributes(int entryNumber) => throw new NotImplementedException();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user