Redis data structure ziplist

Foreword In order to improve memory efficiency, Redis designed a special data structure ziplist (compressed list). The essence of ziplist is a byte array, which adopts a compact and continuous storage format, which can effectively compress data and improve memory efficiency. When the data volume of hash and zset is relatively small, ziplist will be […]

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] […]

[Transfer] [C#] ZIP, RAR compression and decompression

Compressed folder The source code is as follows using System; using System.Data; using System.Configuration; using System.Web; using System.Web.Security; using System.Web.UI; using System.IO; using ICSharpCode.SharpZipLib.Checksums; using ICSharpCode.SharpZipLib.Zip; using ICSharpCode.SharpZipLib.GZip; /// /// Summary description of ZipFloClass /// public class ZipFloClass { public void ZipFile(string strFile, string strZip) { if (strFile[strFile.Length – 1] != Path.DirectorySeparatorChar) strFile + = […]

java generates temporary file txt and compresses it into zip

1: zip tool class import lombok.extern.slf4j.Slf4j; import org.springframework.util.StringUtils; import javax.servlet.ServletOutputStream; import javax.servlet.http.HttpServletResponse; import java.io.BufferedInputStream; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.OutputStream; import java.net.URLEncoder; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Objects; import java.util.zip.ZipEntry; import java.util.zip.ZipOutputStream; @Slf4j public class ZipUtil {<!– –> /** * Set the return front-end file name * @param response response * […]

The underlying implementation of Redis ordered collection zset – ZipList (compressed list) and SkipList (skip list)

1. Description zset is an ordered set, and the key of zset is non-repeatable. 2. Function Commonly used for functions such as rankings 3. Use commands 1. Add: zadd zadd [ redis_key ] [ zset_key ] [ zset_value ] … example: zadd player 99 Xiaobai 87 Xiaohong 2.5 Wutiao 2. Delete: zrem Example: Delete Xiaohong […]

Java packages and downloads zip files for folders, including directory levels and files

Article directory Preface Controller IService ServiceImpl FileUtil Foreword There is a function to upload files on the page. You can create a new directory and upload files under the directory, as shown in the figure: Tips: Select the directory and click Package Download to export the folders and files in the directory into zips according […]

Still using Zipkin distributed service link tracking? Give this a try!

Since the advent of Spring Cloud, microservices have taken the world by storm, and enterprise architectures are transforming from traditional SOA to microservices. However, while the double-edged sword of microservices brings various advantages, it also brings great difficulties to operation and maintenance, performance monitoring, and error troubleshooting. In large projects, the service architecture will include […]

Interpretation of Nginx gzip module

Table of Contents Basic introduction to gzip How gzip works gzip in Nginx It is not recommended to enable the gzip scenario in Nginx Basic introduction to gzip gzip is the abbreviation of GNUzip, which was first used for file compression in UNIX systems. Gzip encoding over HTTP protocol is a technology used to improve […]

[Java package download zip tree structure] Create a folder custom path in the zip when packaging

1. Test class import lombok.Data; @Data public class ZipVo {<!– –> //File path: start and end with /slash to generate attribute folder private String pathName; //File data private String data; private String type; //Suffix suffix private String suffix; } 2. Controller import com.ekkcole.utils.Func; import org.apache.logging.log4j.util.Base64Util; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; import javax.servlet.http.HttpServletResponse; import java.io.*; import java.net.HttpURLConnection; […]