Converting a String representation of bits to a byte

前端 未结 3 1323
小蘑菇
小蘑菇 2021-02-15 02:02

I\'m just beginning to learn about file compression and I\'ve run into a bit of a roadblock. I have an application that will encode a string such as \"program\" as a compressed

3条回答
  •  天涯浪人
    2021-02-15 02:27

    Chop your String up into lengths of 8 and call Byte#parseByte. If you set the radix to 2, it will parse the String as a binary number.

提交回复
热议问题