I found old, huge open source code which performs some computations on binary data stored in file on disk, output is also saved as binary file.
There is one root method which I would like to use, simplified signature:
int magic(FILE* input, FILE* output);
The problem is that I store input data in process memory and I would like to have output also as memory in process. Code is so big that I'm not able to rewrite it in resonable time.
This API forces me to make two huge I/O on every call to magic()
.
Is there any possibility to map BYTE
array as FILE*
on Windows using C/C++ mechanisms?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…