Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use stream_copy_to_stream (prasathmani#1014)
* use stream_copy_to_stream it's simpler, and should be faster. For example, stream_copy_to_stream can use sendfile ( https://man7.org/linux/man-pages/man2/sendfile.2.html ) on operating systems supporting it, which is faster and use less RAM than fread()+fwrite() (because it avoids copying data to/from userland, doing the copy entirely in-kernel~) * fix loop early return, and workaround bug * use feof ref prasathmani#1016 (comment)
- Loading branch information