Questions tagged [adm-zip]

A Javascript implementation of zip for Node.js. Allows user to create or extract zip files both in memory or to/from disk.

A Javascript implementation of zip for Node.js. Allows user to create or extract zip files both in memory or to/from disk. More info can be found in the project repository.

Installation

With npm do:

$ npm install adm-zip

What is it good for?

The library allows you to:

  • decompress zip files directly to disk or in memory buffers
  • compress files and store them to disk in .zip format or in compressed buffers
  • update content of/add new/delete files from an existing .zip

Dependencies

There are no other nodeJS libraries that ADM-ZIP is dependent of

Check out the adm-zip wiki for more info.

53 questions
16
votes
3 answers

Adm Zip zipping files as directories

I am trying to pack files into a zip file using Adm-Zip var AdmZip = require('adm-zip'); var pathToZip = 'build/release/Ext.zip'; var zip = new…
shashi
  • 4,616
  • 9
  • 50
  • 77
13
votes
1 answer

nodejs download and unzip file from url, error No END header found

I am trying to download files from nseindia.com and unzip in memory. I am using nodejs webkit and adm-zip. I am getting error on console: Uncaught Invalid or unsupported zip format. No END header found Code: var http = require('http'), …
mrkanitkar
  • 169
  • 1
  • 1
  • 6
10
votes
1 answer

adm-zip doesn't compress data

I'm trying to use adm-zip to add files from memory to a zip file also in memory. It seems that the zip file is created correctly (the result of saving zipData can be unzipped in Windows), but the compression ratio is always zero. This is a model of…
Yariv
  • 103
  • 6
6
votes
2 answers

Unzip file is not working

Im using the following code from https://github.com/cthackers/adm-zip/wiki/ADM-ZIP-Introduction Whant I need is to get a zip file from request(Im using express and I've request and response) and I need to extract(unzip) it to some path(in the…
user4209821
5
votes
2 answers

Download zip with axios and unzip with adm-zip in memory (electron app)

I need to download a file with axios and unzip it in memory in an electron app. I read in some SO threads (e.g.), that adm-zip supports byte buffer constructor, but I can not see this in the docs. When I extract the content, it behaves like the…
modmoto
  • 2,901
  • 7
  • 29
  • 54
5
votes
0 answers

Adm-zip Invalid or unsupported zip format. No END header found

I get this error 'Invalid or unsupported zip format. No END header found' when i try to unzip files in memory using adm-zip (buffer). I have confirmed that the file i am trying to unzip is a zip file too. …
multy18
  • 148
  • 7
4
votes
2 answers

read json file from zip with adm-zip

Im trying to read a zip file and then parse a json file at the root of the zip. The json file is called manifest.json and will be called this in every zip file i read. Currently i have the following function function getFileContents(directory){ …
ste2425
  • 4,656
  • 2
  • 22
  • 37
3
votes
1 answer

Validating zip file using adm-zip and cypress throws out of memory error

I was trying to validate zip file contents using adm-zip and cypress, but cypress throws out of memory error. The Zip file could contain .txt or .pdf or .ppt or .docx files. I would like to validate below in the zip file: a) no of files b)…
soccerway
  • 10,371
  • 19
  • 67
  • 132
3
votes
1 answer

How to zip files PDF from a Storage in NodeJS

I need to create a zip file with any PDF what I recieved from Storage AWS, and I am trying do this with ADM-zip in NodeJS, but i cant read the final file.zip. Here is the code. var zip = new AdmZip(); // add file…
3
votes
2 answers

Can not open zip file after downloading through nodejs application because of Invalid CEN error

I need to download and unzip zip archive in my nodejs application. I have this code: utils.apiRequest(teamcityOptions) .then(function (loadedData) { var tempDir = tmp.dirSync(); var tmpZipFileName = tempDir.name + "\\" +…
Sharikov Vladislav
  • 7,049
  • 9
  • 50
  • 87
3
votes
1 answer

Adm Zip - files zipped as folder

I am using adm-zip to zip the local directory and all its nested files and directories. var AdmZip = require('adm-zip'); var pathToZip = process.env.PUBLIC + '/Demo/Backup.zip'; var zip = new…
TheKingPinMirza
  • 7,924
  • 6
  • 51
  • 81
3
votes
0 answers

nodejs :extract just one entry from a zip file

I m trying to find a performant way to extract just one entry from a zip file. The command line unzip is just working orders of magnitude faster. I tried adm-zip which has a method to pick out an entry. I tried yauzl - and I used the readEntry…
3
votes
1 answer

Storing SQLite in Memory Database with ADM-ZIP (Node.js)

I'm trying to use the sqlite3 module to create an in memory SQLite database and the adm-zip module to save it into a zip file. So far I have been able to create an in memory database and add data to it, but I have been unsuccessful in finding a way…
Scott Doxey
  • 311
  • 2
  • 7
2
votes
1 answer

How to generate zip and put files into zip using stream in Node js

Currently, I tried to make zip file(or any format of compressed file) containing few files that I want to put into zip file. I thought it would work with adm-zip module. but I found out that the way adm-zip module put files into zip is buffer. It…
ben kwon
  • 61
  • 4
2
votes
0 answers

Add files to zip and download cpu usage

I'm using express js as a backend. Each user can upload 3/5 files. and the admin can download the files from the dashboard as zip file. I'm using ADM-ZIP to zip the files and download the zip. const zip = new AdmZip(); const uploadDir = await…
1
2 3 4