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

Generating Big Zip with streams[with zip4j] and uploading it to s3

I'm working on generating a zip file that has to compress around 2000 documents that are around 1GB in total and after that to upload the zip file in s3 bucket. I'm using net.lingala.zip4j which is a really nice Java library for handling Zip…
brebDev
  • 774
  • 10
  • 27
0
votes
1 answer

How to return an encrypted zip file using Java Spring boot zip4j

I want to generate a password protected zip file and then return to frontend. I am using spring boot and zip4j library. Able to generate zip file in backend service,but not able to send to frontend. Service import net.lingala.zip4j.ZipFile; import…
0
votes
0 answers

How do I transform a zipFile object of zip4j to a byte array

i need to protect a list of files ( file can be any type ) by password . i chose to use zip4j to do it . i use : public static ZipFile creatZipFile(List filesToAdd) { try { //This is name and path of zip file to be…
0
votes
2 answers

ZIP4J Unzipping/Extraction with ProgressBar / Progress Monitor

My question is, how do we achieve putting some progress bar or progress monitoring in unzipping zip file using ZIP4j library and the .extractAll method. I've done a research about this but I did not find any solution for this or maybe I didn't meet…
0
votes
0 answers

Using Zip4J ZipOutputStream to send data to server socket

So I have this thing that I'm making and the problem is that I think that some bytes are lost while the file is compressed and send to server as well as saved locally. I was able to send data while not using ByteArrayOutputStream but I have to use…
Xenu
  • 11
  • 1
0
votes
0 answers

File does not exist error while creating zip file from audio files on Android 10 Q

Error description: File does not exist: content:/com.alphainventor.filemanager.fileprovider/root/storage/emulated/0/Bollywood%20Mix/Old/Audio.mp3 I am using below dependency to create zip file: implementation 'net.lingala.zip4j:zip4j:2.9.0' Code…
Pradip Tilala
  • 1,715
  • 16
  • 24
0
votes
0 answers

How to read multiple-encoded zip file

In my java web application when I upload a Zip file (thread dump), I get inputstream in servlet. I use the Zip4j library to unzip the file and then write it into a file. This zip file has multi encoded content (UTF-8, windows-1252, ISO-8859-1,…
Mahesh
  • 103
  • 1
  • 10
0
votes
1 answer

zip4J exception un-zipping password protected zip file

I am tasked with using open source 'zip4jlibrary for creating and unzipping of password-protected zip files. Method parameters will bebyte[]of file content and password and it should return a byte array as output (unzipped or zipped content), noFile…
0
votes
1 answer

Unzipping files in directory in password protected ZipInputStream

I'm trying to use zip4j on password protected zip files received through a ZipInputStream. It's mostly working well, but I have a .zip file with subdirectories and when I'm looping over it I am only seeing the one directory. Minimal example: Create…
0
votes
1 answer

Can I skip symbolic links when extracting a zipfile in Windows using zip4j?

I'm using the zip4j library to extract a zip file containing symbolic links under Windows. My code is as follows: final String path = App.class.getResource("/file.zip").getPath(); final ZipFile zipFile = new ZipFile(path); final Path tempDirectory =…
0
votes
1 answer

How do you use the Zip4J API to add streamed data with specified file permissions

The Zip4J API provides a convenient method for adding a streamed entry to a zip file: ZipFile.addStream(InputStream stream, ZipParameters pars) There does not appear to be a method of specifying the 'file permissions' or 'default file permissions'…
0
votes
0 answers

Creating password protected zip file in java, during unzipping I am getting file not supported issue

I am able to create a zip file,my requirement is to protect it via password.For that I am using zip4j library.Please click on the further link for reference.[https://github.com/srikanth-lingala/zip4j] Below is the code. public static void…
anil
  • 1
  • 1
0
votes
0 answers

how to zip file download without real file

I make zip download. My code works correctly. Here is my code. package com.example.controller; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import…
0
votes
1 answer

Cannot decompress merged zip file in java

I have a very large volume of data and I need to upload it to github. So i decided to use splitted zip files and have the program merge them and then unzip them. private static void mergeSplitFiles(String path) { System.out.println("Merging…
LordHans
  • 7
  • 2
0
votes
1 answer

Unzip protected archive to a byte array

I'm given a zip archive that is protected by a password, And I need to write a piece of code that would decrypt the archive to a byte [] without saving intermediate results to a file system, So far I've found that standard java JDK does not allow…
Andrey Yaskulsky
  • 2,458
  • 9
  • 39
  • 81
1 2 3
8 9