Tag Archives: zip

Multi file decompression method GZ00 gz01 zip00 zip01 in windors Linux

Decompress multiple compressed files method: first merge, and then decompress

Windows:

Win + R, enter CMD, then enter the CMD terminal, CD to the compressed file directory, and then merge with the following command.

copy /B xxx.zip.001 + xxx.zip.002 + xxx.zip.003 1.zip

Decompress the generated 1. Zip

Note: the space and + sign in the middle

Linux:cat xxx.tar.gz* >& gt; xxx.tar.gz

Decompress the generated xxx.tar.gz:

tar -zxvpf xxx.tar.gz

Note: the compressed name corresponding to the transposition of XXX

Solving Chinese garbled code in Java compressed file

Solving Chinese garbled code in Java compressed file

Introducing Maven dependency

<dependency>
    <groupId>ant</groupId>
    <artifactId>ant</artifactId>
    <version>1.6.5</version>
</dependency>

Click here to view all versions of ant on Maven’s official website

Using ant.jar class in ant

import org.apache.tools.zip.ZipEntry;
import org.apache.tools.zip.ZipOutputStream;

Replace the class in JDK API

import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;

Zip to decompress the jar package, like the add file in the jar package

1. A JAR is just a ZIP package that can be unzip, and the possible path of unzip files is exactly the same.
2. If the JAR package contains exactly the same file, the ZIP add will not be used and a zip error will be reported: zip file structure invalid
3. Add classes to a JAR package, such as classes from the compiled classes, go to the classes directory and use the command zip-r your. Jar./*
4. The FAT JAR packaged with assembly may not contain its own classes, so use the methods in 3 to ensure that the JAR contains its own classes