Python in-memory zip library

According to the Python docs: class zipfile.ZipFile(file[, mode[, compression[, allowZip64]]]) Open a ZIP file, where file can be either a path to a file (a string) or a file-like object. So, to open the file in memory, just create a file-like object (perhaps using BytesIO). file_like_object = io.BytesIO(my_zip_data) zipfile_ob = zipfile.ZipFile(file_like_object)

How do I add files to an existing zip archive

Since you are in .NET 4.5, you can use the ZipArchive (System.IO.Compression) class to achieve this. Here is the MSDN documentation: (MSDN). Here is their example, it just writes text, but you could read in a .csv file and write it out to your new file. To just copy the file in, you would use … Read more

Zip archives in node.js

node-core has built in zip features: http://nodejs.org/api/zlib.html Use them: var zlib = require(‘zlib’); var gzip = zlib.createGzip(); var fs = require(‘fs’); var inp = fs.createReadStream(‘input.txt’); var out = fs.createWriteStream(‘input.txt.gz’); inp.pipe(gzip).pipe(out);