"invalid compressed data to inflate" on unzipping after addLocalFolder
See original GitHub issueI create a new zip by adding a local directory as follows:
var zip = new AdmZip(symbolfile.oldSymbolfilePath),
zipEntries = zip.getEntries(),
bundleName,
entry,
match;
zipEntries.some(function(zipEntry) {
match = zipEntry.entryName.match(/dSYMs\/(.+\.app\.dSYM)\/$/);
if (match) {
entry = zipEntry;
return true;
}
});
var newZip = new AdmZip(),
tempDir = './tmp';
symbolfile.tempPath = path.resolve(path.join(tempDir, symbolfile.projectname, symbolfile.version, symbolfile.platform));
// Extract original ZIP to a temporary location.
zip.extractAllTo(symbolfile.tempPath);
newZip.addLocalFolder(path.join(symbolfile.tempPath, entry.entryName), bundleName);
console.log('Saving a new ZIP file to', symbolfile.targetPath);
newZip.writeZip(symbolfile.targetPath);
After a new zip file is written to a disk, I try to extract and it gives me the following error:
$ unzip BundleName.app.dSYM.zip
Archive: /Users/user/BundleName.app.dSYM.zip
creating: BundleName.app.dSYM/Contents/
inflating: BundleName.app.dSYM/Contents/Info.plist
creating: BundleName.app.dSYM/Contents/Resources/
creating: BundleName.app.dSYM/Contents/Resources/DWARF/
inflating: BundleName.app.dSYM/Contents/Resources/DWARF/BundleName
error: invalid compressed data to inflate
Issue Analytics
- State:
- Created 9 years ago
- Comments:10
Top Results From Across the Web
How to resolve "Invalid compressed data to inflate" error
Resolution: 1. First delete the corrupted unzipped file copied to the server. 2. Download the new monthly data file once again from Pitney...
Read more >UNZIP error: invalid compressed data to inflate - Rocket Forum
We are trying to unzip a file on the zOS and the same error always occurs. Could it be due to the size...
Read more >adm-zip - Bountysource
but when I decompress the zip file, the followed error occurred. error: invalid compressed data to inflate error: invalid compressed data to inflate....
Read more >Unzipping of InfoSphere Information Server files from Passport ...
However, when trying to uncompress the file, the errors similar to "Error: invalid compressed data to inflate" or "...invalid compressed ...
Read more >How To Work With Zip Files in Node.js - DigitalOcean
In this tutorial, you will use adm-zip module to compress, read, and decompress files. First, you'll combine multiple files into a ZIP ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Does anyone know if this will be accepted into the build as an official fix?
To do so, I replaced
Utils.Constants.DEFLATEDwithUtils.Constants.STOREDinzipEntry.json line 176. This worked fine for me.