com.xxdb.compression.EncoderFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dolphindb-javaapi Show documentation
Show all versions of dolphindb-javaapi Show documentation
The messaging and data conversion protocol between Java and DolphinDB server
package com.xxdb.compression;
public class EncoderFactory {
private EncoderFactory() {}
public static Encoder get(int method){
if(method == 1)
return new LZ4Encoder();
else if(method == 2)
return new DeltaOfDeltaEncoder();
else
throw new RuntimeException("Invalid compression method " + method);
}
}