-
Notifications
You must be signed in to change notification settings - Fork 9
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
Benchmarks and Unit tests? #50
Comments
oh sorry I have not came around to benchmark or adding unit tests for this project atm. I was hoping of somehow auto generating unit tests for this like what rosyln does. However it seems IntelliTest is net framework only that auto generates unit tests. 😭 I think microsoft needs to add support for it for sdk style projects that targets frameworks like mine does. For my XmlAbstraction package/project I use Xunit, however it seems Xunit does not like testing on I been planning on eventually adding unit tests and benchmarks for all of my packages though. Sorry that I just now seen your issue, it somehow got lost in my notifications as I normally look at the ones I am participating in to see if anything updated. Also because of that I been basically using this library in a ton of local projects to the point where I would know if something is wrong on this library from those, and one of those projects actually unpacks like about 12 GB worth of compressed data or so RIP. There was 1 time I screwed up something when I tried to fix a compile warning where all of the data would output at the correct unpacked length but all bytes would be null because every time it wanted me to use Oh wow you also work on xplat drawing stuff for net core, I am sure going to need that if I want to make an .net core only internet browser for windows, mac, and linux using the same code without any conditional windows junk. I know for sure I need in that case an html renderer of some kind, some way to render it to a window with tabs, theme the entire thing, js support, apng, all the other things normal browsers supports but also be super fast and more memory efficient than chrome, firefox, etc. |
Hi @AraHaan no need to apologize. You're under no obligation to reply at all 😄 XUnit cannot run tests against net standard since it needs to run against an implementation of the standard, not the standard itself. By targeting multiple implementations you should be able to cover most things. Regarding target frameworks, it looks like you target a lot of frameworks, some of which aren't even supported by Microsoft. From my experience it's best to target the least number of frameworks possible and only add when there are specific enhancements that can be added. I see a dependency on some GitBuildInfo which is influencing your target framework count. There's better alternatives out there for determining build numbers that don't require including in the source. For example, in the ImageSharp codebase we use GitVersion As far as unit tests go I would probable use the Zlib tests from SharpZipLib and the DeflateStream tests from the dotnet runtime as inspiration. https://github.com/icsharpcode/SharpZipLib/tree/f36ca373206340a25b1d3bb226acc7b679128a7c/test I'll have a deeper look when I can to see if I can get some tests added. |
Ye, I made the |
Think I've found an issue with the inflater btw. Roundtrip deflate/inflate fails on the inflater side with larger buffers, returning zeros after array[504] of a decompressed stream given a 4*4096 input buffer to compress/decompress. The original ZLib.NET implementation doesn't seem to have this issue but first 7 bytes of the expanded buffer appear to be incorrect in that implementation so it's hard to compare what is going on. |
Actually, turns out the issue is present in both libraries. zlib.managed/zlib.managed/ZInputStream.cs Line 171 in dbc4aa2
Should be while (this.Z.AvailOut > 0 && err == ZlibCompressionState.ZOK); |
oh crud I see it now. Btw, is the same issue in ZOutputStream or anywhere else too? |
Alright I pushed the fix earlier. |
It seems the pr adds 2 warnings to the build I would like resolved or silenced. |
Hi, Sorry if this is not the best place to ask questions but I'm very curious about this library and how it compares in both performance and compression to other implementations.
Do you have unpublished benchmarks and unit tests to accompany the source code?
The text was updated successfully, but these errors were encountered: