You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, if I want to decode/encode a PNG from a slice and from a file, I have to instance the whole png crate twice. Which blow ups the binary size.
It would be better and less error-prone to have a non-generic implementation. The public API can still be generic, in theory. But the actual decoding/encoding code should be instanced only once.
The text was updated successfully, but these errors were encountered:
Have you tried using dyn BufRead instead? The performance difference should be negligible, the reason why png can't use it is more or less due to auto-trait (Send + Sync) and lifetime accuracy.
Right now, if I want to decode/encode a PNG from a slice and from a file, I have to instance the whole png crate twice. Which blow ups the binary size.
It would be better and less error-prone to have a non-generic implementation. The public API can still be generic, in theory. But the actual decoding/encoding code should be instanced only once.
The text was updated successfully, but these errors were encountered: