CHUNK_SIZE

const val CHUNK_SIZE: Int = 8192

The maximum chunk size is 8192 bytes, because file channel mallocs a native buffer outside of stack if the write buffer size is larger.