Channel and Source Coding for Non-Volatile Flash Memories