Firmware algorithms that detect and correct errors in memory to maintain reliability as storage density increases.