From 9cb97a164400dcd271c47177f2515c6f7bea6f48 Mon Sep 17 00:00:00 2001 From: sorgelig Date: Wed, 1 Apr 2020 22:01:13 +0800 Subject: [PATCH] Better performance for seek inside the zip. --- file_io.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/file_io.cpp b/file_io.cpp index b8b8d6b..64be02f 100644 --- a/file_io.cpp +++ b/file_io.cpp @@ -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);