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

skadistats.clarity.io.decoder.factory.s1.ArrayDecoderFactory Maven / Gradle / Ivy

Go to download

Clarity is an open source replay parser for Dota 2 and CSGO 1 and 2 written in Java.

There is a newer version: 3.1.1
Show newest version
package skadistats.clarity.io.decoder.factory.s1;

import skadistats.clarity.io.Util;
import skadistats.clarity.io.s1.S1DecoderFactory;
import skadistats.clarity.io.s1.SendProp;
import skadistats.clarity.io.decoder.ArrayDecoder;
import skadistats.clarity.io.decoder.Decoder;

public class ArrayDecoderFactory implements DecoderFactory {

    public static Decoder createDecoderStatic(SendProp prop) {
        return new ArrayDecoder(
            S1DecoderFactory.createDecoder(prop.getTemplate()),
            Util.calcBitsNeededFor(prop.getNumElements())
        );
    }

    @Override
    public Decoder createDecoder(SendProp prop) {
        return (Decoder) createDecoderStatic(prop);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy