27 lines
722 B
Java
27 lines
722 B
Java
package eu.mikroskeem.uurimustoo.algoritmidetest.algoritmid;
|
|
|
|
import com.github.luben.zstd.ZstdInputStream;
|
|
import com.github.luben.zstd.ZstdOutputStream;
|
|
import lombok.Getter;
|
|
|
|
import java.io.IOException;
|
|
import java.io.InputStream;
|
|
import java.io.OutputStream;
|
|
|
|
/**
|
|
* @author Mark Vainomaa
|
|
*/
|
|
public class Zstandard extends AbstractAlgorithm {
|
|
@Getter private final String name = "Zstandard";
|
|
|
|
@Override
|
|
public OutputStream createCompressor(OutputStream outputStream) throws IOException {
|
|
return new ZstdOutputStream(outputStream);
|
|
}
|
|
|
|
@Override
|
|
public InputStream createDecompressor(InputStream inputStream) throws IOException {
|
|
return new ZstdInputStream(inputStream);
|
|
}
|
|
}
|