support buffer as input; readme api update
0.4.0