Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add retrieval example #6193

Merged
merged 21 commits into from
Mar 25, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove use of variable sized array
  • Loading branch information
mscheong01 committed Mar 22, 2024
commit d33a0157494fdb80ef07f59ea36c1a1b4635b2cc
4 changes: 2 additions & 2 deletions examples/retrieval/retrieval.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ static std::vector<chunk> chunk_file(const std::string filename, int chunk_size,
}

chunk current_chunk;
char buffer[chunk_size];
char buffer[100];
int64_t filepos = 0;
std::string current = "";
while (f.read(buffer, chunk_size)) {
while (f.read(buffer, 100)) {
mscheong01 marked this conversation as resolved.
Show resolved Hide resolved
current += std::string(buffer, f.gcount());
size_t pos;
while ((pos = current.find(chunk_separator)) != std::string::npos) {
Expand Down
Loading