A run-length limited (RLL) encoder includes a block detection module that
receives a data block that includes N portions and generates N-1 coding
bits indicating whether corresponding ones of N-1 of the N portions of
the data block include one of all ones and all zeros, where N is an
integer greater than two. A mapping module generates an RLL codeword
including N portions comprising bits that are determined by a first
mapping table, a second mapping table, bits of the data block and the N-1
coding bits.