So when I use the list flag of gzip the uncompressed size is listed as 3.5g (with ratio of -9.0%):

$ gzip -l piTorrentbox101216.gz
    compressed        uncompressed  ratio uncompressed_name
     3843992911          3527409664  -9.0% piTorrentbox101216

But when I decompress the file I get an even bigger filesize than listed in the last command:

$ ls -l 
   7822376960 jan 26 13:02 piTorrentbox101216

I also tried decompressing using 7zip but it gives me this output:

$ 7z x piTorrentbox101216.gz

7-Zip [64] 9.20  Copyright (c) 1999-2010 Igor Pavlov  2010-11-18
p7zip Version 9.20 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,4 CPUs)

Processing archive: piTorrentbox101216.gz

Extracting  piTorrentbox101216

I want to burn this backed up image to my raspberrypi brand new SD card (which is 7.7g). I have already burned this image to an old card that was also 7.7g and it worked fine every time but now that the old SD is broken I had to buy a new one.

So, why is it that gzip unzips more than it should? And how can I fix it?


gzip isn't extracting more than it should, you've just hit the 32-bit limit on the size field, so gzip -l can't give the correct result, but the extraction can.

You may find Fastest way of working out uncompressed size of large GZIPPED file relevant!

  • But i'm still confused because I have burned that same image into a 7.7gb SD card (exactly the same size as this one and both are kingston). I don't understand what is wrong with this one. – medicengonzo Jan 27 '17 at 5:18
  • The extracted image is 7.2GiB in size, so there shouldn't be any problem writing it to your SD card. – Stephen Kitt Jan 27 '17 at 6:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.