An often appearing problem for embedded devices, that should be over telephone-line updateble, is the transfer duration for a new firmware. The solution can be the package of the data. However which algorithm gains a good pack installment a demand for code standing not to the disposal without this of the decompressor in the appliance and shows RAM?
You won't lose tests around surely, however, the here introduced LZFG-algorithm is a good election in any case. Most decompressors require RAM again amply, up to 256kB, reached not even 20 percent the data over the Huffman-table to decompress or the pack council about for example.
The LZFG-decompressor module requires exactly 4kB RAM once, that become dynamically allocate in term. Furthermore the code is very compact and the packer reaches amazing 40 ..55 percent with the pile of an application. As transfer parameters, the here introduced decompressor requires the address of the packed record, the length of this record as well as two pointers for address decompressed record, becomes dynamically allocated internally, and length of the same. It is tested within the moduls whether it is about a compatible LZFG-datastream and whether the length and the CRC16 of the decompressed data are identically the values deposited in the LZFG-datastream.
At present, however only one single file can compress and deompress in this procedure with the following tools. However, a later expansion is possible without problems.
Implementation of CRC and lenght into the packed format. Bugfix in compressor for the last bytes of a file.
complete update to U08..U32types. Better portability for RTOS-less use implemented.
bugfix in init of one variables
redesign of length and CRC in cop-file (fix big-endian) - new signatur (in COP too), there now incompatible to older versions
Services of the pC/LZFG version 1.20a (abbreviation)
This here presented function overview only serves as short overview.
For detailed information, you please look in Reference-Manual about pC/LZFG.
decompress the datafield
In order to pack the data, you also use simply following program COP.EXE as PC-decompressor this serves.
I also prepared the code to this for all interested to the download of course.