Category : 7zip

I want to compress/decompress a unsigned char buffer using fast-LZMA2 by 7Zip : https://github.com/conor42/fast-lzma2 In the sample there’s two function : static int compress_file(FL2_CStream *fcs) { unsigned char in_buffer[8 * 1024]; unsigned char out_buffer[4 * 1024]; FL2_inBuffer in_buf = { in_buffer, sizeof(in_buffer), sizeof(in_buffer) }; FL2_outBuffer out_buf = { out_buffer, sizeof(out_buffer), 0 }; size_t res = ..

Read more

I need to compress a batch of files via subprocess and 7z.exe. Their names start with "-". It seems that 7z cannot accept that. There is no problem with other files starting with "+". Is there a workaround? thank you! import os import subprocess subprocess.call([‘7z.exe’, ‘a’, ‘-01+005_compressed.txt’, ‘-01+005_orig.txt’, ‘-mx9’], shell=True) Error: Incorrect command line Source: ..

Read more

I am creating a zip file in PHP using the following: $zipfilename = "/myzip.zip"; $mp3path = "/path/to/mp3-files/"; echobr($zipfilename); if(!is_file($zipfilename)) { $zip = new ZipArchive(); if ($zip->open($zipfilename, ZipArchive::CREATE) !== TRUE) { echo("cannot open <$filename>n"); } else { foreach($mp3Album as $a) { if(is_file($mp3path.$a[‘file’])) { $zip->addFile($mp3path.$a[‘file’]); } } $zip->close(); echo(var_export(is_file($zipfilename),1)); } } The zip gets created, however when ..

Read more

I need to run two versions of R because some of the packages I want don’t work in the new 4.0 build. This should be pretty simple; I just need to install the older version in Program Files/R, next to the newer version, and I can choose which version I want when I boot R ..

Read more

I created a file by mistake, and for the life of me, I cannot remove it. If you have 7-Zip installed, you can produce it. If not, it is easy to install. The following shows what happened: PS C:temp> mkdir abc PS C:temp> cd abc PS C:tempabc> & ‘C:Program Files-Zipz.exe’ a -spf .DuoWindowsLogon.admx,.en-usDuoWindowsLogon.adml 7-Zip 19.00 ..

Read more