douqiu1604 2018-05-22 13:24
浏览 43

将3bit uint编码/解码为紧凑格式(例如字节片)

Having a slice of uint8 but knowing that the uints are all smaller than 8: is there a simple way to en-/decode into a compact type using 3 bits a uint?

Only thing I can come up with is a complicated way of building a byte slice.

  • 写回答

0条回答 默认 最新

    报告相同问题?