increase file read buffer size
This commit is contained in:
parent
d7fa7a615e
commit
eb5fd2d8c5
1 changed files with 2 additions and 2 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue