It happens when your HTTP request’s headers claim that the content is gzip encoded, but it isn’t. Turn off gzip encoding setting or make sure the content is in fact encoded.
Remove below this, if you used anywhere
<?php
ob_start( 'ob_gzhandler' );
echo json_encode($array);
ob_end_flush();
?>