1. A device comprising: a memory; and a controller comprising a data shaping engine, the data shaping engine configured to apply a mapping to input data that includes one or more m-tuples of bits to generate transformed data, wherein the transformed data includes one or more n-tuples of bits, wherein n is greater than m, wherein a relationship of a gray coding of m-tuples of bits to a gray coding of n-tuples of bits is indicated by the mapping, wherein the input data includes a first number of bit values that represent a particular logical state, and wherein the transformed data includes a second number of bit values that represent the particular logical state, the second number of bit values being less than the first number of bit values.