Questions tagged [zip4j]

A java open-source library to handle Zip files.

A library to work with .zip files. It has the following features

  • Create, Add, Extract, Update, Remove files from a Zip file
  • Read/Write password protected Zip files
  • Supports AES 128/256 Encryption
  • Supports Standard Zip Encryption
  • Supports Zip64 format
  • Supports Store (No Compression) and Deflate compression method
  • Create or extract files from Split Zip files (Ex: z01, z02,...zip)
  • Supports Unicode file names
  • Progress Monitor

The project home page: http://www.lingala.net/zip4j/

126 questions
0
votes
1 answer

Zip4j can't remove or overwrite files inside file

I'm trying to edit the contents of an odt file using zip4j (I tried using java ZipEntries but I couldn't even delete the entries from the file itself that's why I chose to use a library instead). I can confirm that the file I am trying to overwrite…
Clio Orgyán
  • 300
  • 1
  • 8
0
votes
1 answer

How avoid to extracting same files multiple times using zip4j lib?

I am able to extract files successfully using the Zip 4j, but I don't want to extract the same file multiple times, is there any way to achieve it? Assume I have a zip file A.zip, the user clicked on it and files are extracted. If the user clicks on…
0
votes
0 answers

How Can I ignore .DS_Store and ___MACOSX file while unzipping?

I have compressed file on MacOS and I came to know that while compressing file some junk file like .DS_Store and __MACOSX added in the zip file. Unzipping is not happening properly from the below code. Is there way I can ignore this junk file while…
Rony Singh
  • 147
  • 1
  • 10
0
votes
1 answer

Zip headers not found, probably not a zip file - Zip4j, java

I'm trying to extract zip file (I want to read it, so I need to extract it first. Or do I?) with Zip4j and it gives me the error in title. Does anyone know what's happening? I've been trying to fix it for past 3 hours.
user11535503
0
votes
0 answers

How to unzip ServletInputStream using zip4j library

I am uploading a zip file (heap dump) in a request through postman tool and retrieving file content in servlet using request.getInputStream() method. Postman Image I have an InputStream that contains zipped bits and would like to decompress that…
Mahesh
  • 103
  • 1
  • 10
0
votes
1 answer

Zip4j no error, extract all failed even though a error should appear

I use zip4j to unzip zip packages which are safed by a password (AES-256). My problem is not, that the code is not working, rather that it doen't throw any error when the password doesn't match with the actual on the .zip. the .zip has a password…
NobodyIsPerfect
  • 182
  • 1
  • 12
0
votes
2 answers

Monitoring Zip4J extractAll() method progress monitor

I am using Zip4J for extracting zip file and I am able to do it. However, I want to use progress monitor provided in Zip4J but not able to use it successfully. The documentation only says that it should have run in thread mode true. I did it and my…
Kumar
  • 955
  • 5
  • 20
  • 50
0
votes
1 answer

How to download zipped file with zip4j in rest API?

Using zip4j lib I can create a zip file from a folder which contain subfolders and files. But now I want to download it to the client by Rest API, so I use ZipOutputStream but I don't know how to get the InputStream from generated zip file. Method…
Thong Vo
  • 809
  • 1
  • 9
  • 21
0
votes
1 answer

Zip4j allowing user to update encrypted zip by 7zip

I have used zip4j to zip certain files. It is able to properly zip and while extracting it asks for password also. So far so go. Now problems I am facing After encrypting with password you can see the file name if you open by 7zip [is there any…
Pranoy Sarkar
  • 1,965
  • 14
  • 31
0
votes
1 answer

Preserve file permission while creating zip using zip4j

I want to preserve file permissions of files while creating Zip. I am generating Zip using the following code : src.setExecutable(true); src.setReadable(true); src.setWritable(true); ZipFile zipFile = new ZipFile(destZipFile); ZipParameters…
Sahil Doshi
  • 346
  • 1
  • 3
  • 13
0
votes
0 answers

Unable to unzip zip file created by zip4j library java

I am using Zip4j to convert some string data into a password protected zip file. Next I send this zip file as an attachment via email. Issue is that sometimes (failure rate like 4%, rest 96% of the time it works) I am unable to unzip (using unzip…
anuj
  • 201
  • 5
  • 16
0
votes
2 answers

Getting "negative time" exception when unpacking zip file with zip4j

I'm using zip4j to extract zip files. For many users this works fine but a Windows 8 user is getting the following exception: net.lingala.zip4j.exception.ZipException: net.lingala.zip4j.exception.ZipException: java.lang.IllegalArgumentException:…
BullyWiiPlaza
  • 17,329
  • 10
  • 113
  • 185
0
votes
1 answer

zip4j produces zip with all files' size = 0

I have a problem generating ZIP files via zip4j. I am able to produce ZIP archive using following code (I omitted some parts, that are not related to the issue), which is basically taken from zip4j tutorial: File zipFile = new…
Ellrohir
  • 1,017
  • 1
  • 14
  • 32
0
votes
2 answers

Semi password protected Zip files in Java

I need to create a zip file by using Java. Library is not important, but zip4j seems to be a good one. In this zip file, only some of the files or subdirectories will be password protected. For example in the following zip file, only the files…
Turkdogan Tasdelen
  • 898
  • 1
  • 11
  • 25
0
votes
1 answer

zip4j archive doesn't contain folders

I'm creating a zipped archive with zip4j using the following method to add single files to the archive: zipParameters = new ZipParameters(); zipParameters.setCompressionMethod(Zip4jConstants.COMP_DEFLATE); …
1 2 3
8 9