mirror of
https://github.com/google/brotli.git
synced 2026-04-05 21:52:51 +00:00
Add a flag to the dictionary generator to skip empty samples.
PiperOrigin-RevId: 875642399
This commit is contained in:
@@ -281,6 +281,10 @@ int main(int argc, char const* argv[]) {
|
||||
const char* resolved_path = resolved_paths.gl_pathv[j];
|
||||
#endif
|
||||
std::string content = readFile(resolved_path);
|
||||
if (content.empty()) {
|
||||
fprintf(stderr, "Skipping empty sample: %s\n", resolved_path);
|
||||
continue;
|
||||
}
|
||||
if (chunkLen == 0) {
|
||||
paths.emplace_back(resolved_path);
|
||||
data.insert(data.end(), content.begin(), content.end());
|
||||
|
||||
Reference in New Issue
Block a user