Can it be used for text compress?
blue31606 opened this issue · 4 comments
As the title and follow your information, thanks.
No, this repo is only for image compression.
For text compression, you can use generic data compression algorithms/formats, e. g., other repo of mine:
(1) An FPGA-based Gzip compressor, with 8300 LUTs and 128MB/s of performance on Xilinx Artix 7:
https://github.com/WangXuan95/FPGA-Gzip-compressor
(2) An FPGA-based LZMA compressor, with 2300 LUTs, 10MB/s of performance, and higher compression ratio on Xilinx Artix 7:
https://github.com/WangXuan95/FPGA-LZMA-compressor
Why is it not suitable for text/data compression? I guess the reason is the algorithm architecture, right?
Because I try to use this repository to compress text/data but the result is bigger than input bytes.
thanks.
Yes, because the algorithm is designed for image compression, which use the correlation between pixels (e.g., local smoothing, regular edges) to achieve compression.
However, text data do not have these features, but other features (e.g., limited character set, repeated words). So generic data compression algorithms/formats (e.g. Gzip, LZMA) will work. On the contrary, using image compression algorithm will get even larger data than the original text.
Generic data compression algorithms can also compress image data, but not good as image compression algorithms.
Thanks!
What is the cycle time for LZMA and GZIP to compress 32K bytes? (40MHz CLK)