All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.com.darkrockstudios.fdic.FrequencyDictionaryFileFormat.kt Maven / Gradle / Ivy

Go to download

A Kotlin Multiplatform implementation of the SymSpell Spell Checking algorithm.

The newest version!
package com.darkrockstudios.fdic

object FrequencyDictionaryFileFormat {
	const val MAGIC_WORD = 0x0F0D010C
	const val FORMAT_VERSION: Byte = 0x01

	const val MAGIC_WORD_SIZE = 4L
	const val FORMAT_VERSION_SIZE = 1L
	const val UNCOMPRESSED_HEADER_SIZE: Long = MAGIC_WORD_SIZE + FORMAT_VERSION_SIZE

	fun magicWordBytes(): ByteArray = MAGIC_WORD.toByteArray()
	fun formatVersion(): ByteArray {
		val array = ByteArray(1)
		array[0] = FORMAT_VERSION
		return array
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy