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