Add support for writing data as chunks
Add support for partial reads