kotlinx-io
kotlinx-io copied to clipboard
Kotlin multiplatform I/O library
Hello, I have asked the question on [StackOverflow](https://stackoverflow.com/questions/53014347/multi-platform-inputstream-alternative-in-kotlin), but didn't get any response there. So I'll try my luck here. I’m looking for a multi-platform alternative to input streams. My...
Let's consider to add some useful extensions: - [x] `fun String.toByteReadChannel(charset)` - [x] `interface Closeable` - [x] `ObjectPool.use(block):R` - [ ] `readUntil` for primitive types and `ByteArray` - [ ]...
# Description Looks like the [`kotlinx.io.core.String(ByteArray, Int, Int, Charset)`](https://github.com/Kotlin/kotlinx-io/blob/9ff93d3bd02b636ac772e93de01ade7805657698/kotlinx-io-js/src/main/kotlin/kotlinx/io/core/StringsJS.kt#L6-L20) function just ignores the `length` and `offset` arguments on JS. For example, the `String(byteArrayOf(64, 64, 67, 67), length = 2, offset...
The array-reading functions readFully and readAvailable are defined with default values for the offset and length parameter. If you only specify an explicit value for offset, length will default to...
What if we want an IoBuffer to use as memory backend a specific `CPointer` ? There are a lot of use cases for this: - Manual allocation of a specific...
JVM currently replaces all malformed input during decoding while Native silently ignores it. `underflow`, `overflow`, `malformed` and `unmappable` flags should be consistent with JVM by default especially in the face...
Fixes #147 **Note: using `applyDefaultHierarchyTemplate` with extended hierarchy is `experimental` + accessors for WasmJs and WasmWasi will be available only in KGP 2.0.** Feel free to integrate it now or...
`IOException` lacks the secondary constructor `public constructor(message: Throwable?)`. The standard exceptions in the Kotlin stdlib and `java.io.IOException` (= the JVM actual) all have this constructor. Would it be possible to...