java decompress all rar compressed packages

Introduce dependencies <!– rar–> <dependency> <groupId>com.github.axet</groupId> <artifactId>java-unrar</artifactId> <version>1.7.0-8</version> </dependency> <dependency> <groupId>net.sf.sevenzipjbinding</groupId> <artifactId>sevenzipjbinding</artifactId> <version>16.02-2.01</version> </dependency> <dependency> <groupId>net.sf.sevenzipjbinding</groupId> <artifactId>sevenzipjbinding-all-platforms</artifactId> <version>16.02-2.01</version> </dependency> ExtractCallback You need to first ship the ExtractCallback tool class and then call the method /** * @Author JimmySong * @Date 2023/11/8 13:49 * @Version 1.0 */ import net.sf.sevenzipjbinding.*; import java.io.*; public class ExtractCallback implements IArchiveExtractCallback […]

[Update] C language simply simulates Gaussian ants: random walk problem (compressed version)

At the request of some people, the number of lines of code has been violently compressed. If it is not easy to read, please see [Update] C language to simply simulate Gaussian ants: random walk problem #define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include <string.h> #include <stdlib.h> #include <math.h> #include <Windows.h> #include <time.h> #include “unistd.h” #define NumberOfAnts 100///Constant […]

How to crack the password of compressed package and process CTF compressed package

I. Introduction We often come into contact with compressed packages, which are used to compress and store/transmit files. Compressed package processing is a very important part in CTF competitions, because compressed packages may contain important information: Many CTF questions will hide key information in compressed packages, and contestants need to unzip and view them. Content […]

Use easypoi template multi-threading to export excel files and generate compressed files for download, supporting dynamic columns

Recently, I have faced a new requirement, which is to export the data queried by users to an Excel file. In order to meet this demand, I decided to use the EasyPoi library to implement this function, and support setting the number of rows of each Excel file and generating a compressed package. Below, I […]

Use SharpZipLib to compress the entire directory (i.e. generate a storage directory in the compressed file) [This can be easily achieved using the built-in ZipFile.CreateFromDirectory starting from .Net4.5]

In projects starting from .Net 4.5, we can introduce the System.IO.Compression and System.IO.Compression.FileSystem (required to use the static class ZipFile) assemblies In this case, it is easy to compress the entire directory using the following static method: ZipFile.CreateFromDirectory //Note that the System.IO.Compression.FileSystem assembly needs to be introduced For projects before .Net 4.5, third-party compression libraries […]

Various languages [Python, Java, Go, Pascal, C++] directly read the Chinese text lines of the compressed package [rar, zip, 7z, gz, tar, z…] without decompression.

Article directory (Zero) Preface (1) [ZIP] format (1.1) Python (1.2)Java (1.3)Golang (1.4)Pascal (1.4.1) Lazarus (Free Pascal) (1.4.2)Delphi (1.5)C++ (2) [GZIP] format (2.1) Python (2.2)Java (2.3)Golang (2.4)Pascal (2.4.1) Lazarus (Free Pascal) (2.4.2)Delphi (2.5) C++ (3) [TAR] format (3.1) Python (3.2)Java (3.3)Golang (3.4) Pascal (3.4.1) Lazarus (Free Pascal) (3.4.2)Delphi (4) [RAR] format (4.1)Python (4.2)Java (4.3)Golang (5) [7Zip] […]