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

Add compression to PNG #390

Closed
nwin opened this issue Apr 20, 2015 · 9 comments · Fixed by #418
Closed

Add compression to PNG #390

nwin opened this issue Apr 20, 2015 · 9 comments · Fixed by #418

Comments

@nwin
Copy link
Contributor

nwin commented Apr 20, 2015

The ability to compress PNG images was reduced in order to make it work with Rust 1.0 beta that should be added back at some point…

@tomaka
Copy link
Contributor

tomaka commented Apr 20, 2015

Shouldn't the zlib/deflate encoders/decoders be extracted into their own library?

@nwin
Copy link
Contributor Author

nwin commented Apr 20, 2015

That would be the optimal solution. I just put this up to document it somewhere else than in some PR comments.

@nwin
Copy link
Contributor Author

nwin commented May 4, 2015

I wonder if we shouldn’t just use flate2 for compression and decompression…

@tomaka
Copy link
Contributor

tomaka commented May 4, 2015

😢 😭

@nwin
Copy link
Contributor Author

nwin commented May 4, 2015

I would be very happy keep the pure Rust solution. But writing a zlib en-/decoder is hard work. I tried both ours, the one from #99 and the one from alexcrichton/rust-compress. They all have bugs. If we are lucky they are easy to fix. I didn’t succeed.

@tomaka
Copy link
Contributor

tomaka commented May 4, 2015

I don't think it's that hard to write.

@kvark
Copy link

kvark commented May 4, 2015

@nwin fixing rust-compress would be nice, if it's failing. We need to add your case as a test.

@nwin
Copy link
Contributor Author

nwin commented May 4, 2015

@tomaka not hard but tedious
@kvark I will try to extract some stream, I can’t remember which images failed it. My guess was that something is fishy with the static Huffman tables. The current testcases of rust-compress are all using dynamic Huffman tables. I tried to make a testcase with zlib but that passed…

@nwin
Copy link
Contributor Author

nwin commented Jun 8, 2015

Closing in favor of #419.

@nwin nwin closed this as completed Jun 8, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants