有没有办法发现tar.gz中所有文件的总未压缩大小而不迭代TarArchiveInputStream中的所有TarArchiveEntries,如下所示?
TarArchiveInputStream tin = new TarArchiveInputStream(new GZIPInputStream(new FileInputStream("/path/to/my.tar.gz")));
TarArchiveEntry ten;
long size = 0;
while( (ten = tin.getNextTarEntry()) != null) {
size += ten.getSize();
}