Using the basic buffered file I/O services is very similar to using the unbuffered services. Specify the MMIO_ALLOCBUF option with the mmioOpen function to open a file for buffered I/O. The file I/O manager will maintain an internal buffer which is transparent to the application.
You can also change the size of the internal buffer, allocate your own buffer, and directly access a buffer for optimal I/O performance. Use the following functions for I/O buffer control and direct I/O buffer access:
mmioAdvance
Fills and/or flushes the I/O buffer of a file set up for direct I/O buffer access.
mmioFlush
Writes the contents of the I/O buffer to disk.
mmioGetInfo
Gets information about the file I/O buffer of a file opened for buffered I/O.
mmioSetBuffer
Changes the size of the I/O buffer, and allows applications to supply their own buffer.
mmioSetInfo
Changes information about the file I/O buffer of a file opened for buffered I/O.