When delimiter pattern appears in data, we do stuffing so that data is not interpreted as a delimiter.
We usually stuff 0 and break the delimiter pattern present in data.
Now we have some data which has a delimiter pattern. (there could be any sequence of 0's and 1's before and after this delimiter pattern)
We can break the pattern by stuffing 0 after
- 2 consecutive 1's
- 3 consecutive 1's
- 4 consecutive 1's
- 5 consecutive 1's
We cleverly choose to stuff a 0 only after 5 consecutive 1's because by doing so we reduce the number of 0's to be stuffed and thereby also number of 0's un-stuffed later while reading this frame.
(Ex: If we stuff a 0 after every 2 consecutive 1's, we will have to stuff every time 2 consecutive 1's appear in the data. This would be too many times. And also while reading the frame, every 0 that occurs after 2 consecutive 1's has to be un-stuffed. This is not so clever)