-
Notifications
You must be signed in to change notification settings - Fork 70
Description
As a starting point for #131, kotlinx-io
API should be implemented as a trimmed-down version for Okio API. The API should include only core IO primitives and allow to build any other functionality on top of it.
Parts of the Okio API that are likely to be removed include:
- select API;
- hash functions API;
- cursor API;
- ByteStrings (will be added back later).
Some of these APIs provide specific functionality required by particular libraries and apps and could be implemented on top of the existing API; others are unsafe and should be redesigned to reduce possible user issues. It's also clear that these APIs were implemented as part of the core Okio library to squeeze additional performance out of it. To make sure that these APIs can be implemented using kotlinx-io
without the loss of performance, the new APIs will be introduced in the future (or, if there will be no other way to implement removed functionality efficiently, it may be added back to the kotlinx-io
).
The goal is to provide concise, well-documented and tested API. Core IO primitives API, like sources and sinks, should include as little functionality as possible; everything that could be implemented on top of it should be moved to extension functions or removed.