Skip buffering for large write operations
In buffered mode,
sion_fwrite collects small amounts of data in a buffer and only writes to the file when the buffer is full. However, if the amount of data in a single write operation is larger than the buffer size, all of the data is first copied to the buffer (in blocks of the buffer size) and then written to the file from the buffer. This seems inefficient, especially with the continuous write modifications, which allow write operations to be quite large.