final class org.apache.isis.commons.internal.base._Bytes_GZipCompressorSmart extends java.lang.Object
{
private static final int INPUT_LENGTH_THRESHOLD_FOR_SMART_COMPRESSION;
private static final int GZIP_MIN_OVERHEAD;
private static final byte COMPRESSION_NONE;
private static final byte COMPRESSION_GZIP;
void <init>()
{
org.apache.isis.commons.internal.base._Bytes_GZipCompressorSmart v;
v := @this: org.apache.isis.commons.internal.base._Bytes_GZipCompressorSmart;
specialinvoke v.<java.lang.Object: void <init>()>();
return;
}
static byte[] compress(byte[]) throws java.io.IOException
{
byte[] v, v, v, v, v, v;
int v, v;
v := @parameter: byte[];
v = lengthof v;
if v >= 18 goto label;
return v;
label:
v = lengthof v;
if v >= 256 goto label;
v = newarray (byte)[1];
v[0] = 0;
v = staticinvoke <org.apache.isis.commons.internal.base._Bytes: byte[] prepend(byte[],byte[])>(v, v);
return v;
label:
v = staticinvoke <org.apache.isis.commons.internal.base._Bytes_GZipCompressor: byte[] compress(byte[])>(v);
v = newarray (byte)[1];
v[0] = 1;
v = staticinvoke <org.apache.isis.commons.internal.base._Bytes: byte[] prepend(byte[],byte[])>(v, v);
return v;
}
static byte[] decompress(byte[]) throws java.io.IOException
{
byte[] v, v, v;
int v, v;
boolean v;
v := @parameter: byte[];
if v == null goto label;
v = lengthof v;
if v >= 18 goto label;
label:
return v;
label:
v = lengthof v;
v = staticinvoke <java.util.Arrays: byte[] copyOfRange(byte[],int,int)>(v, 1, v);
v = staticinvoke <org.apache.isis.commons.internal.base._Bytes_GZipCompressorSmart: boolean isCompressed(byte[])>(v);
if v == 0 goto label;
v = staticinvoke <org.apache.isis.commons.internal.base._Bytes_GZipCompressor: byte[] decompress(byte[])>(v);
goto label;
label:
v = v;
label:
return v;
}
private static boolean isCompressed(byte[])
{
byte[] v;
byte v, v;
java.lang.Byte v;
java.lang.IllegalArgumentException v;
v := @parameter: byte[];
v = v[0];
lookupswitch(v)
{
case 0: goto label;
case 1: goto label;
default: goto label;
};
label:
return 0;
label:
return 1;
label:
v = v[0];
v = staticinvoke <java.lang.Byte: java.lang.Byte valueOf(byte)>(v);
v = staticinvoke <org.apache.isis.commons.internal.exceptions._Exceptions: java.lang.IllegalArgumentException unmatchedCase(java.lang.Object)>(v);
throw v;
}
}