[ISO9660] Fixed performance issue caused by reading the whole data previous to the asked offset.

This commit is contained in:
2025-01-04 02:59:11 +00:00
parent b7dabe699a
commit 66cb455b99

View File

@@ -485,7 +485,7 @@ public sealed partial class ISO9660
byte fileNumber, out byte[] buffer)
{
var ms = new MemoryStream();
long currentFilePos = 0;
long currentFilePos = offset;
for(var i = 0; i < extents.Count; i++)
{
@@ -496,8 +496,8 @@ public sealed partial class ISO9660
continue;
}
long leftExtentSize = extents[i].size;
uint currentExtentSector = 0;
var currentExtentSector = (uint)(offset / 2048);
long leftExtentSize = extents[i].size - currentFilePos;
while(leftExtentSize > 0)
{