
Hi Marek,
On Wed, Sep 26, 2012 at 11:34 PM, Marek Vasut marex@denx.de wrote:
Dear Lei Wen,
On Thu, Sep 6, 2012 at 6:49 PM, Marek Vasut marex@denx.de wrote:
Dear Lukasz Majewski,
[...]
Ok, that means we can make use of this command ?
I cannot promise, that I will provide the "zip" support straightaway
in
the DFU.
On the one hand if DFU is the only user of this command we are adding in fact a "dead" code. On the other hand we can use proper #define CONFIG_CMD_ZIP to not compile it until we "really" use this.
I'd rather see a user and code added, not the other way.
common/cmd_zip.c is another user. :)
I'm OK with this one.
Nice to hear that.
And file systems could use the zip callback to directly create the zipped file.
Definitelly not ... zip callback for FS is wrong.
If there is another work around that facilitate write compressed memory into fs, I also like to take it. Certainly callback is not the only choice.
Since current ext4 and fat in uboot support write function, I think it could be a potential feature to add.
cmd_zip + fs write call is OK. But why do we need to zip anything in uboot, what's the usecase?
The use case may come from we need to dump a range of board memory. While this range tend to be large, and this dump operation behavior may occur frequently. Then do compression would be a good choice.
It would allow us to do more dump than the non-compression one.
Are there any other potential "users" of this functionality (ZIP compression/decompression) in u-boot?
None that I know of. Is it really zip or is it gzip ?
It is porting from zlib, and is there any different for the compression side for zip and gzip?
I ain't no expert, so I'm asking
I quote below saying from zlib.net, maybe this could make us understand the difference. :) "Mark is also the author of gzip's andUnZiphttp://www.info-zip.org/pub/infozip/UnZip.html's main decompression routines and was the original author of Zip. Not surprisingly, the compression algorithm used in zlib is essentially the same as that in gzip and Zip, namely, the `deflate' method that originated in PKWARE http://www.pkware.com/'s PKZIP 2.x."
Thanks, Lei