
Lightweight memory-mapped I/O offering random access to large files, virtual memory-backed Source/Sink abstraction with efficient streaming, minimal overhead and zero-copy operations.
Lightweight memory mapped IO for Kotlin Multiplatform on JVM, Android and native.
If you need random access on big files, this is the library you're looking for!
This library also comes with kotlinx.io integration out of the box.
First, add the official Maven Central repository to your settings.gradle.kts:
dependencyResolutionManagement {
repositories {
mavenCentral()
}
}Then add a dependency on the library in your buildscript:
kotlin {
sourceSets {
commonMain {
dependencies {
implementation("dev.karmakrafts.kmmio:kmmio-core:<version>")
}
}
}
}fun main() {
VirtualMemory(4096, path).use {
it.source() // Consume data through a kotlinx.io.Source
it.sink() // Produce data through a kotlinx.io.Sink
}
}Lightweight memory mapped IO for Kotlin Multiplatform on JVM, Android and native.
If you need random access on big files, this is the library you're looking for!
This library also comes with kotlinx.io integration out of the box.
First, add the official Maven Central repository to your settings.gradle.kts:
dependencyResolutionManagement {
repositories {
mavenCentral()
}
}Then add a dependency on the library in your buildscript:
kotlin {
sourceSets {
commonMain {
dependencies {
implementation("dev.karmakrafts.kmmio:kmmio-core:<version>")
}
}
}
}fun main() {
VirtualMemory(4096, path).use {
it.source() // Consume data through a kotlinx.io.Source
it.sink() // Produce data through a kotlinx.io.Sink
}
}