The subset sum problem and arithmetic coding