66package kotlinx.io.bytestring
77
88import kotlin.io.encoding.Base64
9- import kotlin.io.encoding.Base64.Default.encode
10- import kotlin.io.encoding.Base64.Default.encodeToByteArray
11- import kotlin.io.encoding.ExperimentalEncodingApi
129
1310/* *
1411 * Encodes bytes from the specified [source] byte string or its subrange.
@@ -30,7 +27,6 @@ import kotlin.io.encoding.ExperimentalEncodingApi
3027 *
3128 * @return a [ByteArray] with the resulting symbols.
3229 */
33- @ExperimentalEncodingApi
3430public fun Base64.encodeToByteArray (source : ByteString , startIndex : Int = 0, endIndex : Int = source.size): ByteArray {
3531 return encodeToByteArray(source.getBackingArrayReference(), startIndex, endIndex)
3632}
@@ -55,7 +51,6 @@ public fun Base64.encodeToByteArray(source: ByteString, startIndex: Int = 0, end
5551 *
5652 * @return the number of symbols written into [destination] array.
5753 */
58- @ExperimentalEncodingApi
5954public fun Base64.encodeIntoByteArray (
6055 source : ByteString ,
6156 destination : ByteArray ,
@@ -84,7 +79,6 @@ public fun Base64.encodeIntoByteArray(
8479 *
8580 * @return a string with the resulting symbols.
8681 */
87- @ExperimentalEncodingApi
8882public fun Base64.encode (
8983 source : ByteString ,
9084 startIndex : Int = 0,
@@ -110,7 +104,6 @@ public fun Base64.encode(
110104 *
111105 * @return the destination appendable.
112106 */
113- @ExperimentalEncodingApi
114107public fun <A : Appendable > Base64.encodeToAppendable (
115108 source : ByteString ,
116109 destination : A ,
@@ -139,7 +132,6 @@ public fun <A : Appendable> Base64.encodeToAppendable(
139132 *
140133 * @return a [ByteArray] with the resulting bytes.
141134 */
142- @ExperimentalEncodingApi
143135public fun Base64.decode (source : ByteString , startIndex : Int = 0, endIndex : Int = source.size): ByteArray {
144136 return decode(source.getBackingArrayReference(), startIndex, endIndex)
145137}
@@ -162,7 +154,6 @@ public fun Base64.decode(source: ByteString, startIndex: Int = 0, endIndex: Int
162154 *
163155 * @return a [ByteArray] with the resulting bytes.
164156 */
165- @ExperimentalEncodingApi
166157public fun Base64.decodeToByteString (source : CharSequence , startIndex : Int = 0, endIndex : Int = source.length): ByteString {
167158 return ByteString .wrap(decode(source, startIndex, endIndex))
168159}
@@ -189,7 +180,6 @@ public fun Base64.decodeToByteString(source: CharSequence, startIndex: Int = 0,
189180 *
190181 * @return the number of bytes written into [destination] array.
191182 */
192- @ExperimentalEncodingApi
193183public fun Base64.decodeIntoByteArray (
194184 source : ByteString ,
195185 destination : ByteArray ,
@@ -218,7 +208,6 @@ public fun Base64.decodeIntoByteArray(
218208 *
219209 * @return a [ByteString] with the resulting bytes.
220210 */
221- @ExperimentalEncodingApi
222211public fun Base64.decodeToByteString (source : ByteArray , startIndex : Int = 0, endIndex : Int = source.size): ByteString {
223212 return ByteString .wrap(decode(source, startIndex, endIndex))
224213}
@@ -241,7 +230,6 @@ public fun Base64.decodeToByteString(source: ByteArray, startIndex: Int = 0, end
241230 *
242231 * @return a [ByteString] with the resulting bytes.
243232 */
244- @ExperimentalEncodingApi
245233public fun Base64.decodeToByteString (source : ByteString , startIndex : Int = 0, endIndex : Int = source.size): ByteString {
246234 return ByteString .wrap(decode(source.getBackingArrayReference(), startIndex, endIndex))
247235}
0 commit comments