如何在LZMA SDK中开发增量压缩/解压缩? [英] How to develop incremental compression/decompression in LZMA SDK?

查看:490
本文介绍了如何在LZMA SDK中开发增量压缩/解压缩?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Windows 7(64位)下使用LZMA SDK进行文件压缩/解压缩(LZMA是7-zip中使用的默认算法)。



可以在这里找到sdk(源代码)
http://7-zip.org/sdk .html



要压缩/解压缩文件,我可以使用以下命令。

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

我使用CAN BUS(必须使用它:客户端规格)将二进制文件从HOST闪存到MCU。



为了加快闪烁过程。
我想对单独的文件进行增量压缩,以获得更小的大小。然而,我想使用增量解压缩解压缩文件,以便第一部分被解压缩,另一部分来自于can总线。



因此,在MCU部分,我想要能够解压缩并按部件闪存。



此过程的主要目的是减少将软件刷入微控制器所需的时间,在将输出的文件(.elf / .bin)刷新到存储器之前,引导加载程序必须重新汇编和解压缩所有文件。 / p>

任何有关如何做的建议都会对我非常有帮助。
感谢

解决方案

LZMA SDK已经允许这个选项,你可以很容易地选择要使用的迭代次数,在算法中使用的输入/输出缓冲区的大小。


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

解决方案

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中开发增量压缩/解压缩?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆