From eb5fd2d8c595d83e7cad20d05acac1fc114f3bef Mon Sep 17 00:00:00 2001 From: Minsoo Cheong Date: Mon, 25 Mar 2024 10:57:00 +0900 Subject: [PATCH] increase file read buffer size --- examples/retrieval/retrieval.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/retrieval/retrieval.cpp b/examples/retrieval/retrieval.cpp index eec3ad8a8..335fd0700 100644 --- a/examples/retrieval/retrieval.cpp +++ b/examples/retrieval/retrieval.cpp @@ -97,10 +97,10 @@ static std::vector chunk_file(const std::string filename, int chunk_size, } chunk current_chunk; - char buffer[100]; + char buffer[1024]; int64_t filepos = 0; std::string current = ""; - while (f.read(buffer, 100)) { + while (f.read(buffer, 1024)) { current += std::string(buffer, f.gcount()); size_t pos; while ((pos = current.find(chunk_separator)) != std::string::npos) {