Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can it be used for text compress? #5

Open
blue31606 opened this issue Aug 16, 2023 · 4 comments
Open

Can it be used for text compress? #5

blue31606 opened this issue Aug 16, 2023 · 4 comments

Comments

@blue31606
Copy link

As the title and follow your information, thanks.

@WangXuan95
Copy link
Owner

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

@blue31606
Copy link
Author

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.

@WangXuan95
Copy link
Owner

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.

@blue31606
Copy link
Author

blue31606 commented Aug 18, 2023

Thanks!
What is the cycle time for LZMA and GZIP to compress 32K bytes? (40MHz CLK)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants