// 
// Decompiled by Procyon v0.6.0
// 

package com.github.luben.zstd;

import java.io.IOException;
import java.io.OutputStream;
import java.io.FilterOutputStream;

public class ZstdOutputStream extends FilterOutputStream
{
    private ZstdOutputStreamNoFinalizer inner;
    
    @Deprecated
    public ZstdOutputStream(final OutputStream out, final int n, final boolean closeFrameOnFlush, final boolean checksum) throws IOException {
        super(out);
        (this.inner = new ZstdOutputStreamNoFinalizer(out, n)).setCloseFrameOnFlush(closeFrameOnFlush);
        this.inner.setChecksum(checksum);
    }
    
    @Deprecated
    public ZstdOutputStream(final OutputStream out, final int n, final boolean closeFrameOnFlush) throws IOException {
        super(out);
        (this.inner = new ZstdOutputStreamNoFinalizer(out, n)).setCloseFrameOnFlush(closeFrameOnFlush);
    }
    
    public ZstdOutputStream(final OutputStream outputStream, final int level) throws IOException {
        this(outputStream, NoPool.INSTANCE);
        this.inner.setLevel(level);
    }
    
    public ZstdOutputStream(final OutputStream outputStream) throws IOException {
        this(outputStream, NoPool.INSTANCE);
    }
    
    public ZstdOutputStream(final OutputStream outputStream, final BufferPool bufferPool, final int level) throws IOException {
        this(outputStream, bufferPool);
        this.inner.setLevel(level);
    }
    
    public ZstdOutputStream(final OutputStream out, final BufferPool bufferPool) throws IOException {
        super(out);
        this.inner = new ZstdOutputStreamNoFinalizer(out, bufferPool);
    }
    
    @Deprecated
    public void setFinalize(final boolean b) {
    }
    
    @Override
    protected void finalize() throws Throwable {
        this.close();
    }
    
    public static long recommendedCOutSize() {
        return ZstdOutputStreamNoFinalizer.recommendedCOutSize();
    }
    
    public ZstdOutputStream setChecksum(final boolean checksum) throws IOException {
        this.inner.setChecksum(checksum);
        return this;
    }
    
    public ZstdOutputStream setLevel(final int level) throws IOException {
        this.inner.setLevel(level);
        return this;
    }
    
    public ZstdOutputStream setLong(final int long1) throws IOException {
        this.inner.setLong(long1);
        return this;
    }
    
    public ZstdOutputStream setWorkers(final int workers) throws IOException {
        this.inner.setWorkers(workers);
        return this;
    }
    
    public ZstdOutputStream setOverlapLog(final int overlapLog) throws IOException {
        this.inner.setOverlapLog(overlapLog);
        return this;
    }
    
    public ZstdOutputStream setJobSize(final int jobSize) throws IOException {
        this.inner.setJobSize(jobSize);
        return this;
    }
    
    public ZstdOutputStream setTargetLength(final int targetLength) throws IOException {
        this.inner.setTargetLength(targetLength);
        return this;
    }
    
    public ZstdOutputStream setMinMatch(final int minMatch) throws IOException {
        this.inner.setMinMatch(minMatch);
        return this;
    }
    
    public ZstdOutputStream setSearchLog(final int searchLog) throws IOException {
        this.inner.setSearchLog(searchLog);
        return this;
    }
    
    public ZstdOutputStream setChainLog(final int chainLog) throws IOException {
        this.inner.setChainLog(chainLog);
        return this;
    }
    
    public ZstdOutputStream setHashLog(final int hashLog) throws IOException {
        this.inner.setHashLog(hashLog);
        return this;
    }
    
    public ZstdOutputStream setWindowLog(final int windowLog) throws IOException {
        this.inner.setWindowLog(windowLog);
        return this;
    }
    
    public ZstdOutputStream setStrategy(final int strategy) throws IOException {
        this.inner.setStrategy(strategy);
        return this;
    }
    
    public ZstdOutputStream setCloseFrameOnFlush(final boolean closeFrameOnFlush) {
        this.inner.setCloseFrameOnFlush(closeFrameOnFlush);
        return this;
    }
    
    public ZstdOutputStream setDict(final byte[] dict) throws IOException {
        this.inner.setDict(dict);
        return this;
    }
    
    public ZstdOutputStream setDict(final ZstdDictCompress dict) throws IOException {
        this.inner.setDict(dict);
        return this;
    }
    
    @Override
    public void write(final byte[] array, final int n, final int n2) throws IOException {
        this.inner.write(array, n, n2);
    }
    
    @Override
    public void write(final int n) throws IOException {
        this.inner.write(n);
    }
    
    @Override
    public void flush() throws IOException {
        this.inner.flush();
    }
    
    @Override
    public void close() throws IOException {
        this.inner.close();
    }
}
