Sometimes the special character may see in data and as a part of data they will be misinterpreted as packet data. The solution to this cause is Byte stuffing.
In general to differentiate between data being sent and control information such as packet delimiters network systems arrange for the sending side to modify the data slightly before it is sent because systems generally insert bytes or data to modify data for transmission, the method is known as Data Stuffing.
There are two kinds of data stuffing:
Byte stuffing denotes stuffing with character oriented hardware and bit stuffing denotes to bit oriented hardware. Byte stuffing converts each reserved byte into two unreserved bytes. It may use esc as prefix followed by y for eot, x for soh and z for eco. The receiver then removes each occurrence of esc y, esc x and esc z by the corresponding single character. This is given in figure below:
Byte stuffing is explained in another diagram below we can see the replacement of bytes.