In this paper, we propose channel coding techniques that can mitigate both the sneak-path interference and the channel noise for resistive random-access memory (ReRAM) channels. The main challenge is that the sneak-path interference is data-dependent. and also correlated within a memory array, and hence the conventional error correction coding scheme will he inadequate. We propose an across-array coding scheme, which assigns a codeword to multiple independent memory arrays. Since the coded bits from different arrays experience independent channels, a "diversity" gain can be obtained during decoding, and when the codeword is adequately distributed over different memory arrays, the code actually performs as that over an uncorrelated channel. We also present a real-time channel estimation scheme together with an elementary signal estimator (ESE) to obtain the instant channel status as well as the soft information of the channel coded bits for decoding. By further combining with a data shaping technique to produce an optimized channel input distribution, significant error performance gain is obtained.