Ported library from Parsec (String) to Attoparsec (ByteString)