问题描述
我在 Windows 7(64 位)下使用 LZMA SDK 进行文件压缩/解压缩(LZMA 是 7-zip 中使用的默认算法).
I'm using the LZMA SDK for file compression/decompression (LZMA is the default algorithm used in 7-zip) under Windows 7 (64 bits).
sdk 可以在这里找到(源代码)http://7-zip.org/sdk.html
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
我正在使用 CAN BUS(必须使用它:客户端规范)将二进制文件从主机闪存到 MCU.
I'm using CAN BUS (must use it : client spec) to flash the binary file from the HOST to the MCU.
为了加快刷机过程.我想对单独的文件进行增量压缩,以便获得更小的尺寸.但是,我想使用增量解压缩来解压缩文件,以便第一部分被解压缩,另一部分来自 can 总线.
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.
所以在 MCU 部分,我希望能够逐个解压缩和闪存.
So on the MCU part , i want to be able to decompress and flash part by parts.
此程序的主要目的是减少将软件烧录到微控制器所需的时间,引导加载程序在烧录输出文件(.elf/.bin)之前必须重新组装和解压缩所有文件记忆.
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
推荐答案
LZMA SDK 已经允许此选项,您可以轻松选择要使用的迭代次数以及要在算法中使用的输入/输出缓冲区的大小.
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.
这篇关于LZMA SDK中如何开发增量压缩/解压?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!