public class com.aayushatharva.brotli4j.decoder.Decoder extends java.lang.Object
{
private static final java.nio.ByteBuffer EMPTY_BUFFER;
private final java.nio.channels.ReadableByteChannel source;
private final com.aayushatharva.brotli4j.decoder.DecoderJNI$Wrapper decoder;
java.nio.ByteBuffer buffer;
boolean closed;
boolean eager;
public void <init>(java.nio.channels.ReadableByteChannel, int) throws java.io.IOException
{
java.nio.channels.ReadableByteChannel v;
com.aayushatharva.brotli4j.decoder.Decoder v;
com.aayushatharva.brotli4j.decoder.DecoderJNI$Wrapper v;
int v;
java.lang.IllegalArgumentException v;
java.lang.NullPointerException v;
v := @this: com.aayushatharva.brotli4j.decoder.Decoder;
v := @parameter: java.nio.channels.ReadableByteChannel;
v := @parameter: int;
specialinvoke v.<java.lang.Object: void <init>()>();
if v > 0 goto label;
v = new java.lang.IllegalArgumentException;
specialinvoke v.<java.lang.IllegalArgumentException: void <init>(java.lang.String)>("buffer size must be positive");
throw v;
label:
if v != null goto label;
v = new java.lang.NullPointerException;
specialinvoke v.<java.lang.NullPointerException: void <init>(java.lang.String)>("source can not be null");
throw v;
label:
v.<com.aayushatharva.brotli4j.decoder.Decoder: java.nio.channels.ReadableByteChannel source> = v;
v = new com.aayushatharva.brotli4j.decoder.DecoderJNI$Wrapper;
specialinvoke v.<com.aayushatharva.brotli4j.decoder.DecoderJNI$Wrapper: void <init>(int)>(v);
v.<com.aayushatharva.brotli4j.decoder.Decoder: com.aayushatharva.brotli4j.decoder.DecoderJNI$Wrapper decoder> = v;
return;
}
public static com.aayushatharva.brotli4j.decoder.DirectDecompress decompress(byte[]) throws java.io.IOException
{
byte[] v, v, v;
com.aayushatharva.brotli4j.decoder.DirectDecompress v, v, v, v;
java.nio.ByteBuffer v, v;
int[] v;
boolean v;
java.lang.Throwable v;
java.util.ArrayList v;
com.aayushatharva.brotli4j.decoder.DecoderJNI$Wrapper v;
int v, v, v, v, v, v, v, v, v, v, v;
java.util.Iterator v;
com.aayushatharva.brotli4j.decoder.DecoderJNI$Status v, v, v, v, v, v, v, v, v;
java.lang.Object v, v;
v := @parameter: byte[];
v = new com.aayushatharva.brotli4j.decoder.DecoderJNI$Wrapper;
v = lengthof v;
specialinvoke v.<com.aayushatharva.brotli4j.decoder.DecoderJNI$Wrapper: void <init>(int)>(v);
v = new java.util.ArrayList;
specialinvoke v.<java.util.ArrayList: void <init>()>();
v = 0;
label:
v = virtualinvoke v.<com.aayushatharva.brotli4j.decoder.DecoderJNI$Wrapper: java.nio.ByteBuffer getInputBuffer()>();
virtualinvoke v.<java.nio.ByteBuffer: java.nio.ByteBuffer put(byte[])>(v);
v = lengthof v;
virtualinvoke v.<com.aayushatharva.brotli4j.decoder.DecoderJNI$Wrapper: void push(int)>(v);
label:
v = virtualinvoke v.<com.aayushatharva.brotli4j.decoder.DecoderJNI$Wrapper: com.aayushatharva.brotli4j.decoder.DecoderJNI$Status getStatus()>();
v = <com.aayushatharva.brotli4j.decoder.DecoderJNI$Status: com.aayushatharva.brotli4j.decoder.DecoderJNI$Status DONE>;
if v == v goto label;
v = <com.aayushatharva.brotli4j.decoder.Decoder$1: int[] $SwitchMap$com$aayushatharva$brotli4j$decoder$DecoderJNI$Status>;
v = virtualinvoke v.<com.aayushatharva.brotli4j.decoder.DecoderJNI$Wrapper: com.aayushatharva.brotli4j.decoder.DecoderJNI$Status getStatus()>();
v = virtualinvoke v.<com.aayushatharva.brotli4j.decoder.DecoderJNI$Status: int ordinal()>();
v = v[v];
tableswitch(v)
{
case 1: goto label;
case 2: goto label;
case 3: goto label;
default: goto label;
};
label:
virtualinvoke v.<com.aayushatharva.brotli4j.decoder.DecoderJNI$Wrapper: void push(int)>(0);
goto label;
label:
v = virtualinvoke v.<com.aayushatharva.brotli4j.decoder.DecoderJNI$Wrapper: java.nio.ByteBuffer pull()>();
v = virtualinvoke v.<java.nio.ByteBuffer: int remaining()>();
v = newarray (byte)[v];
virtualinvoke v.<java.nio.ByteBuffer: java.nio.ByteBuffer get(byte[])>(v);
virtualinvoke v.<java.util.ArrayList: boolean add(java.lang.Object)>(v);
v = lengthof v;
v = v + v;
goto label;
label:
virtualinvoke v.<com.aayushatharva.brotli4j.decoder.DecoderJNI$Wrapper: void push(int)>(0);
v = virtualinvoke v.<com.aayushatharva.brotli4j.decoder.DecoderJNI$Wrapper: com.aayushatharva.brotli4j.decoder.DecoderJNI$Status getStatus()>();
v = <com.aayushatharva.brotli4j.decoder.DecoderJNI$Status: com.aayushatharva.brotli4j.decoder.DecoderJNI$Status NEEDS_MORE_INPUT>;
if v != v goto label;
v = new com.aayushatharva.brotli4j.decoder.DirectDecompress;
v = virtualinvoke v.<com.aayushatharva.brotli4j.decoder.DecoderJNI$Wrapper: com.aayushatharva.brotli4j.decoder.DecoderJNI$Status getStatus()>();
specialinvoke v.<com.aayushatharva.brotli4j.decoder.DirectDecompress: void <init>(com.aayushatharva.brotli4j.decoder.DecoderJNI$Status,byte[],io.netty.buffer.ByteBuf)>(v, null, null);
label:
virtualinvoke v.<com.aayushatharva.brotli4j.decoder.DecoderJNI$Wrapper: void destroy()>();
return v;
label:
v = new com.aayushatharva.brotli4j.decoder.DirectDecompress;
v = virtualinvoke v.<com.aayushatharva.brotli4j.decoder.DecoderJNI$Wrapper: com.aayushatharva.brotli4j.decoder.DecoderJNI$Status getStatus()>();
specialinvoke v.<com.aayushatharva.brotli4j.decoder.DirectDecompress: void <init>(com.aayushatharva.brotli4j.decoder.DecoderJNI$Status,byte[],io.netty.buffer.ByteBuf)>(v, null, null);
label:
virtualinvoke v.<com.aayushatharva.brotli4j.decoder.DecoderJNI$Wrapper: void destroy()>();
return v;
label:
virtualinvoke v.<com.aayushatharva.brotli4j.decoder.DecoderJNI$Wrapper: void destroy()>();
goto label;
label:
v := @caughtexception;
virtualinvoke v.<com.aayushatharva.brotli4j.decoder.DecoderJNI$Wrapper: void destroy()>();
throw v;
label:
v = virtualinvoke v.<java.util.ArrayList: int size()>();
if v != 1 goto label;
v = new com.aayushatharva.brotli4j.decoder.DirectDecompress;
v = virtualinvoke v.<com.aayushatharva.brotli4j.decoder.DecoderJNI$Wrapper: com.aayushatharva.brotli4j.decoder.DecoderJNI$Status getStatus()>();
v = virtualinvoke v.<java.util.ArrayList: java.lang.Object get(int)>(0);
specialinvoke v.<com.aayushatharva.brotli4j.decoder.DirectDecompress: void <init>(com.aayushatharva.brotli4j.decoder.DecoderJNI$Status,byte[],io.netty.buffer.ByteBuf)>(v, v, null);
return v;
label:
v = newarray (byte)[v];
v = 0;
v = virtualinvoke v.<java.util.ArrayList: java.util.Iterator iterator()>();
label:
v = interfaceinvoke v.<java.util.Iterator: boolean hasNext()>();
if v == 0 goto label;
v = interfaceinvoke v.<java.util.Iterator: java.lang.Object next()>();
v = lengthof v;
staticinvoke <java.lang.System: void arraycopy(java.lang.Object,int,java.lang.Object,int,int)>(v, 0, v, v, v);
v = lengthof v;
v = v + v;
goto label;
label:
v = new com.aayushatharva.brotli4j.decoder.DirectDecompress;
v = virtualinvoke v.<com.aayushatharva.brotli4j.decoder.DecoderJNI$Wrapper: com.aayushatharva.brotli4j.decoder.DecoderJNI$Status getStatus()>();
specialinvoke v.<com.aayushatharva.brotli4j.decoder.DirectDecompress: void <init>(com.aayushatharva.brotli4j.decoder.DecoderJNI$Status,byte[],io.netty.buffer.ByteBuf)>(v, v, null);
return v;
catch java.lang.Throwable from label to label with label;
catch java.lang.Throwable from label to label with label;
}
private void fail(java.lang.String) throws java.io.IOException
{
java.io.IOException v;
java.lang.String v;
com.aayushatharva.brotli4j.decoder.Decoder v;
v := @this: com.aayushatharva.brotli4j.decoder.Decoder;
v := @parameter: java.lang.String;
v = new java.io.IOException;
specialinvoke v.<java.io.IOException: void <init>(java.lang.String)>(v);
throw v;
}
void attachDictionary(java.nio.ByteBuffer) throws java.io.IOException
{
com.aayushatharva.brotli4j.decoder.Decoder v;
com.aayushatharva.brotli4j.decoder.DecoderJNI$Wrapper v;
java.nio.ByteBuffer v;
boolean v;
v := @this: com.aayushatharva.brotli4j.decoder.Decoder;
v := @parameter: java.nio.ByteBuffer;
v = v.<com.aayushatharva.brotli4j.decoder.Decoder: com.aayushatharva.brotli4j.decoder.DecoderJNI$Wrapper decoder>;
v = virtualinvoke v.<com.aayushatharva.brotli4j.decoder.DecoderJNI$Wrapper: boolean attachDictionary(java.nio.ByteBuffer)>(v);
if v != 0 goto label;
specialinvoke v.<com.aayushatharva.brotli4j.decoder.Decoder: void fail(java.lang.String)>("failed to attach dictionary");
label:
return;
}
public void enableEagerOutput()
{
com.aayushatharva.brotli4j.decoder.Decoder v;
v := @this: com.aayushatharva.brotli4j.decoder.Decoder;
v.<com.aayushatharva.brotli4j.decoder.Decoder: boolean eager> = 1;
return;
}
int decode() throws java.io.IOException
{
java.nio.ByteBuffer v, v, v, v, v, v, v;
int[] v;
com.aayushatharva.brotli4j.decoder.DecoderJNI$Wrapper v, v, v, v, v, v, v;
int v, v, v, v, v, v;
boolean v, v, v;
java.nio.channels.ReadableByteChannel v;
com.aayushatharva.brotli4j.decoder.Decoder v;
com.aayushatharva.brotli4j.decoder.DecoderJNI$Status v;
v := @this: com.aayushatharva.brotli4j.decoder.Decoder;
label:
v = v.<com.aayushatharva.brotli4j.decoder.Decoder: java.nio.ByteBuffer buffer>;
if v == null goto label;
v = v.<com.aayushatharva.brotli4j.decoder.Decoder: java.nio.ByteBuffer buffer>;
v = virtualinvoke v.<java.nio.ByteBuffer: boolean hasRemaining()>();
if v != 0 goto label;
v.<com.aayushatharva.brotli4j.decoder.Decoder: java.nio.ByteBuffer buffer> = null;
goto label;
label:
v = v.<com.aayushatharva.brotli4j.decoder.Decoder: java.nio.ByteBuffer buffer>;
v = virtualinvoke v.<java.nio.ByteBuffer: int remaining()>();
return v;
label:
v = <com.aayushatharva.brotli4j.decoder.Decoder$1: int[] $SwitchMap$com$aayushatharva$brotli4j$decoder$DecoderJNI$Status>;
v = v.<com.aayushatharva.brotli4j.decoder.Decoder: com.aayushatharva.brotli4j.decoder.DecoderJNI$Wrapper decoder>;
v = virtualinvoke v.<com.aayushatharva.brotli4j.decoder.DecoderJNI$Wrapper: com.aayushatharva.brotli4j.decoder.DecoderJNI$Status getStatus()>();
v = virtualinvoke v.<com.aayushatharva.brotli4j.decoder.DecoderJNI$Status: int ordinal()>();
v = v[v];
tableswitch(v)
{
case 1: goto label;
case 2: goto label;
case 3: goto label;
case 4: goto label;
default: goto label;
};
label:
v = (int) -1;
return v;
label:
v = v.<com.aayushatharva.brotli4j.decoder.Decoder: com.aayushatharva.brotli4j.decoder.DecoderJNI$Wrapper decoder>;
virtualinvoke v.<com.aayushatharva.brotli4j.decoder.DecoderJNI$Wrapper: void push(int)>(0);
goto label;
label:
v = v.<com.aayushatharva.brotli4j.decoder.Decoder: boolean eager>;
if v == 0 goto label;
v = v.<com.aayushatharva.brotli4j.decoder.Decoder: com.aayushatharva.brotli4j.decoder.DecoderJNI$Wrapper decoder>;
v = virtualinvoke v.<com.aayushatharva.brotli4j.decoder.DecoderJNI$Wrapper: boolean hasOutput()>();
if v == 0 goto label;
v = v.<com.aayushatharva.brotli4j.decoder.Decoder: com.aayushatharva.brotli4j.decoder.DecoderJNI$Wrapper decoder>;
v = virtualinvoke v.<com.aayushatharva.brotli4j.decoder.DecoderJNI$Wrapper: java.nio.ByteBuffer pull()>();
v.<com.aayushatharva.brotli4j.decoder.Decoder: java.nio.ByteBuffer buffer> = v;
goto label;
label:
v = v.<com.aayushatharva.brotli4j.decoder.Decoder: com.aayushatharva.brotli4j.decoder.DecoderJNI$Wrapper decoder>;
v = virtualinvoke v.<com.aayushatharva.brotli4j.decoder.DecoderJNI$Wrapper: java.nio.ByteBuffer getInputBuffer()>();
virtualinvoke v.<java.nio.Buffer: java.nio.Buffer clear()>();
v = v.<com.aayushatharva.brotli4j.decoder.Decoder: java.nio.channels.ReadableByteChannel source>;
v = interfaceinvoke v.<java.nio.channels.ReadableByteChannel: int read(java.nio.ByteBuffer)>(v);
v = (int) -1;
if v != v goto label;
specialinvoke v.<com.aayushatharva.brotli4j.decoder.Decoder: void fail(java.lang.String)>("unexpected end of input");
label:
if v != 0 goto label;
v = <com.aayushatharva.brotli4j.decoder.Decoder: java.nio.ByteBuffer EMPTY_BUFFER>;
v.<com.aayushatharva.brotli4j.decoder.Decoder: java.nio.ByteBuffer buffer> = v;
return 0;
label:
v = v.<com.aayushatharva.brotli4j.decoder.Decoder: com.aayushatharva.brotli4j.decoder.DecoderJNI$Wrapper decoder>;
virtualinvoke v.<com.aayushatharva.brotli4j.decoder.DecoderJNI$Wrapper: void push(int)>(v);
goto label;
label:
v = v.<com.aayushatharva.brotli4j.decoder.Decoder: com.aayushatharva.brotli4j.decoder.DecoderJNI$Wrapper decoder>;
v = virtualinvoke v.<com.aayushatharva.brotli4j.decoder.DecoderJNI$Wrapper: java.nio.ByteBuffer pull()>();
v.<com.aayushatharva.brotli4j.decoder.Decoder: java.nio.ByteBuffer buffer> = v;
goto label;
label:
specialinvoke v.<com.aayushatharva.brotli4j.decoder.Decoder: void fail(java.lang.String)>("corrupted input");
goto label;
}
void discard(int)
{
com.aayushatharva.brotli4j.decoder.Decoder v;
java.nio.ByteBuffer v, v, v;
int v, v, v;
boolean v;
v := @this: com.aayushatharva.brotli4j.decoder.Decoder;
v := @parameter: int;
v = v.<com.aayushatharva.brotli4j.decoder.Decoder: java.nio.ByteBuffer buffer>;
v = v.<com.aayushatharva.brotli4j.decoder.Decoder: java.nio.ByteBuffer buffer>;
v = virtualinvoke v.<java.nio.ByteBuffer: int position()>();
v = v + v;
virtualinvoke v.<java.nio.Buffer: java.nio.Buffer position(int)>(v);
v = v.<com.aayushatharva.brotli4j.decoder.Decoder: java.nio.ByteBuffer buffer>;
v = virtualinvoke v.<java.nio.ByteBuffer: boolean hasRemaining()>();
if v != 0 goto label;
v.<com.aayushatharva.brotli4j.decoder.Decoder: java.nio.ByteBuffer buffer> = null;
label:
return;
}
int consume(java.nio.ByteBuffer)
{
com.aayushatharva.brotli4j.decoder.Decoder v;
int v, v, v;
java.nio.ByteBuffer v, v, v;
v := @this: com.aayushatharva.brotli4j.decoder.Decoder;
v := @parameter: java.nio.ByteBuffer;
v = v.<com.aayushatharva.brotli4j.decoder.Decoder: java.nio.ByteBuffer buffer>;
v = virtualinvoke v.<java.nio.ByteBuffer: java.nio.ByteBuffer slice()>();
v = virtualinvoke v.<java.nio.ByteBuffer: int remaining()>();
v = virtualinvoke v.<java.nio.ByteBuffer: int remaining()>();
v = staticinvoke <java.lang.Math: int min(int,int)>(v, v);
virtualinvoke v.<java.nio.ByteBuffer: java.nio.ByteBuffer limit(int)>(v);
virtualinvoke v.<java.nio.ByteBuffer: java.nio.ByteBuffer put(java.nio.ByteBuffer)>(v);
virtualinvoke v.<com.aayushatharva.brotli4j.decoder.Decoder: void discard(int)>(v);
return v;
}
void close() throws java.io.IOException
{
java.nio.channels.ReadableByteChannel v;
com.aayushatharva.brotli4j.decoder.Decoder v;
com.aayushatharva.brotli4j.decoder.DecoderJNI$Wrapper v;
boolean v;
v := @this: com.aayushatharva.brotli4j.decoder.Decoder;
v = v.<com.aayushatharva.brotli4j.decoder.Decoder: boolean closed>;
if v == 0 goto label;
return;
label:
v.<com.aayushatharva.brotli4j.decoder.Decoder: boolean closed> = 1;
v = v.<com.aayushatharva.brotli4j.decoder.Decoder: com.aayushatharva.brotli4j.decoder.DecoderJNI$Wrapper decoder>;
virtualinvoke v.<com.aayushatharva.brotli4j.decoder.DecoderJNI$Wrapper: void destroy()>();
v = v.<com.aayushatharva.brotli4j.decoder.Decoder: java.nio.channels.ReadableByteChannel source>;
interfaceinvoke v.<java.nio.channels.ReadableByteChannel: void close()>();
return;
}
public static byte[] decompress(byte[], int, int) throws java.io.IOException
{
java.lang.Throwable v;
byte[] v, v, v;
java.nio.ByteBuffer v, v;
java.util.ArrayList v;
int[] v;
com.aayushatharva.brotli4j.decoder.DecoderJNI$Wrapper v;
int v, v, v, v, v, v, v, v, v, v, v;
boolean v;
java.util.Iterator v;
java.io.IOException v, v;
com.aayushatharva.brotli4j.decoder.DecoderJNI$Status v, v, v, v, v;
java.lang.Object v, v;
v := @parameter: byte[];
v := @parameter: int;
v := @parameter: int;
v = new com.aayushatharva.brotli4j.decoder.DecoderJNI$Wrapper;
specialinvoke v.<com.aayushatharva.brotli4j.decoder.DecoderJNI$Wrapper: void <init>(int)>(v);
v = new java.util.ArrayList;
specialinvoke v.<java.util.ArrayList: void <init>()>();
v = 0;
label:
v = virtualinvoke v.<com.aayushatharva.brotli4j.decoder.DecoderJNI$Wrapper: java.nio.ByteBuffer getInputBuffer()>();
virtualinvoke v.<java.nio.ByteBuffer: java.nio.ByteBuffer put(byte[],int,int)>(v, v, v);
virtualinvoke v.<com.aayushatharva.brotli4j.decoder.DecoderJNI$Wrapper: void push(int)>(v);
label:
v = virtualinvoke v.<com.aayushatharva.brotli4j.decoder.DecoderJNI$Wrapper: com.aayushatharva.brotli4j.decoder.DecoderJNI$Status getStatus()>();
v = <com.aayushatharva.brotli4j.decoder.DecoderJNI$Status: com.aayushatharva.brotli4j.decoder.DecoderJNI$Status DONE>;
if v == v goto label;
v = <com.aayushatharva.brotli4j.decoder.Decoder$1: int[] $SwitchMap$com$aayushatharva$brotli4j$decoder$DecoderJNI$Status>;
v = virtualinvoke v.<com.aayushatharva.brotli4j.decoder.DecoderJNI$Wrapper: com.aayushatharva.brotli4j.decoder.DecoderJNI$Status getStatus()>();
v = virtualinvoke v.<com.aayushatharva.brotli4j.decoder.DecoderJNI$Status: int ordinal()>();
v = v[v];
tableswitch(v)
{
case 1: goto label;
case 2: goto label;
case 3: goto label;
default: goto label;
};
label:
virtualinvoke v.<com.aayushatharva.brotli4j.decoder.DecoderJNI$Wrapper: void push(int)>(0);
goto label;
label:
v = virtualinvoke v.<com.aayushatharva.brotli4j.decoder.DecoderJNI$Wrapper: java.nio.ByteBuffer pull()>();
v = virtualinvoke v.<java.nio.ByteBuffer: int remaining()>();
v = newarray (byte)[v];
virtualinvoke v.<java.nio.ByteBuffer: java.nio.ByteBuffer get(byte[])>(v);
virtualinvoke v.<java.util.ArrayList: boolean add(java.lang.Object)>(v);
v = lengthof v;
v = v + v;
goto label;
label:
virtualinvoke v.<com.aayushatharva.brotli4j.decoder.DecoderJNI$Wrapper: void push(int)>(0);
v = virtualinvoke v.<com.aayushatharva.brotli4j.decoder.DecoderJNI$Wrapper: com.aayushatharva.brotli4j.decoder.DecoderJNI$Status getStatus()>();
v = <com.aayushatharva.brotli4j.decoder.DecoderJNI$Status: com.aayushatharva.brotli4j.decoder.DecoderJNI$Status NEEDS_MORE_INPUT>;
if v != v goto label;
v = new java.io.IOException;
specialinvoke v.<java.io.IOException: void <init>(java.lang.String)>("corrupted input");
throw v;
label:
v = new java.io.IOException;
specialinvoke v.<java.io.IOException: void <init>(java.lang.String)>("corrupted input");
throw v;
label:
virtualinvoke v.<com.aayushatharva.brotli4j.decoder.DecoderJNI$Wrapper: void destroy()>();
goto label;
label:
v := @caughtexception;
virtualinvoke v.<com.aayushatharva.brotli4j.decoder.DecoderJNI$Wrapper: void destroy()>();
throw v;
label:
v = virtualinvoke v.<java.util.ArrayList: int size()>();
if v != 1 goto label;
v = virtualinvoke v.<java.util.ArrayList: java.lang.Object get(int)>(0);
return v;
label:
v = newarray (byte)[v];
v = 0;
v = virtualinvoke v.<java.util.ArrayList: java.util.Iterator iterator()>();
label:
v = interfaceinvoke v.<java.util.Iterator: boolean hasNext()>();
if v == 0 goto label;
v = interfaceinvoke v.<java.util.Iterator: java.lang.Object next()>();
v = lengthof v;
staticinvoke <java.lang.System: void arraycopy(java.lang.Object,int,java.lang.Object,int,int)>(v, 0, v, v, v);
v = lengthof v;
v = v + v;
goto label;
label:
return v;
catch java.lang.Throwable from label to label with label;
}
static void <clinit>()
{
java.nio.ByteBuffer v;
v = staticinvoke <java.nio.ByteBuffer: java.nio.ByteBuffer allocate(int)>(0);
<com.aayushatharva.brotli4j.decoder.Decoder: java.nio.ByteBuffer EMPTY_BUFFER> = v;
return;
}
}