1. A method of writing data, the method comprising: in a data storage device with a flash multi-level cell (MLC) memory, performing: receiving data including a first group of bits and a second group of bits; initiating a shaping encoding operation on the second group of bits to generate a third group of bits, wherein the third group of bits has more bits than the second group of bits and wherein the shaping encoding operation is configured to produce a non-uniform probability distribution of bit values in the third group of bits; and storing the first group of bits and first error correction coding (ECC) parity bits corresponding to the first group of bits to a first logical page that is within a physical page of the MLC memory and storing the third group of bits and second ECC parity bits corresponding to the third group of bits to a second logical page that is within the physical page of the MLC memory.