public class com.aayushatharva.brotli4j.common.BrotliCommon extends java.lang.Object
{
public static final int RFC_DICTIONARY_SIZE;
private static final byte[] RFC_DICTIONARY_MD5;
private static final byte[] RFC_DICTIONARY_SHA_1;
private static final byte[] RFC_DICTIONARY_SHA_256;
private static boolean isDictionaryDataSet;
private static final java.lang.Object mutex;
public void <init>()
{
com.aayushatharva.brotli4j.common.BrotliCommon v;
v := @this: com.aayushatharva.brotli4j.common.BrotliCommon;
specialinvoke v.<java.lang.Object: void <init>()>();
return;
}
public static boolean checkDictionaryDataMd5(byte[])
{
byte[] v, v;
boolean v;
v := @parameter: byte[];
v = <com.aayushatharva.brotli4j.common.BrotliCommon: byte[] RFC_DICTIONARY_MD5>;
v = staticinvoke <java.util.Arrays: boolean equals(byte[],byte[])>(v, v);
return v;
}
public static boolean checkDictionaryDataSha1(byte[])
{
byte[] v, v;
boolean v;
v := @parameter: byte[];
v = <com.aayushatharva.brotli4j.common.BrotliCommon: byte[] RFC_DICTIONARY_SHA_1>;
v = staticinvoke <java.util.Arrays: boolean equals(byte[],byte[])>(v, v);
return v;
}
public static boolean checkDictionaryDataSha256(byte[])
{
byte[] v, v;
boolean v;
v := @parameter: byte[];
v = <com.aayushatharva.brotli4j.common.BrotliCommon: byte[] RFC_DICTIONARY_SHA_256>;
v = staticinvoke <java.util.Arrays: boolean equals(byte[],byte[])>(v, v);
return v;
}
public static java.nio.ByteBuffer makeNative(byte[])
{
int v;
byte[] v;
java.nio.ByteBuffer v;
v := @parameter: byte[];
v = lengthof v;
v = staticinvoke <java.nio.ByteBuffer: java.nio.ByteBuffer allocateDirect(int)>(v);
virtualinvoke v.<java.nio.ByteBuffer: java.nio.ByteBuffer put(byte[])>(v);
return v;
}
public static void setDictionaryData(byte[])
{
java.lang.Throwable v;
byte[] v;
int v;
java.lang.Object v;
java.lang.IllegalArgumentException v;
java.nio.ByteBuffer v;
boolean v;
v := @parameter: byte[];
v = lengthof v;
if v == 122784 goto label;
v = new java.lang.IllegalArgumentException;
specialinvoke v.<java.lang.IllegalArgumentException: void <init>(java.lang.String)>("invalid dictionary size");
throw v;
label:
v = <com.aayushatharva.brotli4j.common.BrotliCommon: java.lang.Object mutex>;
entermonitor v;
label:
v = <com.aayushatharva.brotli4j.common.BrotliCommon: boolean isDictionaryDataSet>;
if v == 0 goto label;
exitmonitor v;
label:
return;
label:
v = staticinvoke <com.aayushatharva.brotli4j.common.BrotliCommon: java.nio.ByteBuffer makeNative(byte[])>(v);
staticinvoke <com.aayushatharva.brotli4j.common.BrotliCommon: void setDictionaryData(java.nio.ByteBuffer)>(v);
exitmonitor v;
label:
goto label;
label:
v := @caughtexception;
exitmonitor v;
throw v;
label:
return;
catch java.lang.Throwable from label to label with label;
catch java.lang.Throwable from label to label with label;
}
public static void setDictionaryData(java.io.InputStream) throws java.io.IOException
{
java.lang.Throwable v;
byte[] v;
java.lang.IllegalArgumentException v, v;
java.nio.ByteBuffer v;
int v, v, v, v, v;
java.lang.Object v;
java.lang.String v;
boolean v;
java.io.InputStream v;
v := @parameter: java.io.InputStream;
v = <com.aayushatharva.brotli4j.common.BrotliCommon: java.lang.Object mutex>;
entermonitor v;
label:
v = <com.aayushatharva.brotli4j.common.BrotliCommon: boolean isDictionaryDataSet>;
if v == 0 goto label;
exitmonitor v;
label:
return;
label:
v = staticinvoke <java.nio.ByteBuffer: java.nio.ByteBuffer allocateDirect(int)>(122784);
v = newarray (byte)[4096];
label:
v = virtualinvoke v.<java.io.InputStream: int read(byte[])>(v);
v = (int) -1;
if v == v goto label;
v = virtualinvoke v.<java.nio.ByteBuffer: int remaining()>();
if v >= v goto label;
v = new java.lang.IllegalArgumentException;
specialinvoke v.<java.lang.IllegalArgumentException: void <init>(java.lang.String)>("invalid dictionary size");
throw v;
label:
virtualinvoke v.<java.nio.ByteBuffer: java.nio.ByteBuffer put(byte[],int,int)>(v, 0, v);
goto label;
label:
v = virtualinvoke v.<java.nio.ByteBuffer: int remaining()>();
if v == 0 goto label;
v = new java.lang.IllegalArgumentException;
v = virtualinvoke v.<java.nio.ByteBuffer: int remaining()>();
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (int)>(v) <java.lang.invoke.StringConcatFactory: java.lang.invoke.CallSite makeConcatWithConstants(java.lang.invoke.MethodHandles$Lookup,java.lang.String,java.lang.invoke.MethodType,java.lang.String,java.lang.Object[])>("invalid dictionary size \u0001");
specialinvoke v.<java.lang.IllegalArgumentException: void <init>(java.lang.String)>(v);
throw v;
label:
staticinvoke <com.aayushatharva.brotli4j.common.BrotliCommon: void setDictionaryData(java.nio.ByteBuffer)>(v);
exitmonitor v;
label:
goto label;
label:
v := @caughtexception;
exitmonitor v;
throw v;
label:
return;
catch java.lang.Throwable from label to label with label;
catch java.lang.Throwable from label to label with label;
}
public static void setDictionaryData(java.nio.ByteBuffer)
{
java.lang.Throwable v;
java.lang.RuntimeException v;
java.lang.IllegalArgumentException v, v;
java.nio.ByteBuffer v;
int v;
java.lang.Object v;
boolean v, v, v;
v := @parameter: java.nio.ByteBuffer;
v = virtualinvoke v.<java.nio.ByteBuffer: boolean isDirect()>();
if v != 0 goto label;
v = new java.lang.IllegalArgumentException;
specialinvoke v.<java.lang.IllegalArgumentException: void <init>(java.lang.String)>("direct byte buffer is expected");
throw v;
label:
v = virtualinvoke v.<java.nio.ByteBuffer: int capacity()>();
if v == 122784 goto label;
v = new java.lang.IllegalArgumentException;
specialinvoke v.<java.lang.IllegalArgumentException: void <init>(java.lang.String)>("invalid dictionary size");
throw v;
label:
v = <com.aayushatharva.brotli4j.common.BrotliCommon: java.lang.Object mutex>;
entermonitor v;
label:
v = <com.aayushatharva.brotli4j.common.BrotliCommon: boolean isDictionaryDataSet>;
if v == 0 goto label;
exitmonitor v;
label:
return;
label:
v = staticinvoke <com.aayushatharva.brotli4j.common.CommonJNI: boolean nativeSetDictionaryData(java.nio.ByteBuffer)>(v);
if v != 0 goto label;
v = new java.lang.RuntimeException;
specialinvoke v.<java.lang.RuntimeException: void <init>(java.lang.String)>("setting dictionary failed");
throw v;
label:
<com.aayushatharva.brotli4j.common.BrotliCommon: boolean isDictionaryDataSet> = 1;
exitmonitor v;
label:
goto label;
label:
v := @caughtexception;
exitmonitor v;
throw v;
label:
return;
catch java.lang.Throwable from label to label with label;
catch java.lang.Throwable from label to label with label;
}
static void <clinit>()
{
byte[] v, v, v;
java.lang.Object v;
v = newarray (byte)[16];
v[0] = -106;
v[1] = -50;
v[2] = -51;
v[3] = 46;
v[4] = -25;
v[5] = -90;
v[6] = 102;
v[7] = -43;
v[8] = -86;
v[9] = 54;
v[10] = 39;
v[11] = -41;
v[12] = 71;
v[13] = 53;
v[14] = -77;
v[15] = 42;
<com.aayushatharva.brotli4j.common.BrotliCommon: byte[] RFC_DICTIONARY_MD5> = v;
v = newarray (byte)[20];
v[0] = 114;
v[1] = -76;
v[2] = 16;
v[3] = 81;
v[4] = -53;
v[5] = 97;
v[6] = -87;
v[7] = 40;
v[8] = 27;
v[9] = -93;
v[10] = -60;
v[11] = 65;
v[12] = 76;
v[13] = 40;
v[14] = -99;
v[15] = -91;
v[16] = 13;
v[17] = -102;
v[18] = 118;
v[19] = 64;
<com.aayushatharva.brotli4j.common.BrotliCommon: byte[] RFC_DICTIONARY_SHA_1> = v;
v = newarray (byte)[32];
v[0] = 32;
v[1] = -28;
v[2] = 46;
v[3] = -79;
v[4] = -75;
v[5] = 17;
v[6] = -62;
v[7] = 24;
v[8] = 6;
v[9] = -44;
v[10] = -46;
v[11] = 39;
v[12] = -48;
v[13] = 126;
v[14] = 93;
v[15] = -48;
v[16] = 104;
v[17] = 119;
v[18] = -40;
v[19] = -50;
v[20] = 123;
v[21] = 58;
v[22] = -127;
v[23] = 127;
v[24] = 55;
v[25] = -113;
v[26] = 49;
v[27] = 54;
v[28] = 83;
v[29] = -13;
v[30] = 92;
v[31] = 112;
<com.aayushatharva.brotli4j.common.BrotliCommon: byte[] RFC_DICTIONARY_SHA_256> = v;
v = new java.lang.Object;
specialinvoke v.<java.lang.Object: void <init>()>();
<com.aayushatharva.brotli4j.common.BrotliCommon: java.lang.Object mutex> = v;
return;
}
}