Dealing with compressed JSON string from external API
Ok, I'm sorry I just figure it out. I wasn't looking at the $request-&gt;headers to see what method to uncompress I have to use. Here is the solution:

$request = drupal_http_request('https://api.stackexchange.com/2.2/users?order=desc&amp;sort=reputation&amp;site=stackoverflow');

if (isset($request-&gt;headers['content-encoding'])) {
  if ($request-&gt;headers['content-encoding'] == 'gzip') {
    $request-&gt;data = gzinflate(substr($request-&gt;data, 10));
  }
  elseif ($request-&gt;headers['content-encoding'] == 'deflate') {
    $request-&gt;data = gzinflate($request-&gt;data);
  }
}

$json_response = drupal_json_decode($request-&gt;data);