在控制字符之前增加一个转义字符(DLE),BSC主要支持字符数据的传输,也可以支持二进制数据传输,但二进制数据时必须被组合,例如:七位形成一个位组。由于二进制位组合的随机性,可能出现等同控制字符组的位串(例如:DLESOH),为了保证数据的透明性(即数据中允许任意的二进制数据),同时保证这些等同控制字符组的位串不会导致控制的混乱,BSC(二进制同步通信规程)采用了字符转义的方法--字符填充法。
以某个特定字符填充空闲缓冲区。
You want to fill the empty buffer space with a specific character.
用指定字符填充描述符的数据区域,并覆盖原有数据。
Fills the descriptor's data area with the specified character, replacing any existing data.
描述符将被指定个数的字符填充。描述符的长度不被改变。
The descriptor is filled with the specified number of characters. The descriptor's length is changed to reflect this.
So now here's the idea. I build a list 256 elements long, and I fill it up with those special characters none.
所以这里就是这种思想6,我创建了一个可以放下256个元素的列表,然后我以这些没有实际意义的字符将其填充。
应用推荐