Patent ID: 7974307

Claim:
A method of detecting stuffing bytes in encoded data, the method comprising reading the encoded data for decoding of the data and to look for stuffing bytes in the encoded data, the method using a state machine whilst reading the encoded data to track when a stuffing byte in the encoded data is encountered, wherein the method is performed by a decoder apparatus and wherein the state machine has four states, said states being: a first state State_ 0 which is a start state; a second state State_ 1 to which the state machine moves in the case that the state machine was in State_ 0 and the next byte read is 0x00; a third state State_ 2 to which the state machine moves in the case that the state machine was in State_ 1 and the next byte read is 0x00, else the state machine reverting to State_ 0 in the case that the state machine was in State_ 1 and the next byte read is not 0x00; and, a fourth state State_ 3 , which is an end state, to which the state machine moves in the case that the state machine was in State_ 2 and the next byte read is 0x03 where 0x03 is a stuffing byte, else the state machine reverting to State_ 0 in the case that the state machine was in State_ 2 and the next byte read is not 0x03.