public class oadd.org.apache.curator.framework.imps.GzipCompressionProvider extends java.lang.Object implements oadd.org.apache.curator.framework.api.CompressionProvider
{
private static final int MAX_SAFE_JAVA_BYTE_ARRAY_SIZE;
private static final int GZIP_MAGIC;
private static final byte[] GZIP_HEADER;
private static final int FHCRC;
private static final int FEXTRA;
private static final int FNAME;
private static final int FCOMMENT;
private static final int GZIP_HEADER_SIZE;
private static final int GZIP_TRAILER_SIZE;
private static final int MIN_COMPRESSED_DATA_SIZE;
private static final java.util.concurrent.ConcurrentLinkedQueue DEFLATER_POOL;
private static final java.util.concurrent.ConcurrentLinkedQueue INFLATER_POOL;
private static final byte[] COMPRESSED_EMPTY_BYTES;
public void <init>()
{
oadd.org.apache.curator.framework.imps.GzipCompressionProvider v;
v := @this: oadd.org.apache.curator.framework.imps.GzipCompressionProvider;
specialinvoke v.<java.lang.Object: void <init>()>();
return;
}
private static java.util.zip.Deflater acquireDeflater()
{
int v;
java.lang.Object v;
java.util.zip.Deflater v;
java.util.concurrent.ConcurrentLinkedQueue v;
v = <oadd.org.apache.curator.framework.imps.GzipCompressionProvider: java.util.concurrent.ConcurrentLinkedQueue DEFLATER_POOL>;
v = virtualinvoke v.<java.util.concurrent.ConcurrentLinkedQueue: java.lang.Object poll()>();
if v != null goto label;
v = new java.util.zip.Deflater;
v = (int) -1;
specialinvoke v.<java.util.zip.Deflater: void <init>(int,boolean)>(v, 1);
v = v;
label:
return v;
}
private static java.util.zip.Inflater acquireInflater()
{
java.lang.Object v;
java.util.zip.Inflater v;
java.util.concurrent.ConcurrentLinkedQueue v;
v = <oadd.org.apache.curator.framework.imps.GzipCompressionProvider: java.util.concurrent.ConcurrentLinkedQueue INFLATER_POOL>;
v = virtualinvoke v.<java.util.concurrent.ConcurrentLinkedQueue: java.lang.Object poll()>();
if v != null goto label;
v = new java.util.zip.Inflater;
specialinvoke v.<java.util.zip.Inflater: void <init>(boolean)>(1);
v = v;
label:
return v;
}
public byte[] compress(java.lang.String, byte[])
{
byte[] v, v, v;
int v;
oadd.org.apache.curator.framework.imps.GzipCompressionProvider v;
java.lang.Object v;
java.lang.String v;
v := @this: oadd.org.apache.curator.framework.imps.GzipCompressionProvider;
v := @parameter: java.lang.String;
v := @parameter: byte[];
v = lengthof v;
if v != 0 goto label;
v = <oadd.org.apache.curator.framework.imps.GzipCompressionProvider: byte[] COMPRESSED_EMPTY_BYTES>;
v = virtualinvoke v.<java.lang.Object: java.lang.Object clone()>();
return v;
label:
v = staticinvoke <oadd.org.apache.curator.framework.imps.GzipCompressionProvider: byte[] doCompress(byte[])>(v);
return v;
}
static byte[] doCompress(byte[])
{
java.lang.Throwable v;
byte[] v, v, v;
long v;
int v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v;
boolean v;
java.util.zip.Deflater v;
java.util.zip.CRC32 v;
java.util.concurrent.ConcurrentLinkedQueue v, v;
v := @parameter: byte[];
v = <oadd.org.apache.curator.framework.imps.GzipCompressionProvider: byte[] GZIP_HEADER>;
v = lengthof v;
v = staticinvoke <oadd.org.apache.curator.framework.imps.GzipCompressionProvider: int conservativeGZippedSizeEstimate(int)>(v);
v = staticinvoke <java.util.Arrays: byte[] copyOf(byte[],int)>(v, v);
v = staticinvoke <oadd.org.apache.curator.framework.imps.GzipCompressionProvider: java.util.zip.Deflater acquireDeflater()>();
label:
virtualinvoke v.<java.util.zip.Deflater: void setInput(byte[])>(v);
virtualinvoke v.<java.util.zip.Deflater: void finish()>();
v = <oadd.org.apache.curator.framework.imps.GzipCompressionProvider: int GZIP_HEADER_SIZE>;
label:
v = lengthof v;
v = v - 8;
v = v - v;
v = virtualinvoke v.<java.util.zip.Deflater: int deflate(byte[],int,int)>(v, v, v);
v = v + v;
v = virtualinvoke v.<java.util.zip.Deflater: boolean finished()>();
if v != 0 goto label;
v = lengthof v;
v = lengthof v;
v = v / 2;
v = v + v;
v = staticinvoke <java.util.Arrays: byte[] copyOf(byte[],int)>(v, v);
goto label;
label:
v = new java.util.zip.CRC32;
specialinvoke v.<java.util.zip.CRC32: void <init>()>();
v = lengthof v;
virtualinvoke v.<java.util.zip.CRC32: void update(byte[],int,int)>(v, 0, v);
v = virtualinvoke v.<java.util.zip.CRC32: long getValue()>();
staticinvoke <oadd.org.apache.curator.framework.imps.GzipCompressionProvider: void writeLittleEndianInt(byte[],int,int)>(v, v, v);
v = v + 4;
v = lengthof v;
staticinvoke <oadd.org.apache.curator.framework.imps.GzipCompressionProvider: void writeLittleEndianInt(byte[],int,int)>(v, v, v);
v = v + 8;
v = lengthof v;
if v == v goto label;
v = staticinvoke <java.util.Arrays: byte[] copyOf(byte[],int)>(v, v);
label:
virtualinvoke v.<java.util.zip.Deflater: void reset()>();
v = <oadd.org.apache.curator.framework.imps.GzipCompressionProvider: java.util.concurrent.ConcurrentLinkedQueue DEFLATER_POOL>;
virtualinvoke v.<java.util.concurrent.ConcurrentLinkedQueue: boolean add(java.lang.Object)>(v);
return v;
label:
v := @caughtexception;
virtualinvoke v.<java.util.zip.Deflater: void reset()>();
v = <oadd.org.apache.curator.framework.imps.GzipCompressionProvider: java.util.concurrent.ConcurrentLinkedQueue DEFLATER_POOL>;
virtualinvoke v.<java.util.concurrent.ConcurrentLinkedQueue: boolean add(java.lang.Object)>(v);
throw v;
catch java.lang.Throwable from label to label with label;
}
private static int conservativeGZippedSizeEstimate(int)
{
int v, v, v, v, v, v;
v := @parameter: int;
if v >= 512 goto label;
v = staticinvoke <java.lang.Math: int max(int,int)>(v, 2);
goto label;
label:
v = v / 2;
v = staticinvoke <java.lang.Math: int max(int,int)>(512, v);
label:
v = <oadd.org.apache.curator.framework.imps.GzipCompressionProvider: int GZIP_HEADER_SIZE>;
v = v + v;
v = v + 8;
return v;
}
private static void writeLittleEndianInt(byte[], int, int)
{
byte[] v;
int v, v, v, v, v, v, v, v;
v := @parameter: byte[];
v := @parameter: int;
v := @parameter: int;
v[v] = v;
v = v + 1;
v = v >> 8;
v[v] = v;
v = v + 2;
v = v >> 16;
v[v] = v;
v = v + 3;
v = v >> 24;
v[v] = v;
return;
}
public byte[] decompress(java.lang.String, byte[]) throws java.io.IOException
{
byte[] v, v, v, v;
java.util.zip.Inflater v;
java.nio.ByteBuffer v;
boolean v, v, v, v;
java.util.zip.ZipException v, v, v, v;
java.io.EOFException v;
java.nio.ByteOrder v;
java.util.concurrent.ConcurrentLinkedQueue v, v;
java.lang.Throwable v;
long v, v, v, v, v;
int v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v;
java.util.zip.DataFormatException v;
oadd.org.apache.curator.framework.imps.GzipCompressionProvider v;
java.lang.String v, v, v;
java.util.zip.CRC32 v;
java.lang.OutOfMemoryError v;
v := @this: oadd.org.apache.curator.framework.imps.GzipCompressionProvider;
v := @parameter: java.lang.String;
v := @parameter: byte[];
v = <oadd.org.apache.curator.framework.imps.GzipCompressionProvider: byte[] COMPRESSED_EMPTY_BYTES>;
v = staticinvoke <java.util.Arrays: boolean equals(byte[],byte[])>(v, v);
if v == 0 goto label;
v = newarray (byte)[0];
return v;
label:
v = staticinvoke <java.nio.ByteBuffer: java.nio.ByteBuffer wrap(byte[])>(v);
v = <java.nio.ByteOrder: java.nio.ByteOrder LITTLE_ENDIAN>;
virtualinvoke v.<java.nio.ByteBuffer: java.nio.ByteBuffer order(java.nio.ByteOrder)>(v);
v = staticinvoke <oadd.org.apache.curator.framework.imps.GzipCompressionProvider: int readGzipHeader(java.nio.ByteBuffer)>(v);
v = lengthof v;
v = v + 2;
v = v + 8;
if v >= v goto label;
v = new java.io.EOFException;
specialinvoke v.<java.io.EOFException: void <init>(java.lang.String)>("Too short GZipped data");
throw v;
label:
v = lengthof v;
v = v - v;
v = v - 8;
v = v * 3L;
v = staticinvoke <java.lang.Math: long min(long,long)>(v, 2147483519L);
v = newarray (byte)[v];
v = staticinvoke <oadd.org.apache.curator.framework.imps.GzipCompressionProvider: java.util.zip.Inflater acquireInflater()>();
label:
virtualinvoke v.<java.util.zip.Inflater: void setInput(byte[],int,int)>(v, v, v);
v = new java.util.zip.CRC32;
specialinvoke v.<java.util.zip.CRC32: void <init>()>();
v = 0;
label:
v = lengthof v;
v = v - v;
v = virtualinvoke v.<java.util.zip.Inflater: int inflate(byte[],int,int)>(v, v, v);
label:
goto label;
label:
v := @caughtexception;
v = virtualinvoke v.<java.util.zip.DataFormatException: java.lang.String getMessage()>();
v = new java.util.zip.ZipException;
if v == null goto label;
v = v;
goto label;
label:
v = "Invalid ZLIB data format";
label:
specialinvoke v.<java.util.zip.ZipException: void <init>(java.lang.String)>(v);
throw v;
label:
virtualinvoke v.<java.util.zip.CRC32: void update(byte[],int,int)>(v, v, v);
v = v + v;
v = virtualinvoke v.<java.util.zip.Inflater: boolean finished()>();
if v != 0 goto label;
v = virtualinvoke v.<java.util.zip.Inflater: boolean needsDictionary()>();
if v != 0 goto label;
if v != 0 goto label;
v = virtualinvoke v.<java.util.zip.Inflater: boolean needsInput()>();
if v == 0 goto label;
v = new java.util.zip.ZipException;
specialinvoke v.<java.util.zip.ZipException: void <init>(java.lang.String)>("Corrupt GZipped data");
throw v;
label:
v = lengthof v;
if v != 2147483519 goto label;
if v != 0 goto label;
v = new java.lang.OutOfMemoryError;
specialinvoke v.<java.lang.OutOfMemoryError: void <init>(java.lang.String)>("Unable to uncompress that much data into a single byte[] array");
throw v;
label:
v = lengthof v;
v = lengthof v;
v = v / 2;
v = v + v;
v = staticinvoke <java.lang.Math: long min(long,long)>(v, 2147483519L);
v = lengthof v;
if v == v goto label;
v = staticinvoke <java.util.Arrays: byte[] copyOf(byte[],int)>(v, v);
goto label;
label:
v = virtualinvoke v.<java.util.zip.Inflater: int getRemaining()>();
if v == 0 goto label;
v = new java.util.zip.ZipException;
specialinvoke v.<java.util.zip.ZipException: void <init>(java.lang.String)>("Expected just one GZip block, without garbage in the end");
throw v;
label:
v = lengthof v;
v = v - 8;
v = virtualinvoke v.<java.nio.ByteBuffer: int getInt(int)>(v);
v = lengthof v;
v = v - 4;
v = virtualinvoke v.<java.nio.ByteBuffer: int getInt(int)>(v);
v = virtualinvoke v.<java.util.zip.CRC32: long getValue()>();
if v != v goto label;
if v == v goto label;
label:
v = new java.util.zip.ZipException;
specialinvoke v.<java.util.zip.ZipException: void <init>(java.lang.String)>("Corrupt GZIP trailer");
throw v;
label:
v = lengthof v;
if v == v goto label;
v = staticinvoke <java.util.Arrays: byte[] copyOf(byte[],int)>(v, v);
label:
virtualinvoke v.<java.util.zip.Inflater: void reset()>();
v = <oadd.org.apache.curator.framework.imps.GzipCompressionProvider: java.util.concurrent.ConcurrentLinkedQueue INFLATER_POOL>;
virtualinvoke v.<java.util.concurrent.ConcurrentLinkedQueue: boolean add(java.lang.Object)>(v);
return v;
label:
v := @caughtexception;
virtualinvoke v.<java.util.zip.Inflater: void reset()>();
v = <oadd.org.apache.curator.framework.imps.GzipCompressionProvider: java.util.concurrent.ConcurrentLinkedQueue INFLATER_POOL>;
virtualinvoke v.<java.util.concurrent.ConcurrentLinkedQueue: boolean add(java.lang.Object)>(v);
throw v;
catch java.util.zip.DataFormatException from label to label with label;
catch java.lang.Throwable from label to label with label;
}
private static int readGzipHeader(java.nio.ByteBuffer) throws java.io.IOException
{
int v;
java.io.EOFException v;
java.nio.BufferUnderflowException v;
java.nio.ByteBuffer v;
v := @parameter: java.nio.ByteBuffer;
label:
v = staticinvoke <oadd.org.apache.curator.framework.imps.GzipCompressionProvider: int doReadHeader(java.nio.ByteBuffer)>(v);
label:
return v;
label:
v := @caughtexception;
v = new java.io.EOFException;
specialinvoke v.<java.io.EOFException: void <init>()>();
throw v;
catch java.nio.BufferUnderflowException from label to label with label;
}
private static int doReadHeader(java.nio.ByteBuffer) throws java.io.IOException
{
byte[] v;
java.nio.ByteBuffer v;
byte v, v, v, v, v, v;
int v, v, v;
java.util.zip.ZipException v, v, v;
char v, v, v, v;
java.util.zip.CRC32 v;
v := @parameter: java.nio.ByteBuffer;
v = virtualinvoke v.<java.nio.ByteBuffer: char getChar()>();
v = (int) 35615;
if v == v goto label;
v = new java.util.zip.ZipException;
specialinvoke v.<java.util.zip.ZipException: void <init>(java.lang.String)>("Not in GZip format");
throw v;
label:
v = virtualinvoke v.<java.nio.ByteBuffer: byte get()>();
if v == 8 goto label;
v = new java.util.zip.ZipException;
specialinvoke v.<java.util.zip.ZipException: void <init>(java.lang.String)>("Unsupported compression method");
throw v;
label:
v = virtualinvoke v.<java.nio.ByteBuffer: byte get()>();
staticinvoke <oadd.org.apache.curator.framework.imps.GzipCompressionProvider: void skip(java.nio.ByteBuffer,int)>(v, 6);
v = v & 4;
if v == 0 goto label;
v = virtualinvoke v.<java.nio.ByteBuffer: char getChar()>();
staticinvoke <oadd.org.apache.curator.framework.imps.GzipCompressionProvider: void skip(java.nio.ByteBuffer,int)>(v, v);
label:
v = v & 8;
if v == 0 goto label;
staticinvoke <oadd.org.apache.curator.framework.imps.GzipCompressionProvider: void skipZeroTerminatedString(java.nio.ByteBuffer)>(v);
label:
v = v & 16;
if v == 0 goto label;
staticinvoke <oadd.org.apache.curator.framework.imps.GzipCompressionProvider: void skipZeroTerminatedString(java.nio.ByteBuffer)>(v);
label:
v = v & 2;
if v == 0 goto label;
v = new java.util.zip.CRC32;
specialinvoke v.<java.util.zip.CRC32: void <init>()>();
v = virtualinvoke v.<java.nio.ByteBuffer: byte[] array()>();
v = virtualinvoke v.<java.nio.ByteBuffer: int position()>();
virtualinvoke v.<java.util.zip.CRC32: void update(byte[],int,int)>(v, 0, v);
v = virtualinvoke v.<java.nio.ByteBuffer: char getChar()>();
virtualinvoke v.<java.util.zip.CRC32: long getValue()>();
if v == v goto label;
v = new java.util.zip.ZipException;
specialinvoke v.<java.util.zip.ZipException: void <init>(java.lang.String)>("Corrupt GZIP header");
throw v;
label:
v = virtualinvoke v.<java.nio.ByteBuffer: int position()>();
return v;
}
private static void skip(java.nio.ByteBuffer, int) throws java.io.IOException
{
int v, v, v;
java.lang.IllegalArgumentException v;
java.io.EOFException v;
java.nio.ByteBuffer v;
v := @parameter: java.nio.ByteBuffer;
v := @parameter: int;
label:
v = virtualinvoke v.<java.nio.ByteBuffer: int position()>();
v = v + v;
virtualinvoke v.<java.nio.ByteBuffer: java.nio.ByteBuffer position(int)>(v);
label:
goto label;
label:
v := @caughtexception;
v = new java.io.EOFException;
specialinvoke v.<java.io.EOFException: void <init>()>();
throw v;
label:
return;
catch java.lang.IllegalArgumentException from label to label with label;
}
private static void skipZeroTerminatedString(java.nio.ByteBuffer)
{
byte v;
java.nio.ByteBuffer v;
v := @parameter: java.nio.ByteBuffer;
label:
v = virtualinvoke v.<java.nio.ByteBuffer: byte get()>();
if v != 0 goto label;
return;
}
static void <clinit>()
{
byte[] v, v, v;
int v;
java.util.concurrent.ConcurrentLinkedQueue v, v;
v = newarray (byte)[10];
v[0] = 31;
v[1] = -117;
v[2] = 8;
v[3] = 0;
v[4] = 0;
v[5] = 0;
v[6] = 0;
v[7] = 0;
v[8] = 0;
v[9] = 0;
<oadd.org.apache.curator.framework.imps.GzipCompressionProvider: byte[] GZIP_HEADER> = v;
v = <oadd.org.apache.curator.framework.imps.GzipCompressionProvider: byte[] GZIP_HEADER>;
v = lengthof v;
<oadd.org.apache.curator.framework.imps.GzipCompressionProvider: int GZIP_HEADER_SIZE> = v;
v = new java.util.concurrent.ConcurrentLinkedQueue;
specialinvoke v.<java.util.concurrent.ConcurrentLinkedQueue: void <init>()>();
<oadd.org.apache.curator.framework.imps.GzipCompressionProvider: java.util.concurrent.ConcurrentLinkedQueue DEFLATER_POOL> = v;
v = new java.util.concurrent.ConcurrentLinkedQueue;
specialinvoke v.<java.util.concurrent.ConcurrentLinkedQueue: void <init>()>();
<oadd.org.apache.curator.framework.imps.GzipCompressionProvider: java.util.concurrent.ConcurrentLinkedQueue INFLATER_POOL> = v;
v = newarray (byte)[20];
v[0] = 31;
v[1] = -117;
v[2] = 8;
v[3] = 0;
v[4] = 0;
v[5] = 0;
v[6] = 0;
v[7] = 0;
v[8] = 0;
v[9] = 0;
v[10] = 3;
v[11] = 0;
v[12] = 0;
v[13] = 0;
v[14] = 0;
v[15] = 0;
v[16] = 0;
v[17] = 0;
v[18] = 0;
v[19] = 0;
<oadd.org.apache.curator.framework.imps.GzipCompressionProvider: byte[] COMPRESSED_EMPTY_BYTES> = v;
return;
}
}