浙江省高等学校教师教育理论培训

微信搜索“毛凌志岗前心得”小程序

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理
Given a 32-bit unsigned integer, encode the integer into multi-bytes array, where each of the byte contains only 7 bits of the integer. To indicate there is more byte follow, the most significant bit of the byte is set to 1, else it is set to 0. Finally, return the array to the caller. For example, the value 5 would be encoded as 1 byte as 0x05, 128 would be encoded as two bytes as 0x81 0x00, and so on. Write a function to implement above requirement.
posted on 2013-03-28 23:51  lexus  阅读(166)  评论(0)    收藏  举报