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
0 answers

Write files into ZIP archive with Zip4j

I have a 3D application, where saving and loading files happens all the time. This files are huge normally but easy to compress so i wanted to Zip them. I didn't find a method in ZipFile which would let me write files directly into it, because it…
user3088126
  • 175
  • 1
  • 12
0
votes
2 answers

Is it correct to use while-loop to report progress and completion?

I have added zip4j library to my Android project. It is very easy to use. ZipFile zipFile = new ZipFile(downloadedFilePath); zipFile.extractAll(context.getFilesDir().getPath()); But there is one feature that I am concerned about. Instead of…
Alex Smolov
  • 1,831
  • 4
  • 24
  • 43
0
votes
1 answer

compress file with zip4j on android

I need to add files on a zip package but on the line code zipFile.addFiles(filesToAdd, parameters)" the "addFiles() appears in red, can anyone help me, please? I'm using: Android Studio 1.2.1.1 RC Java 1.8 update 45 Windows…
0
votes
1 answer

Zip4j: Name mismatch for splits

after calling createZipFileFromFolder(source, parameters, true, splitSize)the generated file name mismatch the physical name BUT only for the splited file number 10. So the name generated by the function getSplitZipFiles() will be 'filename.z010'…
Sarah QA
  • 105
  • 1
  • 1
  • 9
0
votes
1 answer

ZipFile.isSplitArchive is returning false even though I set to true

// Initiate ZipFile object with the path/name of the zip file. ZipFile zipFile = new ZipFile("c:\\ZipTest\\CreateSplitZipFileFromFolder.zip"); // Initiate Zip Parameters which define various properties such // as…
chip
  • 3,039
  • 5
  • 35
  • 59
0
votes
1 answer

Java file writing problems

I am having an issue in Java with file creation. Here is my code - ArrayList list = new ArrayList(); PrintWriter writer = new PrintWriter(/*classpathRoot + */"list.txt", "UTF-8"); writer.println(""); …
Connor
  • 27
  • 1
  • 9
0
votes
1 answer

Zip4j Successful Extraction?

I'm using the poorly documented Zip4j library for Java to create a program that runs dictionary attacks on locked zip files. When I run my program, it pulls values from a dictionary file and runs them by the zip to see if they work. If they do, the…
Zulfe
  • 820
  • 7
  • 25
0
votes
1 answer

I want to unzip my animation.zip file in to the res/drawable-hdpi

public void onClick(View v) { try { // Initiate ZipFile object with the path/name of the zip file. ZipFile zipFile = new ZipFile("/sdcard/animation.zip"); // Extracts all files to the path specified …
parth
  • 1
  • 1
0
votes
2 answers

Zip4j: How to overwrite if created zip file is exist

I want to overwrite existing zip file when I create zip file by using Zip4j. When I create zip file by using Zip4j, my file will split according to splitSize. So I can't check it. Here my Code sample ... File file = new…
Aung Myat Hein
  • 4,018
  • 1
  • 36
  • 42
0
votes
1 answer

Zip4j fails to unzip gz files created in unix

Zip4j fails to open/extract gz files created in UNIX. 7Zip opens the file without any problem. The zip is not enrypted. Is there any option to be set(like host type) before reading the file headers in the file. File file = new…
Arun Christopher
  • 302
  • 1
  • 6
  • 20
0
votes
1 answer

Create Zip File on Disk from Memory File

First of all, Please Pardon me for Poor Coding! Requirement: 1. Create xls/xlsx Report in Memory from Database ResultSet (ie. Plain Text File should not be written to Disk). 2.Create ZIP on Disk From the xlsx file in Memory. Environment: WinXP…
AVA
  • 2,474
  • 2
  • 26
  • 41
0
votes
2 answers

zip4j Compression type not supported Exception: Android

I am trying to unzip a password protected zip file using zip4j library for android. But it is giving Unsupported Compression Type exception. I have searched a lot but could not find any reason or solution for it. So my questions are: Why i am…
Amit
  • 31
  • 3
0
votes
2 answers

Zip4j missing the last file added

I'm trying to zip a bunch of files using the Zip4j library. I pass a list of the file paths of the files I want to compress and I add them one by one into the zip file. For some reason, the last file does not get added. I checked the indexes of the…
-1
votes
1 answer

Create Empty Zip File Using Zip4j Library

I wanna to know How to Create Empty Zip File Using Zip4j Library Shouldn't this line of code be enough to create an empty zip file? when i am tried it, it isn't work. ZipFile zipFile1 = new ZipFile(zipFilePath); my question is for this lib :…
-1
votes
1 answer

how to set charset utf-8 in zip4j without charset function?

I want extract zip file with utf-8 ,but there not's zipfile.setcharset function in 2.1.2 version. public void unZipFiles(File zipfile, String descDir) { try { ZipFile zfile = new ZipFile(zipfile); // zfile.setcharset …
1 2 3
8
9