Hi Gustav,
the "gzinflate: buffer error" problem is a weird problem under some PHP/ZLIB and ZIP files combinations. Some weeks ago, in "Moodle en Español" course, some users reported an that error when trying to restore the Spanish version of the "Moodle for Teachers" course.
Curiously that course was restored without problems by the rest of participants. After some searches in the web looking for info about that error I wasn't able to find the exact cause/combination of the error. And users with problems were able to restore other courses.
Then I tried to create 4 different slightly modified versions of the zip file:
1.-The course zipped with the Unix "zip" executable.
2.-The course zipped with "low compression settings".
3.-The course zipped with WinZip and without the "moddata" directory.
4.-The course zipped without compression at all.
Users tried to restore that course into their "problematic" servers and the process failed in versions 1, 2 and 3, but it was successful with version 4.
So, one workaround can be to unzip and zip the course again with the Unix executable and compression set to 0 (I don't know if there is some W32 application to do that). Obviously other alternative is to use the command executables instead of Moodle internal routines.
When I was searching the web, I found one page about one PHP Bug in version 4.1.2 but one of my problematic users was using PHP 4.2.x, and a very new ZLIB library so I'm not able to determine the wrong combination.
And this is the status of this issue. In my experience it affects to random zip files under some servers. I think that it isn't related with the backup/restore procedure at all but it's really an important problem in some servers.
Any idea/alternative will be welcome, sure!! If people having this problem can post here his OS/
Apache/PHP/ZLIB version, perhaps we could advance something...
Hope it heps, ciao