Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Compressing & Decompressing 7z file in java

I want to compress a file into zip, rar and 7z format using java code. Also I want to decompress these files at a specified location. Can anyone please tell me how to compress and decompress files using 7-zip in java?

like image 356
user1728310 Avatar asked Oct 08 '12 11:10

user1728310


People also ask

What do you mean compressing?

: to press or squeeze together. : to reduce in size, quantity, or volume as if by squeezing. compress a computer file. intransitive verb. : to undergo compression.

What is the example of compressing?

A sponge is one of the best examples that demonstrate the existence of compression force in real life. The sponge has an elastic structure, which is why it is able to regain its original shape as soon as the effect of the externally applied force fades away.

What is the synonym of compress?

Some common synonyms of compress are condense, constrict, contract, deflate, and shrink.


1 Answers

I have used : sevenzipjbinding.jar sevenzipjbinding-Allplatforms.jar

I am now able to decompress files using these jars.

Try this link for decompression: http://sourceforge.net/projects/sevenzipjbind/forums/forum/757964/topic/3844899

like image 190
user1728310 Avatar answered Sep 21 '22 22:09

user1728310