reuse buffer
check for extended shape headers