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表示压缩比越来越小

评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值