Patent ID: 7301483

Claim:
An apparatus for allocating codewords generated for source data to be recorded on a recording medium, the apparatus comprising: one or more code tables arranged to include codewords corresponding to source data; and an allocator arranged to, when a preceding codeword “a” and a following codeword “b” are connected to form a code stream “X”, allocate one of two selectable codewords “b 1 ” and “b 2 ” as codeword “b”, wherein codewords “b 1 ” and “b 2 ” have opposite INV values which indicate whether the number of “1s” contained in a codeword is an odd number or an even number, and, when the code stream of “a” and “b 1 ” is “X 1 ”, and the code stream of “a” and “b 2 ” is “X 2 ”, to allocate codewords such that the INV values of “X 1 ” and “X 2 ” are maintained to be opposite when “a” or “b 1 (b 2 )” should be replaced by another codewords in compliance with a predetermined boundary condition given between codewords.