Lz4的編譯和使用

Lz4:Git Source

Lz4 Release:Git Release

Lz4源碼編譯:

找到lz4\visual,可以選擇VS2017和VS2010,本人使用的是VS2017

編譯:會報一些.h找不到的錯誤,修改屬性,VC++目錄添加包含目錄C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\ucrt和庫目錄C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17134.0\ucrt\x86或者C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17134.0\ucrt\x64

找不到VS自帶的.h需要修改VS的安裝,選擇安裝標準庫模板(實驗性)解決方法

修改連接器,添加ucrtd.lib

使用:

下載的Lz4Release裏有Lz4.exe

Command Line Interface (CLI) supports gzip-like arguments.
By default CLI takes an input file and compresses it to an output file:
```
    Usage: lz4 [arg] [input] [output]
```
The full list of commands for CLI can be obtained with `-h` or `-H`. The ratio can
be improved with commands from `-3` to `-16` but higher levels also have slower
compression. CLI includes in-memory compression benchmark module with compression
levels starting from `-b` and ending with `-e` with iteration time of `-i` seconds.
CLI supports aggregation of parameters i.e. `-b1`, `-e18`, and `-i1` can be joined
into `-b1e18i1`.

Lz4.exe -d   input   output:解壓縮,只識別.lz4後綴

Lz4.exe  input  output:壓縮

可以用-3到-16表示壓縮比越來越小

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章