Questions tagged [ziparchive]

ZipArchive is a PHP extension for manipulating zip compressed archives.

ZipArchive provides procedural and object oriented approaches for creating, extracting and editing zip archives. The php manual provides a full documentation for both approaches, while on wikipedia history and technique of zip compression is covered.

818 questions
2
votes
0 answers

Codeigniter zip the large folder in parts

I would like to zip a large folder in divided zip files. I used the classic codeigniter code and I would like to use popen or stream to it, but I have no idea how to do it. I would like for someone to help me. My code is: public function…
Mina Magdy
  • 63
  • 8
2
votes
2 answers

Replacing files in a *.zip file without unzipping (extracting) in Powershell

Hi everyone! Currently, I am trying to create a script in Powershell that will replace/delete files in a *.zip file without extracting it. I know it is possible to do manually by using applications like 7Zip and WinRAR or by simply opening a zip…
2
votes
2 answers

Azure BlobStorage stream is closed on files > 25 MB

I'm storing some large files in a Blog Storage Container. Later, using a WebJob (also in Azure), I read from each of these blobs using CloudBlockBlob.OpenRead() that gives me a Stream. I open the stream and read from it. The problem is that when…
SuperJMN
  • 13,110
  • 16
  • 86
  • 185
2
votes
1 answer

Reactive Extensions: Creating a pipeline with Rx that works with files

I have a process pipeline with three steps: video to images: I have a video that is converted to still images (frames) frames to zip file: When all the frames in a video have been processed, I should create a Zip File with them. zip file => Upload…
SuperJMN
  • 13,110
  • 16
  • 86
  • 185
2
votes
1 answer

ZipArchive returning Empty Folder C#

I am using ZipArchive to create a zipped folder for a list of documents. I cant figure out why, when I return my archived folder it is empty. Does anyone see what I am doing wrong here? My code is as follows: if (files.Count > 1) { var ms = new…
Mark
  • 4,773
  • 8
  • 53
  • 91
2
votes
1 answer

Php ZipArchive create zip without all folders

i am having troubles with create a zip archive file. I have a folder 2016_03_01_full, which should be archived available by this path. C:\OpenServer\domains\project\backup\2016_03_01_full Zip Archive should be created with same name as folder…
Tigran
  • 633
  • 4
  • 17
  • 26
2
votes
1 answer

How to create and download a zip archive in PHP without an intermediary server-side file

The PHP ZipArchive class will let me create a zip archive with the open() method: mixed ZipArchive::open ( string $filename [, int $flags ] ) I can then add files to this archive, close the file, and download it into the user's web browser as per…
2
votes
1 answer

Yii2 : Arabic language filename not support in `addFromString` of ZipArchive

I have used ZipArchive for creating zip. but i have problem with filename assign in Arabic language that is not supported. I want to get filename like 21_بينل.pdf but i getting 21_.pdf. I have refer following question. PHP ZipArchive non-English…
GAMITG
  • 3,810
  • 7
  • 32
  • 51
2
votes
1 answer

read zip archive from php://

I receive large object from webservice (WSDL). One of their position is fileContent of zip stored as base64 string. I need to read filename and content from this zip. I wrote this: $ePackageFile = $ePackage->ePackageFile; $attachment =…
Bartosz Kowalczyk
  • 1,479
  • 2
  • 18
  • 34
2
votes
1 answer

PHP unzip file into directory, change unzipped folder's name

Is it possible to intercept the unzipping of a directory to change the name of the unzipped folder-to-be? I'm using the PHP ZipArchive class to do this. The unzipping is working fine, I'd just like to add a timestamp to the unzipped folder's…
Lauren F
  • 1,282
  • 4
  • 18
  • 29
2
votes
0 answers

Wrong encoding when extracting zip file

Whenever I extract a zip file using the ZipArchive class in PHP, the character encoding for both folders and files from the zip turns up wrong. (In my case Scandinavian letters like æ ø å). $zip = new ZipArchive(); $res =…
noSoup
  • 71
  • 4
2
votes
1 answer

libz dylib with static link not support iOS 7

Details in my project: Using swift 1 Need support iOS 7 Using ZipArchive Not use cocoapods or something else On my project, i need unzip something. So i'm using ZipArchive, this is dynamic linking. Works on project when i'm not archive(means xcode…
shar0
  • 65
  • 1
  • 6
2
votes
1 answer

Get the official source code of the PHP ZipArchive class

How can I get the official source code for the PHP ZipArchive class?
Jagan
  • 4,649
  • 19
  • 60
  • 70
2
votes
0 answers

Why is PHP's ZipArchive faster than using unzip via exec()?

I made three ZIP files (one with no compression settings, one with minimal compression and one with maximum compression) I then had my script unzip each one, and timed it. First I did it with ZipArchive, then with exec('unzip') Every time, it was…
cantsay
  • 1,967
  • 3
  • 21
  • 34
2
votes
1 answer

ZipArchiveMode.Update never completes for very large files

I have this code, where zipfilename is an existing Zip file, sourceFile is a file I want to compress, and filename is the archive entry name. using (ZipArchive archive = ZipFile.Open(zipfilename, ZipArchiveMode.Update)) { await Task.Run(() =>…
Dshiz
  • 3,099
  • 3
  • 26
  • 53