commit: allow parsing arbitrary buffers with headers