Read by chunks

Support reading chunks better, I was able to use the patch that was just submitted to the upstream project.

@nicolaslara If you have time tomorrow morning to test this, it would be great.