painless stream buffering, cutting and piping