package com.nisemoe.nise.database

import com.nisemoe.nise.service.CompressReplay
import org.junit.jupiter.api.Test
import org.slf4j.LoggerFactory

class Compression {

    private val logger = LoggerFactory.getLogger(javaClass)

    val replayFile = "[encoded data, 24812 characters]"
    val BASE_SIZE = 18907

    @Test
    fun compressionShit() {
        val compressed = CompressReplay.compressReplay(replayFile)


        logger.info("Compressed replay collection from ${replayFile.length} bytes to ${compressed.size} bytes [reference: $BASE_SIZE]")

        assert(compressed.size <= BASE_SIZE)
    }

}