VxWorks inflate和deflate的用法总结

 

转载请标注本人博客:https://mp.csdn.net/console/editor/html

 

背景:项目重构刷新的需要,需要对软件进行上载,并完成在线更新。

首先理一理压缩解压缩的函数定义:

inflate/deflate

/******************************************************************************
*
* inflate - inflate compressed code
*
* This routine inflates <nBytes> of data starting at address <src>.
* The inflated code is copied starting at address <dest>.
* Two sanity checks are performed on the data being decompressed.
* First, we look for a magic number at the start of the data to
* verify that it is really a compressed stream.
* Second, the entire data is optionally checksummed to verify its
* integrity. By default, the checksum is not verified in order to
* speed up the booting process. To turn on checksum verification,
* set the global variable `inflateCksum' to TRUE in the BSP.
*
* RETURNS: OK or ERROR.
*/ 

int inflate
    (
    Byte *    src,
    Byte *    dest,
    int        nBytes
    )

 

/* ===========================================================================
 * Processes a new input file and return its compressed length. This
 * function does not perform lazy evaluationof matches and inserts
 * new strings in the dictionary only for unmatched strings or for short
 * matches. It is used only for the fast compression options.
 */
local ulg deflate()

 

未完待续。。。。

 

 

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值