Package-level declarations
Core entry points, reader interfaces, seekable data sources, and exception hierarchy for reading archives across JVM, Android, iOS, JS, and WasmJs.
Quick Start
Use com.sorrowblue.kioarch.KioArch.createReader to open an archive from a file path, in-memory ByteArray, platform-specific descriptor (java.io.File, Android Uri / ParcelFileDescriptor, Apple NSData / NSURL / NSFileHandle), or a custom com.sorrowblue.kioarch.SeekableSource:
import com.sorrowblue.kioarch.KioArch
import com.sorrowblue.kioarch.extractToByteArray
import kotlinx.io.files.Path
KioArch.createReader(Path("archive.7z")).use { reader ->
for (entry in reader.getEntries()) {
if (!entry.isDirectory) {
val bytes = entry.extractToByteArray(reader)
println("${entry.name}: ${bytes.size} bytes")
}
}
}Core entry points, reader interfaces, seekable data sources, and exception hierarchy for reading archives across JVM, Android, iOS, JS, and WasmJs.
Quick Start
Use com.sorrowblue.kioarch.KioArch.createReader to open an archive from a file path, in-memory ByteArray, platform-specific descriptor (java.io.File, Android Uri / ParcelFileDescriptor, Apple NSData / NSURL / NSFileHandle), or a custom com.sorrowblue.kioarch.SeekableSource:
import com.sorrowblue.kioarch.KioArch
import com.sorrowblue.kioarch.extractToByteArray
import kotlinx.io.files.Path
KioArch.createReader(Path("archive.7z")).use { reader ->
for (entry in reader.getEntries()) {
if (!entry.isDirectory) {
val bytes = entry.extractToByteArray(reader)
println("${entry.name}: ${bytes.size} bytes")
}
}
}Core entry points, reader interfaces, seekable data sources, and exception hierarchy for reading archives across JVM, Android, iOS, JS, and WasmJs.
Quick Start
Use com.sorrowblue.kioarch.KioArch.createReader to open an archive from a file path, in-memory ByteArray, platform-specific descriptor (java.io.File, Android Uri / ParcelFileDescriptor, Apple NSData / NSURL / NSFileHandle), or a custom com.sorrowblue.kioarch.SeekableSource:
import com.sorrowblue.kioarch.KioArch
import com.sorrowblue.kioarch.extractToByteArray
import kotlinx.io.files.Path
KioArch.createReader(Path("archive.7z")).use { reader ->
for (entry in reader.getEntries()) {
if (!entry.isDirectory) {
val bytes = entry.extractToByteArray(reader)
println("${entry.name}: ${bytes.size} bytes")
}
}
}Core entry points, reader interfaces, seekable data sources, and exception hierarchy for reading archives across JVM, Android, iOS, JS, and WasmJs.
Quick Start
Use com.sorrowblue.kioarch.KioArch.createReader to open an archive from a file path, in-memory ByteArray, platform-specific descriptor (java.io.File, Android Uri / ParcelFileDescriptor, Apple NSData / NSURL / NSFileHandle), or a custom com.sorrowblue.kioarch.SeekableSource:
import com.sorrowblue.kioarch.KioArch
import com.sorrowblue.kioarch.extractToByteArray
import kotlinx.io.files.Path
KioArch.createReader(Path("archive.7z")).use { reader ->
for (entry in reader.getEntries()) {
if (!entry.isDirectory) {
val bytes = entry.extractToByteArray(reader)
println("${entry.name}: ${bytes.size} bytes")
}
}
}Core entry points, reader interfaces, seekable data sources, and exception hierarchy for reading archives across JVM, Android, iOS, JS, and WasmJs.
Quick Start
Use com.sorrowblue.kioarch.KioArch.createReader to open an archive from a file path, in-memory ByteArray, platform-specific descriptor (java.io.File, Android Uri / ParcelFileDescriptor, Apple NSData / NSURL / NSFileHandle), or a custom com.sorrowblue.kioarch.SeekableSource:
import com.sorrowblue.kioarch.KioArch
import com.sorrowblue.kioarch.extractToByteArray
import kotlinx.io.files.Path
KioArch.createReader(Path("archive.7z")).use { reader ->
for (entry in reader.getEntries()) {
if (!entry.isDirectory) {
val bytes = entry.extractToByteArray(reader)
println("${entry.name}: ${bytes.size} bytes")
}
}
}Core entry points, reader interfaces, seekable data sources, and exception hierarchy for reading archives across JVM, Android, iOS, JS, and WasmJs.
Quick Start
Use com.sorrowblue.kioarch.KioArch.createReader to open an archive from a file path, in-memory ByteArray, platform-specific descriptor (java.io.File, Android Uri / ParcelFileDescriptor, Apple NSData / NSURL / NSFileHandle), or a custom com.sorrowblue.kioarch.SeekableSource:
import com.sorrowblue.kioarch.KioArch
import com.sorrowblue.kioarch.extractToByteArray
import kotlinx.io.files.Path
KioArch.createReader(Path("archive.7z")).use { reader ->
for (entry in reader.getEntries()) {
if (!entry.isDirectory) {
val bytes = entry.extractToByteArray(reader)
println("${entry.name}: ${bytes.size} bytes")
}
}
}Core entry points, reader interfaces, seekable data sources, and exception hierarchy for reading archives across JVM, Android, iOS, JS, and WasmJs.
Quick Start
Use com.sorrowblue.kioarch.KioArch.createReader to open an archive from a file path, in-memory ByteArray, platform-specific descriptor (java.io.File, Android Uri / ParcelFileDescriptor, Apple NSData / NSURL / NSFileHandle), or a custom com.sorrowblue.kioarch.SeekableSource:
import com.sorrowblue.kioarch.KioArch
import com.sorrowblue.kioarch.extractToByteArray
import kotlinx.io.files.Path
KioArch.createReader(Path("archive.7z")).use { reader ->
for (entry in reader.getEntries()) {
if (!entry.isDirectory) {
val bytes = entry.extractToByteArray(reader)
println("${entry.name}: ${bytes.size} bytes")
}
}
}Core entry points, reader interfaces, seekable data sources, and exception hierarchy for reading archives across JVM, Android, iOS, JS, and WasmJs.
Quick Start
Use com.sorrowblue.kioarch.KioArch.createReader to open an archive from a file path, in-memory ByteArray, platform-specific descriptor (java.io.File, Android Uri / ParcelFileDescriptor, Apple NSData / NSURL / NSFileHandle), or a custom com.sorrowblue.kioarch.SeekableSource:
import com.sorrowblue.kioarch.KioArch
import com.sorrowblue.kioarch.extractToByteArray
import kotlinx.io.files.Path
KioArch.createReader(Path("archive.7z")).use { reader ->
for (entry in reader.getEntries()) {
if (!entry.isDirectory) {
val bytes = entry.extractToByteArray(reader)
println("${entry.name}: ${bytes.size} bytes")
}
}
}Types
Thrown when an archive's headers, compressed streams, or CRC-32 checksums are corrupted.
Base exception hierarchy representing errors thrown during archive opening, inspection, or extraction in KioArch.
Archive and compression formats supported by KioArch.
Thrown when the input stream is not a recognized archive or invalid arguments are supplied to an archive operation.
Thrown when an I/O failure occurs while reading from a SeekableSource, seeking within the archive, or writing decompressed bytes to a kotlinx.io.Sink.
Thrown when the native decompression engine fails to allocate required heap or dictionary memory.
Reads metadata and extracts entries on demand from an open archive.
Thrown when an archive uses an unsupported container format, compression codec, filter, or encryption scheme.
An in-memory SeekableSource backed directly by a ByteArray.
An ArchiveReader decorator returned when opening Bzip2-compressed archives (.bz2, .tar.bz2, .tbz2, and .tbz).
A JVM and Android extension of SeekableSource that transfers bytes directly into a NIO ByteBuffer, bypassing intermediate JVM heap ByteArray copies across the JNI boundary.
A JVM and Android DirectSeekableSource backed by a read-only RandomAccessFile and its underlying FileChannel.
Entry point for creating ArchiveReader instances across all supported Kotlin Multiplatform targets.
JS implementation of KioArch utilizing WebAssembly compiled from pure C archive engines.
JVM implementation of KioArch backed by JNI bindings to the native C decompression engine.
Jetpack App Startup Initializer that preloads the native libkioarch.so library via KioArch.loadLibrary when the Android application starts.
A Node.js-specific SeekableSource implementation for Kotlin/JS that performs synchronous random access via the Node.js fs module (openSync, readSync, fstatSync, closeSync).
A Node.js-specific SeekableSource implementation for Kotlin/WasmJs that performs synchronous random access via the Node.js node:fs module (openSync, readSync, fstatSync, closeSync).
An Android-specific DirectSeekableSource wrapping a seekable ParcelFileDescriptor for Storage Access Framework (content://) or ContentProvider random access without copying files into cache storage.
A JVM and Android DirectSeekableSource backed by a read-only Java NIO FileChannel.
A random-access byte stream from which KioArch reads archive headers and compressed payloads.
Properties
Holds the active Emscripten WebAssembly module instance registered via KioArch.initialize.
Functions
Creates an ArchiveReader reading directly from a java.io.File via FileSeekableSource.
Creates an ArchiveReader directly from an Android ParcelFileDescriptor.
Creates an ArchiveReader directly from an Android content Uri resolved via context.contentResolver.
Returns the canonical lowercase file extensions for all archive formats supported by KioArch.
Loads and instantiates the Emscripten KioArch WebAssembly module on the Kotlin/JS target.
Loads and instantiates the Emscripten KioArch WebAssembly module on the Kotlin/WasmJs target.
Asynchronously loads and instantiates the Emscripten-compiled KioArch WebAssembly module.