Zip stream implementation with C in embedded devices -


i have embed large text file in limited space of internal memory of mcu. mcu use content of text file purposes later.
memory limitation dos not allow me embed file content directly in code (suppose use character array store file content), if compress content of file (using light-weight algorithm zip or gzip) ok.
suppose mcu uses getbytes(i, len) function read content of array (where i index of begining of required byte & len length of data readed), here problem when compress content & store on device(in character array) can't use getbytes function anymore getting target data, if can write wrapper on top of getbytes function map compressed content requested content, problem solve.
i've no processing limitation on mcu, anymore memory amount limited, & know access content of zip compressed file sequential, don't know possible in acceptable manner using c or c++ in such environment?

it possible in simple , efficient manner.

however, it's better use piecewise compression (at expense of compression ratio) instead of compressing/decompressing entire file @ once, otherwise need store entire decompressed file in ram.

with small piece, compression ratio of strong algorithm not different relatively weak one. recommend using simple compression algorithm.

disk compression algorithms best suited such purposes designed compress/decompress blocks.


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -