use string/buffer type instead of dynamic in stream private api (see #13)