Advanced Coding Techniques For Fiber-Optic Communications And Quantum Key Distribution