Please refer to the following article to enable zlib compression in cPanel.
1. Log in to cPanel.
2. Inside Software, click on Select PHP Version.
3. Click on the Options tab.
4. Find the option for Zlib compression.
Select the required option to Enable or Disable.
That’s all you have to do!