Refactor stream parsing buffer formats