Repository: commons-compress Updated Branches: refs/heads/master 58cef1268 -> 763c383fa
COMPRESS-450 add a bit of documentation to examples page Project: http://git-wip-us.apache.org/repos/asf/commons-compress/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-compress/commit/763c383f Tree: http://git-wip-us.apache.org/repos/asf/commons-compress/tree/763c383f Diff: http://git-wip-us.apache.org/repos/asf/commons-compress/diff/763c383f Branch: refs/heads/master Commit: 763c383fa58449851f3d8590e70b1d38fbdbadc4 Parents: 58cef12 Author: Stefan Bodewig <[email protected]> Authored: Wed May 9 12:35:02 2018 +0200 Committer: Stefan Bodewig <[email protected]> Committed: Wed May 9 12:35:02 2018 +0200 ---------------------------------------------------------------------- src/site/xdoc/examples.xml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/commons-compress/blob/763c383f/src/site/xdoc/examples.xml ---------------------------------------------------------------------- diff --git a/src/site/xdoc/examples.xml b/src/site/xdoc/examples.xml index 11e6009..2d5bbe8 100644 --- a/src/site/xdoc/examples.xml +++ b/src/site/xdoc/examples.xml @@ -102,6 +102,21 @@ CompressorInputStream input = new CompressorStreamFactory() size.</p> </subsection> + <subsection name="Statistics"> + <p>Starting with Compress 1.17 most of the + <code>CompressorInputStream</code> implementations as well as + <code>ZipArchiveInputStream</code> and all streams returned by + <code>ZipFile.getInputStream</code> implement the + <code>InputStreamStatistics</code> + interface. <code>SevenZFile</code> provides statistics for the + current entry via the + <code>getStatisticsForCurrentEntry</code> method. This + interface can be used to track progress while extracting a + stream or to detect potential <a + href="https://en.wikipedia.org/wiki/Zip_bomb">zip bombs</a> + when the compression ration becomes suspiciously large.</p> + </subsection> + </section> <section name="Archivers">
