package voldemort.store.compress;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

import org.h2.compress.LZFInputStream;
import org.h2.compress.LZFOutputStream;

/**
 * Implementation of CompressionStrategy for the LZF format. LZF is optimized
 * for speed.
 */
public class LzfCompressionStrategy extends StreamCompressionStrategy {

    @Override
    protected OutputStream wrapOutputStream(OutputStream underlying) throws IOException {
        return new LZFOutputStream(underlying);
    }

    @Override
    protected InputStream wrapInputStream(InputStream underlying) throws IOException {
        return new LZFInputStream(underlying);
    }

    public String getType() {
        return "lzf";
    }
}

@@ -60,143 +60,103 @@
 on;%0A
+%0A
 import 
-java.io.InputStream;%0Aimport java.io.OutputStream;%0A%0Aimport org.h2.compress.LZFInputStream;%0Aimport org.h2.compress.LZFOutputStream
+voldemort.store.compress.lzf.LZFDecoder;%0Aimport voldemort.store.compress.lzf.LZFEncoder
 ;%0A%0A/
@@ -294,22 +294,19 @@
 egy 
-extend
+implement
 s 
-Stream
 Comp
@@ -332,368 +332,268 @@
     
-@Override%0A    protected OutputStream wrapOutputStream(OutputStream underlying) throws IOException %7B%0A        return new LZFOutputStream(underlying);%0A    %7D%0A%0A    @Override%0A    protected InputStream wrapInputStream(InputStream underlying) throws IOException %7B%0A        return new LZFInputStream(underlying);%0A    %7D%0A%0A    public String getType() %7B%0A        return %22lzf%22
+public String getType() %7B%0A        return %22lzf%22;%0A    %7D%0A%0A    public byte%5B%5D deflate(byte%5B%5D data) throws IOException %7B%0A        return LZFEncoder.encode(data);%0A    %7D%0A%0A    public byte%5B%5D inflate(byte%5B%5D data) throws IOException %7B%0A        return LZFDecoder.decode(data)
 ;%0A  

Change LzfCompressionStrategy to use LZFEncoder and LZFDecoder.