How to develop incremental compression/decompression in LZMA SDK?

廉价感情. 提交于 2019-12-24 17:43:40

问题


I'm using the LZMA SDK for file compression/decompression (LZMA is the default algorithm used in 7-zip) under Windows 7 (64 bits).

The sdk can be found here (source code) http://7-zip.org/sdk.html

To compress/decompress the file i can use the following command.

./LzmaUtil.exe e input.elf output.elf
./LzmaUtil.exe d output.elf input.elf

I'm using CAN BUS (must use it : client spec) to flash the binary file from the HOST to the MCU.

In order to speed up the flashing process. I want to make incremental compression to separate files so to get much smaller size .However ,i want to decompress the file using incremental decompression, so that the first part is being decompressed and the other part are coming from the can bus.

So on the MCU part , i want to be able to decompress and flash part by parts.

The main purpose for this procedure is to reduce to time required for flashing the software into a micro-controller, the bootloader have to re-assemble and decompress all the files before flashing the outputed file (.elf/.bin) to memory.

Any suggestions on how to do that will be very helpfull to me. Thanks


回答1:


The LZMA SDK already permit this option , you can easily choose the number of iterations to use and the size of input / output Buffers to be used in the algorithm.



来源:https://stackoverflow.com/questions/35249031/how-to-develop-incremental-compression-decompression-in-lzma-sdk

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!