Every so often timber framers find themselves needing to lengthen a timber for a post or a rafter and for this they need a special type of scarf joint – a post or rafter scarf joint. The one seen here is adapted from the one that I used in my staircase and found in a TF Guild Publication that was written and illustrated by Jack Sobon; you can find a PDF of it here.
It resembles a stop-splayed and undersquinted scarf joint but with two tables cut on either end to act as the loading bearing points. This joint will resist twisting and with the addition of the 4 structural screws will look good over time and will be one you remember cutting.
Click Images for Slide Show and Larger Images
Could this work with pegs instead of screws?
Yes, look at this example: https://timberframehq.com/under-squinted-stop-splayed-scarf-joint-with-pegs/