class CompressStrategyManager {

    private static byte DEFAULT_STRATEGY = 1;
    public static final byte SERIAL_STRATEGY = 1;
    public static final byte PARALLEL_STRATEGY = 2;
    public static final byte MAX_STRATEGY = 5;
    private static CompressStrategy[] compressStrategies = new CompressStrategy[MAX_STRATEGY];

    static {
        addCompressStrategy(SERIAL_STRATEGY, new SerialCompressStrategy());
    }

    private CompressStrategyManager() {
    }

    public static void addCompressStrategy(int index, CompressStrategy compressStrategy) {<FILL_FUNCTION_BODY>}

    public static CompressStrategy getDefault() {
        return compressStrategies[DEFAULT_STRATEGY];
    }

    public static void init(final HugeConfig config) {
        if (!config.get(CoreOptions.RAFT_SNAPSHOT_PARALLEL_COMPRESS)) {
            return;
        }
        // add parallel compress strategy
        if (compressStrategies[PARALLEL_STRATEGY] == null) {
            CompressStrategy compressStrategy = new ParallelCompressStrategy(
                    config.get(CoreOptions.RAFT_SNAPSHOT_COMPRESS_THREADS),
                    config.get(CoreOptions.RAFT_SNAPSHOT_DECOMPRESS_THREADS));
            CompressStrategyManager.addCompressStrategy(
                    CompressStrategyManager.PARALLEL_STRATEGY, compressStrategy);
            DEFAULT_STRATEGY = PARALLEL_STRATEGY;
        }
    }
}

        if (compressStrategies.length <= index) {
            CompressStrategy[] newCompressStrategies = new CompressStrategy[index + MAX_STRATEGY];
            System.arraycopy(compressStrategies, 0, newCompressStrategies, 0,
                             compressStrategies.length);
            compressStrategies = newCompressStrategies;
        }
        compressStrategies[index] = compressStrategy;
    
<no_super_class>