[英]Encoding and decoding synchsafe integers
What is the best way to encode and decode synchsafe integers? 编码和解码同步安全整数的最佳方法是什么?
A synchsafe integer (used in ID3v2 tags) is one in which the most significant bit is always 0
and is disregarded. 同步安全整数 (在ID3v2标签中使用)是其中最高有效位始终为0
且被忽略的整数 。
For example, 11111111
(255) as a synchsafe integer is 00000001 01111111
(383); 例如, 11111111
(255)作为同步安全整数是00000001 01111111
(383); and 11111111 11111111
is equivalent to a synchsafe 00000011 01111111 01111111
. 和11111111 11111111
等效于synchsafe 00000011 01111111 01111111
。
解决方案可在Wikipedia synchsafe页面上找到 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.