BucketSizeResolver bucketSizeResolver = getBucketSizeResolver();
return bucketSizeResolver.resolveBucketSize(bucket);
}
private static BucketSizeResolver getBucketSizeResolver() {
ArchiveConfiguration config = ArchiveConfiguration.getSharedInstance();
ArchiveFileSystem archiveFileSystem = ArchiveFileSystemFactory
.getWithConfiguration(config);
LocalFileSystemPaths localFileSystemPaths = LocalFileSystemPaths.create();
return new BucketSizeResolver(ArchiveBucketSize.create(new PathResolver(
config), archiveFileSystem, localFileSystemPaths));