Exposing LZ77 sliding window size in the java.util.zip.[Inflator|Defaltor] API
markt at apache.org
Tue Aug 26 08:45:30 UTC 2014
I'm currently working on the implementation of the WebSocket
permessage-deflate extension for Apache Tomcat. I am using the JRE
provided classes java.util.zip.[Inflator|Defaltor] to do the compression
I have a working implementation but there is one feature I can't
implement because the necessary API isn't available.
The WebSocket permessage-deflate specification  allows both the
client and server to specify a number between 8 to 15 inclusive
indicating the base-2 logarithm of the LZ77 sliding window size. The
purpose of this feature is to enable both the client and the server to
limit the size of the buffer they need to maintain to reduce their
memory footprint per connection.
Would it be possible for the java.util.zip.Inflator and
java.util.zip.Defaltor API to be extended to expose the LZ77 window
size? My suggestion would be an additional constructor for each class
that took and additional int parameter for window size but I'd be happy
with any API that provided control of the window size.
More information about the core-libs-dev