Better performance for seek inside the zip.

This commit is contained in:
sorgelig
2020-04-01 22:01:13 +08:00
parent cceef25c24
commit 9cb97a1644

View File

@@ -503,7 +503,7 @@ int FileSeek(fileTYPE *file, __off64_t offset, int origin)
file->zip->offset = 0;
}
char buf[512];
static char buf[4*1024];
while (file->zip->offset < offset)
{
const size_t want_len = MIN((__off64_t)sizeof(buf), offset - file->zip->offset);