'Get .gz file size using Curl Command

I am to trying to get the full uncompressed file size using the curl command but I am not able to get Could someone help me with this?

curl -sI -i -H "Accept: application/json" -H "Content-Type: application/json" -X GET file.gz | grep -i Content-Length | awk '{print $2/1024/1024}'

This is giving me results by returning the size of.gz file but not full size

My requirement is to get the size of the uncompressed file using curl Could someone help me with this?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source