From 617dfb54e0107d23e6ee8174ca312ff5ae13156b Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Mon, 3 Apr 2023 22:35:41 +0600 Subject: [PATCH] experimentally add linuxx64 and mingwx64 as target platforms --- common/build.gradle | 11 + .../src/linuxX64Main/kotlin/ActualMPPFile.kt | 152 +- common/src/linuxX64Main/kotlin/FileChannel.kt | 107 -- .../src/linuxX64Main/kotlin/FileIterator.kt | 56 - common/src/linuxX64Test/kotlin/FileTests.kt | 36 - .../src/mingwX64Main/kotlin/ActualMPPFile.kt | 36 + common/src/mingwX64Main/kotlin/fixed.kt | 26 + crypto/build.gradle | 1 + .../kotlin/dev/inmo/micro_utils/crypto/MD5.kt | 6 +- .../inmo/micro_utils/crypto/MD5Realization.kt | 6 - .../inmo/micro_utils/crypto/MD5Realization.kt | 12 - gradle/libs.versions.toml | 9 +- ktor/client/build.gradle | 12 + .../ktor/client/MPPFileInputProvider.kt | 6 +- .../ktor/client/ActualMPPFileInputProvider.kt | 11 - .../ktor/client/ActualMPPFileInputProvider.kt | 2 - .../kotlin/ActualTemporalUpload.kt | 40 + .../linuxX64Main/kotlin/ActualUniUpload.kt | 107 ++ .../kotlin/ActualTemporalUpload.kt | 40 + .../mingwX64Main/kotlin/ActualUniUpload.kt | 107 ++ .../linuxX64Main/kotlin/ActualMPPFileInput.kt | 33 + .../mingwX64Main/kotlin/ActualMPPFileInput.kt | 33 + mime_types/mimes_generator/mime_generator.py | 34 +- .../mime_types/FilesExtensionsMap.kt | 24 + .../micro_utils/mime_types/KnownMimeTypes.kt | 1420 ++++++++--------- .../inmo/micro_utils/mime_types/MimeType.kt | 2 + mppProjectWithSerialization.gradle | 6 +- 27 files changed, 1248 insertions(+), 1087 deletions(-) delete mode 100644 common/src/linuxX64Main/kotlin/FileChannel.kt delete mode 100644 common/src/linuxX64Main/kotlin/FileIterator.kt delete mode 100644 common/src/linuxX64Test/kotlin/FileTests.kt create mode 100644 common/src/mingwX64Main/kotlin/ActualMPPFile.kt create mode 100644 common/src/mingwX64Main/kotlin/fixed.kt delete mode 100644 crypto/src/jsMain/kotlin/dev/inmo/micro_utils/crypto/MD5Realization.kt delete mode 100644 crypto/src/jvmMain/kotlin/dev/inmo/micro_utils/crypto/MD5Realization.kt delete mode 100644 ktor/client/src/jsMain/kotlin/dev/inmo/micro_utils/ktor/client/ActualMPPFileInputProvider.kt create mode 100644 ktor/client/src/linuxX64Main/kotlin/ActualTemporalUpload.kt create mode 100644 ktor/client/src/linuxX64Main/kotlin/ActualUniUpload.kt create mode 100644 ktor/client/src/mingwX64Main/kotlin/ActualTemporalUpload.kt create mode 100644 ktor/client/src/mingwX64Main/kotlin/ActualUniUpload.kt create mode 100644 ktor/common/src/linuxX64Main/kotlin/ActualMPPFileInput.kt create mode 100644 ktor/common/src/mingwX64Main/kotlin/ActualMPPFileInput.kt create mode 100644 mime_types/src/commonMain/kotlin/dev/inmo/micro_utils/mime_types/FilesExtensionsMap.kt diff --git a/common/build.gradle b/common/build.gradle index ffe436a0cf5..ad1081a6a29 100644 --- a/common/build.gradle +++ b/common/build.gradle @@ -20,5 +20,16 @@ kotlin { } dependsOn jvmMain } + + linuxX64Main { + dependencies { + api libs.okio + } + } + mingwX64Main { + dependencies { + api libs.okio + } + } } } diff --git a/common/src/linuxX64Main/kotlin/ActualMPPFile.kt b/common/src/linuxX64Main/kotlin/ActualMPPFile.kt index 4c00ce4fbdc..ff5f9619c53 100644 --- a/common/src/linuxX64Main/kotlin/ActualMPPFile.kt +++ b/common/src/linuxX64Main/kotlin/ActualMPPFile.kt @@ -1,146 +1,36 @@ package dev.inmo.micro_utils.common -import kotlinx.cinterop.ByteVar -import kotlinx.cinterop.CPointer -import kotlinx.cinterop.alloc -import kotlinx.cinterop.allocArray -import kotlinx.cinterop.convert -import kotlinx.cinterop.memScoped -import kotlinx.cinterop.ptr -import kotlinx.cinterop.readBytes -import platform.linux.statvfs -import platform.posix.ACCESSPERMS -import platform.posix.FILE -import platform.posix.F_OK -import platform.posix.SEEK_END -import platform.posix.S_IFDIR -import platform.posix.S_IFMT -import platform.posix.access -import platform.posix.fgets -import platform.posix.fopen -import platform.posix.fseek -import platform.posix.ftell -import platform.posix.remove -import platform.posix.rename -import platform.posix.rmdir -import platform.posix.stat +import okio.FileSystem +import okio.Path +import okio.use -actual data class MPPFile(internal val filename: FileName) { - val path = filename.string - val isFile: Boolean - get() = memScoped { - val stat = alloc() - if (stat(path, stat.ptr) != 0) - return@memScoped false - (S_IFDIR != (stat.st_mode and S_IFMT.convert()).convert()) - } - - val isDirectory: Boolean - get() = memScoped { - val stat = alloc() - if (stat(path, stat.ptr) != 0) - return@memScoped false - S_IFDIR == (stat.st_mode and S_IFMT.convert()).convert() - } - val size: Long - get() = memScoped { - val stat = alloc() - if (stat(path, stat.ptr) != 0) - return@memScoped 0 - return stat.st_size.convert() - } - val lastModified: Long - get() = memScoped { - val stat = alloc() - if (stat(path, stat.ptr) != 0) - return@memScoped 0 - return stat.st_ctim.tv_nsec / 1000L - } - - val freeSpace: Long - get() = - memScoped { - val stat = alloc() - statvfs(path, stat.ptr) - (stat.f_bfree.toULong() * stat.f_bsize.toULong()).toLong() - } - - val availableSpace: Long - get() = - memScoped { - val stat = alloc() - statvfs(path, stat.ptr) - (stat.f_bavail.toULong() * stat.f_bsize.toULong()).toLong() - } - - val totalSpace: Long - get() = memScoped { - val stat = alloc() - statvfs(path, stat.ptr) - (stat.f_blocks.toULong() * stat.f_frsize.toULong()).toLong() - } - - constructor(vararg path: String) : this(FileName(path.map { it.removeSuffix(SEPARATOR_STRING) }.joinToString(SEPARATOR_STRING))) - constructor(parent: MPPFile, subpath: String) : this("${parent.filename.withoutSlashAtTheEnd}$SEPARATOR${subpath}") - - fun createPointer(mode: String = "r") = fopen(filename.name, mode) - - fun delete(): Boolean { - return when { - isDirectory -> rmdir(path) == 0 - isFile -> remove(path) == 0 - else -> false - } - } - - fun mkdir(): Boolean = platform.posix.mkdir(path, ACCESSPERMS) == 0 - - override fun toString(): String = path - override fun equals(other: Any?): Boolean { - if (other !is MPPFile) return false - return path == other.path - } - - override fun hashCode(): Int = 31 + path.hashCode() - - fun renameTo(newPath: MPPFile): Boolean = rename(path, newPath.path) == 0 - - fun list(): List { - val out = ArrayList() - FileIterator(this).forEach { file -> - out += file - } - return out - } - - fun fileChannel(mode: String = "r") = FileChannel(this, mode) - - companion object { - val SEPARATOR: Char = '/' - val SEPARATOR_STRING: String = SEPARATOR.toString() - val temporalDirectory: MPPFile? - get() = MPPFile("/tmp").takeIf { - it.isDirectory - } - } -} +actual typealias MPPFile = Path +/** + * @suppress + */ actual val MPPFile.filename: FileName - get() = this.filename + get() = FileName(toString()) +/** + * @suppress + */ actual val MPPFile.filesize: Long - get() = memScoped { - val pointer = createPointer() - fseek(pointer, 0L, SEEK_END) - ftell(pointer) + get() = FileSystem.SYSTEM.openReadOnly(this).use { + it.size() } +/** + * @suppress + */ actual val MPPFile.bytesAllocatorSync: ByteArrayAllocator get() = { - memScoped { - fileChannel().readFully() + FileSystem.SYSTEM.read(this) { + readByteArray() } } +/** + * @suppress + */ actual val MPPFile.bytesAllocator: SuspendByteArrayAllocator get() = { bytesAllocatorSync() } - diff --git a/common/src/linuxX64Main/kotlin/FileChannel.kt b/common/src/linuxX64Main/kotlin/FileChannel.kt deleted file mode 100644 index d76ba8f66cd..00000000000 --- a/common/src/linuxX64Main/kotlin/FileChannel.kt +++ /dev/null @@ -1,107 +0,0 @@ -package dev.inmo.micro_utils.common - -import kotlinx.cinterop.ByteVar -import kotlinx.cinterop.allocArray -import kotlinx.cinterop.convert -import kotlinx.cinterop.memScoped -import kotlinx.cinterop.toCValues -import kotlinx.cinterop.toKString -import platform.posix.SEEK_END -import platform.posix.SEEK_SET -import platform.posix.fclose -import platform.posix.feof -import platform.posix.fread -import platform.posix.fseek -import platform.posix.ftell -import platform.posix.fwrite -import platform.posix.size_t - -class FileChannel (file: MPPFile, mode: String) : RandomAccess { - internal val handler = file.createPointer(mode) - - private var position: ULong - get() = ftell(handler).convert() - set(value) { - fseek(handler, value.convert(), SEEK_SET) - } - private val size: ULong - get() { - val pos = position - gotoEnd() - val result = position - position = pos - return result - } - - fun skip(length: Long): Long { - checkClosed() - memScoped { } - if (length == 0L) - return 0L - if (feof(handler) != 0) - return 0L - val endOfFile = size - val position = minOf(endOfFile, this.position + length.toULong()) - this.position = position - return (endOfFile - position).toLong() - } - - fun read(dest: ByteArray): Int { - checkClosed() - if (feof(handler) != 0) - return 0 - - memScoped { - val tmp = allocArray(dest.size); - fread(tmp, Byte.SIZE_BYTES.convert(), dest.size.convert(), handler).convert() - tmp.toKString() - } - return fread(dest.toCValues(), Byte.SIZE_BYTES.convert(), dest.size.convert(), handler).convert() - } - - private var closed = false - - private fun checkClosed() { - if (closed) { - error("File channel has been closed already") - } - } - - fun close() { - checkClosed() - fclose(handler) - closed = true - } - - fun write(data: ByteArray): Int { - checkClosed() - if (feof(handler) != 0) - return 0 - - return fwrite(data.toCValues(), 1.convert(), data.size.convert(), handler).convert() - } - - fun flush() { - checkClosed() - } - - private fun gotoEnd() { - fseek(handler, 0, SEEK_END) - } - - fun readFully(): ByteArray { - var result = ByteArray(0) - memScoped { - val tmp = ByteArray(64 * 1024) - - do { - val read = read(tmp) - result += tmp.take(read) - } while (read > 0) - } - val tmp = ByteArray(64 * 1024) - - - return result - } -} diff --git a/common/src/linuxX64Main/kotlin/FileIterator.kt b/common/src/linuxX64Main/kotlin/FileIterator.kt deleted file mode 100644 index 95d7490f130..00000000000 --- a/common/src/linuxX64Main/kotlin/FileIterator.kt +++ /dev/null @@ -1,56 +0,0 @@ -package dev.inmo.micro_utils.common - -import kotlinx.cinterop.pointed -import kotlinx.cinterop.toKString -import platform.posix.closedir -import platform.posix.dirent -import platform.posix.opendir -import platform.posix.readdir -import kotlin.native.internal.createCleaner - -class FileIterator internal constructor(private val file: MPPFile) : Iterator { - init { - if (!file.isDirectory) - error("\"${file.path}\" is not direction") - } - - private val handler = opendir(file.path) - private var next: dirent? = null - private var end = false - - override fun hasNext(): Boolean { - while (true) { - if (end) - return false - - if (next == null) { - next = readdir(handler)?.pointed - if (next == null) { - end = true - return false - } - val name = next!!.d_name.toKString() - if (name == "." || name == "..") { - next = null - continue - } - return true - } - return true - } - } - - override fun next(): MPPFile { - if (!hasNext()) - throw NoSuchElementException() - val result = MPPFile(file, next!!.d_name.toKString()) - next = null - return result - } - - @OptIn(ExperimentalStdlibApi::class) - private val cleaner = createCleaner(handler) { - closedir(it) - } -} - diff --git a/common/src/linuxX64Test/kotlin/FileTests.kt b/common/src/linuxX64Test/kotlin/FileTests.kt deleted file mode 100644 index 5be272eb8b3..00000000000 --- a/common/src/linuxX64Test/kotlin/FileTests.kt +++ /dev/null @@ -1,36 +0,0 @@ -package dev.inmo.micro_utils.common - -import dev.inmo.micro_utils.common.MPPFile -import kotlin.test.Test -import kotlin.test.assertEquals - -fun createTestFile(content: String): MPPFile = MPPFile( - MPPFile.temporalDirectory!!, - "tmp.file.txt" -).apply { - val channel = fileChannel("wc") - runCatching { - channel.write(content.encodeToByteArray()) - } - channel.close() -} -fun MPPFile.removeTestFile() { - delete() -} - -class FileTests { - @Test - fun testReadFromFile() { - val testContent = "Test" - val file = createTestFile(testContent) - - try { - val content = runCatching { - file.fileChannel().readFully().contentToString() - }.getOrThrow() - assertEquals(testContent, content) - } finally { - file.removeTestFile() - } - } -} diff --git a/common/src/mingwX64Main/kotlin/ActualMPPFile.kt b/common/src/mingwX64Main/kotlin/ActualMPPFile.kt new file mode 100644 index 00000000000..ff5f9619c53 --- /dev/null +++ b/common/src/mingwX64Main/kotlin/ActualMPPFile.kt @@ -0,0 +1,36 @@ +package dev.inmo.micro_utils.common + +import okio.FileSystem +import okio.Path +import okio.use + +actual typealias MPPFile = Path + +/** + * @suppress + */ +actual val MPPFile.filename: FileName + get() = FileName(toString()) +/** + * @suppress + */ +actual val MPPFile.filesize: Long + get() = FileSystem.SYSTEM.openReadOnly(this).use { + it.size() + } +/** + * @suppress + */ +actual val MPPFile.bytesAllocatorSync: ByteArrayAllocator + get() = { + FileSystem.SYSTEM.read(this) { + readByteArray() + } + } +/** + * @suppress + */ +actual val MPPFile.bytesAllocator: SuspendByteArrayAllocator + get() = { + bytesAllocatorSync() + } diff --git a/common/src/mingwX64Main/kotlin/fixed.kt b/common/src/mingwX64Main/kotlin/fixed.kt new file mode 100644 index 00000000000..057002f1ad4 --- /dev/null +++ b/common/src/mingwX64Main/kotlin/fixed.kt @@ -0,0 +1,26 @@ +package dev.inmo.micro_utils.common + +import kotlinx.cinterop.ByteVar +import kotlinx.cinterop.allocArray +import kotlinx.cinterop.memScoped +import kotlinx.cinterop.toKString +import platform.posix.snprintf +import platform.posix.sprintf + +actual fun Float.fixed(signs: Int): Float { + return memScoped { + val buff = allocArray(Float.SIZE_BYTES * 2) + + sprintf(buff, "%.${signs}f", this@fixed) + buff.toKString().toFloat() + } +} + +actual fun Double.fixed(signs: Int): Double { + return memScoped { + val buff = allocArray(Double.SIZE_BYTES * 2) + + sprintf(buff, "%.${signs}f", this@fixed) + buff.toKString().toDouble() + } +} diff --git a/crypto/build.gradle b/crypto/build.gradle index 5759368da46..686093b86f0 100644 --- a/crypto/build.gradle +++ b/crypto/build.gradle @@ -11,6 +11,7 @@ kotlin { commonMain { dependencies { api project(":micro_utils.common") + api libs.krypto } } jsMain { diff --git a/crypto/src/commonMain/kotlin/dev/inmo/micro_utils/crypto/MD5.kt b/crypto/src/commonMain/kotlin/dev/inmo/micro_utils/crypto/MD5.kt index 76ad1fa9560..37dc958212c 100644 --- a/crypto/src/commonMain/kotlin/dev/inmo/micro_utils/crypto/MD5.kt +++ b/crypto/src/commonMain/kotlin/dev/inmo/micro_utils/crypto/MD5.kt @@ -1,6 +1,8 @@ package dev.inmo.micro_utils.crypto +import com.soywiz.krypto.md5 + typealias MD5 = String -expect fun SourceBytes.md5(): MD5 -fun SourceString.md5(): MD5 = encodeToByteArray().md5() +fun SourceBytes.md5(): MD5 = md5().hexLower +fun SourceString.md5(): MD5 = encodeToByteArray().md5().hexLower diff --git a/crypto/src/jsMain/kotlin/dev/inmo/micro_utils/crypto/MD5Realization.kt b/crypto/src/jsMain/kotlin/dev/inmo/micro_utils/crypto/MD5Realization.kt deleted file mode 100644 index 2efb854b1cf..00000000000 --- a/crypto/src/jsMain/kotlin/dev/inmo/micro_utils/crypto/MD5Realization.kt +++ /dev/null @@ -1,6 +0,0 @@ -package dev.inmo.micro_utils.crypto - -/** - * @suppress - */ -actual fun SourceBytes.md5(): MD5 = CryptoJS.MD5(decodeToString()) diff --git a/crypto/src/jvmMain/kotlin/dev/inmo/micro_utils/crypto/MD5Realization.kt b/crypto/src/jvmMain/kotlin/dev/inmo/micro_utils/crypto/MD5Realization.kt deleted file mode 100644 index 48af37e2ed6..00000000000 --- a/crypto/src/jvmMain/kotlin/dev/inmo/micro_utils/crypto/MD5Realization.kt +++ /dev/null @@ -1,12 +0,0 @@ -package dev.inmo.micro_utils.crypto - -import java.math.BigInteger -import java.security.MessageDigest - -/** - * @suppress - */ -actual fun SourceBytes.md5(): MD5 = BigInteger( - 1, - MessageDigest.getInstance("MD5").digest(this) -).toString(16) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 141d7dbb4b8..f94c0fd7941 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -10,7 +10,7 @@ jb-compose = "1.3.1" jb-exposed = "0.41.1" jb-dokka = "1.8.10" -klock = "3.4.0" +korlibs = "3.4.0" uuid = "0.7.0" ktor = "2.2.4" @@ -19,6 +19,8 @@ gh-release = "2.4.1" koin = "3.3.2" +okio = "3.3.0" + ksp = "1.8.10-1.0.9" kotlin-poet = "1.12.0" @@ -67,7 +69,8 @@ ktor-server-content-negotiation = { module = "io.ktor:ktor-server-content-negoti kslog = { module = "dev.inmo:kslog", version.ref = "kslog" } -klock = { module = "com.soywiz.korlibs.klock:klock", version.ref = "klock" } +klock = { module = "com.soywiz.korlibs.klock:klock", version.ref = "korlibs" } +krypto = { module = "com.soywiz.korlibs.krypto:krypto", version.ref = "korlibs" } uuid = { module = "com.benasher44:uuid", version.ref = "uuid" } koin = { module = "io.insert-koin:koin-core", version.ref = "koin" } @@ -91,6 +94,8 @@ kt-test-junit = { module = "org.jetbrains.kotlin:kotlin-test-junit", version.ref kotlin-poet = { module = "com.squareup:kotlinpoet-ksp", version.ref = "kotlin-poet" } ksp = { module = "com.google.devtools.ksp:symbol-processing-api", version.ref = "ksp" } +okio = { module = "com.squareup.okio:okio", version.ref = "okio" } + # Buildscript buildscript-kt-gradle = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kt" } diff --git a/ktor/client/build.gradle b/ktor/client/build.gradle index 748477c43ac..3387bb81ef2 100644 --- a/ktor/client/build.gradle +++ b/ktor/client/build.gradle @@ -18,5 +18,17 @@ kotlin { androidMain { dependsOn jvmMain } + + linuxX64Main { + dependencies { + api internalProject("micro_utils.mime_types") + } + } + + mingwX64Main { + dependencies { + api internalProject("micro_utils.mime_types") + } + } } } diff --git a/ktor/client/src/commonMain/kotlin/dev/inmo/micro_utils/ktor/client/MPPFileInputProvider.kt b/ktor/client/src/commonMain/kotlin/dev/inmo/micro_utils/ktor/client/MPPFileInputProvider.kt index de8363bb3cb..6c16c1d1810 100644 --- a/ktor/client/src/commonMain/kotlin/dev/inmo/micro_utils/ktor/client/MPPFileInputProvider.kt +++ b/ktor/client/src/commonMain/kotlin/dev/inmo/micro_utils/ktor/client/MPPFileInputProvider.kt @@ -1,6 +1,10 @@ package dev.inmo.micro_utils.ktor.client import dev.inmo.micro_utils.common.MPPFile +import dev.inmo.micro_utils.common.filesize +import dev.inmo.micro_utils.ktor.common.input import io.ktor.client.request.forms.InputProvider -expect suspend fun MPPFile.inputProvider(): InputProvider +fun MPPFile.inputProvider(): InputProvider = InputProvider(filesize) { + input() +} diff --git a/ktor/client/src/jsMain/kotlin/dev/inmo/micro_utils/ktor/client/ActualMPPFileInputProvider.kt b/ktor/client/src/jsMain/kotlin/dev/inmo/micro_utils/ktor/client/ActualMPPFileInputProvider.kt deleted file mode 100644 index 8dafe4a6372..00000000000 --- a/ktor/client/src/jsMain/kotlin/dev/inmo/micro_utils/ktor/client/ActualMPPFileInputProvider.kt +++ /dev/null @@ -1,11 +0,0 @@ -package dev.inmo.micro_utils.ktor.client - -import dev.inmo.micro_utils.common.* -import io.ktor.client.request.forms.InputProvider -import io.ktor.utils.io.core.ByteReadPacket - -actual suspend fun MPPFile.inputProvider(): InputProvider = bytes().let { - InputProvider(it.size.toLong()) { - ByteReadPacket(it) - } -} diff --git a/ktor/client/src/jvmMain/kotlin/dev/inmo/micro_utils/ktor/client/ActualMPPFileInputProvider.kt b/ktor/client/src/jvmMain/kotlin/dev/inmo/micro_utils/ktor/client/ActualMPPFileInputProvider.kt index ad8a9ee406a..367e1b78a3f 100644 --- a/ktor/client/src/jvmMain/kotlin/dev/inmo/micro_utils/ktor/client/ActualMPPFileInputProvider.kt +++ b/ktor/client/src/jvmMain/kotlin/dev/inmo/micro_utils/ktor/client/ActualMPPFileInputProvider.kt @@ -7,5 +7,3 @@ import io.ktor.utils.io.streams.asInput fun MPPFile.inputProviderSync(): InputProvider = InputProvider(length()) { inputStream().asInput() } - -actual suspend fun MPPFile.inputProvider(): InputProvider = inputProviderSync() diff --git a/ktor/client/src/linuxX64Main/kotlin/ActualTemporalUpload.kt b/ktor/client/src/linuxX64Main/kotlin/ActualTemporalUpload.kt new file mode 100644 index 00000000000..8dc14e5f7c0 --- /dev/null +++ b/ktor/client/src/linuxX64Main/kotlin/ActualTemporalUpload.kt @@ -0,0 +1,40 @@ +package dev.inmo.micro_utils.ktor.client + +import dev.inmo.micro_utils.common.MPPFile +import dev.inmo.micro_utils.common.filename +import dev.inmo.micro_utils.ktor.common.TemporalFileId +import dev.inmo.micro_utils.mime_types.getMimeTypeOrAny +import io.ktor.client.HttpClient +import io.ktor.client.plugins.onUpload +import io.ktor.client.request.forms.formData +import io.ktor.client.request.forms.submitFormWithBinaryData +import io.ktor.client.statement.bodyAsText +import io.ktor.http.Headers +import io.ktor.http.HttpHeaders + +internal val MPPFile.mimeType: String + get() = getMimeTypeOrAny(filename.extension).raw + +actual suspend fun HttpClient.tempUpload( + fullTempUploadDraftPath: String, + file: MPPFile, + onUpload: OnUploadCallback +): TemporalFileId { + val inputProvider = file.inputProvider() + val fileId = submitFormWithBinaryData( + fullTempUploadDraftPath, + formData = formData { + append( + "data", + inputProvider, + Headers.build { + append(HttpHeaders.ContentType, file.mimeType) + append(HttpHeaders.ContentDisposition, "filename=\"${file.filename.string}\"") + } + ) + } + ) { + onUpload(onUpload) + }.bodyAsText() + return TemporalFileId(fileId) +} diff --git a/ktor/client/src/linuxX64Main/kotlin/ActualUniUpload.kt b/ktor/client/src/linuxX64Main/kotlin/ActualUniUpload.kt new file mode 100644 index 00000000000..4da3d874f80 --- /dev/null +++ b/ktor/client/src/linuxX64Main/kotlin/ActualUniUpload.kt @@ -0,0 +1,107 @@ +package dev.inmo.micro_utils.ktor.client + +import dev.inmo.micro_utils.common.MPPFile +import dev.inmo.micro_utils.common.Progress +import io.ktor.client.HttpClient +import io.ktor.client.engine.mergeHeaders +import io.ktor.client.plugins.onUpload +import io.ktor.client.request.HttpRequestBuilder +import io.ktor.client.request.forms.InputProvider +import io.ktor.client.request.forms.formData +import io.ktor.client.request.forms.submitForm +import io.ktor.client.request.forms.submitFormWithBinaryData +import io.ktor.client.request.headers +import io.ktor.client.statement.bodyAsText +import io.ktor.http.Headers +import io.ktor.http.HttpHeaders +import io.ktor.http.HttpStatusCode +import io.ktor.http.Parameters +import io.ktor.http.content.PartData +import kotlinx.serialization.DeserializationStrategy +import kotlinx.serialization.InternalSerializationApi +import kotlinx.serialization.SerializationStrategy +import kotlinx.serialization.StringFormat +import kotlinx.serialization.encodeToString +import kotlinx.serialization.serializer + +/** + * Will execute submitting of multipart data request + * + * @param data [Map] where keys will be used as names for multipart parts and values as values. If you will pass + * [dev.inmo.micro_utils.common.MPPFile] (File from JS or JVM platform). Also you may pass [UniUploadFileInfo] as value + * in case you wish to pass other source of multipart binary data than regular file + * @suppress + */ +@OptIn(InternalSerializationApi::class) +actual suspend fun HttpClient.uniUpload( + url: String, + data: Map, + resultDeserializer: DeserializationStrategy, + headers: Headers, + stringFormat: StringFormat, + onUpload: OnUploadCallback +): T? { + val withBinary = data.values.any { it is MPPFile || it is UniUploadFileInfo } + + val formData = formData { + for (k in data.keys) { + val v = data[k] ?: continue + when (v) { + is MPPFile -> append( + k, + v.inputProvider(), + Headers.build { + append(HttpHeaders.ContentType, v.mimeType) + append(HttpHeaders.ContentDisposition, "filename=\"${v.name}\"") + } + ) + is UniUploadFileInfo -> append( + k, + InputProvider(block = v.inputAllocator), + Headers.build { + append(HttpHeaders.ContentType, v.mimeType) + append(HttpHeaders.ContentDisposition, "filename=\"${v.fileName.name}\"") + } + ) + else -> append( + k, + stringFormat.encodeToString(v::class.serializer() as SerializationStrategy, v) + ) + } + } + } + + val requestBuilder: HttpRequestBuilder.() -> Unit = { + headers { + appendAll(headers) + } + onUpload { bytesSentTotal, contentLength -> + onUpload(bytesSentTotal, contentLength) + } + } + + val response = if (withBinary) { + submitFormWithBinaryData( + url, + formData, + block = requestBuilder + ) + } else { + submitForm( + url, + Parameters.build { + for (it in formData) { + val formItem = (it as PartData.FormItem) + append(it.name!!, it.value) + } + }, + block = requestBuilder + ) + } + + return if (response.status == HttpStatusCode.OK) { + stringFormat.decodeFromString(resultDeserializer, response.bodyAsText()) + } else { + null + } +} diff --git a/ktor/client/src/mingwX64Main/kotlin/ActualTemporalUpload.kt b/ktor/client/src/mingwX64Main/kotlin/ActualTemporalUpload.kt new file mode 100644 index 00000000000..8dc14e5f7c0 --- /dev/null +++ b/ktor/client/src/mingwX64Main/kotlin/ActualTemporalUpload.kt @@ -0,0 +1,40 @@ +package dev.inmo.micro_utils.ktor.client + +import dev.inmo.micro_utils.common.MPPFile +import dev.inmo.micro_utils.common.filename +import dev.inmo.micro_utils.ktor.common.TemporalFileId +import dev.inmo.micro_utils.mime_types.getMimeTypeOrAny +import io.ktor.client.HttpClient +import io.ktor.client.plugins.onUpload +import io.ktor.client.request.forms.formData +import io.ktor.client.request.forms.submitFormWithBinaryData +import io.ktor.client.statement.bodyAsText +import io.ktor.http.Headers +import io.ktor.http.HttpHeaders + +internal val MPPFile.mimeType: String + get() = getMimeTypeOrAny(filename.extension).raw + +actual suspend fun HttpClient.tempUpload( + fullTempUploadDraftPath: String, + file: MPPFile, + onUpload: OnUploadCallback +): TemporalFileId { + val inputProvider = file.inputProvider() + val fileId = submitFormWithBinaryData( + fullTempUploadDraftPath, + formData = formData { + append( + "data", + inputProvider, + Headers.build { + append(HttpHeaders.ContentType, file.mimeType) + append(HttpHeaders.ContentDisposition, "filename=\"${file.filename.string}\"") + } + ) + } + ) { + onUpload(onUpload) + }.bodyAsText() + return TemporalFileId(fileId) +} diff --git a/ktor/client/src/mingwX64Main/kotlin/ActualUniUpload.kt b/ktor/client/src/mingwX64Main/kotlin/ActualUniUpload.kt new file mode 100644 index 00000000000..4da3d874f80 --- /dev/null +++ b/ktor/client/src/mingwX64Main/kotlin/ActualUniUpload.kt @@ -0,0 +1,107 @@ +package dev.inmo.micro_utils.ktor.client + +import dev.inmo.micro_utils.common.MPPFile +import dev.inmo.micro_utils.common.Progress +import io.ktor.client.HttpClient +import io.ktor.client.engine.mergeHeaders +import io.ktor.client.plugins.onUpload +import io.ktor.client.request.HttpRequestBuilder +import io.ktor.client.request.forms.InputProvider +import io.ktor.client.request.forms.formData +import io.ktor.client.request.forms.submitForm +import io.ktor.client.request.forms.submitFormWithBinaryData +import io.ktor.client.request.headers +import io.ktor.client.statement.bodyAsText +import io.ktor.http.Headers +import io.ktor.http.HttpHeaders +import io.ktor.http.HttpStatusCode +import io.ktor.http.Parameters +import io.ktor.http.content.PartData +import kotlinx.serialization.DeserializationStrategy +import kotlinx.serialization.InternalSerializationApi +import kotlinx.serialization.SerializationStrategy +import kotlinx.serialization.StringFormat +import kotlinx.serialization.encodeToString +import kotlinx.serialization.serializer + +/** + * Will execute submitting of multipart data request + * + * @param data [Map] where keys will be used as names for multipart parts and values as values. If you will pass + * [dev.inmo.micro_utils.common.MPPFile] (File from JS or JVM platform). Also you may pass [UniUploadFileInfo] as value + * in case you wish to pass other source of multipart binary data than regular file + * @suppress + */ +@OptIn(InternalSerializationApi::class) +actual suspend fun HttpClient.uniUpload( + url: String, + data: Map, + resultDeserializer: DeserializationStrategy, + headers: Headers, + stringFormat: StringFormat, + onUpload: OnUploadCallback +): T? { + val withBinary = data.values.any { it is MPPFile || it is UniUploadFileInfo } + + val formData = formData { + for (k in data.keys) { + val v = data[k] ?: continue + when (v) { + is MPPFile -> append( + k, + v.inputProvider(), + Headers.build { + append(HttpHeaders.ContentType, v.mimeType) + append(HttpHeaders.ContentDisposition, "filename=\"${v.name}\"") + } + ) + is UniUploadFileInfo -> append( + k, + InputProvider(block = v.inputAllocator), + Headers.build { + append(HttpHeaders.ContentType, v.mimeType) + append(HttpHeaders.ContentDisposition, "filename=\"${v.fileName.name}\"") + } + ) + else -> append( + k, + stringFormat.encodeToString(v::class.serializer() as SerializationStrategy, v) + ) + } + } + } + + val requestBuilder: HttpRequestBuilder.() -> Unit = { + headers { + appendAll(headers) + } + onUpload { bytesSentTotal, contentLength -> + onUpload(bytesSentTotal, contentLength) + } + } + + val response = if (withBinary) { + submitFormWithBinaryData( + url, + formData, + block = requestBuilder + ) + } else { + submitForm( + url, + Parameters.build { + for (it in formData) { + val formItem = (it as PartData.FormItem) + append(it.name!!, it.value) + } + }, + block = requestBuilder + ) + } + + return if (response.status == HttpStatusCode.OK) { + stringFormat.decodeFromString(resultDeserializer, response.bodyAsText()) + } else { + null + } +} diff --git a/ktor/common/src/linuxX64Main/kotlin/ActualMPPFileInput.kt b/ktor/common/src/linuxX64Main/kotlin/ActualMPPFileInput.kt new file mode 100644 index 00000000000..71d65288dfb --- /dev/null +++ b/ktor/common/src/linuxX64Main/kotlin/ActualMPPFileInput.kt @@ -0,0 +1,33 @@ +package dev.inmo.micro_utils.ktor.common + +import dev.inmo.micro_utils.common.MPPFile +import io.ktor.utils.io.bits.Memory +import io.ktor.utils.io.bits.loadByteArray +import io.ktor.utils.io.core.Input +import okio.FileSystem +import okio.Path + +private class FileInput( + private val path: Path +) : Input() { + private val openedFile = FileSystem.SYSTEM.openReadOnly(path) + override fun closeSource() { + openedFile.close() + } + + override fun fill(destination: Memory, offset: Int, length: Int): Int { + val byteArray = ByteArray(length) + val read = openedFile.read(offset.toLong(), byteArray, 0, length) + destination.loadByteArray( + offset, + byteArray, + count = length + ) + return read + } +} + +actual fun MPPFile.input(): Input { + return FileInput(this) +} + diff --git a/ktor/common/src/mingwX64Main/kotlin/ActualMPPFileInput.kt b/ktor/common/src/mingwX64Main/kotlin/ActualMPPFileInput.kt new file mode 100644 index 00000000000..71d65288dfb --- /dev/null +++ b/ktor/common/src/mingwX64Main/kotlin/ActualMPPFileInput.kt @@ -0,0 +1,33 @@ +package dev.inmo.micro_utils.ktor.common + +import dev.inmo.micro_utils.common.MPPFile +import io.ktor.utils.io.bits.Memory +import io.ktor.utils.io.bits.loadByteArray +import io.ktor.utils.io.core.Input +import okio.FileSystem +import okio.Path + +private class FileInput( + private val path: Path +) : Input() { + private val openedFile = FileSystem.SYSTEM.openReadOnly(path) + override fun closeSource() { + openedFile.close() + } + + override fun fill(destination: Memory, offset: Int, length: Int): Int { + val byteArray = ByteArray(length) + val read = openedFile.read(offset.toLong(), byteArray, 0, length) + destination.loadByteArray( + offset, + byteArray, + count = length + ) + return read + } +} + +actual fun MPPFile.input(): Input { + return FileInput(this) +} + diff --git a/mime_types/mimes_generator/mime_generator.py b/mime_types/mimes_generator/mime_generator.py index ae0348f3ff5..0272c5c6c19 100644 --- a/mime_types/mimes_generator/mime_generator.py +++ b/mime_types/mimes_generator/mime_generator.py @@ -1,3 +1,5 @@ +import math + import requests from bs4 import BeautifulSoup import pandas as pd @@ -17,33 +19,45 @@ def fix_name(category, raw_name): result += out1 return result +def remove_prefix(text, prefix): + if text.startswith(prefix): + return text[len(prefix):] + return text # or whatever + +def extensionPreparationFun(extension): + return "\"%s\"" % (remove_prefix(extension, ".")) + # https://www.freeformatter.com/mime-types-list.html if __name__ == '__main__': - df = pd.read_html(open('table.html', 'r')) + df = pd.read_html(open('local.table.html', 'r')) mimes = [] for row in df[0].drop_duplicates(subset=['MIME Type / Internet Media Type'], keep='first').iterrows(): mime = row[1][1] + extensions = list() + if isinstance(row[1][2], str): + extensions = list(map(extensionPreparationFun, row[1][2].split(", "))) mime_category = mime.split('/', 1)[0] mime_name = mime.split('/', 1)[1] - mimes.append({ - 'mime_category': mime_category, - 'mime_name': mime_name, - }) + mimes.append([ + mime_category, + mime_name, + extensions + ]) # codegen - mimes.sort(key=lambda x: x['mime_category']) - grouped = itertools.groupby(mimes, lambda x: x['mime_category']) + mimes.sort(key=lambda x: x[0]) + grouped = itertools.groupby(mimes, lambda x: x[0]) code = '' code2 = 'internal val knownMimeTypes: Set = setOf(\n' code2 += ' KnownMimeTypes.Any,\n' for key, group in grouped: group_name = fix_name(group, key) - code += '@Serializable(MimeTypeSerializer::class)\nsealed class %s(raw: String) : MimeType, KnownMimeTypes(raw) {\n' % group_name + code += '@Serializable(MimeTypeSerializer::class)\nsealed class %s(raw: String, extensions: Array = emptyArray()) : MimeType, KnownMimeTypes(raw, extensions) {\n' % group_name code += ' @Serializable(MimeTypeSerializer::class)\n object Any: %s ("%s/*")\n' % (group_name, key) for mime in group: - name = fix_name(mime['mime_category'], mime['mime_name']) - code += ' @Serializable(MimeTypeSerializer::class)\n object %s: %s ("%s/%s")\n' % (name, group_name, mime['mime_category'], mime['mime_name']) + name = fix_name(mime[0], mime[1]) + code += ' @Serializable(MimeTypeSerializer::class)\n object %s: %s ("%s/%s", arrayOf(%s))\n' % (name, group_name, mime[0], mime[1], ", ".join(mime[2])) code2 += ' KnownMimeTypes.%s.%s,\n' % (group_name, name) code += '}\n\n' code2 += ')\n' diff --git a/mime_types/src/commonMain/kotlin/dev/inmo/micro_utils/mime_types/FilesExtensionsMap.kt b/mime_types/src/commonMain/kotlin/dev/inmo/micro_utils/mime_types/FilesExtensionsMap.kt new file mode 100644 index 00000000000..b3101f1a15d --- /dev/null +++ b/mime_types/src/commonMain/kotlin/dev/inmo/micro_utils/mime_types/FilesExtensionsMap.kt @@ -0,0 +1,24 @@ +package dev.inmo.micro_utils.mime_types + +val mimeTypesByExtensions: Map> by lazy { + val extensionsMap = mutableMapOf>() + + knownMimeTypes.forEach { mimeType -> + mimeType.extensions.forEach { + extensionsMap.getOrPut(it) { mutableListOf() }.add(mimeType) + } + } + + extensionsMap.mapValues { + it.value.toTypedArray() + } +} + +inline fun getMimeType( + stringWithExtension: String, + selector: (Array) -> MimeType? = { it.firstOrNull() } +) = mimeTypesByExtensions[stringWithExtension.takeLastWhile { it != '.' }] ?.takeIf { it.isNotEmpty() } ?.let(selector) +inline fun getMimeTypeOrAny( + stringWithExtension: String, + selector: (Array) -> MimeType? = { it.firstOrNull() } +) = getMimeType(stringWithExtension, selector) ?: KnownMimeTypes.Any diff --git a/mime_types/src/commonMain/kotlin/dev/inmo/micro_utils/mime_types/KnownMimeTypes.kt b/mime_types/src/commonMain/kotlin/dev/inmo/micro_utils/mime_types/KnownMimeTypes.kt index 1608e3a2fde..17c0fa25854 100644 --- a/mime_types/src/commonMain/kotlin/dev/inmo/micro_utils/mime_types/KnownMimeTypes.kt +++ b/mime_types/src/commonMain/kotlin/dev/inmo/micro_utils/mime_types/KnownMimeTypes.kt @@ -5,1460 +5,1460 @@ package dev.inmo.micro_utils.mime_types import kotlinx.serialization.Serializable @Serializable(MimeTypeSerializer::class) -sealed class KnownMimeTypes(override val raw: String) : MimeType { +sealed class KnownMimeTypes(override val raw: String, override val extensions: Array = emptyArray()) : MimeType { object Any : MimeType, KnownMimeTypes("*/*") @Serializable(MimeTypeSerializer::class) - sealed class Application(raw: String) : MimeType, KnownMimeTypes(raw) { + sealed class Application(raw: String, extensions: Array = emptyArray()) : MimeType, KnownMimeTypes(raw, extensions) { @Serializable(MimeTypeSerializer::class) object Any: Application ("application/*") @Serializable(MimeTypeSerializer::class) - object VndHzn3dCrossword: Application ("application/vnd.hzn-3d-crossword") + object VndHzn3dCrossword: Application ("application/vnd.hzn-3d-crossword", arrayOf("x3d")) @Serializable(MimeTypeSerializer::class) - object VndMseq: Application ("application/vnd.mseq") + object VndMseq: Application ("application/vnd.mseq", arrayOf("mseq")) @Serializable(MimeTypeSerializer::class) - object Vnd3mPostItNotes: Application ("application/vnd.3m.post-it-notes") + object Vnd3mPostItNotes: Application ("application/vnd.3m.post-it-notes", arrayOf("pwn")) @Serializable(MimeTypeSerializer::class) - object Vnd3gppPicBwLarge: Application ("application/vnd.3gpp.pic-bw-large") + object Vnd3gppPicBwLarge: Application ("application/vnd.3gpp.pic-bw-large", arrayOf("plb")) @Serializable(MimeTypeSerializer::class) - object Vnd3gppPicBwSmall: Application ("application/vnd.3gpp.pic-bw-small") + object Vnd3gppPicBwSmall: Application ("application/vnd.3gpp.pic-bw-small", arrayOf("psb")) @Serializable(MimeTypeSerializer::class) - object Vnd3gppPicBwVar: Application ("application/vnd.3gpp.pic-bw-var") + object Vnd3gppPicBwVar: Application ("application/vnd.3gpp.pic-bw-var", arrayOf("pvb")) @Serializable(MimeTypeSerializer::class) - object Vnd3gpp2Tcap: Application ("application/vnd.3gpp2.tcap") + object Vnd3gpp2Tcap: Application ("application/vnd.3gpp2.tcap", arrayOf("tcap")) @Serializable(MimeTypeSerializer::class) - object X7zCompressed: Application ("application/x-7z-compressed") + object X7zCompressed: Application ("application/x-7z-compressed", arrayOf("7z")) @Serializable(MimeTypeSerializer::class) - object XAbiword: Application ("application/x-abiword") + object XAbiword: Application ("application/x-abiword", arrayOf("abw")) @Serializable(MimeTypeSerializer::class) - object XAceCompressed: Application ("application/x-ace-compressed") + object XAceCompressed: Application ("application/x-ace-compressed", arrayOf("ace")) @Serializable(MimeTypeSerializer::class) - object VndAmericandynamicsAcc: Application ("application/vnd.americandynamics.acc") + object VndAmericandynamicsAcc: Application ("application/vnd.americandynamics.acc", arrayOf("acc")) @Serializable(MimeTypeSerializer::class) - object VndAcucobol: Application ("application/vnd.acucobol") + object VndAcucobol: Application ("application/vnd.acucobol", arrayOf("acu")) @Serializable(MimeTypeSerializer::class) - object VndAcucorp: Application ("application/vnd.acucorp") + object VndAcucorp: Application ("application/vnd.acucorp", arrayOf("atc")) @Serializable(MimeTypeSerializer::class) - object XAuthorwareBin: Application ("application/x-authorware-bin") + object XAuthorwareBin: Application ("application/x-authorware-bin", arrayOf("aab")) @Serializable(MimeTypeSerializer::class) - object XAuthorwareMap: Application ("application/x-authorware-map") + object XAuthorwareMap: Application ("application/x-authorware-map", arrayOf("aam")) @Serializable(MimeTypeSerializer::class) - object XAuthorwareSeg: Application ("application/x-authorware-seg") + object XAuthorwareSeg: Application ("application/x-authorware-seg", arrayOf("aas")) @Serializable(MimeTypeSerializer::class) - object VndAdobeAirApplicationInstallerPackageZip: Application ("application/vnd.adobe.air-application-installer-package+zip") + object VndAdobeAirApplicationInstallerPackageZip: Application ("application/vnd.adobe.air-application-installer-package+zip", arrayOf("air")) @Serializable(MimeTypeSerializer::class) - object XShockwaveFlash: Application ("application/x-shockwave-flash") + object XShockwaveFlash: Application ("application/x-shockwave-flash", arrayOf("swf")) @Serializable(MimeTypeSerializer::class) - object VndAdobeFxp: Application ("application/vnd.adobe.fxp") + object VndAdobeFxp: Application ("application/vnd.adobe.fxp", arrayOf("fxp")) @Serializable(MimeTypeSerializer::class) - object Pdf: Application ("application/pdf") + object Pdf: Application ("application/pdf", arrayOf("pdf")) @Serializable(MimeTypeSerializer::class) - object VndCupsPpd: Application ("application/vnd.cups-ppd") + object VndCupsPpd: Application ("application/vnd.cups-ppd", arrayOf("ppd")) @Serializable(MimeTypeSerializer::class) - object XDirector: Application ("application/x-director") + object XDirector: Application ("application/x-director", arrayOf("dir")) @Serializable(MimeTypeSerializer::class) - object VndAdobeXdpXml: Application ("application/vnd.adobe.xdp+xml") + object VndAdobeXdpXml: Application ("application/vnd.adobe.xdp+xml", arrayOf("xdp")) @Serializable(MimeTypeSerializer::class) - object VndAdobeXfdf: Application ("application/vnd.adobe.xfdf") + object VndAdobeXfdf: Application ("application/vnd.adobe.xfdf", arrayOf("xfdf")) @Serializable(MimeTypeSerializer::class) - object VndAheadSpace: Application ("application/vnd.ahead.space") + object VndAheadSpace: Application ("application/vnd.ahead.space", arrayOf("ahead")) @Serializable(MimeTypeSerializer::class) - object VndAirzipFilesecureAzf: Application ("application/vnd.airzip.filesecure.azf") + object VndAirzipFilesecureAzf: Application ("application/vnd.airzip.filesecure.azf", arrayOf("azf")) @Serializable(MimeTypeSerializer::class) - object VndAirzipFilesecureAzs: Application ("application/vnd.airzip.filesecure.azs") + object VndAirzipFilesecureAzs: Application ("application/vnd.airzip.filesecure.azs", arrayOf("azs")) @Serializable(MimeTypeSerializer::class) - object VndAmazonEbook: Application ("application/vnd.amazon.ebook") + object VndAmazonEbook: Application ("application/vnd.amazon.ebook", arrayOf("azw")) @Serializable(MimeTypeSerializer::class) - object VndAmigaAmi: Application ("application/vnd.amiga.ami") + object VndAmigaAmi: Application ("application/vnd.amiga.ami", arrayOf("ami")) @Serializable(MimeTypeSerializer::class) - object AndrewInset: Application ("application/andrew-inset") + object AndrewInset: Application ("application/andrew-inset", arrayOf()) @Serializable(MimeTypeSerializer::class) - object VndAndroidPackageArchive: Application ("application/vnd.android.package-archive") + object VndAndroidPackageArchive: Application ("application/vnd.android.package-archive", arrayOf("apk")) @Serializable(MimeTypeSerializer::class) - object VndAnserWebCertificateIssueInitiation: Application ("application/vnd.anser-web-certificate-issue-initiation") + object VndAnserWebCertificateIssueInitiation: Application ("application/vnd.anser-web-certificate-issue-initiation", arrayOf("cii")) @Serializable(MimeTypeSerializer::class) - object VndAnserWebFundsTransferInitiation: Application ("application/vnd.anser-web-funds-transfer-initiation") + object VndAnserWebFundsTransferInitiation: Application ("application/vnd.anser-web-funds-transfer-initiation", arrayOf("fti")) @Serializable(MimeTypeSerializer::class) - object VndAntixGameComponent: Application ("application/vnd.antix.game-component") + object VndAntixGameComponent: Application ("application/vnd.antix.game-component", arrayOf("atx")) @Serializable(MimeTypeSerializer::class) - object XAppleDiskimage: Application ("application/x-apple-diskimage") + object XAppleDiskimage: Application ("application/x-apple-diskimage", arrayOf("dmg")) @Serializable(MimeTypeSerializer::class) - object VndAppleInstallerXml: Application ("application/vnd.apple.installer+xml") + object VndAppleInstallerXml: Application ("application/vnd.apple.installer+xml", arrayOf("mpkg")) @Serializable(MimeTypeSerializer::class) - object Applixware: Application ("application/applixware") + object Applixware: Application ("application/applixware", arrayOf("aw")) @Serializable(MimeTypeSerializer::class) - object VndHheLessonPlayer: Application ("application/vnd.hhe.lesson-player") + object VndHheLessonPlayer: Application ("application/vnd.hhe.lesson-player", arrayOf("les")) @Serializable(MimeTypeSerializer::class) - object XFreearc: Application ("application/x-freearc") + object XFreearc: Application ("application/x-freearc", arrayOf("arc")) @Serializable(MimeTypeSerializer::class) - object VndAristanetworksSwi: Application ("application/vnd.aristanetworks.swi") + object VndAristanetworksSwi: Application ("application/vnd.aristanetworks.swi", arrayOf("swi")) @Serializable(MimeTypeSerializer::class) - object AtomcatXml: Application ("application/atomcat+xml") + object AtomcatXml: Application ("application/atomcat+xml", arrayOf("atomcat")) @Serializable(MimeTypeSerializer::class) - object AtomsvcXml: Application ("application/atomsvc+xml") + object AtomsvcXml: Application ("application/atomsvc+xml", arrayOf("atomsvc")) @Serializable(MimeTypeSerializer::class) - object AtomXml: Application ("application/atom+xml") + object AtomXml: Application ("application/atom+xml", arrayOf("atom", "xml")) @Serializable(MimeTypeSerializer::class) - object PkixAttrCert: Application ("application/pkix-attr-cert") + object PkixAttrCert: Application ("application/pkix-attr-cert", arrayOf("ac")) @Serializable(MimeTypeSerializer::class) - object VndAudiograph: Application ("application/vnd.audiograph") + object VndAudiograph: Application ("application/vnd.audiograph", arrayOf("aep")) @Serializable(MimeTypeSerializer::class) - object XBcpio: Application ("application/x-bcpio") + object XBcpio: Application ("application/x-bcpio", arrayOf("bcpio")) @Serializable(MimeTypeSerializer::class) - object OctetStream: Application ("application/octet-stream") + object OctetStream: Application ("application/octet-stream", arrayOf("bin")) @Serializable(MimeTypeSerializer::class) - object XBittorrent: Application ("application/x-bittorrent") + object XBittorrent: Application ("application/x-bittorrent", arrayOf("torrent")) @Serializable(MimeTypeSerializer::class) - object VndRimCod: Application ("application/vnd.rim.cod") + object VndRimCod: Application ("application/vnd.rim.cod", arrayOf("cod")) @Serializable(MimeTypeSerializer::class) - object VndBlueiceMultipass: Application ("application/vnd.blueice.multipass") + object VndBlueiceMultipass: Application ("application/vnd.blueice.multipass", arrayOf("mpm")) @Serializable(MimeTypeSerializer::class) - object VndBmi: Application ("application/vnd.bmi") + object VndBmi: Application ("application/vnd.bmi", arrayOf("bmi")) @Serializable(MimeTypeSerializer::class) - object XSh: Application ("application/x-sh") + object XSh: Application ("application/x-sh", arrayOf("sh")) @Serializable(MimeTypeSerializer::class) - object VndBusinessobjects: Application ("application/vnd.businessobjects") + object VndBusinessobjects: Application ("application/vnd.businessobjects", arrayOf("rep")) @Serializable(MimeTypeSerializer::class) - object XBzip: Application ("application/x-bzip") + object XBzip: Application ("application/x-bzip", arrayOf("bz")) @Serializable(MimeTypeSerializer::class) - object XBzip2: Application ("application/x-bzip2") + object XBzip2: Application ("application/x-bzip2", arrayOf("bz2")) @Serializable(MimeTypeSerializer::class) - object XCsh: Application ("application/x-csh") + object XCsh: Application ("application/x-csh", arrayOf("csh")) @Serializable(MimeTypeSerializer::class) - object VndChemdrawXml: Application ("application/vnd.chemdraw+xml") + object VndChemdrawXml: Application ("application/vnd.chemdraw+xml", arrayOf("cdxml")) @Serializable(MimeTypeSerializer::class) - object XCdf: Application ("application/x-cdf") + object XCdf: Application ("application/x-cdf", arrayOf("cda")) @Serializable(MimeTypeSerializer::class) - object VndContactCmsg: Application ("application/vnd.contact.cmsg") + object VndContactCmsg: Application ("application/vnd.contact.cmsg", arrayOf("cdbcmsg")) @Serializable(MimeTypeSerializer::class) - object VndClaymore: Application ("application/vnd.claymore") + object VndClaymore: Application ("application/vnd.claymore", arrayOf("cla")) @Serializable(MimeTypeSerializer::class) - object VndClonkC4group: Application ("application/vnd.clonk.c4group") + object VndClonkC4group: Application ("application/vnd.clonk.c4group", arrayOf("c4g")) @Serializable(MimeTypeSerializer::class) - object CdmiCapability: Application ("application/cdmi-capability") + object CdmiCapability: Application ("application/cdmi-capability", arrayOf("cdmia")) @Serializable(MimeTypeSerializer::class) - object CdmiContainer: Application ("application/cdmi-container") + object CdmiContainer: Application ("application/cdmi-container", arrayOf("cdmic")) @Serializable(MimeTypeSerializer::class) - object CdmiDomain: Application ("application/cdmi-domain") + object CdmiDomain: Application ("application/cdmi-domain", arrayOf("cdmid")) @Serializable(MimeTypeSerializer::class) - object CdmiObject: Application ("application/cdmi-object") + object CdmiObject: Application ("application/cdmi-object", arrayOf("cdmio")) @Serializable(MimeTypeSerializer::class) - object CdmiQueue: Application ("application/cdmi-queue") + object CdmiQueue: Application ("application/cdmi-queue", arrayOf("cdmiq")) @Serializable(MimeTypeSerializer::class) - object VndCluetrustCartomobileConfig: Application ("application/vnd.cluetrust.cartomobile-config") + object VndCluetrustCartomobileConfig: Application ("application/vnd.cluetrust.cartomobile-config", arrayOf("c11amc")) @Serializable(MimeTypeSerializer::class) - object VndCluetrustCartomobileConfigPkg: Application ("application/vnd.cluetrust.cartomobile-config-pkg") + object VndCluetrustCartomobileConfigPkg: Application ("application/vnd.cluetrust.cartomobile-config-pkg", arrayOf("c11amz")) @Serializable(MimeTypeSerializer::class) - object MacCompactpro: Application ("application/mac-compactpro") + object MacCompactpro: Application ("application/mac-compactpro", arrayOf("cpt")) @Serializable(MimeTypeSerializer::class) - object VndWapWmlc: Application ("application/vnd.wap.wmlc") + object VndWapWmlc: Application ("application/vnd.wap.wmlc", arrayOf("wmlc")) @Serializable(MimeTypeSerializer::class) - object VndXara: Application ("application/vnd.xara") + object VndXara: Application ("application/vnd.xara", arrayOf("xar")) @Serializable(MimeTypeSerializer::class) - object VndCosmocaller: Application ("application/vnd.cosmocaller") + object VndCosmocaller: Application ("application/vnd.cosmocaller", arrayOf("cmc")) @Serializable(MimeTypeSerializer::class) - object XCpio: Application ("application/x-cpio") + object XCpio: Application ("application/x-cpio", arrayOf("cpio")) @Serializable(MimeTypeSerializer::class) - object VndCrickClicker: Application ("application/vnd.crick.clicker") + object VndCrickClicker: Application ("application/vnd.crick.clicker", arrayOf("clkx")) @Serializable(MimeTypeSerializer::class) - object VndCrickClickerKeyboard: Application ("application/vnd.crick.clicker.keyboard") + object VndCrickClickerKeyboard: Application ("application/vnd.crick.clicker.keyboard", arrayOf("clkk")) @Serializable(MimeTypeSerializer::class) - object VndCrickClickerPalette: Application ("application/vnd.crick.clicker.palette") + object VndCrickClickerPalette: Application ("application/vnd.crick.clicker.palette", arrayOf("clkp")) @Serializable(MimeTypeSerializer::class) - object VndCrickClickerTemplate: Application ("application/vnd.crick.clicker.template") + object VndCrickClickerTemplate: Application ("application/vnd.crick.clicker.template", arrayOf("clkt")) @Serializable(MimeTypeSerializer::class) - object VndCrickClickerWordbank: Application ("application/vnd.crick.clicker.wordbank") + object VndCrickClickerWordbank: Application ("application/vnd.crick.clicker.wordbank", arrayOf("clkw")) @Serializable(MimeTypeSerializer::class) - object VndCriticaltoolsWbsXml: Application ("application/vnd.criticaltools.wbs+xml") + object VndCriticaltoolsWbsXml: Application ("application/vnd.criticaltools.wbs+xml", arrayOf("wbs")) @Serializable(MimeTypeSerializer::class) - object VndRigCryptonote: Application ("application/vnd.rig.cryptonote") + object VndRigCryptonote: Application ("application/vnd.rig.cryptonote", arrayOf("cryptonote")) @Serializable(MimeTypeSerializer::class) - object CuSeeme: Application ("application/cu-seeme") + object CuSeeme: Application ("application/cu-seeme", arrayOf("cu")) @Serializable(MimeTypeSerializer::class) - object PrsCww: Application ("application/prs.cww") + object PrsCww: Application ("application/prs.cww", arrayOf("cww")) @Serializable(MimeTypeSerializer::class) - object VndCurlCar: Application ("application/vnd.curl.car") + object VndCurlCar: Application ("application/vnd.curl.car", arrayOf("car")) @Serializable(MimeTypeSerializer::class) - object VndCurlPcurl: Application ("application/vnd.curl.pcurl") + object VndCurlPcurl: Application ("application/vnd.curl.pcurl", arrayOf("pcurl")) @Serializable(MimeTypeSerializer::class) - object VndYellowriverCustomMenu: Application ("application/vnd.yellowriver-custom-menu") + object VndYellowriverCustomMenu: Application ("application/vnd.yellowriver-custom-menu", arrayOf("cmp")) @Serializable(MimeTypeSerializer::class) - object DsscDer: Application ("application/dssc+der") + object DsscDer: Application ("application/dssc+der", arrayOf("dssc")) @Serializable(MimeTypeSerializer::class) - object DsscXml: Application ("application/dssc+xml") + object DsscXml: Application ("application/dssc+xml", arrayOf("xdssc")) @Serializable(MimeTypeSerializer::class) - object XDebianPackage: Application ("application/x-debian-package") + object XDebianPackage: Application ("application/x-debian-package", arrayOf("deb")) @Serializable(MimeTypeSerializer::class) - object XDvi: Application ("application/x-dvi") + object XDvi: Application ("application/x-dvi", arrayOf("dvi")) @Serializable(MimeTypeSerializer::class) - object VndFdsnSeed: Application ("application/vnd.fdsn.seed") + object VndFdsnSeed: Application ("application/vnd.fdsn.seed", arrayOf("seed")) @Serializable(MimeTypeSerializer::class) - object XDtbookXml: Application ("application/x-dtbook+xml") + object XDtbookXml: Application ("application/x-dtbook+xml", arrayOf("dtb")) @Serializable(MimeTypeSerializer::class) - object XDtbresourceXml: Application ("application/x-dtbresource+xml") + object XDtbresourceXml: Application ("application/x-dtbresource+xml", arrayOf("res")) @Serializable(MimeTypeSerializer::class) - object VndDvbAit: Application ("application/vnd.dvb.ait") + object VndDvbAit: Application ("application/vnd.dvb.ait", arrayOf("ait")) @Serializable(MimeTypeSerializer::class) - object VndDvbService: Application ("application/vnd.dvb.service") + object VndDvbService: Application ("application/vnd.dvb.service", arrayOf("svc")) @Serializable(MimeTypeSerializer::class) - object XmlDtd: Application ("application/xml-dtd") + object XmlDtd: Application ("application/xml-dtd", arrayOf("dtd")) @Serializable(MimeTypeSerializer::class) - object VndDolbyMlp: Application ("application/vnd.dolby.mlp") + object VndDolbyMlp: Application ("application/vnd.dolby.mlp", arrayOf("mlp")) @Serializable(MimeTypeSerializer::class) - object XDoom: Application ("application/x-doom") + object XDoom: Application ("application/x-doom", arrayOf("wad")) @Serializable(MimeTypeSerializer::class) - object VndDpgraph: Application ("application/vnd.dpgraph") + object VndDpgraph: Application ("application/vnd.dpgraph", arrayOf("dpg")) @Serializable(MimeTypeSerializer::class) - object VndDreamfactory: Application ("application/vnd.dreamfactory") + object VndDreamfactory: Application ("application/vnd.dreamfactory", arrayOf("dfac")) @Serializable(MimeTypeSerializer::class) - object VndDynageo: Application ("application/vnd.dynageo") + object VndDynageo: Application ("application/vnd.dynageo", arrayOf("geo")) @Serializable(MimeTypeSerializer::class) - object Ecmascript: Application ("application/ecmascript") + object Ecmascript: Application ("application/ecmascript", arrayOf("es")) @Serializable(MimeTypeSerializer::class) - object VndEcowinChart: Application ("application/vnd.ecowin.chart") + object VndEcowinChart: Application ("application/vnd.ecowin.chart", arrayOf("mag")) @Serializable(MimeTypeSerializer::class) - object Exi: Application ("application/exi") + object Exi: Application ("application/exi", arrayOf("exi")) @Serializable(MimeTypeSerializer::class) - object VndProteusMagazine: Application ("application/vnd.proteus.magazine") + object VndProteusMagazine: Application ("application/vnd.proteus.magazine", arrayOf("mgz")) @Serializable(MimeTypeSerializer::class) - object EpubZip: Application ("application/epub+zip") + object EpubZip: Application ("application/epub+zip", arrayOf("epub")) @Serializable(MimeTypeSerializer::class) - object VndEnliven: Application ("application/vnd.enliven") + object VndEnliven: Application ("application/vnd.enliven", arrayOf("nml")) @Serializable(MimeTypeSerializer::class) - object VndIsXpr: Application ("application/vnd.is-xpr") + object VndIsXpr: Application ("application/vnd.is-xpr", arrayOf("xpr")) @Serializable(MimeTypeSerializer::class) - object VndXfdl: Application ("application/vnd.xfdl") + object VndXfdl: Application ("application/vnd.xfdl", arrayOf("xfdl")) @Serializable(MimeTypeSerializer::class) - object EmmaXml: Application ("application/emma+xml") + object EmmaXml: Application ("application/emma+xml", arrayOf("emma")) @Serializable(MimeTypeSerializer::class) - object VndEzpixAlbum: Application ("application/vnd.ezpix-album") + object VndEzpixAlbum: Application ("application/vnd.ezpix-album", arrayOf("ez2")) @Serializable(MimeTypeSerializer::class) - object VndEzpixPackage: Application ("application/vnd.ezpix-package") + object VndEzpixPackage: Application ("application/vnd.ezpix-package", arrayOf("ez3")) @Serializable(MimeTypeSerializer::class) - object VndDenovoFcselayoutLink: Application ("application/vnd.denovo.fcselayout-link") + object VndDenovoFcselayoutLink: Application ("application/vnd.denovo.fcselayout-link", arrayOf("fe_launch")) @Serializable(MimeTypeSerializer::class) - object VndFluxtimeClip: Application ("application/vnd.fluxtime.clip") + object VndFluxtimeClip: Application ("application/vnd.fluxtime.clip", arrayOf("ftc")) @Serializable(MimeTypeSerializer::class) - object VndFdf: Application ("application/vnd.fdf") + object VndFdf: Application ("application/vnd.fdf", arrayOf("fdf")) @Serializable(MimeTypeSerializer::class) - object VndMif: Application ("application/vnd.mif") + object VndMif: Application ("application/vnd.mif", arrayOf("mif")) @Serializable(MimeTypeSerializer::class) - object VndFramemaker: Application ("application/vnd.framemaker") + object VndFramemaker: Application ("application/vnd.framemaker", arrayOf("fm")) @Serializable(MimeTypeSerializer::class) - object VndFscWeblaunch: Application ("application/vnd.fsc.weblaunch") + object VndFscWeblaunch: Application ("application/vnd.fsc.weblaunch", arrayOf("fsc")) @Serializable(MimeTypeSerializer::class) - object VndFrogansFnc: Application ("application/vnd.frogans.fnc") + object VndFrogansFnc: Application ("application/vnd.frogans.fnc", arrayOf("fnc")) @Serializable(MimeTypeSerializer::class) - object VndFrogansLtf: Application ("application/vnd.frogans.ltf") + object VndFrogansLtf: Application ("application/vnd.frogans.ltf", arrayOf("ltf")) @Serializable(MimeTypeSerializer::class) - object VndFujixeroxDdd: Application ("application/vnd.fujixerox.ddd") + object VndFujixeroxDdd: Application ("application/vnd.fujixerox.ddd", arrayOf("ddd")) @Serializable(MimeTypeSerializer::class) - object VndFujixeroxDocuworks: Application ("application/vnd.fujixerox.docuworks") + object VndFujixeroxDocuworks: Application ("application/vnd.fujixerox.docuworks", arrayOf("xdw")) @Serializable(MimeTypeSerializer::class) - object VndFujixeroxDocuworksBinder: Application ("application/vnd.fujixerox.docuworks.binder") + object VndFujixeroxDocuworksBinder: Application ("application/vnd.fujixerox.docuworks.binder", arrayOf("xbd")) @Serializable(MimeTypeSerializer::class) - object VndFujitsuOasys: Application ("application/vnd.fujitsu.oasys") + object VndFujitsuOasys: Application ("application/vnd.fujitsu.oasys", arrayOf("oas")) @Serializable(MimeTypeSerializer::class) - object VndFujitsuOasys2: Application ("application/vnd.fujitsu.oasys2") + object VndFujitsuOasys2: Application ("application/vnd.fujitsu.oasys2", arrayOf("oa2")) @Serializable(MimeTypeSerializer::class) - object VndFujitsuOasys3: Application ("application/vnd.fujitsu.oasys3") + object VndFujitsuOasys3: Application ("application/vnd.fujitsu.oasys3", arrayOf("oa3")) @Serializable(MimeTypeSerializer::class) - object VndFujitsuOasysgp: Application ("application/vnd.fujitsu.oasysgp") + object VndFujitsuOasysgp: Application ("application/vnd.fujitsu.oasysgp", arrayOf("fg5")) @Serializable(MimeTypeSerializer::class) - object VndFujitsuOasysprs: Application ("application/vnd.fujitsu.oasysprs") + object VndFujitsuOasysprs: Application ("application/vnd.fujitsu.oasysprs", arrayOf("bh2")) @Serializable(MimeTypeSerializer::class) - object XFuturesplash: Application ("application/x-futuresplash") + object XFuturesplash: Application ("application/x-futuresplash", arrayOf("spl")) @Serializable(MimeTypeSerializer::class) - object VndFuzzysheet: Application ("application/vnd.fuzzysheet") + object VndFuzzysheet: Application ("application/vnd.fuzzysheet", arrayOf("fzs")) @Serializable(MimeTypeSerializer::class) - object VndGmx: Application ("application/vnd.gmx") + object VndGmx: Application ("application/vnd.gmx", arrayOf("gmx")) @Serializable(MimeTypeSerializer::class) - object VndGenomatixTuxedo: Application ("application/vnd.genomatix.tuxedo") + object VndGenomatixTuxedo: Application ("application/vnd.genomatix.tuxedo", arrayOf("txd")) @Serializable(MimeTypeSerializer::class) - object VndGeogebraFile: Application ("application/vnd.geogebra.file") + object VndGeogebraFile: Application ("application/vnd.geogebra.file", arrayOf("ggb")) @Serializable(MimeTypeSerializer::class) - object VndGeogebraTool: Application ("application/vnd.geogebra.tool") + object VndGeogebraTool: Application ("application/vnd.geogebra.tool", arrayOf("ggt")) @Serializable(MimeTypeSerializer::class) - object VndGeometryExplorer: Application ("application/vnd.geometry-explorer") + object VndGeometryExplorer: Application ("application/vnd.geometry-explorer", arrayOf("gex")) @Serializable(MimeTypeSerializer::class) - object VndGeonext: Application ("application/vnd.geonext") + object VndGeonext: Application ("application/vnd.geonext", arrayOf("gxt")) @Serializable(MimeTypeSerializer::class) - object VndGeoplan: Application ("application/vnd.geoplan") + object VndGeoplan: Application ("application/vnd.geoplan", arrayOf("g2w")) @Serializable(MimeTypeSerializer::class) - object VndGeospace: Application ("application/vnd.geospace") + object VndGeospace: Application ("application/vnd.geospace", arrayOf("g3w")) @Serializable(MimeTypeSerializer::class) - object XFontGhostscript: Application ("application/x-font-ghostscript") + object XFontGhostscript: Application ("application/x-font-ghostscript", arrayOf("gsf")) @Serializable(MimeTypeSerializer::class) - object XFontBdf: Application ("application/x-font-bdf") + object XFontBdf: Application ("application/x-font-bdf", arrayOf("bdf")) @Serializable(MimeTypeSerializer::class) - object XGtar: Application ("application/x-gtar") + object XGtar: Application ("application/x-gtar", arrayOf("gtar")) @Serializable(MimeTypeSerializer::class) - object XTexinfo: Application ("application/x-texinfo") + object XTexinfo: Application ("application/x-texinfo", arrayOf("texinfo")) @Serializable(MimeTypeSerializer::class) - object XGnumeric: Application ("application/x-gnumeric") + object XGnumeric: Application ("application/x-gnumeric", arrayOf("gnumeric")) @Serializable(MimeTypeSerializer::class) - object VndGoogleEarthKmlXml: Application ("application/vnd.google-earth.kml+xml") + object VndGoogleEarthKmlXml: Application ("application/vnd.google-earth.kml+xml", arrayOf("kml")) @Serializable(MimeTypeSerializer::class) - object VndGoogleEarthKmz: Application ("application/vnd.google-earth.kmz") + object VndGoogleEarthKmz: Application ("application/vnd.google-earth.kmz", arrayOf("kmz")) @Serializable(MimeTypeSerializer::class) - object GpxXml: Application ("application/gpx+xml") + object GpxXml: Application ("application/gpx+xml", arrayOf("gpx")) @Serializable(MimeTypeSerializer::class) - object VndGrafeq: Application ("application/vnd.grafeq") + object VndGrafeq: Application ("application/vnd.grafeq", arrayOf("gqf")) @Serializable(MimeTypeSerializer::class) - object VndGrooveAccount: Application ("application/vnd.groove-account") + object VndGrooveAccount: Application ("application/vnd.groove-account", arrayOf("gac")) @Serializable(MimeTypeSerializer::class) - object VndGrooveHelp: Application ("application/vnd.groove-help") + object VndGrooveHelp: Application ("application/vnd.groove-help", arrayOf("ghf")) @Serializable(MimeTypeSerializer::class) - object VndGrooveIdentityMessage: Application ("application/vnd.groove-identity-message") + object VndGrooveIdentityMessage: Application ("application/vnd.groove-identity-message", arrayOf("gim")) @Serializable(MimeTypeSerializer::class) - object VndGrooveInjector: Application ("application/vnd.groove-injector") + object VndGrooveInjector: Application ("application/vnd.groove-injector", arrayOf("grv")) @Serializable(MimeTypeSerializer::class) - object VndGrooveToolMessage: Application ("application/vnd.groove-tool-message") + object VndGrooveToolMessage: Application ("application/vnd.groove-tool-message", arrayOf("gtm")) @Serializable(MimeTypeSerializer::class) - object VndGrooveToolTemplate: Application ("application/vnd.groove-tool-template") + object VndGrooveToolTemplate: Application ("application/vnd.groove-tool-template", arrayOf("tpl")) @Serializable(MimeTypeSerializer::class) - object VndGrooveVcard: Application ("application/vnd.groove-vcard") + object VndGrooveVcard: Application ("application/vnd.groove-vcard", arrayOf("vcg")) @Serializable(MimeTypeSerializer::class) - object Gzip: Application ("application/gzip") + object Gzip: Application ("application/gzip", arrayOf("gz")) @Serializable(MimeTypeSerializer::class) - object VndHpHpid: Application ("application/vnd.hp-hpid") + object VndHpHpid: Application ("application/vnd.hp-hpid", arrayOf("hpid")) @Serializable(MimeTypeSerializer::class) - object VndHpHps: Application ("application/vnd.hp-hps") + object VndHpHps: Application ("application/vnd.hp-hps", arrayOf("hps")) @Serializable(MimeTypeSerializer::class) - object XHdf: Application ("application/x-hdf") + object XHdf: Application ("application/x-hdf", arrayOf("hdf")) @Serializable(MimeTypeSerializer::class) - object VndHbci: Application ("application/vnd.hbci") + object VndHbci: Application ("application/vnd.hbci", arrayOf("hbci")) @Serializable(MimeTypeSerializer::class) - object VndHpJlyt: Application ("application/vnd.hp-jlyt") + object VndHpJlyt: Application ("application/vnd.hp-jlyt", arrayOf("jlt")) @Serializable(MimeTypeSerializer::class) - object VndHpPcl: Application ("application/vnd.hp-pcl") + object VndHpPcl: Application ("application/vnd.hp-pcl", arrayOf("pcl")) @Serializable(MimeTypeSerializer::class) - object VndHpHpgl: Application ("application/vnd.hp-hpgl") + object VndHpHpgl: Application ("application/vnd.hp-hpgl", arrayOf("hpgl")) @Serializable(MimeTypeSerializer::class) - object VndYamahaHvScript: Application ("application/vnd.yamaha.hv-script") + object VndYamahaHvScript: Application ("application/vnd.yamaha.hv-script", arrayOf("hvs")) @Serializable(MimeTypeSerializer::class) - object VndYamahaHvDic: Application ("application/vnd.yamaha.hv-dic") + object VndYamahaHvDic: Application ("application/vnd.yamaha.hv-dic", arrayOf("hvd")) @Serializable(MimeTypeSerializer::class) - object VndYamahaHvVoice: Application ("application/vnd.yamaha.hv-voice") + object VndYamahaHvVoice: Application ("application/vnd.yamaha.hv-voice", arrayOf("hvp")) @Serializable(MimeTypeSerializer::class) - object VndHydrostatixSofData: Application ("application/vnd.hydrostatix.sof-data") + object VndHydrostatixSofData: Application ("application/vnd.hydrostatix.sof-data", arrayOf("sfd-hdstx")) @Serializable(MimeTypeSerializer::class) - object Hyperstudio: Application ("application/hyperstudio") + object Hyperstudio: Application ("application/hyperstudio", arrayOf("stk")) @Serializable(MimeTypeSerializer::class) - object VndHalXml: Application ("application/vnd.hal+xml") + object VndHalXml: Application ("application/vnd.hal+xml", arrayOf("hal")) @Serializable(MimeTypeSerializer::class) - object VndIbmRightsManagement: Application ("application/vnd.ibm.rights-management") + object VndIbmRightsManagement: Application ("application/vnd.ibm.rights-management", arrayOf("irm")) @Serializable(MimeTypeSerializer::class) - object VndIbmSecureContainer: Application ("application/vnd.ibm.secure-container") + object VndIbmSecureContainer: Application ("application/vnd.ibm.secure-container", arrayOf("sc")) @Serializable(MimeTypeSerializer::class) - object VndIccprofile: Application ("application/vnd.iccprofile") + object VndIccprofile: Application ("application/vnd.iccprofile", arrayOf("icc")) @Serializable(MimeTypeSerializer::class) - object VndIgloader: Application ("application/vnd.igloader") + object VndIgloader: Application ("application/vnd.igloader", arrayOf("igl")) @Serializable(MimeTypeSerializer::class) - object VndImmervisionIvp: Application ("application/vnd.immervision-ivp") + object VndImmervisionIvp: Application ("application/vnd.immervision-ivp", arrayOf("ivp")) @Serializable(MimeTypeSerializer::class) - object VndImmervisionIvu: Application ("application/vnd.immervision-ivu") + object VndImmervisionIvu: Application ("application/vnd.immervision-ivu", arrayOf("ivu")) @Serializable(MimeTypeSerializer::class) - object ReginfoXml: Application ("application/reginfo+xml") + object ReginfoXml: Application ("application/reginfo+xml", arrayOf("rif")) @Serializable(MimeTypeSerializer::class) - object VndIntergeo: Application ("application/vnd.intergeo") + object VndIntergeo: Application ("application/vnd.intergeo", arrayOf("i2g")) @Serializable(MimeTypeSerializer::class) - object VndCinderella: Application ("application/vnd.cinderella") + object VndCinderella: Application ("application/vnd.cinderella", arrayOf("cdy")) @Serializable(MimeTypeSerializer::class) - object VndInterconFormnet: Application ("application/vnd.intercon.formnet") + object VndInterconFormnet: Application ("application/vnd.intercon.formnet", arrayOf("xpw")) @Serializable(MimeTypeSerializer::class) - object VndIsacFcs: Application ("application/vnd.isac.fcs") + object VndIsacFcs: Application ("application/vnd.isac.fcs", arrayOf("fcs")) @Serializable(MimeTypeSerializer::class) - object Ipfix: Application ("application/ipfix") + object Ipfix: Application ("application/ipfix", arrayOf("ipfix")) @Serializable(MimeTypeSerializer::class) - object PkixCert: Application ("application/pkix-cert") + object PkixCert: Application ("application/pkix-cert", arrayOf("cer")) @Serializable(MimeTypeSerializer::class) - object Pkixcmp: Application ("application/pkixcmp") + object Pkixcmp: Application ("application/pkixcmp", arrayOf("pki")) @Serializable(MimeTypeSerializer::class) - object PkixCrl: Application ("application/pkix-crl") + object PkixCrl: Application ("application/pkix-crl", arrayOf("crl")) @Serializable(MimeTypeSerializer::class) - object PkixPkipath: Application ("application/pkix-pkipath") + object PkixPkipath: Application ("application/pkix-pkipath", arrayOf("pkipath")) @Serializable(MimeTypeSerializer::class) - object VndInsorsIgm: Application ("application/vnd.insors.igm") + object VndInsorsIgm: Application ("application/vnd.insors.igm", arrayOf("igm")) @Serializable(MimeTypeSerializer::class) - object VndIpunpluggedRcprofile: Application ("application/vnd.ipunplugged.rcprofile") + object VndIpunpluggedRcprofile: Application ("application/vnd.ipunplugged.rcprofile", arrayOf("rcprofile")) @Serializable(MimeTypeSerializer::class) - object VndIrepositoryPackageXml: Application ("application/vnd.irepository.package+xml") + object VndIrepositoryPackageXml: Application ("application/vnd.irepository.package+xml", arrayOf("irp")) @Serializable(MimeTypeSerializer::class) - object JavaArchive: Application ("application/java-archive") + object JavaArchive: Application ("application/java-archive", arrayOf("jar")) @Serializable(MimeTypeSerializer::class) - object JavaVm: Application ("application/java-vm") + object JavaVm: Application ("application/java-vm", arrayOf("class")) @Serializable(MimeTypeSerializer::class) - object XJavaJnlpFile: Application ("application/x-java-jnlp-file") + object XJavaJnlpFile: Application ("application/x-java-jnlp-file", arrayOf("jnlp")) @Serializable(MimeTypeSerializer::class) - object JavaSerializedObject: Application ("application/java-serialized-object") + object JavaSerializedObject: Application ("application/java-serialized-object", arrayOf("ser")) @Serializable(MimeTypeSerializer::class) - object Javascript: Application ("application/javascript") + object Javascript: Application ("application/javascript", arrayOf("js")) @Serializable(MimeTypeSerializer::class) - object Json: Application ("application/json") + object Json: Application ("application/json", arrayOf("json")) @Serializable(MimeTypeSerializer::class) - object VndJoostJodaArchive: Application ("application/vnd.joost.joda-archive") + object VndJoostJodaArchive: Application ("application/vnd.joost.joda-archive", arrayOf("joda")) @Serializable(MimeTypeSerializer::class) - object LdJson: Application ("application/ld+json") + object LdJson: Application ("application/ld+json", arrayOf("jsonld")) @Serializable(MimeTypeSerializer::class) - object VndKahootz: Application ("application/vnd.kahootz") + object VndKahootz: Application ("application/vnd.kahootz", arrayOf("ktz")) @Serializable(MimeTypeSerializer::class) - object VndChipnutsKaraokeMmd: Application ("application/vnd.chipnuts.karaoke-mmd") + object VndChipnutsKaraokeMmd: Application ("application/vnd.chipnuts.karaoke-mmd", arrayOf("mmd")) @Serializable(MimeTypeSerializer::class) - object VndKdeKarbon: Application ("application/vnd.kde.karbon") + object VndKdeKarbon: Application ("application/vnd.kde.karbon", arrayOf("karbon")) @Serializable(MimeTypeSerializer::class) - object VndKdeKchart: Application ("application/vnd.kde.kchart") + object VndKdeKchart: Application ("application/vnd.kde.kchart", arrayOf("chrt")) @Serializable(MimeTypeSerializer::class) - object VndKdeKformula: Application ("application/vnd.kde.kformula") + object VndKdeKformula: Application ("application/vnd.kde.kformula", arrayOf("kfo")) @Serializable(MimeTypeSerializer::class) - object VndKdeKivio: Application ("application/vnd.kde.kivio") + object VndKdeKivio: Application ("application/vnd.kde.kivio", arrayOf("flw")) @Serializable(MimeTypeSerializer::class) - object VndKdeKontour: Application ("application/vnd.kde.kontour") + object VndKdeKontour: Application ("application/vnd.kde.kontour", arrayOf("kon")) @Serializable(MimeTypeSerializer::class) - object VndKdeKpresenter: Application ("application/vnd.kde.kpresenter") + object VndKdeKpresenter: Application ("application/vnd.kde.kpresenter", arrayOf("kpr")) @Serializable(MimeTypeSerializer::class) - object VndKdeKspread: Application ("application/vnd.kde.kspread") + object VndKdeKspread: Application ("application/vnd.kde.kspread", arrayOf("ksp")) @Serializable(MimeTypeSerializer::class) - object VndKdeKword: Application ("application/vnd.kde.kword") + object VndKdeKword: Application ("application/vnd.kde.kword", arrayOf("kwd")) @Serializable(MimeTypeSerializer::class) - object VndKenameaapp: Application ("application/vnd.kenameaapp") + object VndKenameaapp: Application ("application/vnd.kenameaapp", arrayOf("htke")) @Serializable(MimeTypeSerializer::class) - object VndKidspiration: Application ("application/vnd.kidspiration") + object VndKidspiration: Application ("application/vnd.kidspiration", arrayOf("kia")) @Serializable(MimeTypeSerializer::class) - object VndKinar: Application ("application/vnd.kinar") + object VndKinar: Application ("application/vnd.kinar", arrayOf("kne")) @Serializable(MimeTypeSerializer::class) - object VndKodakDescriptor: Application ("application/vnd.kodak-descriptor") + object VndKodakDescriptor: Application ("application/vnd.kodak-descriptor", arrayOf("sse")) @Serializable(MimeTypeSerializer::class) - object VndLasLasXml: Application ("application/vnd.las.las+xml") + object VndLasLasXml: Application ("application/vnd.las.las+xml", arrayOf("lasxml")) @Serializable(MimeTypeSerializer::class) - object XLatex: Application ("application/x-latex") + object XLatex: Application ("application/x-latex", arrayOf("latex")) @Serializable(MimeTypeSerializer::class) - object VndLlamagraphicsLifeBalanceDesktop: Application ("application/vnd.llamagraphics.life-balance.desktop") + object VndLlamagraphicsLifeBalanceDesktop: Application ("application/vnd.llamagraphics.life-balance.desktop", arrayOf("lbd")) @Serializable(MimeTypeSerializer::class) - object VndLlamagraphicsLifeBalanceExchangeXml: Application ("application/vnd.llamagraphics.life-balance.exchange+xml") + object VndLlamagraphicsLifeBalanceExchangeXml: Application ("application/vnd.llamagraphics.life-balance.exchange+xml", arrayOf("lbe")) @Serializable(MimeTypeSerializer::class) - object VndJam: Application ("application/vnd.jam") + object VndJam: Application ("application/vnd.jam", arrayOf("jam")) @Serializable(MimeTypeSerializer::class) - object VndLotus123: Application ("application/vnd.lotus-1-2-3") + object VndLotus123: Application ("application/vnd.lotus-1-2-3", arrayOf("123")) @Serializable(MimeTypeSerializer::class) - object VndLotusApproach: Application ("application/vnd.lotus-approach") + object VndLotusApproach: Application ("application/vnd.lotus-approach", arrayOf("apr")) @Serializable(MimeTypeSerializer::class) - object VndLotusFreelance: Application ("application/vnd.lotus-freelance") + object VndLotusFreelance: Application ("application/vnd.lotus-freelance", arrayOf("pre")) @Serializable(MimeTypeSerializer::class) - object VndLotusNotes: Application ("application/vnd.lotus-notes") + object VndLotusNotes: Application ("application/vnd.lotus-notes", arrayOf("nsf")) @Serializable(MimeTypeSerializer::class) - object VndLotusOrganizer: Application ("application/vnd.lotus-organizer") + object VndLotusOrganizer: Application ("application/vnd.lotus-organizer", arrayOf("org")) @Serializable(MimeTypeSerializer::class) - object VndLotusScreencam: Application ("application/vnd.lotus-screencam") + object VndLotusScreencam: Application ("application/vnd.lotus-screencam", arrayOf("scm")) @Serializable(MimeTypeSerializer::class) - object VndLotusWordpro: Application ("application/vnd.lotus-wordpro") + object VndLotusWordpro: Application ("application/vnd.lotus-wordpro", arrayOf("lwp")) @Serializable(MimeTypeSerializer::class) - object MacBinhex40: Application ("application/mac-binhex40") + object MacBinhex40: Application ("application/mac-binhex40", arrayOf("hqx")) @Serializable(MimeTypeSerializer::class) - object VndMacportsPortpkg: Application ("application/vnd.macports.portpkg") + object VndMacportsPortpkg: Application ("application/vnd.macports.portpkg", arrayOf("portpkg")) @Serializable(MimeTypeSerializer::class) - object VndOsgeoMapguidePackage: Application ("application/vnd.osgeo.mapguide.package") + object VndOsgeoMapguidePackage: Application ("application/vnd.osgeo.mapguide.package", arrayOf("mgp")) @Serializable(MimeTypeSerializer::class) - object Marc: Application ("application/marc") + object Marc: Application ("application/marc", arrayOf("mrc")) @Serializable(MimeTypeSerializer::class) - object MarcxmlXml: Application ("application/marcxml+xml") + object MarcxmlXml: Application ("application/marcxml+xml", arrayOf("mrcx")) @Serializable(MimeTypeSerializer::class) - object Mxf: Application ("application/mxf") + object Mxf: Application ("application/mxf", arrayOf("mxf")) @Serializable(MimeTypeSerializer::class) - object VndWolframPlayer: Application ("application/vnd.wolfram.player") + object VndWolframPlayer: Application ("application/vnd.wolfram.player", arrayOf("nbp")) @Serializable(MimeTypeSerializer::class) - object Mathematica: Application ("application/mathematica") + object Mathematica: Application ("application/mathematica", arrayOf("ma")) @Serializable(MimeTypeSerializer::class) - object MathmlXml: Application ("application/mathml+xml") + object MathmlXml: Application ("application/mathml+xml", arrayOf("mathml")) @Serializable(MimeTypeSerializer::class) - object Mbox: Application ("application/mbox") + object Mbox: Application ("application/mbox", arrayOf("mbox")) @Serializable(MimeTypeSerializer::class) - object VndMedcalcdata: Application ("application/vnd.medcalcdata") + object VndMedcalcdata: Application ("application/vnd.medcalcdata", arrayOf("mc1")) @Serializable(MimeTypeSerializer::class) - object MediaservercontrolXml: Application ("application/mediaservercontrol+xml") + object MediaservercontrolXml: Application ("application/mediaservercontrol+xml", arrayOf("mscml")) @Serializable(MimeTypeSerializer::class) - object VndMediastationCdkey: Application ("application/vnd.mediastation.cdkey") + object VndMediastationCdkey: Application ("application/vnd.mediastation.cdkey", arrayOf("cdkey")) @Serializable(MimeTypeSerializer::class) - object VndMfer: Application ("application/vnd.mfer") + object VndMfer: Application ("application/vnd.mfer", arrayOf("mwf")) @Serializable(MimeTypeSerializer::class) - object VndMfmp: Application ("application/vnd.mfmp") + object VndMfmp: Application ("application/vnd.mfmp", arrayOf("mfm")) @Serializable(MimeTypeSerializer::class) - object MadsXml: Application ("application/mads+xml") + object MadsXml: Application ("application/mads+xml", arrayOf("mads")) @Serializable(MimeTypeSerializer::class) - object MetsXml: Application ("application/mets+xml") + object MetsXml: Application ("application/mets+xml", arrayOf("mets")) @Serializable(MimeTypeSerializer::class) - object ModsXml: Application ("application/mods+xml") + object ModsXml: Application ("application/mods+xml", arrayOf("mods")) @Serializable(MimeTypeSerializer::class) - object Metalink4Xml: Application ("application/metalink4+xml") + object Metalink4Xml: Application ("application/metalink4+xml", arrayOf("meta4")) @Serializable(MimeTypeSerializer::class) - object VndMcd: Application ("application/vnd.mcd") + object VndMcd: Application ("application/vnd.mcd", arrayOf("mcd")) @Serializable(MimeTypeSerializer::class) - object VndMicrografxFlo: Application ("application/vnd.micrografx.flo") + object VndMicrografxFlo: Application ("application/vnd.micrografx.flo", arrayOf("flo")) @Serializable(MimeTypeSerializer::class) - object VndMicrografxIgx: Application ("application/vnd.micrografx.igx") + object VndMicrografxIgx: Application ("application/vnd.micrografx.igx", arrayOf("igx")) @Serializable(MimeTypeSerializer::class) - object VndEszigno3Xml: Application ("application/vnd.eszigno3+xml") + object VndEszigno3Xml: Application ("application/vnd.eszigno3+xml", arrayOf("es3")) @Serializable(MimeTypeSerializer::class) - object XMsaccess: Application ("application/x-msaccess") + object XMsaccess: Application ("application/x-msaccess", arrayOf("mdb")) @Serializable(MimeTypeSerializer::class) - object XMsdownload: Application ("application/x-msdownload") + object XMsdownload: Application ("application/x-msdownload", arrayOf("exe")) @Serializable(MimeTypeSerializer::class) - object VndMsArtgalry: Application ("application/vnd.ms-artgalry") + object VndMsArtgalry: Application ("application/vnd.ms-artgalry", arrayOf("cil")) @Serializable(MimeTypeSerializer::class) - object VndMsCabCompressed: Application ("application/vnd.ms-cab-compressed") + object VndMsCabCompressed: Application ("application/vnd.ms-cab-compressed", arrayOf("cab")) @Serializable(MimeTypeSerializer::class) - object VndMsIms: Application ("application/vnd.ms-ims") + object VndMsIms: Application ("application/vnd.ms-ims", arrayOf("ims")) @Serializable(MimeTypeSerializer::class) - object XMsApplication: Application ("application/x-ms-application") + object XMsApplication: Application ("application/x-ms-application", arrayOf("application")) @Serializable(MimeTypeSerializer::class) - object XMsclip: Application ("application/x-msclip") + object XMsclip: Application ("application/x-msclip", arrayOf("clp")) @Serializable(MimeTypeSerializer::class) - object VndMsFontobject: Application ("application/vnd.ms-fontobject") + object VndMsFontobject: Application ("application/vnd.ms-fontobject", arrayOf("eot")) @Serializable(MimeTypeSerializer::class) - object VndMsExcel: Application ("application/vnd.ms-excel") + object VndMsExcel: Application ("application/vnd.ms-excel", arrayOf("xls")) @Serializable(MimeTypeSerializer::class) - object VndMsExcelAddinMacroenabled12: Application ("application/vnd.ms-excel.addin.macroenabled.12") + object VndMsExcelAddinMacroenabled12: Application ("application/vnd.ms-excel.addin.macroenabled.12", arrayOf("xlam")) @Serializable(MimeTypeSerializer::class) - object VndMsExcelSheetBinaryMacroenabled12: Application ("application/vnd.ms-excel.sheet.binary.macroenabled.12") + object VndMsExcelSheetBinaryMacroenabled12: Application ("application/vnd.ms-excel.sheet.binary.macroenabled.12", arrayOf("xlsb")) @Serializable(MimeTypeSerializer::class) - object VndMsExcelTemplateMacroenabled12: Application ("application/vnd.ms-excel.template.macroenabled.12") + object VndMsExcelTemplateMacroenabled12: Application ("application/vnd.ms-excel.template.macroenabled.12", arrayOf("xltm")) @Serializable(MimeTypeSerializer::class) - object VndMsExcelSheetMacroenabled12: Application ("application/vnd.ms-excel.sheet.macroenabled.12") + object VndMsExcelSheetMacroenabled12: Application ("application/vnd.ms-excel.sheet.macroenabled.12", arrayOf("xlsm")) @Serializable(MimeTypeSerializer::class) - object VndMsHtmlhelp: Application ("application/vnd.ms-htmlhelp") + object VndMsHtmlhelp: Application ("application/vnd.ms-htmlhelp", arrayOf("chm")) @Serializable(MimeTypeSerializer::class) - object XMscardfile: Application ("application/x-mscardfile") + object XMscardfile: Application ("application/x-mscardfile", arrayOf("crd")) @Serializable(MimeTypeSerializer::class) - object VndMsLrm: Application ("application/vnd.ms-lrm") + object VndMsLrm: Application ("application/vnd.ms-lrm", arrayOf("lrm")) @Serializable(MimeTypeSerializer::class) - object XMsmediaview: Application ("application/x-msmediaview") + object XMsmediaview: Application ("application/x-msmediaview", arrayOf("mvb")) @Serializable(MimeTypeSerializer::class) - object XMsmoney: Application ("application/x-msmoney") + object XMsmoney: Application ("application/x-msmoney", arrayOf("mny")) @Serializable(MimeTypeSerializer::class) - object VndOpenxmlformatsOfficedocumentPresentationmlPresentation: Application ("application/vnd.openxmlformats-officedocument.presentationml.presentation") + object VndOpenxmlformatsOfficedocumentPresentationmlPresentation: Application ("application/vnd.openxmlformats-officedocument.presentationml.presentation", arrayOf("pptx")) @Serializable(MimeTypeSerializer::class) - object VndOpenxmlformatsOfficedocumentPresentationmlSlide: Application ("application/vnd.openxmlformats-officedocument.presentationml.slide") + object VndOpenxmlformatsOfficedocumentPresentationmlSlide: Application ("application/vnd.openxmlformats-officedocument.presentationml.slide", arrayOf("sldx")) @Serializable(MimeTypeSerializer::class) - object VndOpenxmlformatsOfficedocumentPresentationmlSlideshow: Application ("application/vnd.openxmlformats-officedocument.presentationml.slideshow") + object VndOpenxmlformatsOfficedocumentPresentationmlSlideshow: Application ("application/vnd.openxmlformats-officedocument.presentationml.slideshow", arrayOf("ppsx")) @Serializable(MimeTypeSerializer::class) - object VndOpenxmlformatsOfficedocumentPresentationmlTemplate: Application ("application/vnd.openxmlformats-officedocument.presentationml.template") + object VndOpenxmlformatsOfficedocumentPresentationmlTemplate: Application ("application/vnd.openxmlformats-officedocument.presentationml.template", arrayOf("potx")) @Serializable(MimeTypeSerializer::class) - object VndOpenxmlformatsOfficedocumentSpreadsheetmlSheet: Application ("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet") + object VndOpenxmlformatsOfficedocumentSpreadsheetmlSheet: Application ("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", arrayOf("xlsx")) @Serializable(MimeTypeSerializer::class) - object VndOpenxmlformatsOfficedocumentSpreadsheetmlTemplate: Application ("application/vnd.openxmlformats-officedocument.spreadsheetml.template") + object VndOpenxmlformatsOfficedocumentSpreadsheetmlTemplate: Application ("application/vnd.openxmlformats-officedocument.spreadsheetml.template", arrayOf("xltx")) @Serializable(MimeTypeSerializer::class) - object VndOpenxmlformatsOfficedocumentWordprocessingmlDocument: Application ("application/vnd.openxmlformats-officedocument.wordprocessingml.document") + object VndOpenxmlformatsOfficedocumentWordprocessingmlDocument: Application ("application/vnd.openxmlformats-officedocument.wordprocessingml.document", arrayOf("docx")) @Serializable(MimeTypeSerializer::class) - object VndOpenxmlformatsOfficedocumentWordprocessingmlTemplate: Application ("application/vnd.openxmlformats-officedocument.wordprocessingml.template") + object VndOpenxmlformatsOfficedocumentWordprocessingmlTemplate: Application ("application/vnd.openxmlformats-officedocument.wordprocessingml.template", arrayOf("dotx")) @Serializable(MimeTypeSerializer::class) - object XMsbinder: Application ("application/x-msbinder") + object XMsbinder: Application ("application/x-msbinder", arrayOf("obd")) @Serializable(MimeTypeSerializer::class) - object VndMsOfficetheme: Application ("application/vnd.ms-officetheme") + object VndMsOfficetheme: Application ("application/vnd.ms-officetheme", arrayOf("thmx")) @Serializable(MimeTypeSerializer::class) - object Onenote: Application ("application/onenote") + object Onenote: Application ("application/onenote", arrayOf("onetoc")) @Serializable(MimeTypeSerializer::class) - object VndMsPowerpoint: Application ("application/vnd.ms-powerpoint") + object VndMsPowerpoint: Application ("application/vnd.ms-powerpoint", arrayOf("ppt")) @Serializable(MimeTypeSerializer::class) - object VndMsPowerpointAddinMacroenabled12: Application ("application/vnd.ms-powerpoint.addin.macroenabled.12") + object VndMsPowerpointAddinMacroenabled12: Application ("application/vnd.ms-powerpoint.addin.macroenabled.12", arrayOf("ppam")) @Serializable(MimeTypeSerializer::class) - object VndMsPowerpointSlideMacroenabled12: Application ("application/vnd.ms-powerpoint.slide.macroenabled.12") + object VndMsPowerpointSlideMacroenabled12: Application ("application/vnd.ms-powerpoint.slide.macroenabled.12", arrayOf("sldm")) @Serializable(MimeTypeSerializer::class) - object VndMsPowerpointPresentationMacroenabled12: Application ("application/vnd.ms-powerpoint.presentation.macroenabled.12") + object VndMsPowerpointPresentationMacroenabled12: Application ("application/vnd.ms-powerpoint.presentation.macroenabled.12", arrayOf("pptm")) @Serializable(MimeTypeSerializer::class) - object VndMsPowerpointSlideshowMacroenabled12: Application ("application/vnd.ms-powerpoint.slideshow.macroenabled.12") + object VndMsPowerpointSlideshowMacroenabled12: Application ("application/vnd.ms-powerpoint.slideshow.macroenabled.12", arrayOf("ppsm")) @Serializable(MimeTypeSerializer::class) - object VndMsPowerpointTemplateMacroenabled12: Application ("application/vnd.ms-powerpoint.template.macroenabled.12") + object VndMsPowerpointTemplateMacroenabled12: Application ("application/vnd.ms-powerpoint.template.macroenabled.12", arrayOf("potm")) @Serializable(MimeTypeSerializer::class) - object VndMsProject: Application ("application/vnd.ms-project") + object VndMsProject: Application ("application/vnd.ms-project", arrayOf("mpp")) @Serializable(MimeTypeSerializer::class) - object XMspublisher: Application ("application/x-mspublisher") + object XMspublisher: Application ("application/x-mspublisher", arrayOf("pub")) @Serializable(MimeTypeSerializer::class) - object XMsschedule: Application ("application/x-msschedule") + object XMsschedule: Application ("application/x-msschedule", arrayOf("scd")) @Serializable(MimeTypeSerializer::class) - object XSilverlightApp: Application ("application/x-silverlight-app") + object XSilverlightApp: Application ("application/x-silverlight-app", arrayOf("xap")) @Serializable(MimeTypeSerializer::class) - object VndMsPkiStl: Application ("application/vnd.ms-pki.stl") + object VndMsPkiStl: Application ("application/vnd.ms-pki.stl", arrayOf("stl")) @Serializable(MimeTypeSerializer::class) - object VndMsPkiSeccat: Application ("application/vnd.ms-pki.seccat") + object VndMsPkiSeccat: Application ("application/vnd.ms-pki.seccat", arrayOf("cat")) @Serializable(MimeTypeSerializer::class) - object VndVisio: Application ("application/vnd.visio") + object VndVisio: Application ("application/vnd.visio", arrayOf("vsd")) @Serializable(MimeTypeSerializer::class) - object VndVisio2013: Application ("application/vnd.visio2013") + object VndVisio2013: Application ("application/vnd.visio2013", arrayOf("vsdx")) @Serializable(MimeTypeSerializer::class) - object XMsWmd: Application ("application/x-ms-wmd") + object XMsWmd: Application ("application/x-ms-wmd", arrayOf("wmd")) @Serializable(MimeTypeSerializer::class) - object VndMsWpl: Application ("application/vnd.ms-wpl") + object VndMsWpl: Application ("application/vnd.ms-wpl", arrayOf("wpl")) @Serializable(MimeTypeSerializer::class) - object XMsWmz: Application ("application/x-ms-wmz") + object XMsWmz: Application ("application/x-ms-wmz", arrayOf("wmz")) @Serializable(MimeTypeSerializer::class) - object XMsmetafile: Application ("application/x-msmetafile") + object XMsmetafile: Application ("application/x-msmetafile", arrayOf("wmf")) @Serializable(MimeTypeSerializer::class) - object XMsterminal: Application ("application/x-msterminal") + object XMsterminal: Application ("application/x-msterminal", arrayOf("trm")) @Serializable(MimeTypeSerializer::class) - object Msword: Application ("application/msword") + object Msword: Application ("application/msword", arrayOf("doc")) @Serializable(MimeTypeSerializer::class) - object VndMsWordDocumentMacroenabled12: Application ("application/vnd.ms-word.document.macroenabled.12") + object VndMsWordDocumentMacroenabled12: Application ("application/vnd.ms-word.document.macroenabled.12", arrayOf("docm")) @Serializable(MimeTypeSerializer::class) - object VndMsWordTemplateMacroenabled12: Application ("application/vnd.ms-word.template.macroenabled.12") + object VndMsWordTemplateMacroenabled12: Application ("application/vnd.ms-word.template.macroenabled.12", arrayOf("dotm")) @Serializable(MimeTypeSerializer::class) - object XMswrite: Application ("application/x-mswrite") + object XMswrite: Application ("application/x-mswrite", arrayOf("wri")) @Serializable(MimeTypeSerializer::class) - object VndMsWorks: Application ("application/vnd.ms-works") + object VndMsWorks: Application ("application/vnd.ms-works", arrayOf("wps")) @Serializable(MimeTypeSerializer::class) - object XMsXbap: Application ("application/x-ms-xbap") + object XMsXbap: Application ("application/x-ms-xbap", arrayOf("xbap")) @Serializable(MimeTypeSerializer::class) - object VndMsXpsdocument: Application ("application/vnd.ms-xpsdocument") + object VndMsXpsdocument: Application ("application/vnd.ms-xpsdocument", arrayOf("xps")) @Serializable(MimeTypeSerializer::class) - object VndIbmMinipay: Application ("application/vnd.ibm.minipay") + object VndIbmMinipay: Application ("application/vnd.ibm.minipay", arrayOf("mpy")) @Serializable(MimeTypeSerializer::class) - object VndIbmModcap: Application ("application/vnd.ibm.modcap") + object VndIbmModcap: Application ("application/vnd.ibm.modcap", arrayOf("afp")) @Serializable(MimeTypeSerializer::class) - object VndJcpJavameMidletRms: Application ("application/vnd.jcp.javame.midlet-rms") + object VndJcpJavameMidletRms: Application ("application/vnd.jcp.javame.midlet-rms", arrayOf("rms")) @Serializable(MimeTypeSerializer::class) - object VndTmobileLivetv: Application ("application/vnd.tmobile-livetv") + object VndTmobileLivetv: Application ("application/vnd.tmobile-livetv", arrayOf("tmo")) @Serializable(MimeTypeSerializer::class) - object XMobipocketEbook: Application ("application/x-mobipocket-ebook") + object XMobipocketEbook: Application ("application/x-mobipocket-ebook", arrayOf("prc")) @Serializable(MimeTypeSerializer::class) - object VndMobiusMbk: Application ("application/vnd.mobius.mbk") + object VndMobiusMbk: Application ("application/vnd.mobius.mbk", arrayOf("mbk")) @Serializable(MimeTypeSerializer::class) - object VndMobiusDis: Application ("application/vnd.mobius.dis") + object VndMobiusDis: Application ("application/vnd.mobius.dis", arrayOf("dis")) @Serializable(MimeTypeSerializer::class) - object VndMobiusPlc: Application ("application/vnd.mobius.plc") + object VndMobiusPlc: Application ("application/vnd.mobius.plc", arrayOf("plc")) @Serializable(MimeTypeSerializer::class) - object VndMobiusMqy: Application ("application/vnd.mobius.mqy") + object VndMobiusMqy: Application ("application/vnd.mobius.mqy", arrayOf("mqy")) @Serializable(MimeTypeSerializer::class) - object VndMobiusMsl: Application ("application/vnd.mobius.msl") + object VndMobiusMsl: Application ("application/vnd.mobius.msl", arrayOf("msl")) @Serializable(MimeTypeSerializer::class) - object VndMobiusTxf: Application ("application/vnd.mobius.txf") + object VndMobiusTxf: Application ("application/vnd.mobius.txf", arrayOf("txf")) @Serializable(MimeTypeSerializer::class) - object VndMobiusDaf: Application ("application/vnd.mobius.daf") + object VndMobiusDaf: Application ("application/vnd.mobius.daf", arrayOf("daf")) @Serializable(MimeTypeSerializer::class) - object VndMophunCertificate: Application ("application/vnd.mophun.certificate") + object VndMophunCertificate: Application ("application/vnd.mophun.certificate", arrayOf("mpc")) @Serializable(MimeTypeSerializer::class) - object VndMophunApplication: Application ("application/vnd.mophun.application") + object VndMophunApplication: Application ("application/vnd.mophun.application", arrayOf("mpn")) @Serializable(MimeTypeSerializer::class) - object Mp21: Application ("application/mp21") + object Mp21: Application ("application/mp21", arrayOf("m21")) @Serializable(MimeTypeSerializer::class) - object Mp4: Application ("application/mp4") + object Mp4: Application ("application/mp4", arrayOf("mp4")) @Serializable(MimeTypeSerializer::class) - object VndAppleMpegurl: Application ("application/vnd.apple.mpegurl") + object VndAppleMpegurl: Application ("application/vnd.apple.mpegurl", arrayOf("m3u8")) @Serializable(MimeTypeSerializer::class) - object VndMusician: Application ("application/vnd.musician") + object VndMusician: Application ("application/vnd.musician", arrayOf("mus")) @Serializable(MimeTypeSerializer::class) - object VndMuveeStyle: Application ("application/vnd.muvee.style") + object VndMuveeStyle: Application ("application/vnd.muvee.style", arrayOf("msty")) @Serializable(MimeTypeSerializer::class) - object XvXml: Application ("application/xv+xml") + object XvXml: Application ("application/xv+xml", arrayOf("mxml")) @Serializable(MimeTypeSerializer::class) - object VndNokiaNGageData: Application ("application/vnd.nokia.n-gage.data") + object VndNokiaNGageData: Application ("application/vnd.nokia.n-gage.data", arrayOf("ngdat")) @Serializable(MimeTypeSerializer::class) - object VndNokiaNGageSymbianInstall: Application ("application/vnd.nokia.n-gage.symbian.install") + object VndNokiaNGageSymbianInstall: Application ("application/vnd.nokia.n-gage.symbian.install", arrayOf("n-gage")) @Serializable(MimeTypeSerializer::class) - object XDtbncxXml: Application ("application/x-dtbncx+xml") + object XDtbncxXml: Application ("application/x-dtbncx+xml", arrayOf("ncx")) @Serializable(MimeTypeSerializer::class) - object XNetcdf: Application ("application/x-netcdf") + object XNetcdf: Application ("application/x-netcdf", arrayOf("nc")) @Serializable(MimeTypeSerializer::class) - object VndNeurolanguageNlu: Application ("application/vnd.neurolanguage.nlu") + object VndNeurolanguageNlu: Application ("application/vnd.neurolanguage.nlu", arrayOf("nlu")) @Serializable(MimeTypeSerializer::class) - object VndDna: Application ("application/vnd.dna") + object VndDna: Application ("application/vnd.dna", arrayOf("dna")) @Serializable(MimeTypeSerializer::class) - object VndNoblenetDirectory: Application ("application/vnd.noblenet-directory") + object VndNoblenetDirectory: Application ("application/vnd.noblenet-directory", arrayOf("nnd")) @Serializable(MimeTypeSerializer::class) - object VndNoblenetSealer: Application ("application/vnd.noblenet-sealer") + object VndNoblenetSealer: Application ("application/vnd.noblenet-sealer", arrayOf("nns")) @Serializable(MimeTypeSerializer::class) - object VndNoblenetWeb: Application ("application/vnd.noblenet-web") + object VndNoblenetWeb: Application ("application/vnd.noblenet-web", arrayOf("nnw")) @Serializable(MimeTypeSerializer::class) - object VndNokiaRadioPreset: Application ("application/vnd.nokia.radio-preset") + object VndNokiaRadioPreset: Application ("application/vnd.nokia.radio-preset", arrayOf("rpst")) @Serializable(MimeTypeSerializer::class) - object VndNokiaRadioPresets: Application ("application/vnd.nokia.radio-presets") + object VndNokiaRadioPresets: Application ("application/vnd.nokia.radio-presets", arrayOf("rpss")) @Serializable(MimeTypeSerializer::class) - object VndNovadigmEdm: Application ("application/vnd.novadigm.edm") + object VndNovadigmEdm: Application ("application/vnd.novadigm.edm", arrayOf("edm")) @Serializable(MimeTypeSerializer::class) - object VndNovadigmEdx: Application ("application/vnd.novadigm.edx") + object VndNovadigmEdx: Application ("application/vnd.novadigm.edx", arrayOf("edx")) @Serializable(MimeTypeSerializer::class) - object VndNovadigmExt: Application ("application/vnd.novadigm.ext") + object VndNovadigmExt: Application ("application/vnd.novadigm.ext", arrayOf("ext")) @Serializable(MimeTypeSerializer::class) - object VndFlographit: Application ("application/vnd.flographit") + object VndFlographit: Application ("application/vnd.flographit", arrayOf("gph")) @Serializable(MimeTypeSerializer::class) - object Oda: Application ("application/oda") + object Oda: Application ("application/oda", arrayOf("oda")) @Serializable(MimeTypeSerializer::class) - object Ogg: Application ("application/ogg") + object Ogg: Application ("application/ogg", arrayOf("ogx")) @Serializable(MimeTypeSerializer::class) - object VndOmaDd2Xml: Application ("application/vnd.oma.dd2+xml") + object VndOmaDd2Xml: Application ("application/vnd.oma.dd2+xml", arrayOf("dd2")) @Serializable(MimeTypeSerializer::class) - object VndOasisOpendocumentTextWeb: Application ("application/vnd.oasis.opendocument.text-web") + object VndOasisOpendocumentTextWeb: Application ("application/vnd.oasis.opendocument.text-web", arrayOf("oth")) @Serializable(MimeTypeSerializer::class) - object OebpsPackageXml: Application ("application/oebps-package+xml") + object OebpsPackageXml: Application ("application/oebps-package+xml", arrayOf("opf")) @Serializable(MimeTypeSerializer::class) - object VndIntuQbo: Application ("application/vnd.intu.qbo") + object VndIntuQbo: Application ("application/vnd.intu.qbo", arrayOf("qbo")) @Serializable(MimeTypeSerializer::class) - object VndOpenofficeorgExtension: Application ("application/vnd.openofficeorg.extension") + object VndOpenofficeorgExtension: Application ("application/vnd.openofficeorg.extension", arrayOf("oxt")) @Serializable(MimeTypeSerializer::class) - object VndYamahaOpenscoreformat: Application ("application/vnd.yamaha.openscoreformat") + object VndYamahaOpenscoreformat: Application ("application/vnd.yamaha.openscoreformat", arrayOf("osf")) @Serializable(MimeTypeSerializer::class) - object VndOasisOpendocumentChart: Application ("application/vnd.oasis.opendocument.chart") + object VndOasisOpendocumentChart: Application ("application/vnd.oasis.opendocument.chart", arrayOf("odc")) @Serializable(MimeTypeSerializer::class) - object VndOasisOpendocumentChartTemplate: Application ("application/vnd.oasis.opendocument.chart-template") + object VndOasisOpendocumentChartTemplate: Application ("application/vnd.oasis.opendocument.chart-template", arrayOf("otc")) @Serializable(MimeTypeSerializer::class) - object VndOasisOpendocumentDatabase: Application ("application/vnd.oasis.opendocument.database") + object VndOasisOpendocumentDatabase: Application ("application/vnd.oasis.opendocument.database", arrayOf("odb")) @Serializable(MimeTypeSerializer::class) - object VndOasisOpendocumentFormula: Application ("application/vnd.oasis.opendocument.formula") + object VndOasisOpendocumentFormula: Application ("application/vnd.oasis.opendocument.formula", arrayOf("odf")) @Serializable(MimeTypeSerializer::class) - object VndOasisOpendocumentFormulaTemplate: Application ("application/vnd.oasis.opendocument.formula-template") + object VndOasisOpendocumentFormulaTemplate: Application ("application/vnd.oasis.opendocument.formula-template", arrayOf("odft")) @Serializable(MimeTypeSerializer::class) - object VndOasisOpendocumentGraphics: Application ("application/vnd.oasis.opendocument.graphics") + object VndOasisOpendocumentGraphics: Application ("application/vnd.oasis.opendocument.graphics", arrayOf("odg")) @Serializable(MimeTypeSerializer::class) - object VndOasisOpendocumentGraphicsTemplate: Application ("application/vnd.oasis.opendocument.graphics-template") + object VndOasisOpendocumentGraphicsTemplate: Application ("application/vnd.oasis.opendocument.graphics-template", arrayOf("otg")) @Serializable(MimeTypeSerializer::class) - object VndOasisOpendocumentImage: Application ("application/vnd.oasis.opendocument.image") + object VndOasisOpendocumentImage: Application ("application/vnd.oasis.opendocument.image", arrayOf("odi")) @Serializable(MimeTypeSerializer::class) - object VndOasisOpendocumentImageTemplate: Application ("application/vnd.oasis.opendocument.image-template") + object VndOasisOpendocumentImageTemplate: Application ("application/vnd.oasis.opendocument.image-template", arrayOf("oti")) @Serializable(MimeTypeSerializer::class) - object VndOasisOpendocumentPresentation: Application ("application/vnd.oasis.opendocument.presentation") + object VndOasisOpendocumentPresentation: Application ("application/vnd.oasis.opendocument.presentation", arrayOf("odp")) @Serializable(MimeTypeSerializer::class) - object VndOasisOpendocumentPresentationTemplate: Application ("application/vnd.oasis.opendocument.presentation-template") + object VndOasisOpendocumentPresentationTemplate: Application ("application/vnd.oasis.opendocument.presentation-template", arrayOf("otp")) @Serializable(MimeTypeSerializer::class) - object VndOasisOpendocumentSpreadsheet: Application ("application/vnd.oasis.opendocument.spreadsheet") + object VndOasisOpendocumentSpreadsheet: Application ("application/vnd.oasis.opendocument.spreadsheet", arrayOf("ods")) @Serializable(MimeTypeSerializer::class) - object VndOasisOpendocumentSpreadsheetTemplate: Application ("application/vnd.oasis.opendocument.spreadsheet-template") + object VndOasisOpendocumentSpreadsheetTemplate: Application ("application/vnd.oasis.opendocument.spreadsheet-template", arrayOf("ots")) @Serializable(MimeTypeSerializer::class) - object VndOasisOpendocumentText: Application ("application/vnd.oasis.opendocument.text") + object VndOasisOpendocumentText: Application ("application/vnd.oasis.opendocument.text", arrayOf("odt")) @Serializable(MimeTypeSerializer::class) - object VndOasisOpendocumentTextMaster: Application ("application/vnd.oasis.opendocument.text-master") + object VndOasisOpendocumentTextMaster: Application ("application/vnd.oasis.opendocument.text-master", arrayOf("odm")) @Serializable(MimeTypeSerializer::class) - object VndOasisOpendocumentTextTemplate: Application ("application/vnd.oasis.opendocument.text-template") + object VndOasisOpendocumentTextTemplate: Application ("application/vnd.oasis.opendocument.text-template", arrayOf("ott")) @Serializable(MimeTypeSerializer::class) - object VndSunXmlCalc: Application ("application/vnd.sun.xml.calc") + object VndSunXmlCalc: Application ("application/vnd.sun.xml.calc", arrayOf("sxc")) @Serializable(MimeTypeSerializer::class) - object VndSunXmlCalcTemplate: Application ("application/vnd.sun.xml.calc.template") + object VndSunXmlCalcTemplate: Application ("application/vnd.sun.xml.calc.template", arrayOf("stc")) @Serializable(MimeTypeSerializer::class) - object VndSunXmlDraw: Application ("application/vnd.sun.xml.draw") + object VndSunXmlDraw: Application ("application/vnd.sun.xml.draw", arrayOf("sxd")) @Serializable(MimeTypeSerializer::class) - object VndSunXmlDrawTemplate: Application ("application/vnd.sun.xml.draw.template") + object VndSunXmlDrawTemplate: Application ("application/vnd.sun.xml.draw.template", arrayOf("std")) @Serializable(MimeTypeSerializer::class) - object VndSunXmlImpress: Application ("application/vnd.sun.xml.impress") + object VndSunXmlImpress: Application ("application/vnd.sun.xml.impress", arrayOf("sxi")) @Serializable(MimeTypeSerializer::class) - object VndSunXmlImpressTemplate: Application ("application/vnd.sun.xml.impress.template") + object VndSunXmlImpressTemplate: Application ("application/vnd.sun.xml.impress.template", arrayOf("sti")) @Serializable(MimeTypeSerializer::class) - object VndSunXmlMath: Application ("application/vnd.sun.xml.math") + object VndSunXmlMath: Application ("application/vnd.sun.xml.math", arrayOf("sxm")) @Serializable(MimeTypeSerializer::class) - object VndSunXmlWriter: Application ("application/vnd.sun.xml.writer") + object VndSunXmlWriter: Application ("application/vnd.sun.xml.writer", arrayOf("sxw")) @Serializable(MimeTypeSerializer::class) - object VndSunXmlWriterGlobal: Application ("application/vnd.sun.xml.writer.global") + object VndSunXmlWriterGlobal: Application ("application/vnd.sun.xml.writer.global", arrayOf("sxg")) @Serializable(MimeTypeSerializer::class) - object VndSunXmlWriterTemplate: Application ("application/vnd.sun.xml.writer.template") + object VndSunXmlWriterTemplate: Application ("application/vnd.sun.xml.writer.template", arrayOf("stw")) @Serializable(MimeTypeSerializer::class) - object XFontOtf: Application ("application/x-font-otf") + object XFontOtf: Application ("application/x-font-otf", arrayOf("otf")) @Serializable(MimeTypeSerializer::class) - object VndYamahaOpenscoreformatOsfpvgXml: Application ("application/vnd.yamaha.openscoreformat.osfpvg+xml") + object VndYamahaOpenscoreformatOsfpvgXml: Application ("application/vnd.yamaha.openscoreformat.osfpvg+xml", arrayOf("osfpvg")) @Serializable(MimeTypeSerializer::class) - object VndOsgiDp: Application ("application/vnd.osgi.dp") + object VndOsgiDp: Application ("application/vnd.osgi.dp", arrayOf("dp")) @Serializable(MimeTypeSerializer::class) - object VndPalm: Application ("application/vnd.palm") + object VndPalm: Application ("application/vnd.palm", arrayOf("pdb")) @Serializable(MimeTypeSerializer::class) - object VndPawaafile: Application ("application/vnd.pawaafile") + object VndPawaafile: Application ("application/vnd.pawaafile", arrayOf("paw")) @Serializable(MimeTypeSerializer::class) - object VndHpPclxl: Application ("application/vnd.hp-pclxl") + object VndHpPclxl: Application ("application/vnd.hp-pclxl", arrayOf("pclxl")) @Serializable(MimeTypeSerializer::class) - object VndPicsel: Application ("application/vnd.picsel") + object VndPicsel: Application ("application/vnd.picsel", arrayOf("efif")) @Serializable(MimeTypeSerializer::class) - object PicsRules: Application ("application/pics-rules") + object PicsRules: Application ("application/pics-rules", arrayOf("prf")) @Serializable(MimeTypeSerializer::class) - object XChat: Application ("application/x-chat") + object XChat: Application ("application/x-chat", arrayOf("chat")) @Serializable(MimeTypeSerializer::class) - object Pkcs10: Application ("application/pkcs10") + object Pkcs10: Application ("application/pkcs10", arrayOf("p10")) @Serializable(MimeTypeSerializer::class) - object XPkcs12: Application ("application/x-pkcs12") + object XPkcs12: Application ("application/x-pkcs12", arrayOf("p12")) @Serializable(MimeTypeSerializer::class) - object Pkcs7Mime: Application ("application/pkcs7-mime") + object Pkcs7Mime: Application ("application/pkcs7-mime", arrayOf("p7m")) @Serializable(MimeTypeSerializer::class) - object Pkcs7Signature: Application ("application/pkcs7-signature") + object Pkcs7Signature: Application ("application/pkcs7-signature", arrayOf("p7s")) @Serializable(MimeTypeSerializer::class) - object XPkcs7Certreqresp: Application ("application/x-pkcs7-certreqresp") + object XPkcs7Certreqresp: Application ("application/x-pkcs7-certreqresp", arrayOf("p7r")) @Serializable(MimeTypeSerializer::class) - object XPkcs7Certificates: Application ("application/x-pkcs7-certificates") + object XPkcs7Certificates: Application ("application/x-pkcs7-certificates", arrayOf("p7b")) @Serializable(MimeTypeSerializer::class) - object Pkcs8: Application ("application/pkcs8") + object Pkcs8: Application ("application/pkcs8", arrayOf("p8")) @Serializable(MimeTypeSerializer::class) - object VndPocketlearn: Application ("application/vnd.pocketlearn") + object VndPocketlearn: Application ("application/vnd.pocketlearn", arrayOf("plf")) @Serializable(MimeTypeSerializer::class) - object XFontPcf: Application ("application/x-font-pcf") + object XFontPcf: Application ("application/x-font-pcf", arrayOf("pcf")) @Serializable(MimeTypeSerializer::class) - object FontTdpfr: Application ("application/font-tdpfr") + object FontTdpfr: Application ("application/font-tdpfr", arrayOf("pfr")) @Serializable(MimeTypeSerializer::class) - object XChessPgn: Application ("application/x-chess-pgn") + object XChessPgn: Application ("application/x-chess-pgn", arrayOf("pgn")) @Serializable(MimeTypeSerializer::class) - object PskcXml: Application ("application/pskc+xml") + object PskcXml: Application ("application/pskc+xml", arrayOf("pskcxml")) @Serializable(MimeTypeSerializer::class) - object VndCtcPosml: Application ("application/vnd.ctc-posml") + object VndCtcPosml: Application ("application/vnd.ctc-posml", arrayOf("pml")) @Serializable(MimeTypeSerializer::class) - object Postscript: Application ("application/postscript") + object Postscript: Application ("application/postscript", arrayOf("ai")) @Serializable(MimeTypeSerializer::class) - object XFontType1: Application ("application/x-font-type1") + object XFontType1: Application ("application/x-font-type1", arrayOf("pfa")) @Serializable(MimeTypeSerializer::class) - object VndPowerbuilder6: Application ("application/vnd.powerbuilder6") + object VndPowerbuilder6: Application ("application/vnd.powerbuilder6", arrayOf("pbd")) @Serializable(MimeTypeSerializer::class) - object PgpEncrypted: Application ("application/pgp-encrypted") + object PgpEncrypted: Application ("application/pgp-encrypted", arrayOf("pgp")) @Serializable(MimeTypeSerializer::class) - object PgpSignature: Application ("application/pgp-signature") + object PgpSignature: Application ("application/pgp-signature", arrayOf("pgp")) @Serializable(MimeTypeSerializer::class) - object VndPreviewsystemsBox: Application ("application/vnd.previewsystems.box") + object VndPreviewsystemsBox: Application ("application/vnd.previewsystems.box", arrayOf("box")) @Serializable(MimeTypeSerializer::class) - object VndPviPtid1: Application ("application/vnd.pvi.ptid1") + object VndPviPtid1: Application ("application/vnd.pvi.ptid1", arrayOf("ptid")) @Serializable(MimeTypeSerializer::class) - object PlsXml: Application ("application/pls+xml") + object PlsXml: Application ("application/pls+xml", arrayOf("pls")) @Serializable(MimeTypeSerializer::class) - object VndPgFormat: Application ("application/vnd.pg.format") + object VndPgFormat: Application ("application/vnd.pg.format", arrayOf("str")) @Serializable(MimeTypeSerializer::class) - object VndPgOsasli: Application ("application/vnd.pg.osasli") + object VndPgOsasli: Application ("application/vnd.pg.osasli", arrayOf("ei6")) @Serializable(MimeTypeSerializer::class) - object XFontLinuxPsf: Application ("application/x-font-linux-psf") + object XFontLinuxPsf: Application ("application/x-font-linux-psf", arrayOf("psf")) @Serializable(MimeTypeSerializer::class) - object VndPublishareDeltaTree: Application ("application/vnd.publishare-delta-tree") + object VndPublishareDeltaTree: Application ("application/vnd.publishare-delta-tree", arrayOf("qps")) @Serializable(MimeTypeSerializer::class) - object VndPmiWidget: Application ("application/vnd.pmi.widget") + object VndPmiWidget: Application ("application/vnd.pmi.widget", arrayOf("wg")) @Serializable(MimeTypeSerializer::class) - object VndQuarkQuarkxpress: Application ("application/vnd.quark.quarkxpress") + object VndQuarkQuarkxpress: Application ("application/vnd.quark.quarkxpress", arrayOf("qxd")) @Serializable(MimeTypeSerializer::class) - object VndEpsonEsf: Application ("application/vnd.epson.esf") + object VndEpsonEsf: Application ("application/vnd.epson.esf", arrayOf("esf")) @Serializable(MimeTypeSerializer::class) - object VndEpsonMsf: Application ("application/vnd.epson.msf") + object VndEpsonMsf: Application ("application/vnd.epson.msf", arrayOf("msf")) @Serializable(MimeTypeSerializer::class) - object VndEpsonSsf: Application ("application/vnd.epson.ssf") + object VndEpsonSsf: Application ("application/vnd.epson.ssf", arrayOf("ssf")) @Serializable(MimeTypeSerializer::class) - object VndEpsonQuickanime: Application ("application/vnd.epson.quickanime") + object VndEpsonQuickanime: Application ("application/vnd.epson.quickanime", arrayOf("qam")) @Serializable(MimeTypeSerializer::class) - object VndIntuQfx: Application ("application/vnd.intu.qfx") + object VndIntuQfx: Application ("application/vnd.intu.qfx", arrayOf("qfx")) @Serializable(MimeTypeSerializer::class) - object XRarCompressed: Application ("application/x-rar-compressed") + object XRarCompressed: Application ("application/x-rar-compressed", arrayOf("rar")) @Serializable(MimeTypeSerializer::class) - object RsdXml: Application ("application/rsd+xml") + object RsdXml: Application ("application/rsd+xml", arrayOf("rsd")) @Serializable(MimeTypeSerializer::class) - object VndRnRealmedia: Application ("application/vnd.rn-realmedia") + object VndRnRealmedia: Application ("application/vnd.rn-realmedia", arrayOf("rm")) @Serializable(MimeTypeSerializer::class) - object VndRealvncBed: Application ("application/vnd.realvnc.bed") + object VndRealvncBed: Application ("application/vnd.realvnc.bed", arrayOf("bed")) @Serializable(MimeTypeSerializer::class) - object VndRecordareMusicxml: Application ("application/vnd.recordare.musicxml") + object VndRecordareMusicxml: Application ("application/vnd.recordare.musicxml", arrayOf("mxl")) @Serializable(MimeTypeSerializer::class) - object VndRecordareMusicxmlXml: Application ("application/vnd.recordare.musicxml+xml") + object VndRecordareMusicxmlXml: Application ("application/vnd.recordare.musicxml+xml", arrayOf("musicxml")) @Serializable(MimeTypeSerializer::class) - object RelaxNgCompactSyntax: Application ("application/relax-ng-compact-syntax") + object RelaxNgCompactSyntax: Application ("application/relax-ng-compact-syntax", arrayOf("rnc")) @Serializable(MimeTypeSerializer::class) - object VndDataVisionRdz: Application ("application/vnd.data-vision.rdz") + object VndDataVisionRdz: Application ("application/vnd.data-vision.rdz", arrayOf("rdz")) @Serializable(MimeTypeSerializer::class) - object RdfXml: Application ("application/rdf+xml") + object RdfXml: Application ("application/rdf+xml", arrayOf("rdf")) @Serializable(MimeTypeSerializer::class) - object VndCloantoRp9: Application ("application/vnd.cloanto.rp9") + object VndCloantoRp9: Application ("application/vnd.cloanto.rp9", arrayOf("rp9")) @Serializable(MimeTypeSerializer::class) - object VndJisp: Application ("application/vnd.jisp") + object VndJisp: Application ("application/vnd.jisp", arrayOf("jisp")) @Serializable(MimeTypeSerializer::class) - object Rtf: Application ("application/rtf") + object Rtf: Application ("application/rtf", arrayOf("rtf")) @Serializable(MimeTypeSerializer::class) - object VndRoute66Link66Xml: Application ("application/vnd.route66.link66+xml") + object VndRoute66Link66Xml: Application ("application/vnd.route66.link66+xml", arrayOf("link66")) @Serializable(MimeTypeSerializer::class) - object RssXml: Application ("application/rss+xml") + object RssXml: Application ("application/rss+xml", arrayOf("rss", "xml")) @Serializable(MimeTypeSerializer::class) - object ShfXml: Application ("application/shf+xml") + object ShfXml: Application ("application/shf+xml", arrayOf("shf")) @Serializable(MimeTypeSerializer::class) - object VndSailingtrackerTrack: Application ("application/vnd.sailingtracker.track") + object VndSailingtrackerTrack: Application ("application/vnd.sailingtracker.track", arrayOf("st")) @Serializable(MimeTypeSerializer::class) - object VndSusCalendar: Application ("application/vnd.sus-calendar") + object VndSusCalendar: Application ("application/vnd.sus-calendar", arrayOf("sus")) @Serializable(MimeTypeSerializer::class) - object SruXml: Application ("application/sru+xml") + object SruXml: Application ("application/sru+xml", arrayOf("sru")) @Serializable(MimeTypeSerializer::class) - object SetPaymentInitiation: Application ("application/set-payment-initiation") + object SetPaymentInitiation: Application ("application/set-payment-initiation", arrayOf("setpay")) @Serializable(MimeTypeSerializer::class) - object SetRegistrationInitiation: Application ("application/set-registration-initiation") + object SetRegistrationInitiation: Application ("application/set-registration-initiation", arrayOf("setreg")) @Serializable(MimeTypeSerializer::class) - object VndSema: Application ("application/vnd.sema") + object VndSema: Application ("application/vnd.sema", arrayOf("sema")) @Serializable(MimeTypeSerializer::class) - object VndSemd: Application ("application/vnd.semd") + object VndSemd: Application ("application/vnd.semd", arrayOf("semd")) @Serializable(MimeTypeSerializer::class) - object VndSemf: Application ("application/vnd.semf") + object VndSemf: Application ("application/vnd.semf", arrayOf("semf")) @Serializable(MimeTypeSerializer::class) - object VndSeemail: Application ("application/vnd.seemail") + object VndSeemail: Application ("application/vnd.seemail", arrayOf("see")) @Serializable(MimeTypeSerializer::class) - object XFontSnf: Application ("application/x-font-snf") + object XFontSnf: Application ("application/x-font-snf", arrayOf("snf")) @Serializable(MimeTypeSerializer::class) - object ScvpVpRequest: Application ("application/scvp-vp-request") + object ScvpVpRequest: Application ("application/scvp-vp-request", arrayOf("spq")) @Serializable(MimeTypeSerializer::class) - object ScvpVpResponse: Application ("application/scvp-vp-response") + object ScvpVpResponse: Application ("application/scvp-vp-response", arrayOf("spp")) @Serializable(MimeTypeSerializer::class) - object ScvpCvRequest: Application ("application/scvp-cv-request") + object ScvpCvRequest: Application ("application/scvp-cv-request", arrayOf("scq")) @Serializable(MimeTypeSerializer::class) - object ScvpCvResponse: Application ("application/scvp-cv-response") + object ScvpCvResponse: Application ("application/scvp-cv-response", arrayOf("scs")) @Serializable(MimeTypeSerializer::class) - object Sdp: Application ("application/sdp") + object Sdp: Application ("application/sdp", arrayOf("sdp")) @Serializable(MimeTypeSerializer::class) - object VndShanaInformedFormdata: Application ("application/vnd.shana.informed.formdata") + object VndShanaInformedFormdata: Application ("application/vnd.shana.informed.formdata", arrayOf("ifm")) @Serializable(MimeTypeSerializer::class) - object VndShanaInformedFormtemplate: Application ("application/vnd.shana.informed.formtemplate") + object VndShanaInformedFormtemplate: Application ("application/vnd.shana.informed.formtemplate", arrayOf("itp")) @Serializable(MimeTypeSerializer::class) - object VndShanaInformedInterchange: Application ("application/vnd.shana.informed.interchange") + object VndShanaInformedInterchange: Application ("application/vnd.shana.informed.interchange", arrayOf("iif")) @Serializable(MimeTypeSerializer::class) - object VndShanaInformedPackage: Application ("application/vnd.shana.informed.package") + object VndShanaInformedPackage: Application ("application/vnd.shana.informed.package", arrayOf("ipk")) @Serializable(MimeTypeSerializer::class) - object ThraudXml: Application ("application/thraud+xml") + object ThraudXml: Application ("application/thraud+xml", arrayOf("tfi")) @Serializable(MimeTypeSerializer::class) - object XShar: Application ("application/x-shar") + object XShar: Application ("application/x-shar", arrayOf("shar")) @Serializable(MimeTypeSerializer::class) - object VndEpsonSalt: Application ("application/vnd.epson.salt") + object VndEpsonSalt: Application ("application/vnd.epson.salt", arrayOf("slt")) @Serializable(MimeTypeSerializer::class) - object VndAccpacSimplyAso: Application ("application/vnd.accpac.simply.aso") + object VndAccpacSimplyAso: Application ("application/vnd.accpac.simply.aso", arrayOf("aso")) @Serializable(MimeTypeSerializer::class) - object VndAccpacSimplyImp: Application ("application/vnd.accpac.simply.imp") + object VndAccpacSimplyImp: Application ("application/vnd.accpac.simply.imp", arrayOf("imp")) @Serializable(MimeTypeSerializer::class) - object VndSimtechMindmapper: Application ("application/vnd.simtech-mindmapper") + object VndSimtechMindmapper: Application ("application/vnd.simtech-mindmapper", arrayOf("twd")) @Serializable(MimeTypeSerializer::class) - object VndCommonspace: Application ("application/vnd.commonspace") + object VndCommonspace: Application ("application/vnd.commonspace", arrayOf("csp")) @Serializable(MimeTypeSerializer::class) - object VndYamahaSmafAudio: Application ("application/vnd.yamaha.smaf-audio") + object VndYamahaSmafAudio: Application ("application/vnd.yamaha.smaf-audio", arrayOf("saf")) @Serializable(MimeTypeSerializer::class) - object VndSmaf: Application ("application/vnd.smaf") + object VndSmaf: Application ("application/vnd.smaf", arrayOf("mmf")) @Serializable(MimeTypeSerializer::class) - object VndYamahaSmafPhrase: Application ("application/vnd.yamaha.smaf-phrase") + object VndYamahaSmafPhrase: Application ("application/vnd.yamaha.smaf-phrase", arrayOf("spf")) @Serializable(MimeTypeSerializer::class) - object VndSmartTeacher: Application ("application/vnd.smart.teacher") + object VndSmartTeacher: Application ("application/vnd.smart.teacher", arrayOf("teacher")) @Serializable(MimeTypeSerializer::class) - object VndSvd: Application ("application/vnd.svd") + object VndSvd: Application ("application/vnd.svd", arrayOf("svd")) @Serializable(MimeTypeSerializer::class) - object SparqlQuery: Application ("application/sparql-query") + object SparqlQuery: Application ("application/sparql-query", arrayOf("rq")) @Serializable(MimeTypeSerializer::class) - object SparqlResultsXml: Application ("application/sparql-results+xml") + object SparqlResultsXml: Application ("application/sparql-results+xml", arrayOf("srx")) @Serializable(MimeTypeSerializer::class) - object Srgs: Application ("application/srgs") + object Srgs: Application ("application/srgs", arrayOf("gram")) @Serializable(MimeTypeSerializer::class) - object SrgsXml: Application ("application/srgs+xml") + object SrgsXml: Application ("application/srgs+xml", arrayOf("grxml")) @Serializable(MimeTypeSerializer::class) - object SsmlXml: Application ("application/ssml+xml") + object SsmlXml: Application ("application/ssml+xml", arrayOf("ssml")) @Serializable(MimeTypeSerializer::class) - object VndKoan: Application ("application/vnd.koan") + object VndKoan: Application ("application/vnd.koan", arrayOf("skp")) @Serializable(MimeTypeSerializer::class) - object VndStardivisionCalc: Application ("application/vnd.stardivision.calc") + object VndStardivisionCalc: Application ("application/vnd.stardivision.calc", arrayOf("sdc")) @Serializable(MimeTypeSerializer::class) - object VndStardivisionDraw: Application ("application/vnd.stardivision.draw") + object VndStardivisionDraw: Application ("application/vnd.stardivision.draw", arrayOf("sda")) @Serializable(MimeTypeSerializer::class) - object VndStardivisionImpress: Application ("application/vnd.stardivision.impress") + object VndStardivisionImpress: Application ("application/vnd.stardivision.impress", arrayOf("sdd")) @Serializable(MimeTypeSerializer::class) - object VndStardivisionMath: Application ("application/vnd.stardivision.math") + object VndStardivisionMath: Application ("application/vnd.stardivision.math", arrayOf("smf")) @Serializable(MimeTypeSerializer::class) - object VndStardivisionWriter: Application ("application/vnd.stardivision.writer") + object VndStardivisionWriter: Application ("application/vnd.stardivision.writer", arrayOf("sdw")) @Serializable(MimeTypeSerializer::class) - object VndStardivisionWriterGlobal: Application ("application/vnd.stardivision.writer-global") + object VndStardivisionWriterGlobal: Application ("application/vnd.stardivision.writer-global", arrayOf("sgl")) @Serializable(MimeTypeSerializer::class) - object VndStepmaniaStepchart: Application ("application/vnd.stepmania.stepchart") + object VndStepmaniaStepchart: Application ("application/vnd.stepmania.stepchart", arrayOf("sm")) @Serializable(MimeTypeSerializer::class) - object XStuffit: Application ("application/x-stuffit") + object XStuffit: Application ("application/x-stuffit", arrayOf("sit")) @Serializable(MimeTypeSerializer::class) - object XStuffitx: Application ("application/x-stuffitx") + object XStuffitx: Application ("application/x-stuffitx", arrayOf("sitx")) @Serializable(MimeTypeSerializer::class) - object VndSolentSdkmXml: Application ("application/vnd.solent.sdkm+xml") + object VndSolentSdkmXml: Application ("application/vnd.solent.sdkm+xml", arrayOf("sdkm")) @Serializable(MimeTypeSerializer::class) - object VndOlpcSugar: Application ("application/vnd.olpc-sugar") + object VndOlpcSugar: Application ("application/vnd.olpc-sugar", arrayOf("xo")) @Serializable(MimeTypeSerializer::class) - object VndWqd: Application ("application/vnd.wqd") + object VndWqd: Application ("application/vnd.wqd", arrayOf("wqd")) @Serializable(MimeTypeSerializer::class) - object VndSymbianInstall: Application ("application/vnd.symbian.install") + object VndSymbianInstall: Application ("application/vnd.symbian.install", arrayOf("sis")) @Serializable(MimeTypeSerializer::class) - object SmilXml: Application ("application/smil+xml") + object SmilXml: Application ("application/smil+xml", arrayOf("smi")) @Serializable(MimeTypeSerializer::class) - object VndSyncmlXml: Application ("application/vnd.syncml+xml") + object VndSyncmlXml: Application ("application/vnd.syncml+xml", arrayOf("xsm")) @Serializable(MimeTypeSerializer::class) - object VndSyncmlDmWbxml: Application ("application/vnd.syncml.dm+wbxml") + object VndSyncmlDmWbxml: Application ("application/vnd.syncml.dm+wbxml", arrayOf("bdm")) @Serializable(MimeTypeSerializer::class) - object VndSyncmlDmXml: Application ("application/vnd.syncml.dm+xml") + object VndSyncmlDmXml: Application ("application/vnd.syncml.dm+xml", arrayOf("xdm")) @Serializable(MimeTypeSerializer::class) - object XSv4cpio: Application ("application/x-sv4cpio") + object XSv4cpio: Application ("application/x-sv4cpio", arrayOf("sv4cpio")) @Serializable(MimeTypeSerializer::class) - object XSv4crc: Application ("application/x-sv4crc") + object XSv4crc: Application ("application/x-sv4crc", arrayOf("sv4crc")) @Serializable(MimeTypeSerializer::class) - object SbmlXml: Application ("application/sbml+xml") + object SbmlXml: Application ("application/sbml+xml", arrayOf("sbml")) @Serializable(MimeTypeSerializer::class) - object VndTaoIntentModuleArchive: Application ("application/vnd.tao.intent-module-archive") + object VndTaoIntentModuleArchive: Application ("application/vnd.tao.intent-module-archive", arrayOf("tao")) @Serializable(MimeTypeSerializer::class) - object XTar: Application ("application/x-tar") + object XTar: Application ("application/x-tar", arrayOf("tar")) @Serializable(MimeTypeSerializer::class) - object XTcl: Application ("application/x-tcl") + object XTcl: Application ("application/x-tcl", arrayOf("tcl")) @Serializable(MimeTypeSerializer::class) - object XTex: Application ("application/x-tex") + object XTex: Application ("application/x-tex", arrayOf("tex")) @Serializable(MimeTypeSerializer::class) - object XTexTfm: Application ("application/x-tex-tfm") + object XTexTfm: Application ("application/x-tex-tfm", arrayOf("tfm")) @Serializable(MimeTypeSerializer::class) - object TeiXml: Application ("application/tei+xml") + object TeiXml: Application ("application/tei+xml", arrayOf("tei")) @Serializable(MimeTypeSerializer::class) - object VndSpotfireDxp: Application ("application/vnd.spotfire.dxp") + object VndSpotfireDxp: Application ("application/vnd.spotfire.dxp", arrayOf("dxp")) @Serializable(MimeTypeSerializer::class) - object VndSpotfireSfs: Application ("application/vnd.spotfire.sfs") + object VndSpotfireSfs: Application ("application/vnd.spotfire.sfs", arrayOf("sfs")) @Serializable(MimeTypeSerializer::class) - object TimestampedData: Application ("application/timestamped-data") + object TimestampedData: Application ("application/timestamped-data", arrayOf("tsd")) @Serializable(MimeTypeSerializer::class) - object VndTridTpt: Application ("application/vnd.trid.tpt") + object VndTridTpt: Application ("application/vnd.trid.tpt", arrayOf("tpt")) @Serializable(MimeTypeSerializer::class) - object VndTriscapeMxs: Application ("application/vnd.triscape.mxs") + object VndTriscapeMxs: Application ("application/vnd.triscape.mxs", arrayOf("mxs")) @Serializable(MimeTypeSerializer::class) - object VndTrueapp: Application ("application/vnd.trueapp") + object VndTrueapp: Application ("application/vnd.trueapp", arrayOf("tra")) @Serializable(MimeTypeSerializer::class) - object XFontTtf: Application ("application/x-font-ttf") + object XFontTtf: Application ("application/x-font-ttf", arrayOf("ttf")) @Serializable(MimeTypeSerializer::class) - object VndUmajin: Application ("application/vnd.umajin") + object VndUmajin: Application ("application/vnd.umajin", arrayOf("umj")) @Serializable(MimeTypeSerializer::class) - object VndUomlXml: Application ("application/vnd.uoml+xml") + object VndUomlXml: Application ("application/vnd.uoml+xml", arrayOf("uoml")) @Serializable(MimeTypeSerializer::class) - object VndUnity: Application ("application/vnd.unity") + object VndUnity: Application ("application/vnd.unity", arrayOf("unityweb")) @Serializable(MimeTypeSerializer::class) - object VndUfdl: Application ("application/vnd.ufdl") + object VndUfdl: Application ("application/vnd.ufdl", arrayOf("ufd")) @Serializable(MimeTypeSerializer::class) - object VndUiqTheme: Application ("application/vnd.uiq.theme") + object VndUiqTheme: Application ("application/vnd.uiq.theme", arrayOf("utz")) @Serializable(MimeTypeSerializer::class) - object XUstar: Application ("application/x-ustar") + object XUstar: Application ("application/x-ustar", arrayOf("ustar")) @Serializable(MimeTypeSerializer::class) - object XCdlink: Application ("application/x-cdlink") + object XCdlink: Application ("application/x-cdlink", arrayOf("vcd")) @Serializable(MimeTypeSerializer::class) - object VndVsf: Application ("application/vnd.vsf") + object VndVsf: Application ("application/vnd.vsf", arrayOf("vsf")) @Serializable(MimeTypeSerializer::class) - object VndVcx: Application ("application/vnd.vcx") + object VndVcx: Application ("application/vnd.vcx", arrayOf("vcx")) @Serializable(MimeTypeSerializer::class) - object VndVisionary: Application ("application/vnd.visionary") + object VndVisionary: Application ("application/vnd.visionary", arrayOf("vis")) @Serializable(MimeTypeSerializer::class) - object CcxmlXml: Application ("application/ccxml+xml,") + object CcxmlXml: Application ("application/ccxml+xml,", arrayOf("ccxml")) @Serializable(MimeTypeSerializer::class) - object VoicexmlXml: Application ("application/voicexml+xml") + object VoicexmlXml: Application ("application/voicexml+xml", arrayOf("vxml")) @Serializable(MimeTypeSerializer::class) - object XWaisSource: Application ("application/x-wais-source") + object XWaisSource: Application ("application/x-wais-source", arrayOf("src")) @Serializable(MimeTypeSerializer::class) - object VndWapWbxml: Application ("application/vnd.wap.wbxml") + object VndWapWbxml: Application ("application/vnd.wap.wbxml", arrayOf("wbxml")) @Serializable(MimeTypeSerializer::class) - object DavmountXml: Application ("application/davmount+xml") + object DavmountXml: Application ("application/davmount+xml", arrayOf("davmount")) @Serializable(MimeTypeSerializer::class) - object XFontWoff: Application ("application/x-font-woff") + object XFontWoff: Application ("application/x-font-woff", arrayOf("woff")) @Serializable(MimeTypeSerializer::class) - object WspolicyXml: Application ("application/wspolicy+xml") + object WspolicyXml: Application ("application/wspolicy+xml", arrayOf("wspolicy")) @Serializable(MimeTypeSerializer::class) - object VndWebturbo: Application ("application/vnd.webturbo") + object VndWebturbo: Application ("application/vnd.webturbo", arrayOf("wtb")) @Serializable(MimeTypeSerializer::class) - object Widget: Application ("application/widget") + object Widget: Application ("application/widget", arrayOf("wgt")) @Serializable(MimeTypeSerializer::class) - object Winhlp: Application ("application/winhlp") + object Winhlp: Application ("application/winhlp", arrayOf("hlp")) @Serializable(MimeTypeSerializer::class) - object VndWapWmlscriptc: Application ("application/vnd.wap.wmlscriptc") + object VndWapWmlscriptc: Application ("application/vnd.wap.wmlscriptc", arrayOf("wmlsc")) @Serializable(MimeTypeSerializer::class) - object VndWordperfect: Application ("application/vnd.wordperfect") + object VndWordperfect: Application ("application/vnd.wordperfect", arrayOf("wpd")) @Serializable(MimeTypeSerializer::class) - object VndWtStf: Application ("application/vnd.wt.stf") + object VndWtStf: Application ("application/vnd.wt.stf", arrayOf("stf")) @Serializable(MimeTypeSerializer::class) - object WsdlXml: Application ("application/wsdl+xml") + object WsdlXml: Application ("application/wsdl+xml", arrayOf("wsdl")) @Serializable(MimeTypeSerializer::class) - object XX509CaCert: Application ("application/x-x509-ca-cert") + object XX509CaCert: Application ("application/x-x509-ca-cert", arrayOf("der")) @Serializable(MimeTypeSerializer::class) - object XXfig: Application ("application/x-xfig") + object XXfig: Application ("application/x-xfig", arrayOf("fig")) @Serializable(MimeTypeSerializer::class) - object XhtmlXml: Application ("application/xhtml+xml") + object XhtmlXml: Application ("application/xhtml+xml", arrayOf("xhtml")) @Serializable(MimeTypeSerializer::class) - object Xml: Application ("application/xml") + object Xml: Application ("application/xml", arrayOf("xml")) @Serializable(MimeTypeSerializer::class) - object XcapDiffXml: Application ("application/xcap-diff+xml") + object XcapDiffXml: Application ("application/xcap-diff+xml", arrayOf("xdf")) @Serializable(MimeTypeSerializer::class) - object XencXml: Application ("application/xenc+xml") + object XencXml: Application ("application/xenc+xml", arrayOf("xenc")) @Serializable(MimeTypeSerializer::class) - object PatchOpsErrorXml: Application ("application/patch-ops-error+xml") + object PatchOpsErrorXml: Application ("application/patch-ops-error+xml", arrayOf("xer")) @Serializable(MimeTypeSerializer::class) - object ResourceListsXml: Application ("application/resource-lists+xml") + object ResourceListsXml: Application ("application/resource-lists+xml", arrayOf("rl")) @Serializable(MimeTypeSerializer::class) - object RlsServicesXml: Application ("application/rls-services+xml") + object RlsServicesXml: Application ("application/rls-services+xml", arrayOf("rs")) @Serializable(MimeTypeSerializer::class) - object ResourceListsDiffXml: Application ("application/resource-lists-diff+xml") + object ResourceListsDiffXml: Application ("application/resource-lists-diff+xml", arrayOf("rld")) @Serializable(MimeTypeSerializer::class) - object XsltXml: Application ("application/xslt+xml") + object XsltXml: Application ("application/xslt+xml", arrayOf("xslt")) @Serializable(MimeTypeSerializer::class) - object XopXml: Application ("application/xop+xml") + object XopXml: Application ("application/xop+xml", arrayOf("xop")) @Serializable(MimeTypeSerializer::class) - object XXpinstall: Application ("application/x-xpinstall") + object XXpinstall: Application ("application/x-xpinstall", arrayOf("xpi")) @Serializable(MimeTypeSerializer::class) - object XspfXml: Application ("application/xspf+xml") + object XspfXml: Application ("application/xspf+xml", arrayOf("xspf")) @Serializable(MimeTypeSerializer::class) - object VndMozillaXulXml: Application ("application/vnd.mozilla.xul+xml") + object VndMozillaXulXml: Application ("application/vnd.mozilla.xul+xml", arrayOf("xul")) @Serializable(MimeTypeSerializer::class) - object Yang: Application ("application/yang") + object Yang: Application ("application/yang", arrayOf("yang")) @Serializable(MimeTypeSerializer::class) - object YinXml: Application ("application/yin+xml") + object YinXml: Application ("application/yin+xml", arrayOf("yin")) @Serializable(MimeTypeSerializer::class) - object VndZul: Application ("application/vnd.zul") + object VndZul: Application ("application/vnd.zul", arrayOf("zir")) @Serializable(MimeTypeSerializer::class) - object Zip: Application ("application/zip") + object Zip: Application ("application/zip", arrayOf("zip")) @Serializable(MimeTypeSerializer::class) - object VndHandheldEntertainmentXml: Application ("application/vnd.handheld-entertainment+xml") + object VndHandheldEntertainmentXml: Application ("application/vnd.handheld-entertainment+xml", arrayOf("zmm")) @Serializable(MimeTypeSerializer::class) - object VndZzazzDeckXml: Application ("application/vnd.zzazz.deck+xml") + object VndZzazzDeckXml: Application ("application/vnd.zzazz.deck+xml", arrayOf("zaz")) } @Serializable(MimeTypeSerializer::class) - sealed class Audio(raw: String) : MimeType, KnownMimeTypes(raw) { + sealed class Audio(raw: String, extensions: Array = emptyArray()) : MimeType, KnownMimeTypes(raw, extensions) { @Serializable(MimeTypeSerializer::class) object Any: Audio ("audio/*") @Serializable(MimeTypeSerializer::class) - object Adpcm: Audio ("audio/adpcm") + object Adpcm: Audio ("audio/adpcm", arrayOf("adp")) @Serializable(MimeTypeSerializer::class) - object XAac: Audio ("audio/x-aac") + object XAac: Audio ("audio/x-aac", arrayOf("aac")) @Serializable(MimeTypeSerializer::class) - object XAiff: Audio ("audio/x-aiff") + object XAiff: Audio ("audio/x-aiff", arrayOf("aif")) @Serializable(MimeTypeSerializer::class) - object VndDeceAudio: Audio ("audio/vnd.dece.audio") + object VndDeceAudio: Audio ("audio/vnd.dece.audio", arrayOf("uva")) @Serializable(MimeTypeSerializer::class) - object VndDigitalWinds: Audio ("audio/vnd.digital-winds") + object VndDigitalWinds: Audio ("audio/vnd.digital-winds", arrayOf("eol")) @Serializable(MimeTypeSerializer::class) - object VndDra: Audio ("audio/vnd.dra") + object VndDra: Audio ("audio/vnd.dra", arrayOf("dra")) @Serializable(MimeTypeSerializer::class) - object VndDts: Audio ("audio/vnd.dts") + object VndDts: Audio ("audio/vnd.dts", arrayOf("dts")) @Serializable(MimeTypeSerializer::class) - object VndDtsHd: Audio ("audio/vnd.dts.hd") + object VndDtsHd: Audio ("audio/vnd.dts.hd", arrayOf("dtshd")) @Serializable(MimeTypeSerializer::class) - object VndRip: Audio ("audio/vnd.rip") + object VndRip: Audio ("audio/vnd.rip", arrayOf("rip")) @Serializable(MimeTypeSerializer::class) - object VndLucentVoice: Audio ("audio/vnd.lucent.voice") + object VndLucentVoice: Audio ("audio/vnd.lucent.voice", arrayOf("lvp")) @Serializable(MimeTypeSerializer::class) - object XMpegurl: Audio ("audio/x-mpegurl") + object XMpegurl: Audio ("audio/x-mpegurl", arrayOf("m3u")) @Serializable(MimeTypeSerializer::class) - object VndMsPlayreadyMediaPya: Audio ("audio/vnd.ms-playready.media.pya") + object VndMsPlayreadyMediaPya: Audio ("audio/vnd.ms-playready.media.pya", arrayOf("pya")) @Serializable(MimeTypeSerializer::class) - object XMsWma: Audio ("audio/x-ms-wma") + object XMsWma: Audio ("audio/x-ms-wma", arrayOf("wma")) @Serializable(MimeTypeSerializer::class) - object XMsWax: Audio ("audio/x-ms-wax") + object XMsWax: Audio ("audio/x-ms-wax", arrayOf("wax")) @Serializable(MimeTypeSerializer::class) - object Midi: Audio ("audio/midi") + object Midi: Audio ("audio/midi", arrayOf("midi")) @Serializable(MimeTypeSerializer::class) - object Mpeg: Audio ("audio/mpeg") + object Mpeg: Audio ("audio/mpeg", arrayOf("mpga")) @Serializable(MimeTypeSerializer::class) - object Mp4: Audio ("audio/mp4") + object Mp4: Audio ("audio/mp4", arrayOf("mp4a")) @Serializable(MimeTypeSerializer::class) - object VndNueraEcelp4800: Audio ("audio/vnd.nuera.ecelp4800") + object VndNueraEcelp4800: Audio ("audio/vnd.nuera.ecelp4800", arrayOf("ecelp4800")) @Serializable(MimeTypeSerializer::class) - object VndNueraEcelp7470: Audio ("audio/vnd.nuera.ecelp7470") + object VndNueraEcelp7470: Audio ("audio/vnd.nuera.ecelp7470", arrayOf("ecelp7470")) @Serializable(MimeTypeSerializer::class) - object VndNueraEcelp9600: Audio ("audio/vnd.nuera.ecelp9600") + object VndNueraEcelp9600: Audio ("audio/vnd.nuera.ecelp9600", arrayOf("ecelp9600")) @Serializable(MimeTypeSerializer::class) - object Ogg: Audio ("audio/ogg") + object Ogg: Audio ("audio/ogg", arrayOf("oga")) @Serializable(MimeTypeSerializer::class) - object Webm: Audio ("audio/webm") + object Webm: Audio ("audio/webm", arrayOf("weba")) @Serializable(MimeTypeSerializer::class) - object Opus: Audio ("audio/opus") + object Opus: Audio ("audio/opus", arrayOf("opus")) @Serializable(MimeTypeSerializer::class) - object XPnRealaudio: Audio ("audio/x-pn-realaudio") + object XPnRealaudio: Audio ("audio/x-pn-realaudio", arrayOf("ram")) @Serializable(MimeTypeSerializer::class) - object XPnRealaudioPlugin: Audio ("audio/x-pn-realaudio-plugin") + object XPnRealaudioPlugin: Audio ("audio/x-pn-realaudio-plugin", arrayOf("rmp")) @Serializable(MimeTypeSerializer::class) - object Basic: Audio ("audio/basic") + object Basic: Audio ("audio/basic", arrayOf("au")) @Serializable(MimeTypeSerializer::class) - object XWav: Audio ("audio/x-wav") + object XWav: Audio ("audio/x-wav", arrayOf("wav")) } @Serializable(MimeTypeSerializer::class) - sealed class Chemical(raw: String) : MimeType, KnownMimeTypes(raw) { + sealed class Chemical(raw: String, extensions: Array = emptyArray()) : MimeType, KnownMimeTypes(raw, extensions) { @Serializable(MimeTypeSerializer::class) object Any: Chemical ("chemical/*") @Serializable(MimeTypeSerializer::class) - object XCdx: Chemical ("chemical/x-cdx") + object XCdx: Chemical ("chemical/x-cdx", arrayOf("cdx")) @Serializable(MimeTypeSerializer::class) - object XCml: Chemical ("chemical/x-cml") + object XCml: Chemical ("chemical/x-cml", arrayOf("cml")) @Serializable(MimeTypeSerializer::class) - object XCsml: Chemical ("chemical/x-csml") + object XCsml: Chemical ("chemical/x-csml", arrayOf("csml")) @Serializable(MimeTypeSerializer::class) - object XCif: Chemical ("chemical/x-cif") + object XCif: Chemical ("chemical/x-cif", arrayOf("cif")) @Serializable(MimeTypeSerializer::class) - object XCmdf: Chemical ("chemical/x-cmdf") + object XCmdf: Chemical ("chemical/x-cmdf", arrayOf("cmdf")) @Serializable(MimeTypeSerializer::class) - object XXyz: Chemical ("chemical/x-xyz") + object XXyz: Chemical ("chemical/x-xyz", arrayOf("xyz")) } @Serializable(MimeTypeSerializer::class) - sealed class Image(raw: String) : MimeType, KnownMimeTypes(raw) { + sealed class Image(raw: String, extensions: Array = emptyArray()) : MimeType, KnownMimeTypes(raw, extensions) { @Serializable(MimeTypeSerializer::class) object Any: Image ("image/*") @Serializable(MimeTypeSerializer::class) - object VndDxf: Image ("image/vnd.dxf") + object VndDxf: Image ("image/vnd.dxf", arrayOf("dxf")) @Serializable(MimeTypeSerializer::class) - object Avif: Image ("image/avif") + object Avif: Image ("image/avif", arrayOf("avif")) @Serializable(MimeTypeSerializer::class) - object Bmp: Image ("image/bmp") + object Bmp: Image ("image/bmp", arrayOf("bmp")) @Serializable(MimeTypeSerializer::class) - object PrsBtif: Image ("image/prs.btif") + object PrsBtif: Image ("image/prs.btif", arrayOf("btif")) @Serializable(MimeTypeSerializer::class) - object VndDvbSubtitle: Image ("image/vnd.dvb.subtitle") + object VndDvbSubtitle: Image ("image/vnd.dvb.subtitle", arrayOf("sub")) @Serializable(MimeTypeSerializer::class) - object XCmuRaster: Image ("image/x-cmu-raster") + object XCmuRaster: Image ("image/x-cmu-raster", arrayOf("ras")) @Serializable(MimeTypeSerializer::class) - object Cgm: Image ("image/cgm") + object Cgm: Image ("image/cgm", arrayOf("cgm")) @Serializable(MimeTypeSerializer::class) - object XCmx: Image ("image/x-cmx") + object XCmx: Image ("image/x-cmx", arrayOf("cmx")) @Serializable(MimeTypeSerializer::class) - object VndDeceGraphic: Image ("image/vnd.dece.graphic") + object VndDeceGraphic: Image ("image/vnd.dece.graphic", arrayOf("uvi")) @Serializable(MimeTypeSerializer::class) - object VndDjvu: Image ("image/vnd.djvu") + object VndDjvu: Image ("image/vnd.djvu", arrayOf("djvu")) @Serializable(MimeTypeSerializer::class) - object VndDwg: Image ("image/vnd.dwg") + object VndDwg: Image ("image/vnd.dwg", arrayOf("dwg")) @Serializable(MimeTypeSerializer::class) - object VndFujixeroxEdmicsMmr: Image ("image/vnd.fujixerox.edmics-mmr") + object VndFujixeroxEdmicsMmr: Image ("image/vnd.fujixerox.edmics-mmr", arrayOf("mmr")) @Serializable(MimeTypeSerializer::class) - object VndFujixeroxEdmicsRlc: Image ("image/vnd.fujixerox.edmics-rlc") + object VndFujixeroxEdmicsRlc: Image ("image/vnd.fujixerox.edmics-rlc", arrayOf("rlc")) @Serializable(MimeTypeSerializer::class) - object VndXiff: Image ("image/vnd.xiff") + object VndXiff: Image ("image/vnd.xiff", arrayOf("xif")) @Serializable(MimeTypeSerializer::class) - object VndFst: Image ("image/vnd.fst") + object VndFst: Image ("image/vnd.fst", arrayOf("fst")) @Serializable(MimeTypeSerializer::class) - object VndFastbidsheet: Image ("image/vnd.fastbidsheet") + object VndFastbidsheet: Image ("image/vnd.fastbidsheet", arrayOf("fbs")) @Serializable(MimeTypeSerializer::class) - object VndFpx: Image ("image/vnd.fpx") + object VndFpx: Image ("image/vnd.fpx", arrayOf("fpx")) @Serializable(MimeTypeSerializer::class) - object VndNetFpx: Image ("image/vnd.net-fpx") + object VndNetFpx: Image ("image/vnd.net-fpx", arrayOf("npx")) @Serializable(MimeTypeSerializer::class) - object XFreehand: Image ("image/x-freehand") + object XFreehand: Image ("image/x-freehand", arrayOf("fh")) @Serializable(MimeTypeSerializer::class) - object G3fax: Image ("image/g3fax") + object G3fax: Image ("image/g3fax", arrayOf("g3")) @Serializable(MimeTypeSerializer::class) - object Gif: Image ("image/gif") + object Gif: Image ("image/gif", arrayOf("gif")) @Serializable(MimeTypeSerializer::class) - object XIcon: Image ("image/x-icon") + object XIcon: Image ("image/x-icon", arrayOf("ico")) @Serializable(MimeTypeSerializer::class) - object Ief: Image ("image/ief") + object Ief: Image ("image/ief", arrayOf("ief")) @Serializable(MimeTypeSerializer::class) - object Jpeg: Image ("image/jpeg") + object Jpeg: Image ("image/jpeg", arrayOf("jpeg", "jpg")) @Serializable(MimeTypeSerializer::class) - object XCitrixJpeg: Image ("image/x-citrix-jpeg") + object XCitrixJpeg: Image ("image/x-citrix-jpeg", arrayOf("jpeg", "jpg")) @Serializable(MimeTypeSerializer::class) - object Pjpeg: Image ("image/pjpeg") + object Pjpeg: Image ("image/pjpeg", arrayOf("pjpeg")) @Serializable(MimeTypeSerializer::class) - object VndMsModi: Image ("image/vnd.ms-modi") + object VndMsModi: Image ("image/vnd.ms-modi", arrayOf("mdi")) @Serializable(MimeTypeSerializer::class) - object Ktx: Image ("image/ktx") + object Ktx: Image ("image/ktx", arrayOf("ktx")) @Serializable(MimeTypeSerializer::class) - object XPcx: Image ("image/x-pcx") + object XPcx: Image ("image/x-pcx", arrayOf("pcx")) @Serializable(MimeTypeSerializer::class) - object VndAdobePhotoshop: Image ("image/vnd.adobe.photoshop") + object VndAdobePhotoshop: Image ("image/vnd.adobe.photoshop", arrayOf("psd")) @Serializable(MimeTypeSerializer::class) - object XPict: Image ("image/x-pict") + object XPict: Image ("image/x-pict", arrayOf("pic")) @Serializable(MimeTypeSerializer::class) - object XPortableAnymap: Image ("image/x-portable-anymap") + object XPortableAnymap: Image ("image/x-portable-anymap", arrayOf("pnm")) @Serializable(MimeTypeSerializer::class) - object XPortableBitmap: Image ("image/x-portable-bitmap") + object XPortableBitmap: Image ("image/x-portable-bitmap", arrayOf("pbm")) @Serializable(MimeTypeSerializer::class) - object XPortableGraymap: Image ("image/x-portable-graymap") + object XPortableGraymap: Image ("image/x-portable-graymap", arrayOf("pgm")) @Serializable(MimeTypeSerializer::class) - object Png: Image ("image/png") + object Png: Image ("image/png", arrayOf("png")) @Serializable(MimeTypeSerializer::class) - object XCitrixPng: Image ("image/x-citrix-png") + object XCitrixPng: Image ("image/x-citrix-png", arrayOf("png")) @Serializable(MimeTypeSerializer::class) - object XPng: Image ("image/x-png") + object XPng: Image ("image/x-png", arrayOf("png")) @Serializable(MimeTypeSerializer::class) - object XPortablePixmap: Image ("image/x-portable-pixmap") + object XPortablePixmap: Image ("image/x-portable-pixmap", arrayOf("ppm")) @Serializable(MimeTypeSerializer::class) - object SvgXml: Image ("image/svg+xml") + object SvgXml: Image ("image/svg+xml", arrayOf("svg")) @Serializable(MimeTypeSerializer::class) - object XRgb: Image ("image/x-rgb") + object XRgb: Image ("image/x-rgb", arrayOf("rgb")) @Serializable(MimeTypeSerializer::class) - object Tiff: Image ("image/tiff") + object Tiff: Image ("image/tiff", arrayOf("tiff")) @Serializable(MimeTypeSerializer::class) - object VndWapWbmp: Image ("image/vnd.wap.wbmp") + object VndWapWbmp: Image ("image/vnd.wap.wbmp", arrayOf("wbmp")) @Serializable(MimeTypeSerializer::class) - object Webp: Image ("image/webp") + object Webp: Image ("image/webp", arrayOf("webp")) @Serializable(MimeTypeSerializer::class) - object XXbitmap: Image ("image/x-xbitmap") + object XXbitmap: Image ("image/x-xbitmap", arrayOf("xbm")) @Serializable(MimeTypeSerializer::class) - object XXpixmap: Image ("image/x-xpixmap") + object XXpixmap: Image ("image/x-xpixmap", arrayOf("xpm")) @Serializable(MimeTypeSerializer::class) - object XXwindowdump: Image ("image/x-xwindowdump") + object XXwindowdump: Image ("image/x-xwindowdump", arrayOf("xwd")) } @Serializable(MimeTypeSerializer::class) - sealed class Message(raw: String) : MimeType, KnownMimeTypes(raw) { + sealed class Message(raw: String, extensions: Array = emptyArray()) : MimeType, KnownMimeTypes(raw, extensions) { @Serializable(MimeTypeSerializer::class) object Any: Message ("message/*") @Serializable(MimeTypeSerializer::class) - object Rfc822: Message ("message/rfc822") + object Rfc822: Message ("message/rfc822", arrayOf("eml")) } @Serializable(MimeTypeSerializer::class) - sealed class Model(raw: String) : MimeType, KnownMimeTypes(raw) { + sealed class Model(raw: String, extensions: Array = emptyArray()) : MimeType, KnownMimeTypes(raw, extensions) { @Serializable(MimeTypeSerializer::class) object Any: Model ("model/*") @Serializable(MimeTypeSerializer::class) - object VndDwf: Model ("model/vnd.dwf") + object VndDwf: Model ("model/vnd.dwf", arrayOf("dwf")) @Serializable(MimeTypeSerializer::class) - object VndColladaXml: Model ("model/vnd.collada+xml") + object VndColladaXml: Model ("model/vnd.collada+xml", arrayOf("dae")) @Serializable(MimeTypeSerializer::class) - object VndGtw: Model ("model/vnd.gtw") + object VndGtw: Model ("model/vnd.gtw", arrayOf("gtw")) @Serializable(MimeTypeSerializer::class) - object VndGdl: Model ("model/vnd.gdl") + object VndGdl: Model ("model/vnd.gdl", arrayOf("gdl")) @Serializable(MimeTypeSerializer::class) - object Iges: Model ("model/iges") + object Iges: Model ("model/iges", arrayOf("igs")) @Serializable(MimeTypeSerializer::class) - object Mesh: Model ("model/mesh") + object Mesh: Model ("model/mesh", arrayOf("msh")) @Serializable(MimeTypeSerializer::class) - object Vrml: Model ("model/vrml") + object Vrml: Model ("model/vrml", arrayOf("wrl")) @Serializable(MimeTypeSerializer::class) - object VndMts: Model ("model/vnd.mts") + object VndMts: Model ("model/vnd.mts", arrayOf("mts")) @Serializable(MimeTypeSerializer::class) - object VndVtu: Model ("model/vnd.vtu") + object VndVtu: Model ("model/vnd.vtu", arrayOf("vtu")) } @Serializable(MimeTypeSerializer::class) - sealed class Text(raw: String) : MimeType, KnownMimeTypes(raw) { + sealed class Text(raw: String, extensions: Array = emptyArray()) : MimeType, KnownMimeTypes(raw, extensions) { @Serializable(MimeTypeSerializer::class) object Any: Text ("text/*") @Serializable(MimeTypeSerializer::class) - object XAsm: Text ("text/x-asm") + object XAsm: Text ("text/x-asm", arrayOf("s")) @Serializable(MimeTypeSerializer::class) - object PlainBas: Text ("text/plain-bas") + object PlainBas: Text ("text/plain-bas", arrayOf("par")) @Serializable(MimeTypeSerializer::class) - object XC: Text ("text/x-c") + object XC: Text ("text/x-c", arrayOf("c")) @Serializable(MimeTypeSerializer::class) - object Css: Text ("text/css") + object Css: Text ("text/css", arrayOf("css")) @Serializable(MimeTypeSerializer::class) - object Csv: Text ("text/csv") + object Csv: Text ("text/csv", arrayOf("csv")) @Serializable(MimeTypeSerializer::class) - object VndCurl: Text ("text/vnd.curl") + object VndCurl: Text ("text/vnd.curl", arrayOf("curl")) @Serializable(MimeTypeSerializer::class) - object VndCurlDcurl: Text ("text/vnd.curl.dcurl") + object VndCurlDcurl: Text ("text/vnd.curl.dcurl", arrayOf("dcurl")) @Serializable(MimeTypeSerializer::class) - object VndCurlMcurl: Text ("text/vnd.curl.mcurl") + object VndCurlMcurl: Text ("text/vnd.curl.mcurl", arrayOf("mcurl")) @Serializable(MimeTypeSerializer::class) - object VndCurlScurl: Text ("text/vnd.curl.scurl") + object VndCurlScurl: Text ("text/vnd.curl.scurl", arrayOf("scurl")) @Serializable(MimeTypeSerializer::class) - object VndFmiFlexstor: Text ("text/vnd.fmi.flexstor") + object VndFmiFlexstor: Text ("text/vnd.fmi.flexstor", arrayOf("flx")) @Serializable(MimeTypeSerializer::class) - object XFortran: Text ("text/x-fortran") + object XFortran: Text ("text/x-fortran", arrayOf("f")) @Serializable(MimeTypeSerializer::class) - object VndGraphviz: Text ("text/vnd.graphviz") + object VndGraphviz: Text ("text/vnd.graphviz", arrayOf("gv")) @Serializable(MimeTypeSerializer::class) - object Html: Text ("text/html") + object Html: Text ("text/html", arrayOf("html")) @Serializable(MimeTypeSerializer::class) - object Calendar: Text ("text/calendar") + object Calendar: Text ("text/calendar", arrayOf("ics")) @Serializable(MimeTypeSerializer::class) - object VndIn3d3dml: Text ("text/vnd.in3d.3dml") + object VndIn3d3dml: Text ("text/vnd.in3d.3dml", arrayOf("3dml")) @Serializable(MimeTypeSerializer::class) - object VndIn3dSpot: Text ("text/vnd.in3d.spot") + object VndIn3dSpot: Text ("text/vnd.in3d.spot", arrayOf("spot")) @Serializable(MimeTypeSerializer::class) - object VndSunJ2meAppDescriptor: Text ("text/vnd.sun.j2me.app-descriptor") + object VndSunJ2meAppDescriptor: Text ("text/vnd.sun.j2me.app-descriptor", arrayOf("jad")) @Serializable(MimeTypeSerializer::class) - object XJavaSourceJava: Text ("text/x-java-source,java") + object XJavaSourceJava: Text ("text/x-java-source,java", arrayOf("java")) @Serializable(MimeTypeSerializer::class) - object Javascript: Text ("text/javascript") + object Javascript: Text ("text/javascript", arrayOf("mjs")) @Serializable(MimeTypeSerializer::class) - object VndFly: Text ("text/vnd.fly") + object VndFly: Text ("text/vnd.fly", arrayOf("fly")) @Serializable(MimeTypeSerializer::class) - object N3: Text ("text/n3") + object N3: Text ("text/n3", arrayOf("n3")) @Serializable(MimeTypeSerializer::class) - object XPascal: Text ("text/x-pascal") + object XPascal: Text ("text/x-pascal", arrayOf("p")) @Serializable(MimeTypeSerializer::class) - object PrsLinesTag: Text ("text/prs.lines.tag") + object PrsLinesTag: Text ("text/prs.lines.tag", arrayOf("dsc")) @Serializable(MimeTypeSerializer::class) - object Richtext: Text ("text/richtext") + object Richtext: Text ("text/richtext", arrayOf("rtx")) @Serializable(MimeTypeSerializer::class) - object XSetext: Text ("text/x-setext") + object XSetext: Text ("text/x-setext", arrayOf("etx")) @Serializable(MimeTypeSerializer::class) - object Sgml: Text ("text/sgml") + object Sgml: Text ("text/sgml", arrayOf("sgml")) @Serializable(MimeTypeSerializer::class) - object TabSeparatedValues: Text ("text/tab-separated-values") + object TabSeparatedValues: Text ("text/tab-separated-values", arrayOf("tsv")) @Serializable(MimeTypeSerializer::class) - object Plain: Text ("text/plain") + object Plain: Text ("text/plain", arrayOf("txt")) @Serializable(MimeTypeSerializer::class) - object Troff: Text ("text/troff") + object Troff: Text ("text/troff", arrayOf("t")) @Serializable(MimeTypeSerializer::class) - object Turtle: Text ("text/turtle") + object Turtle: Text ("text/turtle", arrayOf("ttl")) @Serializable(MimeTypeSerializer::class) - object UriList: Text ("text/uri-list") + object UriList: Text ("text/uri-list", arrayOf("uri")) @Serializable(MimeTypeSerializer::class) - object XUuencode: Text ("text/x-uuencode") + object XUuencode: Text ("text/x-uuencode", arrayOf("uu")) @Serializable(MimeTypeSerializer::class) - object XVcalendar: Text ("text/x-vcalendar") + object XVcalendar: Text ("text/x-vcalendar", arrayOf("vcs")) @Serializable(MimeTypeSerializer::class) - object XVcard: Text ("text/x-vcard") + object XVcard: Text ("text/x-vcard", arrayOf("vcf")) @Serializable(MimeTypeSerializer::class) - object VndWapWml: Text ("text/vnd.wap.wml") + object VndWapWml: Text ("text/vnd.wap.wml", arrayOf("wml")) @Serializable(MimeTypeSerializer::class) - object VndWapWmlscript: Text ("text/vnd.wap.wmlscript") + object VndWapWmlscript: Text ("text/vnd.wap.wmlscript", arrayOf("wmls")) @Serializable(MimeTypeSerializer::class) - object Yaml: Text ("text/yaml") + object Yaml: Text ("text/yaml", arrayOf("yaml")) } @Serializable(MimeTypeSerializer::class) - sealed class Video(raw: String) : MimeType, KnownMimeTypes(raw) { + sealed class Video(raw: String, extensions: Array = emptyArray()) : MimeType, KnownMimeTypes(raw, extensions) { @Serializable(MimeTypeSerializer::class) object Any: Video ("video/*") @Serializable(MimeTypeSerializer::class) - object V3gpp: Video ("video/3gpp") + object V3gpp: Video ("video/3gpp", arrayOf("3gp")) @Serializable(MimeTypeSerializer::class) - object V3gpp2: Video ("video/3gpp2") + object V3gpp2: Video ("video/3gpp2", arrayOf("3g2")) @Serializable(MimeTypeSerializer::class) - object XMsvideo: Video ("video/x-msvideo") + object XMsvideo: Video ("video/x-msvideo", arrayOf("avi")) @Serializable(MimeTypeSerializer::class) - object VndDeceHd: Video ("video/vnd.dece.hd") + object VndDeceHd: Video ("video/vnd.dece.hd", arrayOf("uvh")) @Serializable(MimeTypeSerializer::class) - object VndDeceMobile: Video ("video/vnd.dece.mobile") + object VndDeceMobile: Video ("video/vnd.dece.mobile", arrayOf("uvm")) @Serializable(MimeTypeSerializer::class) - object VndUvvuMp4: Video ("video/vnd.uvvu.mp4") + object VndUvvuMp4: Video ("video/vnd.uvvu.mp4", arrayOf("uvu")) @Serializable(MimeTypeSerializer::class) - object VndDecePd: Video ("video/vnd.dece.pd") + object VndDecePd: Video ("video/vnd.dece.pd", arrayOf("uvp")) @Serializable(MimeTypeSerializer::class) - object VndDeceSd: Video ("video/vnd.dece.sd") + object VndDeceSd: Video ("video/vnd.dece.sd", arrayOf("uvs")) @Serializable(MimeTypeSerializer::class) - object VndDeceVideo: Video ("video/vnd.dece.video") + object VndDeceVideo: Video ("video/vnd.dece.video", arrayOf("uvv")) @Serializable(MimeTypeSerializer::class) - object VndFvt: Video ("video/vnd.fvt") + object VndFvt: Video ("video/vnd.fvt", arrayOf("fvt")) @Serializable(MimeTypeSerializer::class) - object XF4v: Video ("video/x-f4v") + object XF4v: Video ("video/x-f4v", arrayOf("f4v")) @Serializable(MimeTypeSerializer::class) - object XFlv: Video ("video/x-flv") + object XFlv: Video ("video/x-flv", arrayOf("flv")) @Serializable(MimeTypeSerializer::class) - object XFli: Video ("video/x-fli") + object XFli: Video ("video/x-fli", arrayOf("fli")) @Serializable(MimeTypeSerializer::class) - object H261: Video ("video/h261") + object H261: Video ("video/h261", arrayOf("h261")) @Serializable(MimeTypeSerializer::class) - object H263: Video ("video/h263") + object H263: Video ("video/h263", arrayOf("h263")) @Serializable(MimeTypeSerializer::class) - object H264: Video ("video/h264") + object H264: Video ("video/h264", arrayOf("h264")) @Serializable(MimeTypeSerializer::class) - object Jpm: Video ("video/jpm") + object Jpm: Video ("video/jpm", arrayOf("jpm")) @Serializable(MimeTypeSerializer::class) - object Jpeg: Video ("video/jpeg") + object Jpeg: Video ("video/jpeg", arrayOf("jpgv")) @Serializable(MimeTypeSerializer::class) - object XM4v: Video ("video/x-m4v") + object XM4v: Video ("video/x-m4v", arrayOf("m4v")) @Serializable(MimeTypeSerializer::class) - object XMsAsf: Video ("video/x-ms-asf") + object XMsAsf: Video ("video/x-ms-asf", arrayOf("asf")) @Serializable(MimeTypeSerializer::class) - object VndMsPlayreadyMediaPyv: Video ("video/vnd.ms-playready.media.pyv") + object VndMsPlayreadyMediaPyv: Video ("video/vnd.ms-playready.media.pyv", arrayOf("pyv")) @Serializable(MimeTypeSerializer::class) - object XMsWm: Video ("video/x-ms-wm") + object XMsWm: Video ("video/x-ms-wm", arrayOf("wm")) @Serializable(MimeTypeSerializer::class) - object XMsWmx: Video ("video/x-ms-wmx") + object XMsWmx: Video ("video/x-ms-wmx", arrayOf("wmx")) @Serializable(MimeTypeSerializer::class) - object XMsWmv: Video ("video/x-ms-wmv") + object XMsWmv: Video ("video/x-ms-wmv", arrayOf("wmv")) @Serializable(MimeTypeSerializer::class) - object XMsWvx: Video ("video/x-ms-wvx") + object XMsWvx: Video ("video/x-ms-wvx", arrayOf("wvx")) @Serializable(MimeTypeSerializer::class) - object Mj2: Video ("video/mj2") + object Mj2: Video ("video/mj2", arrayOf("mj2")) @Serializable(MimeTypeSerializer::class) - object Mp2t: Video ("video/mp2t") + object Mp2t: Video ("video/mp2t", arrayOf("ts")) @Serializable(MimeTypeSerializer::class) - object VndMpegurl: Video ("video/vnd.mpegurl") + object VndMpegurl: Video ("video/vnd.mpegurl", arrayOf("mxu")) @Serializable(MimeTypeSerializer::class) - object Mpeg: Video ("video/mpeg") + object Mpeg: Video ("video/mpeg", arrayOf("mpeg")) @Serializable(MimeTypeSerializer::class) - object Mp4: Video ("video/mp4") + object Mp4: Video ("video/mp4", arrayOf("mp4")) @Serializable(MimeTypeSerializer::class) - object Ogg: Video ("video/ogg") + object Ogg: Video ("video/ogg", arrayOf("ogv")) @Serializable(MimeTypeSerializer::class) - object Webm: Video ("video/webm") + object Webm: Video ("video/webm", arrayOf("webm")) @Serializable(MimeTypeSerializer::class) - object Quicktime: Video ("video/quicktime") + object Quicktime: Video ("video/quicktime", arrayOf("qt")) @Serializable(MimeTypeSerializer::class) - object XSgiMovie: Video ("video/x-sgi-movie") + object XSgiMovie: Video ("video/x-sgi-movie", arrayOf("movie")) @Serializable(MimeTypeSerializer::class) - object VndVivo: Video ("video/vnd.vivo") + object VndVivo: Video ("video/vnd.vivo", arrayOf("viv")) } @Serializable(MimeTypeSerializer::class) - sealed class XConference(raw: String) : MimeType, KnownMimeTypes(raw) { + sealed class XConference(raw: String, extensions: Array = emptyArray()) : MimeType, KnownMimeTypes(raw, extensions) { @Serializable(MimeTypeSerializer::class) object Any: XConference ("x-conference/*") @Serializable(MimeTypeSerializer::class) - object XCooltalk: XConference ("x-conference/x-cooltalk") + object XCooltalk: XConference ("x-conference/x-cooltalk", arrayOf("ice")) } } diff --git a/mime_types/src/commonMain/kotlin/dev/inmo/micro_utils/mime_types/MimeType.kt b/mime_types/src/commonMain/kotlin/dev/inmo/micro_utils/mime_types/MimeType.kt index 2ac677bb35f..55468b3baac 100644 --- a/mime_types/src/commonMain/kotlin/dev/inmo/micro_utils/mime_types/MimeType.kt +++ b/mime_types/src/commonMain/kotlin/dev/inmo/micro_utils/mime_types/MimeType.kt @@ -5,4 +5,6 @@ import kotlinx.serialization.Serializable @Serializable(MimeTypeSerializer::class) interface MimeType { val raw: String + val extensions: Array + get() = emptyArray() } diff --git a/mppProjectWithSerialization.gradle b/mppProjectWithSerialization.gradle index 3ee345baf44..c242d24c0fb 100644 --- a/mppProjectWithSerialization.gradle +++ b/mppProjectWithSerialization.gradle @@ -54,7 +54,11 @@ kotlin { } mingwX64Test { dependencies { - implementation kotlin('test-js') + implementation kotlin('test-junit') + } + } + linuxX64Test { + dependencies { implementation kotlin('test-junit') } }