|
11 | 11 | A multiplatform Kotlin library providing basic IO primitives. `kotlinx-io` is based on [Okio](https://github.com/square/okio) but does not preserve backward compatibility with it.
|
12 | 12 |
|
13 | 13 | ## Overview
|
14 |
| -The library is built around `Buffer` - a mutable sequence of bytes. `Buffer` works like a queue allowing one to read data from its head or write data to its tail. |
| 14 | +**kotlinx-io** is built around `Buffer` - a mutable sequence of bytes. |
15 | 15 |
|
16 |
| -`Buffer` provides functions to read and write data of different built-in types and copy data to or from other buffers. Depending on a target platform, extension functions allowing data exchange with platform-specific types are also provided. |
| 16 | +`Buffer` works like a queue, allowing to read data from its head or to write data to its tail. |
| 17 | +`Buffer` provides functions to read and write data of different built-in types, and to copy data to or from other `Buffer`s. |
| 18 | +Depending on the target platform, extension functions allowing data exchange with platform-specific types are also available. |
17 | 19 |
|
18 |
| -`Buffer` consists of segments organized as a linked list. Segments allow reducing memory allocations during the buffer's expansion and copying. The latter is achieved by delegating or sharing the ownership over the underlying buffer's segments with other buffers. |
| 20 | +A `Buffer` consists of segments organized as a linked list: segments allow reducing memory allocations during the buffer's expansion and copy, |
| 21 | +with the latter achieved by delegating or sharing the ownership over the underlying buffer's segments with other buffers. |
19 | 22 |
|
20 |
| -The library also provides interfaces representing data sources and destinations - `Source` and `Sink`. |
| 23 | +**kotlinx-io** provides interfaces representing data sources and destinations - `Source` and `Sink`, |
| 24 | +and in addition to the *mutable* `Buffer` the library also provides an *immutable* sequence of bytes - `ByteString`. |
21 | 25 |
|
22 |
| -In addition to `Buffer`, the library provides an immutable sequence of bytes - `ByteString`. |
| 26 | +An experimental filesystem support is shipped under the `kotlinx.io.files` package, |
| 27 | +which includes the `FileSystem` interface and its default implementation - `SystemFileSystem`. |
23 | 28 |
|
24 |
| -Also, there's an experimental filesystem support provided by `kotlinx.io.files` package. |
25 |
| -The package includes `FileSystem` interface and its implementation - `SystemFileSystem`. |
26 |
| - |
27 |
| -`FileSystem` provides basic operations for working with files and directories. |
28 |
| - |
29 |
| -File and directory paths are represented by yet another class provided by the package - `Path`. |
| 29 | +`FileSystem` provides basic operations for working with files and directories, which are represented by yet another class under the same package - `Path`. |
30 | 30 |
|
31 | 31 | There are two `kotlinx-io` modules:
|
32 | 32 | - [kotlinx-io-bytestring](./bytestring) - provides `ByteString`.
|
|
0 commit comments