Add sequence number prediction and payload size detection