diff --git a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/io/InputUtils.kt b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/io/InputUtils.kt index e6a12c223..2d7667efe 100644 --- a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/io/InputUtils.kt +++ b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/io/InputUtils.kt @@ -144,35 +144,4 @@ fun Input.readLVNumber(): Number { 8 -> this.readLong() else -> throw UnsupportedOperationException() } -} - -//添加@JvmSynthetic 导致 idea 无法检查这个文件的错误 -//@JvmSynthetic -@Deprecated("Low efficiency", ReplaceWith("")) -fun I.gotoWhere(matcher: UByteArray): I { - @Suppress("DEPRECATION") - return this.gotoWhere(matcher.toByteArray()) -} - -/** - * 去往下一个含这些连续字节的位置 - */ -@Deprecated("Low efficiency", ReplaceWith("")) -fun I.gotoWhere(matcher: ByteArray): I { - require(matcher.isNotEmpty()) - - loop@ - do { - val byte = this.readByte() - if (byte == matcher[0]) { - //todo mark here - for (i in 1 until matcher.size) { - val b = this.readByte() - if (b != matcher[i]) { - continue@loop //todo goto mark - } - } - return this - } - } while (true) } \ No newline at end of file