Generic processing with stream