Tag:compress

  • The problems of using gzip to compress gin in go language

    Time:2020-2-10

    Recently, I learned go language and wrote a real estate salary website in Chengdu. I grabbed the online recruitment information and made statistics. There are some pits in the middle, which are recorded here for future reference Gzip compression is essential for every web application. In this project, gin is used as the web framework. […]

  • The uploader of Vue + vant in mobile terminal realizes the function of uploading, compressing and rotating pictures

    Time:2020-1-15

    Development for Baidu html <van-uploader :after-read=”onRead” accept=”image/*”> <img src=”./icon_input_add.png” /> </van-uploader> js data() { return { files: { name: “”, type: “” }, headerImage: null, picValue: null, upImgUrl, } }, //Component method fetch flow async onRead(file) { // console.log(file); // console.log(file.file); This. Files. Name = file. File. Name; // get the file name This. Files. […]

  • The basic use of tar command operation file in Linux

    Time:2020-1-5

    grammar     tar [-] A –catenate –concatenate | c –create | d –diff –compare |          –delete | r –append | t –list | –test-label | u –update | x          –extract –get [options] [pathname…] describeThe original official saying is that tar stores or extracts archives on tapes and hard disks. Functional options    -a,–catenate,–concatenateAdd files to […]

  • A detailed explanation of the use cases of snappy in golang

    Time:2019-12-20

    Preface There are many compression / decompression requirements in the project, such as typical compression and transmission of data considering network transmission delay, or other space saving storage requirements. This time, I also met a similar demand. When I was doing a crawler, I considered compressing and storing the entire HTML page in the database […]

  • Using batch processing to copy and compress files

    Time:2019-12-9

    Implementation code of copying and compressing files in batch processing Copy codeThe code is as follows: @echo onREM assign source path to spset sp=D:/JavaWorkSpace/huayu_bbsUnder rem, get the current date and call the copy processfor /f “tokens=2 delims==” %%a in (‘wmic os get localdatetime /value^|findstr /i “LocalDateTime”‘) do (call :doit %%a)pauseexit :doitset dt=%1REM gets the original […]

  • How does Linux use the command to compress and extract to the specified directory?

    Time:2019-11-30

    Describes how to use the command to compress and extract a file or directory to a specified directory. 1. Command format: tar – zxvf [compressed package filename. Tar. GZ] – C [path]/ Note: extract. Tar.gz format to the specified directory For example: tar – zxvf japan.tar.gz – C / tmp/ 2. Command format: tar – […]

  • Summary of methods of compression and decompression in Linux XZ

    Time:2019-11-24

    First of all, I’d like to introduce a summary of the methods of Linux XZ compression and decompression 1. Extract XZ format file Method 1: We need to use two-step commands. First, use XZ command of XZ utils to extract linux-3.12.tar.xz to linux-3.12.tar, and then use tar command to fully extract linux-3.12.tar. xz -d linux-3.12.tar.xz […]

  • Merge, compress and cache management of JS and CSS in high performance web development

    Time:2019-11-21

    Problems: There are two main problems in merging and compressing files:1. Each time you publish, you need to run your own bat file or other programs to merge and compress the files according to your own configuration.2. Because the files that need to be loaded in the production environment and development environment are different, the […]

  • Compression of all files in the directory (Zip) with VBScript

    Time:2019-10-8

    Copy codeThe code is as follows: On Error Resume Next Dim objFSO,sourcepath,targetpath,targetfile Function GetSourceFile(path) Dim file,folder,sfolder,subfolder,files If Not objFSO.FolderExists(path) Then Msgbox “Target folder does not exist! “Else objFSO.CreateFolder targetpath & Right(path,Len(path)-Len(sourcepath)) Set folder=objFSO.GetFolder(path) Set files=folder.files For Each file in files targetfile=targetpath & Right(path,Len(path)-Len(sourcepath)) & “\” & file.name & “.zip” Set fp=objFSO.OpenTextFile(targetfile,2,True) fp.Write Chr(80) & Chr(75) […]

  • VBScript Compresses Single File in Zip Format

    Time:2019-10-6

    Copy codeThe code is as follows: On Error Resume Next Dim fso,fp,oApp,targetfile Set fso=CreateObject(“Scripting.FileSystemObject”) targetfile=”D:\tmp.zip” Set fp=fso.OpenTextFile(targetfile,2,True) fp.Write Chr(80) & Chr(75) & Chr(5) & Chr(6) & String(18,0) fp.Close Set oApp=CreateObject(“Shell.Application”) Set fso=Nothing Err.Clear oApp.Namespace(targetfile).CopyHere “C:\1.txt” WScript.Sleep 1000

  • PHP Implementation of Compression and Decompression Operation

    Time:2019-9-4

    In php, sometimes we need to use compressed file operation, compressed file can save disk space; and compressed file is smaller, convenient for network transmission, high efficiency, let’s learn about PHP compression and decompression related operations. There is a ZipArchive class in PHP that is dedicated to the compression and decompression of files The following […]

  • Common commands for FreeBSD

    Time:2019-6-13

    1 man Online Query man ls 2 ls View directories and Archives ls -la 3 ln Create Link Files ln -fs /usr/local/apache/etc/httpd.conf /etc/httpd.conf 4 more Paging displayMore file name 5 cd Switching directories cd /usr/local/apache 6 mkdir Create a new catalogue mkdir /usr/temp 7 rmdir Delete directories rmdir /usr/temp 8 rm Delete directories or filesRm-f […]