From 35ec89e65a618b98667bcc8123d35d576603b57a Mon Sep 17 00:00:00 2001 From: Sebastian Schuberth Date: Wed, 21 Feb 2024 22:12:46 +0100 Subject: [PATCH] chore(common-utils)!: Remove the unused `ByteArray.unpackZip()` function Signed-off-by: Sebastian Schuberth --- utils/common/src/main/kotlin/ArchiveUtils.kt | 7 ------- 1 file changed, 7 deletions(-) diff --git a/utils/common/src/main/kotlin/ArchiveUtils.kt b/utils/common/src/main/kotlin/ArchiveUtils.kt index 992290439a245..198e8efa55a06 100644 --- a/utils/common/src/main/kotlin/ArchiveUtils.kt +++ b/utils/common/src/main/kotlin/ArchiveUtils.kt @@ -44,7 +44,6 @@ import org.apache.commons.compress.archivers.zip.ZipFile import org.apache.commons.compress.compressors.bzip2.BZip2CompressorInputStream import org.apache.commons.compress.compressors.gzip.GzipCompressorInputStream import org.apache.commons.compress.compressors.xz.XZCompressorInputStream -import org.apache.commons.compress.utils.SeekableInMemoryByteChannel import org.apache.logging.log4j.kotlin.logger enum class ArchiveType(extension: String, vararg aliases: String) { @@ -158,12 +157,6 @@ fun File.unpack7Zip(targetDirectory: File, filter: (ArchiveEntry) -> Boolean = { } } -/** - * Unpack the [ByteArray] assuming it is a Zip archive, ignoring entries not matched by [filter]. - */ -fun ByteArray.unpackZip(targetDirectory: File, filter: (ArchiveEntry) -> Boolean = { true }) = - ZipFile.Builder().setSeekableByteChannel(SeekableInMemoryByteChannel(this)).get().unpack(targetDirectory, filter) - /** * Unpack the [File] assuming it is a Zip archive ignoring all entries not matched by [filter]. */