mirror of
https://github.com/zeek/zeek.git
synced 2025-10-12 11:38:20 +00:00
GH-1432: Use buffered IO for file extraction
This can improve performance significantly: ~3.5x faster when tested on a large file passing data to the file analysis framework in small chunks of 20 bytes.
This commit is contained in:
parent
f2d3bf3037
commit
1c58a2d86b
2 changed files with 61 additions and 10 deletions
|
@ -3,6 +3,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <cstdio>
|
||||
|
||||
#include "zeek/Val.h"
|
||||
#include "zeek/file_analysis/File.h"
|
||||
|
@ -72,7 +73,7 @@ protected:
|
|||
|
||||
private:
|
||||
std::string filename;
|
||||
int fd;
|
||||
FILE* file_stream;
|
||||
uint64_t limit;
|
||||
uint64_t depth;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue