ymnk / jzlib

re-implementation of zlib in pure Java

Home Page:http://www.jcraft.com/jzlib/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

incorporate netty fixes and publish to maven central

opened this issue · comments

Atsuhiko Yamanaka:

  1. currently netty uses custom build of jzlib with some fixes:
    https://github.com/netty/netty/tree/master/common/src/main/java/io/netty/util/internal/jzlib

  2. do you think you will be able to accept pull request to incorporate these fixes
    and release updated jzlib to maven central?

thank you.

Andrei.

Sorry for my delay.
Before making a response, I had needed to understand the changes, but it was not so trivial and not so easy for me. It seems the changes are based on the older jzlib vesion and include many not so essential changes.

Anyway, from my understandings, I guess the essential changes by netty is the introduction of JZlib.W_ZLIB_OR_NONE. The original jzlib needs an explicit parameter(nowrap; true or not) to inflate data, but the advantage of netty's jzlib is that it can handle any deflated data gracefully with JZlib.W_ZLIB_OR_NONE. Is my guess right?

I have implemented a similar functionality. Please refer to a commit 99d6334 and incorporate_netty_fixes ,
and check tests out for how-to use it,
https://github.com/ymnk/jzlib/blob/incorporate_netty_fixes/src/test/scala/WrapperTypeTest.scala

Oops, I forget to leave a comment for the second question,

  1. do you think you will be able to accept pull request to incorporate these fixes
    and release updated jzlib to maven central?

Yes, it will be deployed to the maven central repo, if we get the mutually acceptable version for you and us.

@ymnk's change looks fine. Thanks for porting it. Sorry that I reformatted the code way too much.

> @ymnk's change looks fine. Thanks for porting it. Sorry that I reformatted the code way too much.

No, I have understood the reason for changes to fix redundancies and wrong formats, etc. They are right changes.
After netty is ready for switching to the updated jzlib, I'll also apply such re-formating and refactoring.

@trustin what you think about switch to it for netty 4 now ?

@normanmaurer, I'm fine with that. :-)

@ymnk thank you for accepting this.

@trustin do we have any jzlib unit tests that should be contributed here?

@ymnk did you release it yet ?

Not yet. We have been wanting for the success of tests by netty, commented at netty/netty#1012 (comment)

It has been released as https://github.com/ymnk/jzlib/tree/1.1.2 , and deployed to the maven central repository.