  Data compression has the potential to significantly improve the computation
offloading performance in hierarchical fog-cloud systems. However, it remains
unknown how to optimally determine the compression ratio jointly with the
computation offloading decisions and the resource allocation. This joint
optimization problem is studied in the current paper where we aim to minimize
the maximum weighted energy and service delay cost (WEDC) of all users. First,
we consider a scenario where data compression is performed only at the mobile
users. We prove that the optimal offloading decisions have a threshold
structure. Moreover, a novel three-step approach employing convexification
techniques is developed to optimize the compression ratios and the resource
allocation. Then, we address the more general design where data compression is
performed at both the mobile users and the fog server. We propose three
efficient algorithms to overcome the strong coupling between the offloading
decisions and resource allocation. We show that the proposed optimal algorithm
for data compression at only the mobile users can reduce the WEDC by a few
hundred percent compared to computation offloading strategies that do not
leverage data compression or use sub-optimal optimization approaches. Besides,
the proposed algorithms for additional data compression at the fog server can
further reduce the WEDC.
