mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
[HA] Implement GetCompressedSize and GetUncompressedSize
This commit is contained in:
@@ -46,5 +46,33 @@ public sealed partial class Ha
|
||||
return ErrorNumber.NoSuchFile;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public ErrorNumber GetCompressedSize(int entryNumber, out long length)
|
||||
{
|
||||
length = -1;
|
||||
|
||||
if(!Opened) return ErrorNumber.NotOpened;
|
||||
|
||||
if(entryNumber < 0 || entryNumber >= _entries.Count) return ErrorNumber.OutOfRange;
|
||||
|
||||
length = _entries[entryNumber].Compressed;
|
||||
|
||||
return ErrorNumber.NoError;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public ErrorNumber GetUncompressedSize(int entryNumber, out long length)
|
||||
{
|
||||
length = -1;
|
||||
|
||||
if(!Opened) return ErrorNumber.NotOpened;
|
||||
|
||||
if(entryNumber < 0 || entryNumber >= _entries.Count) return ErrorNumber.OutOfRange;
|
||||
|
||||
length = _entries[entryNumber].Uncompressed;
|
||||
|
||||
return ErrorNumber.NoError;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
@@ -11,12 +11,6 @@ public sealed partial class Ha
|
||||
{
|
||||
#region IArchive Members
|
||||
|
||||
/// <inheritdoc />
|
||||
public ErrorNumber GetCompressedSize(int entryNumber, out long length) => throw new NotImplementedException();
|
||||
|
||||
/// <inheritdoc />
|
||||
public ErrorNumber GetUncompressedSize(int entryNumber, out long length) => throw new NotImplementedException();
|
||||
|
||||
/// <inheritdoc />
|
||||
public ErrorNumber GetAttributes(int entryNumber, out FileAttributes attributes) =>
|
||||
throw new NotImplementedException();
|
||||
|
||||
Reference in New Issue
Block a user