diff --git a/cottontaildb-dbms/src/main/kotlin/org/vitrivr/cottontail/storage/serializers/tablets/LZ4TabletSerializer.kt b/cottontaildb-dbms/src/main/kotlin/org/vitrivr/cottontail/storage/serializers/tablets/LZ4TabletSerializer.kt index d67af6038..d1b21df48 100644 --- a/cottontaildb-dbms/src/main/kotlin/org/vitrivr/cottontail/storage/serializers/tablets/LZ4TabletSerializer.kt +++ b/cottontaildb-dbms/src/main/kotlin/org/vitrivr/cottontail/storage/serializers/tablets/LZ4TabletSerializer.kt @@ -3,6 +3,7 @@ package org.vitrivr.cottontail.storage.serializers.tablets import jetbrains.exodus.ArrayByteIterable import jetbrains.exodus.ByteIterable import net.jpountz.lz4.LZ4Compressor +import net.jpountz.lz4.LZ4Factory import org.vitrivr.cottontail.core.types.Types import org.vitrivr.cottontail.core.types.Value import org.vitrivr.cottontail.core.values.DoubleVectorValue @@ -22,10 +23,10 @@ import java.nio.ByteBuffer class LZ4TabletSerializer(override val type: Types, val size: Int): TabletSerializer { /** The [LZ4Compressor] instance used by this [LZ4TabletSerializer]. */ - private val compressor: LZ4Compressor = TabletSerializer.FACTORY.highCompressor() + private val compressor: LZ4Compressor = LZ4Factory.fastestInstance().highCompressor() /** The [LZ4Compressor] instance used by this [LZ4TabletSerializer]. */ - private val decompressor = TabletSerializer.FACTORY.fastDecompressor() + private val decompressor = LZ4Factory.fastestInstance().fastDecompressor() /** Internal buffer used to store compressed data. */ private val compressBuffer: ByteBuffer = ByteBuffer.allocate(this.compressor.maxCompressedLength( this.size.shr(3) + when(type) { diff --git a/cottontaildb-dbms/src/main/kotlin/org/vitrivr/cottontail/storage/serializers/tablets/TabletSerializer.kt b/cottontaildb-dbms/src/main/kotlin/org/vitrivr/cottontail/storage/serializers/tablets/TabletSerializer.kt index 2bca53742..158587d28 100644 --- a/cottontaildb-dbms/src/main/kotlin/org/vitrivr/cottontail/storage/serializers/tablets/TabletSerializer.kt +++ b/cottontaildb-dbms/src/main/kotlin/org/vitrivr/cottontail/storage/serializers/tablets/TabletSerializer.kt @@ -15,11 +15,6 @@ import org.vitrivr.cottontail.core.values.tablets.Tablet */ interface TabletSerializer { - companion object { - /** The [LZ4Factory] instance used. */ - val FACTORY: LZ4Factory = LZ4Factory.fastestInstance() - } - /** The [Types] converted by this [TabletSerializer]. */ val type: Types