diff --git a/compress-cli/src/main/kotlin/org/openrs2/compress/cli/gzip/GunzipLaxCommand.kt b/compress-cli/src/main/kotlin/org/openrs2/compress/cli/gzip/GunzipLaxCommand.kt index d2616628..ae65184c 100644 --- a/compress-cli/src/main/kotlin/org/openrs2/compress/cli/gzip/GunzipLaxCommand.kt +++ b/compress-cli/src/main/kotlin/org/openrs2/compress/cli/gzip/GunzipLaxCommand.kt @@ -6,14 +6,14 @@ import com.github.ajalt.clikt.parameters.types.defaultStdin import com.github.ajalt.clikt.parameters.types.defaultStdout import com.github.ajalt.clikt.parameters.types.inputStream import com.github.ajalt.clikt.parameters.types.outputStream -import org.openrs2.compress.gzip.Gzip +import org.openrs2.compress.gzip.GzipLaxInputStream public class GunzipLaxCommand : CliktCommand(name = "gunzip-lax") { private val input by option().inputStream().defaultStdin() private val output by option().outputStream(truncateExisting = true).defaultStdout() override fun run() { - Gzip.createLaxInputStream(input).use { input -> + GzipLaxInputStream(input).use { input -> output.use { output -> input.copyTo(output) } diff --git a/compress/src/main/kotlin/org/openrs2/compress/gzip/Gzip.kt b/compress/src/main/kotlin/org/openrs2/compress/gzip/Gzip.kt index 44073769..037ebf40 100644 --- a/compress/src/main/kotlin/org/openrs2/compress/gzip/Gzip.kt +++ b/compress/src/main/kotlin/org/openrs2/compress/gzip/Gzip.kt @@ -21,8 +21,4 @@ public object Gzip { ): OutputStream { return GzipLevelOutputStream(SkipOutputStream(output, HEADER.size.toLong()), level) } - - public fun createLaxInputStream(input: InputStream): InputStream { - return GzipLaxInputStream(input) - } }