Questions tagged [zipstream]

31 questions
8
votes
1 answer

Cannot convert from one iterator type to another but both are the exact same

I'm attempting to compile the ZipStream library, it is effectivley a C++ wrapper for zlib. Right now I'm at the point where I'm getting two compile errors on these two lines: std::set::iterator first =…
meds
  • 21,699
  • 37
  • 163
  • 314
6
votes
3 answers

Creating a zip archive from a folder and preserving structure with Node.js

I'm trying to use Node.js to create a zip file from an existing folder, and preserve the structure. I was hoping there would be a simple module to allow this kind of thing: archiver.create("../folder", function(zipFile){ console.log('et…
user1257359
  • 105
  • 1
  • 6
6
votes
1 answer

nodejs appending data to the end of a readstream

I would like to read a .txt file, append data to the end and finally send it to a zipstream. Right now what I'm doing is writting a new file and then using the new file for zipstream, but I would like to do it on the fly, without creating an…
Miquel
  • 8,339
  • 11
  • 59
  • 82
4
votes
1 answer

Getting corrupt zips using Python ZipStream in Django

I am a little new to Django so please bear with me. I'm using zipstream from here and have a Django view that returns a zip file of all file attachments which are all hosted on Amazon S3. But the zip files are all coming up as corrupt when I…
Andrew
  • 43
  • 4
4
votes
0 answers

Adding files into existing zipped archive with NodeJs zip-stream or archiver module

I have this scenario: I have a zip file for users to download but for each download, I want to include a 'readme' file with user specific content ( e.g. with user's name and download time ). I used archiver (zip-stream) module to zip and stream …
David Lin
  • 13,168
  • 5
  • 46
  • 46
3
votes
2 answers

Understanding streams in Node js

I am stuck on an issue where I need to create and download a zip of multiple files using NodeJs. Things I have tried and failed…
Raghu Chahar
  • 1,637
  • 2
  • 15
  • 33
2
votes
0 answers

How to create a streamed zip archive in PHP suitable for OS X's Archive Utility?

I'm trying to integrate an on-demand backup system for a relatively small web-application which allows the user to download a zip file of all the files on the server and a database dump. The zip file is streamed to the user, instead of packaged as a…
mensch
  • 4,411
  • 3
  • 28
  • 49
2
votes
1 answer

PowerShell reading and writing compressed files with byte arrays

Final Update: Turns out I didn't need Binary writer. I could just copy memory streams from one archive to another. I'm re-writing a PowerShell script which works with archives. I'm using two functions from here Expand-Archive without Importing and…
2
votes
2 answers

How can I stream a zip in a zip stream download?

I want to be able to archive (zip, no compression needed, but that is a plus), in memory and stream it, the problem is that I want to create an inner zip in the zip I am streaming, like so: Files: a.txt, b.txt, c.txt Stream download should look…
funerr
  • 7,212
  • 14
  • 81
  • 129
2
votes
1 answer

how to zip stream csv file php

I created an .csv export file with code: header('Content-type: text.csv'); header('Content-Disposition: attachment; filename=filename.csv'); ..... $fp = fopen('php://output','w'); foreach ($rowsCsv as $rowCsv) { fwrite($fp,…
Phong Tran
  • 36
  • 1
  • 3
2
votes
0 answers

In Node.js, a Stream generated by fs.createFileStream is unreadable after another stream has been read to the end

I'm using node-zipstream to create ZIP files in node.js. I've created a simple wrapper to create the illusion of a syncronous API when adding streams to the ZIP (included in the code below). When using request streams, everything works as expected,…
Aurelia
  • 1,052
  • 6
  • 28
1
vote
0 answers

zip file corrupted or has NUL bytes at the beginning correct it and re create the zip in Java

we are receiving a zip file through http post url,some times this zip file is corrupted or while zipping from source contains NUL bytes while it is adding the files to the zip when ever it takes more time to create the files to zip. Now we have…
1
vote
0 answers

How to create download file and refresh the page

I had create a download button, it will zip the files from my folder then it will return the zip file to user. I had no way to refresh my page after return the zip file. Here was my code like this :
1
vote
1 answer

Laravel Zipstream add file from stream

I'm trying to get ZipStream working in Laravel 5.4. I want to stream files from s3 to create a ZipStream which is returned to the browser. Currently my code produces corrupt ZIP files the same size as valid ZIP files. This is my action…
brice
  • 1,801
  • 1
  • 10
  • 15
1
vote
1 answer

Using ZipStream in Symfony: streamed zip download will not decompress using Archive Utility on Mac OSX

I have a symfony 2.8 application and on the user clicking "download" button, I use the keys of several large (images, video) files on s3 to stream this to the browser as a zip file using ZipStream (https://github.com/maennchen/ZipStream-PHP). The…
Forer
  • 1,045
  • 1
  • 9
  • 32
1
2 3