kMMIO

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.

Android
JVM
iOS
Android Native
macOS
watchOS
tvOS
Linux
Windows
GitHub stars21
Dependents0
LicenseApache License 2.0
Creation datealmost 2 years ago

Last activityabout 2 months ago
Latest release2.3.1 (about 2 months ago)

kMMIO

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.

How to use it

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>")
            }
        }
    }
}

Code example

fun main() {
    VirtualMemory(4096, path).use {
        it.source() // Consume data through a kotlinx.io.Source
        it.sink() // Produce data through a kotlinx.io.Sink
    }
}
Android
JVM
iOS
Android Native
macOS
watchOS
tvOS
Linux
Windows
GitHub stars21
Dependents0
LicenseApache License 2.0
Creation datealmost 2 years ago

Last activityabout 2 months ago
Latest release2.3.1 (about 2 months ago)

kMMIO

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.

How to use it

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>")
            }
        }
    }
}

Code example

fun main() {
    VirtualMemory(4096, path).use {
        it.source() // Consume data through a kotlinx.io.Source
        it.sink() // Produce data through a kotlinx.io.Sink
    }
}