increase file read buffer size

This commit is contained in:
Minsoo Cheong 2024-03-25 10:57:00 +09:00
parent d7fa7a615e
commit eb5fd2d8c5

View file

@ -97,10 +97,10 @@ static std::vector<chunk> 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) {