Add parsing function for buffers