Algebraic approaches to distributed compression and network error correction