Haskell, 124 105105 93 bytes
f(x:_:y)=fromEnum.(/=x)<$>y
g[]=[]
g s=(toEnum.sum.zipWith((*).(2^))[0..][7,6.reverse.take 80])s:g(drop 8s)
g.f
[Try it online!][TIO-jgcfmfe2]
[TIO-jgcfmfe2]: https://tio.run/##dYo9C8IwGIT3/IqX4pA4RHEqxQgJuLk5OJQqhaZJ6VdIUmn98zFWVw@O47k7XbpWdl0INZ6zR7YQVtuxPw9TT/GOzeS4OS1I5QXLC6TAMezHdXTRr8bcGq8x3hKKD3dC8j2lBbXyKa2T1JethJS4TOHKjgZSR5BmitahL5sBGFQjAuikBxPBTP7q7WWgOpYGEi44F9EfrfljwZPvQfC/h/AG "Haskell – Try It Online"ANQqghuCu8dj9IcGzVA6mIhUiHTgiI/@ciom30Eq/g76Nw "Haskell – Try It Online"Try it online!
f
converts the string to a list of bits by comparing each character to the first one, turning the Bool
s into zeros and ones with fromEnum
. g
divides this list into groups of 8, converts them to decimal, and takes the value of the resulting number as an Enum
, which Char
is an instance of.
Thanks to @Laikoni for saving 19 bytes!
Changes:
- -19 bytes thanks to @Laikoni (removing import, embedding
map
into function) - -12 bytes inspired by @Lynn's answer (getting rid of
take
by zipping with shorter list)