Skip to content

Commit a7c2b78

Browse files
committed
Re-add non-inline functions which were removed in #226 as deprecated
1 parent bf2032b commit a7c2b78

File tree

3 files changed

+38
-0
lines changed

3 files changed

+38
-0
lines changed

library/core/api/core.api

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
public abstract class io/matthewnelson/encoding/core/Decoder {
22
public static final field Companion Lio/matthewnelson/encoding/core/Decoder$Companion;
33
public synthetic fun <init> (Lio/matthewnelson/encoding/core/EncoderDecoder$Config;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
4+
public static final fun decodeBuffered (Ljava/lang/CharSequence;ILio/matthewnelson/encoding/core/Decoder;Lkotlin/jvm/functions/Function3;)J
45
public static final fun decodeBuffered (Ljava/lang/CharSequence;Lio/matthewnelson/encoding/core/Decoder;Lkotlin/jvm/functions/Function3;)J
56
public static final fun decodeBuffered (Ljava/lang/CharSequence;Lio/matthewnelson/encoding/core/Decoder;ZILkotlin/jvm/functions/Function3;)J
67
public static final fun decodeBuffered (Ljava/lang/CharSequence;Lio/matthewnelson/encoding/core/Decoder;ZLkotlin/jvm/functions/Function3;)J
78
public static final fun decodeBuffered (Ljava/lang/CharSequence;Lio/matthewnelson/encoding/core/Decoder;Z[BLkotlin/jvm/functions/Function3;)J
89
public static final fun decodeBuffered ([CLio/matthewnelson/encoding/core/Decoder;ZILkotlin/jvm/functions/Function3;)J
910
public static final fun decodeBuffered ([CLio/matthewnelson/encoding/core/Decoder;ZLkotlin/jvm/functions/Function3;)J
1011
public static final fun decodeBuffered ([CLio/matthewnelson/encoding/core/Decoder;Z[BLkotlin/jvm/functions/Function3;)J
12+
public static final fun decodeBufferedAsync (Ljava/lang/CharSequence;ILio/matthewnelson/encoding/core/Decoder;Lkotlin/jvm/functions/Function4;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
1113
public static final fun decodeBufferedAsync (Ljava/lang/CharSequence;Lio/matthewnelson/encoding/core/Decoder;Lkotlin/jvm/functions/Function4;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
1214
public static final fun decodeBufferedAsync (Ljava/lang/CharSequence;Lio/matthewnelson/encoding/core/Decoder;ZILkotlin/jvm/functions/Function4;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
1315
public static final fun decodeBufferedAsync (Ljava/lang/CharSequence;Lio/matthewnelson/encoding/core/Decoder;ZLkotlin/jvm/functions/Function4;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
@@ -27,13 +29,15 @@ public abstract class io/matthewnelson/encoding/core/Decoder {
2729
}
2830

2931
public final class io/matthewnelson/encoding/core/Decoder$Companion {
32+
public final fun decodeBuffered (Ljava/lang/CharSequence;ILio/matthewnelson/encoding/core/Decoder;Lkotlin/jvm/functions/Function3;)J
3033
public final fun decodeBuffered (Ljava/lang/CharSequence;Lio/matthewnelson/encoding/core/Decoder;Lkotlin/jvm/functions/Function3;)J
3134
public final fun decodeBuffered (Ljava/lang/CharSequence;Lio/matthewnelson/encoding/core/Decoder;ZILkotlin/jvm/functions/Function3;)J
3235
public final fun decodeBuffered (Ljava/lang/CharSequence;Lio/matthewnelson/encoding/core/Decoder;ZLkotlin/jvm/functions/Function3;)J
3336
public final fun decodeBuffered (Ljava/lang/CharSequence;Lio/matthewnelson/encoding/core/Decoder;Z[BLkotlin/jvm/functions/Function3;)J
3437
public final fun decodeBuffered ([CLio/matthewnelson/encoding/core/Decoder;ZILkotlin/jvm/functions/Function3;)J
3538
public final fun decodeBuffered ([CLio/matthewnelson/encoding/core/Decoder;ZLkotlin/jvm/functions/Function3;)J
3639
public final fun decodeBuffered ([CLio/matthewnelson/encoding/core/Decoder;Z[BLkotlin/jvm/functions/Function3;)J
40+
public final fun decodeBufferedAsync (Ljava/lang/CharSequence;ILio/matthewnelson/encoding/core/Decoder;Lkotlin/jvm/functions/Function4;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
3741
public final fun decodeBufferedAsync (Ljava/lang/CharSequence;Lio/matthewnelson/encoding/core/Decoder;Lkotlin/jvm/functions/Function4;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
3842
public final fun decodeBufferedAsync (Ljava/lang/CharSequence;Lio/matthewnelson/encoding/core/Decoder;ZILkotlin/jvm/functions/Function4;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
3943
public final fun decodeBufferedAsync (Ljava/lang/CharSequence;Lio/matthewnelson/encoding/core/Decoder;ZLkotlin/jvm/functions/Function4;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;

library/core/api/core.klib.api

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,7 @@ sealed class <#A: io.matthewnelson.encoding.core/EncoderDecoder.Config> io.matth
223223
final fun (kotlin/CharArray).decodeToByteArrayOrNull(io.matthewnelson.encoding.core/Decoder<*>): kotlin/ByteArray? // io.matthewnelson.encoding.core/Decoder.Companion.decodeToByteArrayOrNull|[email protected](io.matthewnelson.encoding.core.Decoder<*>){}[0]
224224
final fun (kotlin/CharSequence).decodeBuffered(io.matthewnelson.encoding.core/Decoder<*>, kotlin/Boolean, kotlin/ByteArray, kotlin/Function3<kotlin/ByteArray, kotlin/Int, kotlin/Int, kotlin/Unit>): kotlin/Long // io.matthewnelson.encoding.core/Decoder.Companion.decodeBuffered|[email protected](io.matthewnelson.encoding.core.Decoder<*>;kotlin.Boolean;kotlin.ByteArray;kotlin.Function3<kotlin.ByteArray,kotlin.Int,kotlin.Int,kotlin.Unit>){}[0]
225225
final fun (kotlin/CharSequence).decodeBuffered(io.matthewnelson.encoding.core/Decoder<*>, kotlin/Boolean, kotlin/Int, kotlin/Function3<kotlin/ByteArray, kotlin/Int, kotlin/Int, kotlin/Unit>): kotlin/Long // io.matthewnelson.encoding.core/Decoder.Companion.decodeBuffered|[email protected](io.matthewnelson.encoding.core.Decoder<*>;kotlin.Boolean;kotlin.Int;kotlin.Function3<kotlin.ByteArray,kotlin.Int,kotlin.Int,kotlin.Unit>){}[0]
226+
final fun (kotlin/CharSequence).decodeBuffered(kotlin/Int, io.matthewnelson.encoding.core/Decoder<*>, kotlin/Function3<kotlin/ByteArray, kotlin/Int, kotlin/Int, kotlin/Unit>): kotlin/Long // io.matthewnelson.encoding.core/Decoder.Companion.decodeBuffered|[email protected](kotlin.Int;io.matthewnelson.encoding.core.Decoder<*>;kotlin.Function3<kotlin.ByteArray,kotlin.Int,kotlin.Int,kotlin.Unit>){}[0]
226227
final fun (kotlin/CharSequence).decodeToByteArray(io.matthewnelson.encoding.core/Decoder<*>): kotlin/ByteArray // io.matthewnelson.encoding.core/Decoder.Companion.decodeToByteArray|[email protected](io.matthewnelson.encoding.core.Decoder<*>){}[0]
227228
final fun (kotlin/CharSequence).decodeToByteArrayOrNull(io.matthewnelson.encoding.core/Decoder<*>): kotlin/ByteArray? // io.matthewnelson.encoding.core/Decoder.Companion.decodeToByteArrayOrNull|[email protected](io.matthewnelson.encoding.core.Decoder<*>){}[0]
228229
final inline fun (kotlin/CharArray).decodeBuffered(io.matthewnelson.encoding.core/Decoder<*>, kotlin/Boolean, noinline kotlin/Function3<kotlin/ByteArray, kotlin/Int, kotlin/Int, kotlin/Unit>): kotlin/Long // io.matthewnelson.encoding.core/Decoder.Companion.decodeBuffered|[email protected](io.matthewnelson.encoding.core.Decoder<*>;kotlin.Boolean;kotlin.Function3<kotlin.ByteArray,kotlin.Int,kotlin.Int,kotlin.Unit>){}[0]
@@ -232,6 +233,7 @@ sealed class <#A: io.matthewnelson.encoding.core/EncoderDecoder.Config> io.matth
232233
final suspend fun (kotlin/CharArray).decodeBufferedAsync(io.matthewnelson.encoding.core/Decoder<*>, kotlin/Boolean, kotlin/Int, kotlin.coroutines/SuspendFunction3<kotlin/ByteArray, kotlin/Int, kotlin/Int, kotlin/Unit>): kotlin/Long // io.matthewnelson.encoding.core/Decoder.Companion.decodeBufferedAsync|[email protected](io.matthewnelson.encoding.core.Decoder<*>;kotlin.Boolean;kotlin.Int;kotlin.coroutines.SuspendFunction3<kotlin.ByteArray,kotlin.Int,kotlin.Int,kotlin.Unit>){}[0]
233234
final suspend fun (kotlin/CharSequence).decodeBufferedAsync(io.matthewnelson.encoding.core/Decoder<*>, kotlin/Boolean, kotlin/ByteArray, kotlin.coroutines/SuspendFunction3<kotlin/ByteArray, kotlin/Int, kotlin/Int, kotlin/Unit>): kotlin/Long // io.matthewnelson.encoding.core/Decoder.Companion.decodeBufferedAsync|[email protected](io.matthewnelson.encoding.core.Decoder<*>;kotlin.Boolean;kotlin.ByteArray;kotlin.coroutines.SuspendFunction3<kotlin.ByteArray,kotlin.Int,kotlin.Int,kotlin.Unit>){}[0]
234235
final suspend fun (kotlin/CharSequence).decodeBufferedAsync(io.matthewnelson.encoding.core/Decoder<*>, kotlin/Boolean, kotlin/Int, kotlin.coroutines/SuspendFunction3<kotlin/ByteArray, kotlin/Int, kotlin/Int, kotlin/Unit>): kotlin/Long // io.matthewnelson.encoding.core/Decoder.Companion.decodeBufferedAsync|[email protected](io.matthewnelson.encoding.core.Decoder<*>;kotlin.Boolean;kotlin.Int;kotlin.coroutines.SuspendFunction3<kotlin.ByteArray,kotlin.Int,kotlin.Int,kotlin.Unit>){}[0]
236+
final suspend fun (kotlin/CharSequence).decodeBufferedAsync(kotlin/Int, io.matthewnelson.encoding.core/Decoder<*>, kotlin.coroutines/SuspendFunction3<kotlin/ByteArray, kotlin/Int, kotlin/Int, kotlin/Unit>): kotlin/Long // io.matthewnelson.encoding.core/Decoder.Companion.decodeBufferedAsync|[email protected](kotlin.Int;io.matthewnelson.encoding.core.Decoder<*>;kotlin.coroutines.SuspendFunction3<kotlin.ByteArray,kotlin.Int,kotlin.Int,kotlin.Unit>){}[0]
235237
final suspend inline fun (kotlin/CharArray).decodeBufferedAsync(io.matthewnelson.encoding.core/Decoder<*>, kotlin/Boolean, noinline kotlin.coroutines/SuspendFunction3<kotlin/ByteArray, kotlin/Int, kotlin/Int, kotlin/Unit>): kotlin/Long // io.matthewnelson.encoding.core/Decoder.Companion.decodeBufferedAsync|[email protected](io.matthewnelson.encoding.core.Decoder<*>;kotlin.Boolean;kotlin.coroutines.SuspendFunction3<kotlin.ByteArray,kotlin.Int,kotlin.Int,kotlin.Unit>){}[0]
236238
final suspend inline fun (kotlin/CharSequence).decodeBufferedAsync(io.matthewnelson.encoding.core/Decoder<*>, kotlin/Boolean, noinline kotlin.coroutines/SuspendFunction3<kotlin/ByteArray, kotlin/Int, kotlin/Int, kotlin/Unit>): kotlin/Long // io.matthewnelson.encoding.core/Decoder.Companion.decodeBufferedAsync|[email protected](io.matthewnelson.encoding.core.Decoder<*>;kotlin.Boolean;kotlin.coroutines.SuspendFunction3<kotlin.ByteArray,kotlin.Int,kotlin.Int,kotlin.Unit>){}[0]
237239
final suspend inline fun (kotlin/CharSequence).decodeBufferedAsync(io.matthewnelson.encoding.core/Decoder<*>, noinline kotlin.coroutines/SuspendFunction3<kotlin/ByteArray, kotlin/Int, kotlin/Int, kotlin/Unit>): kotlin/Long // io.matthewnelson.encoding.core/Decoder.Companion.decodeBufferedAsync|[email protected](io.matthewnelson.encoding.core.Decoder<*>;kotlin.coroutines.SuspendFunction3<kotlin.ByteArray,kotlin.Int,kotlin.Int,kotlin.Unit>){}[0]

library/core/src/commonMain/kotlin/io/matthewnelson/encoding/core/Decoder.kt

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1260,6 +1260,22 @@ public sealed class Decoder<C: EncoderDecoder.Config>(public val config: C) {
12601260
noinline action: (buf: ByteArray, offset: Int, len: Int) -> Unit,
12611261
): Long = decodeBuffered(decoder, false, DEFAULT_BUFFER_SIZE, action)
12621262

1263+
/**
1264+
* TODO: Remove. See https://github.com/05nelsonm/encoding/issues/225
1265+
* @suppress
1266+
* */
1267+
@JvmStatic
1268+
@Throws(EncodingException::class)
1269+
@Deprecated(
1270+
message = "Will be removed upon 2.6.0 release",
1271+
replaceWith = ReplaceWith("decodeBuffered(decoder, false, maxBufSize, action)")
1272+
)
1273+
public fun CharSequence.decodeBuffered(
1274+
maxBufSize: Int,
1275+
decoder: Decoder<*>,
1276+
action: (buf: ByteArray, offset: Int, len: Int) -> Unit,
1277+
): Long = decodeBuffered(decoder, false, maxBufSize, action)
1278+
12631279
/**
12641280
* TODO: Remove. See https://github.com/05nelsonm/encoding/issues/225
12651281
* @suppress
@@ -1275,6 +1291,22 @@ public sealed class Decoder<C: EncoderDecoder.Config>(public val config: C) {
12751291
noinline action: suspend (buf: ByteArray, offset: Int, len: Int) -> Unit,
12761292
): Long = decodeBufferedAsync(decoder, false, DEFAULT_BUFFER_SIZE, action)
12771293

1294+
/**
1295+
* TODO: Remove. See https://github.com/05nelsonm/encoding/issues/225
1296+
* @suppress
1297+
* */
1298+
@JvmStatic
1299+
@Throws(CancellationException::class, EncodingException::class)
1300+
@Deprecated(
1301+
message = "Will be removed upon 2.6.0 release",
1302+
replaceWith = ReplaceWith("decodeBufferedAsync(decoder, false, maxBufSize, action)")
1303+
)
1304+
public suspend fun CharSequence.decodeBufferedAsync(
1305+
maxBufSize: Int,
1306+
decoder: Decoder<*>,
1307+
action: suspend (buf: ByteArray, offset: Int, len: Int) -> Unit,
1308+
): Long = decodeBufferedAsync(decoder, false, maxBufSize, action)
1309+
12781310
/**
12791311
* DEPRECATED since `2.3.0`
12801312
* @throws [EncodingException] If decoding failed, such as the [decoder] rejecting

0 commit comments

Comments
 (0)