Git Product home page Git Product logo

quicklz-1's Introduction

QuickLZ

1、介绍

QuickLZ号称是世界上速度最快的压缩库,速度可达到单核308 Mbyte/s, 使用简单,易于集成。这个 quicklz 库是RT-thread针对官方qiuicklz的C库的移植, 有关quicklz的更多信息,请参阅http://www.quicklz.com

2、获取方式

  • Git方式获取: git clone https://github.com/RT-Thread-packages/quicklz.git

  • env工具辅助下载: menuconfig package path:RT-Thread online package -> miscellaneous package -> QucikLZ

3、示例介绍

3.1 获取示例

  • 配置使能示例选项 Enable using quizklz sample;
  • 配置压缩等级选项,配置为level 1(有三种等级 1/2/3,level 1 压缩速度最快,压缩比最小,level 3 压缩速度最快,压缩比最大);
  • 配置包版本选为最新版 latest_version .

3.2 运行示例

该示例为一个简单的文件压缩和解压的例程,需要依赖文件系统,用到的命令有两个 -c-d-c命令压缩一个文件到另一个文件,-d命令解压一个文件到另一个文件。
使用方式:msh cmd qlz_test -c /file.bin /file.cmprs.bin qlz_test -d /file.cmprs.bin /file_dcmprs.bin

msh />qlz_test -c /file.bin /file.cmprs.bin
[qlz]compress start : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
[qlz]compressed 469848 bytes into 363495 bytes , compression ratio is 77%!
msh />
msh />qlz_test -d /file.cmprs.bin /file_dcmprs.bin
[qlz]decompress start : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
[qlz]decompressed 363495 bytes into 469848 bytes !

4、常见问题

4.1 内存不足问题

[qlz] No memory for state_compress struct, need 36868 byte, or you can change QLZ_HASH_VALUES to 1024!

原因:quicklz库压缩时所需的内存空间比较大,设备内存空间不足
解决方法:修改quicklz.h文件中当前level等级下的QLZ_HASH_VALUES大小

5、参考资料

quicklz-1's People

Contributors

armink avatar bernardxiong avatar lawlieta avatar

Watchers

 avatar  avatar

Forkers

shawnplana

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.