From e86f89308bf41bdd2562f6928d86c23d129dff99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Mon, 10 Feb 2020 19:40:04 +0100 Subject: [PATCH] Decreased GMAP read block size to 4K --- src/map/IMG/subfile.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/map/IMG/subfile.h b/src/map/IMG/subfile.h index 9dc5f177..49688999 100644 --- a/src/map/IMG/subfile.h +++ b/src/map/IMG/subfile.h @@ -7,7 +7,7 @@ #include "img.h" -#define BLOCK_SIZE 8192 +#define BLOCK_SIZE 4096 class SubFile { @@ -146,7 +146,7 @@ protected: private: bool readByte(Handle &handle, quint8 &val) const { - int blockSize = handle._file ? BLOCK_SIZE : _img->blockSize(); + int blockSize = _img ? _img->blockSize() : BLOCK_SIZE; val = handle._data.at(handle._blockPos++); handle._pos++; return (handle._blockPos >= blockSize)