Skip to content

I/O functionality for Kotlin Multiplatform from Fluxo, including read-only random data access interface with multiple implementations, and more.

License

Notifications You must be signed in to change notification settings

fluxo-kt/fluxo-io

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

79 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Fluxo IO

Stability: Alpha Version Kotlin Version Build codecov License

Kotlin Multiplatform JVM badge badge badge badge badge badge badge badge badge badge


Caution

⚠ Work-In-Progress. API may be not completely stable yet!
Benchmarks and complete test coverage are coming.

How to use

Version

// in the `build.gradle.kts` of the target module.
plugins {
  kotlin("multiplatform") version "2.0.21"
}
dependencies {
  implementation("io.github.fluxo-kt:fluxo-io:0.1.0") // <-- add here
}

You can also use snapshots from Maven Central or JitPack:
Snapshot Version JitPack

Library provides cross-platform RandomAccessData abstraction for effective read-only random access to binary data. Both suspend and blocking APIs are provided. Different platform-specific implementations are provided.

Tip

For JVM and Android, compatibility with ByteBuffer reads and writes is provided.
An InputStream view is also provided for compatibility with existing APIs.

API Platform Supported for
ByteArray All All
ByteBuffer JVM, Android JVM, Android
ByteBufferMmap
(memory-mapped file)
JVM, Android JVM, Android
FileChannel JVM, Android JVM, Android
RandomAccessFile JVM, Android JVM, Android
SeekableByteChannel JVM, Android JVM, Android
() -> InputStream Factory JVM, Android JVM, Android
() -> DataInput Factory JVM, Android JVM, Android
() -> ReadableByteChannel Factory JVM, Android JVM, Android
AsynchronousFileChannel JVM, Android JVM, Android

Important

For using AsynchronousFileChannel, you need to add Kotlin Coroutines dependency to your project.

History notes

The first steps of the implementation were dated 2021-03-31 (2d87ec044f5801cd3ad8cc31ac380b17fa31d44a).
Open-source since 2024-06-16.

Related or alternative projects

Versioning

Uses SemVer for versioning.
For the versions available, see the tags on this repository.

License

License

This project is licensed under the Apache License, Version 2.0 — see the license file for details.

About

I/O functionality for Kotlin Multiplatform from Fluxo, including read-only random data access interface with multiple implementations, and more.

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks