The class ``++java.util.zip.GZIPInputStream++`` is already buffering its input while reading. Thus passing a ``++java.io.BufferedInputStream++`` to a ``++java.util.zip.GZIPInputStream++`` is redundant. It is more efficient to directly pass the original input stream to ``++java.util.zip.GZIPInputStream++``.
Note that the default buffer size of ``++GZIPInputStream++`` is not the same as the one in ``++BufferedInputStream++``. Configure it if need be.
This rule raises an issue when a ``++java.util.zip.GZIPInputStream++`` reads from a ``++java.io.BufferedInputStream++``.
* Stackoverflow question about usage of GZIPInputStream and the BufferedInputStream - https://stackoverflow.com/questions/4438085/seeking-out-the-optimum-size-for-bufferedinputstream-in-java/4438217#4438217[GZIPInputStream and the BufferedInputStream]
=== on 9 Jul 2020, 09:37:33 Nicolas Harraudeau wrote:
\[~pierre-loup.tristant] There are a few references in other articles but this one explains it the best so I would prefer to keep it if possible. Otherwise I'll replace it with https://stackoverflow.com/a/4438217[this stack overflow link]