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

needless code #143

Open
da0ka opened this issue Jan 3, 2025 · 0 comments
Open

needless code #143

da0ka opened this issue Jan 3, 2025 · 0 comments

Comments

@da0ka
Copy link

da0ka commented Jan 3, 2025

lz77.c: maybe line 374 and line 379 is needless code.

i++;
while (i + ZOPFLI_MAX_MATCH <= inend && memcmp(&in[i], &in[i - 1], ZOPFLI_MAX_MATCH) == 0) {
	ZopfliStoreLitLenDist(lls + ((leng - symtox(lls)) << 9), ZopfliGetDistSymbol(dist) + 1, store);
	i += leng;
}
i--;

after(rewrite line 375, 376)
dist==1, so ZopfliGetDistSymbol(dist) is 0

while (i + ZOPFLI_MAX_MATCH < inend && memcmp(&in[i+1], &in[i], ZOPFLI_MAX_MATCH) == 0){
	ZopfliStoreLitLenDist(lls + ((leng - symtox(lls)) << 9),1,store);
	i += leng;
}
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

1 participant