字节填充(Byte Stuffing):一种数据链路/通信协议中的处理方法,为避免把数据内容误识别为帧定界符、转义符等控制字节,在发送端对特定字节进行插入(填充)转义字节或替换编码;接收端再按规则去填充(反转义)以还原原始数据。常见于面向字节的成帧协议(如 PPP 等)。
/baɪt ˈstʌfɪŋ/
The protocol uses byte stuffing to escape special characters.
该协议使用字节填充来转义特殊字符。
To ensure the frame delimiter never appears inside the payload, the sender performs byte stuffing and the receiver removes the extra bytes during decoding.
为确保帧定界符不会在负载数据中出现,发送端进行字节填充,接收端在解码时移除这些额外字节。
byte(字节)源自计算机术语,表示一组二进制位(通常为 8 位);stuffing 原义为“填塞/填充”。合起来在通信领域引申为:在数据流中“塞入”额外的字节,用来实现转义或避免歧义。类似概念还有按位处理的 bit stuffing(比特填充)。