Repository navigation
Utility.Skip uses seek - #336
Conversation
|
Use the Archive API for random access. The Reader API intentionally doesn’t use Seek |
|
The change conditionally uses CanSeek to perform a Skip much quicker where possible - why is this considered wrong? |
|
Thank you for reply. Archive API is very useful, but since Entry is cached, memory space is needed. I'm trying to extract some files from Zip. using (var zip = ZipArchive.Open(stream, ...))
{
foreach (var entry in zip.LoadEntries())
{
if (IsTargetFile(entry.Key))
{
entry.WriteToDirectory(...);
}
}
}Current ZipArchive.LoadEntries is protected, but I think that it would be nice if there was an API similar to this. |
|
Fair enough. I shouldn’t be so rigid. Hopefully no streams throw when accessing CanSeek |
|
Thank you so much. PR closing. |
Hello.
I have a large zip file.(~100GB 871kEntries)
I tried below code.
It took about 13 minutes in my machine.
However, when this PR is applied, it was shortened to 10 seconds.
Does this cause problems?
I'm sorry for my poor English.
Thank you for reading.