问题
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