一个从7zip中分离出来的高压缩比文本压缩工具ppmd

主页
生成二进制文件很简单

/par/ppmd-mini-master# make
cc -Ilib -g -O3 -flto -fwhole-program -Wall -Wextra -o ppmd-mini ppmd-mini.c lib/Ppmd8.c lib/Ppmd8Dec.c lib/Ppmd8Enc.c
/par/ppmd-mini-master# ./ppmd-mini
ppmid-mini: compressed data cannot be written to a terminal

/par/ppmd-mini-master# time ./ppmd-mini sheet1.ppmd ../10/x/xl/worksheets/sheet1.xml
ppmid-mini: too many arguments
Usage: ppmid-mini [-d] [-k] [-c] [FILE]

/par/ppmd-mini-master# time ./ppmd-mini -k ../10/x/xl/worksheets/sheet1.xml

real    0m29.257s
user    0m19.373s
sys     0m0.659s

time ../myzips ../10/x/xl/worksheets/sheet1.xml
写入sheet1.xml文件数据
成功创建ZIP文件: output.zip (1个条目)

real    0m15.089s
user    0m8.063s
sys     0m0.746s
root@6ae32a5ffcde:/par/ppmd-mini-master# ls -l output.zip
-rwxrwxrwx 1 root root 123923992 Aug 31 13:32 output.zip

root@6ae32a5ffcde:/par/ppmd-mini-master# time xz -k ../10/x/xl/worksheets/sheet1.xml

real    3m44.080s
user    3m31.611s
sys     0m0.587s

root@6ae32a5ffcde:/par/ppmd-mini-master# ls -l ../10/x/xl/worksheets/sheet1*
-rwxrwxrwx 1 root root 439043188 Jul  2  2012 ../10/x/xl/worksheets/sheet1.xml
-rwxrwxrwx 1 root root  91712087 Aug 31 13:25 ../10/x/xl/worksheets/sheet1.xml.ppmd
-rwxrwxrwx 1 root root  83660036 Jul  2  2012 ../10/x/xl/worksheets/sheet1.xml.xz

可见,压缩时间约是zip的两倍,大小约是zip的75%,虽然比xz格式大10%,但压缩时间仅为xz的1/7.

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值