support stream
add buffer support and fix test
Merge pull request #1 from dead-horse/stream

Upload support buffer and stream.