Software implementation of data compression and error control techniques