Converting a String representation of bits to a byte

前端 未结 3 582
南方客
南方客 2021-02-15 01:48

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:37

    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.

提交回复
热议问题