Delim a frame
One way to delim frames is to use special characters or bit patterns to indicate the start and end of a frame.
Such as 0111110
indicates start and end.
What if the frame data contain delim character/bit patterns
This is when we need stuffing. We will escape that character/bit pattern.
EG: when we see 011111
in our data, we will add a 1
to it so it won’t coincide with the delim bit pattern. When we are reading it from the other end of communication, we will remove that extra 1
appropriately.
Can’t have fixed size frame
Since we don’t know how many char/bit patterns that coincide with the escape sequence, we might need to escape an unknown amount of the data. So we can’t have fixed size frame.