Windows 8 or newer
DWORD dwOption = WINHTTP_DECOMPRESSION_FLAG_GZIP;
DWORD dwL = sizeof(dwOption);
if (!WinHttpSetOption(rHandle, WINHTTP_OPTION_DECOMPRESSION, &dwOption, dwL))
{
return FALSE;
}
需要注意的是 rHandle WinHttpOpenRequest创建的句柄,this set must before WinHttpSendRequest function otherwise invalid decompress