Abstract—Flash memory is a nonvolatile memory technology that suffers from errors due to charge leakage, can tolerate limited erasures, and where erasures have to be performed in large blocks. We show that using cosets of a linear code can provide correction against uniform charge leakage, and can enhance the rewritability of flash memory which leads to fewer erasures. We introduce two coset coding schemes that are generalizations of the scheme in Jacobvitz et al. (2013). For the same worst case rewrite cost, we show that coset codes can encode more information than rank modulation codes. The average case performance of coset codes is demonstrated via numerical simulations. 1