mirror of
https://github.com/Pinball3D/Rabbit-R1.git
synced 2024-12-25 16:42:30 -06:00
454 lines
11 KiB
Smali
454 lines
11 KiB
Smali
.class public final Lokio/GzipSink;
|
|
.super Ljava/lang/Object;
|
|
.source "GzipSink.kt"
|
|
|
|
# interfaces
|
|
.implements Lokio/Sink;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/SourceDebugExtension;
|
|
value = "SMAP\nGzipSink.kt\nKotlin\n*S Kotlin\n*F\n+ 1 GzipSink.kt\nokio/GzipSink\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n+ 3 -Util.kt\nokio/-Util\n+ 4 RealBufferedSink.kt\nokio/RealBufferedSink\n*L\n1#1,153:1\n1#2:154\n75#3:155\n50#4:156\n*E\n*S KotlinDebug\n*F\n+ 1 GzipSink.kt\nokio/GzipSink\n*L\n132#1:155\n64#1:156\n*E\n"
|
|
.end annotation
|
|
|
|
.annotation runtime Lkotlin/Metadata;
|
|
bv = {
|
|
0x1,
|
|
0x0,
|
|
0x3
|
|
}
|
|
d1 = {
|
|
"\u0000H\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0008\u0003\n\u0002\u0010\u000b\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0008\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0002\u0008\u0003\n\u0002\u0018\u0002\n\u0002\u0008\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\t\n\u0002\u0008\u0004\u0018\u00002\u00020\u0001B\r\u0012\u0006\u0010\u0002\u001a\u00020\u0001\u00a2\u0006\u0002\u0010\u0003J\u0008\u0010\u000e\u001a\u00020\u000fH\u0016J\r\u0010\u0008\u001a\u00020\tH\u0007\u00a2\u0006\u0002\u0008\u0010J\u0008\u0010\u0011\u001a\u00020\u000fH\u0016J\u0008\u0010\u0012\u001a\u00020\u0013H\u0016J\u0018\u0010\u0014\u001a\u00020\u000f2\u0006\u0010\u0015\u001a\u00020\u00162\u0006\u0010\u0017\u001a\u00020\u0018H\u0002J\u0018\u0010\u0019\u001a\u00020\u000f2\u0006\u0010\u001a\u001a\u00020\u00162\u0006\u0010\u0017\u001a\u00020\u0018H\u0016J\u0008\u0010\u001b\u001a\u00020\u000fH\u0002R\u000e\u0010\u0004\u001a\u00020\u0005X\u0082\u000e\u00a2\u0006\u0002\n\u0000R\u000e\u0010\u0006\u001a\u00020\u0007X\u0082\u0004\u00a2\u0006\u0002\n\u0000R\u0013\u0010\u0008\u001a\u00020\t8G\u00a2\u0006\u0008\n\u0000\u001a\u0004\u0008\u0008\u0010\nR\u000e\u0010\u000b\u001a\u00020\u000cX\u0082\u0004\u00a2\u0006\u0002\n\u0000R\u000e\u0010\u0002\u001a\u00020\rX\u0082\u0004\u00a2\u0006\u0002\n\u0000\u00a8\u0006\u001c"
|
|
}
|
|
d2 = {
|
|
"Lokio/GzipSink;",
|
|
"Lokio/Sink;",
|
|
"sink",
|
|
"(Lokio/Sink;)V",
|
|
"closed",
|
|
"",
|
|
"crc",
|
|
"Ljava/util/zip/CRC32;",
|
|
"deflater",
|
|
"Ljava/util/zip/Deflater;",
|
|
"()Ljava/util/zip/Deflater;",
|
|
"deflaterSink",
|
|
"Lokio/DeflaterSink;",
|
|
"Lokio/RealBufferedSink;",
|
|
"close",
|
|
"",
|
|
"-deprecated_deflater",
|
|
"flush",
|
|
"timeout",
|
|
"Lokio/Timeout;",
|
|
"updateCrc",
|
|
"buffer",
|
|
"Lokio/Buffer;",
|
|
"byteCount",
|
|
"",
|
|
"write",
|
|
"source",
|
|
"writeFooter",
|
|
"okio"
|
|
}
|
|
k = 0x1
|
|
mv = {
|
|
0x1,
|
|
0x4,
|
|
0x0
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field private closed:Z
|
|
|
|
.field private final crc:Ljava/util/zip/CRC32;
|
|
|
|
.field private final deflater:Ljava/util/zip/Deflater;
|
|
|
|
.field private final deflaterSink:Lokio/DeflaterSink;
|
|
|
|
.field private final sink:Lokio/RealBufferedSink;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Lokio/Sink;)V
|
|
.locals 3
|
|
|
|
const-string v0, "sink"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 43
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
.line 45
|
|
new-instance v0, Lokio/RealBufferedSink;
|
|
|
|
invoke-direct {v0, p1}, Lokio/RealBufferedSink;-><init>(Lokio/Sink;)V
|
|
|
|
iput-object v0, p0, Lokio/GzipSink;->sink:Lokio/RealBufferedSink;
|
|
|
|
.line 49
|
|
new-instance p1, Ljava/util/zip/Deflater;
|
|
|
|
const/4 v1, -0x1
|
|
|
|
const/4 v2, 0x1
|
|
|
|
invoke-direct {p1, v1, v2}, Ljava/util/zip/Deflater;-><init>(IZ)V
|
|
|
|
iput-object p1, p0, Lokio/GzipSink;->deflater:Ljava/util/zip/Deflater;
|
|
|
|
.line 55
|
|
new-instance v1, Lokio/DeflaterSink;
|
|
|
|
move-object v2, v0
|
|
|
|
check-cast v2, Lokio/BufferedSink;
|
|
|
|
invoke-direct {v1, v2, p1}, Lokio/DeflaterSink;-><init>(Lokio/BufferedSink;Ljava/util/zip/Deflater;)V
|
|
|
|
iput-object v1, p0, Lokio/GzipSink;->deflaterSink:Lokio/DeflaterSink;
|
|
|
|
.line 60
|
|
new-instance p1, Ljava/util/zip/CRC32;
|
|
|
|
invoke-direct {p1}, Ljava/util/zip/CRC32;-><init>()V
|
|
|
|
iput-object p1, p0, Lokio/GzipSink;->crc:Ljava/util/zip/CRC32;
|
|
|
|
.line 156
|
|
iget-object p0, v0, Lokio/RealBufferedSink;->bufferField:Lokio/Buffer;
|
|
|
|
const/16 p1, 0x1f8b
|
|
|
|
.line 65
|
|
invoke-virtual {p0, p1}, Lokio/Buffer;->writeShort(I)Lokio/Buffer;
|
|
|
|
const/16 p1, 0x8
|
|
|
|
.line 66
|
|
invoke-virtual {p0, p1}, Lokio/Buffer;->writeByte(I)Lokio/Buffer;
|
|
|
|
const/4 p1, 0x0
|
|
|
|
.line 67
|
|
invoke-virtual {p0, p1}, Lokio/Buffer;->writeByte(I)Lokio/Buffer;
|
|
|
|
.line 68
|
|
invoke-virtual {p0, p1}, Lokio/Buffer;->writeInt(I)Lokio/Buffer;
|
|
|
|
.line 69
|
|
invoke-virtual {p0, p1}, Lokio/Buffer;->writeByte(I)Lokio/Buffer;
|
|
|
|
.line 70
|
|
invoke-virtual {p0, p1}, Lokio/Buffer;->writeByte(I)Lokio/Buffer;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final updateCrc(Lokio/Buffer;J)V
|
|
.locals 4
|
|
|
|
.line 129
|
|
iget-object p1, p1, Lokio/Buffer;->head:Lokio/Segment;
|
|
|
|
invoke-static {p1}, Lkotlin/jvm/internal/Intrinsics;->checkNotNull(Ljava/lang/Object;)V
|
|
|
|
:goto_0
|
|
const-wide/16 v0, 0x0
|
|
|
|
cmp-long v0, p2, v0
|
|
|
|
if-lez v0, :cond_0
|
|
|
|
.line 132
|
|
iget v0, p1, Lokio/Segment;->limit:I
|
|
|
|
iget v1, p1, Lokio/Segment;->pos:I
|
|
|
|
sub-int/2addr v0, v1
|
|
|
|
int-to-long v0, v0
|
|
|
|
.line 155
|
|
invoke-static {p2, p3, v0, v1}, Ljava/lang/Math;->min(JJ)J
|
|
|
|
move-result-wide v0
|
|
|
|
long-to-int v0, v0
|
|
|
|
iget-object v1, p0, Lokio/GzipSink;->crc:Ljava/util/zip/CRC32;
|
|
|
|
.line 133
|
|
iget-object v2, p1, Lokio/Segment;->data:[B
|
|
|
|
iget v3, p1, Lokio/Segment;->pos:I
|
|
|
|
invoke-virtual {v1, v2, v3, v0}, Ljava/util/zip/CRC32;->update([BII)V
|
|
|
|
int-to-long v0, v0
|
|
|
|
sub-long/2addr p2, v0
|
|
|
|
.line 135
|
|
iget-object p1, p1, Lokio/Segment;->next:Lokio/Segment;
|
|
|
|
invoke-static {p1}, Lkotlin/jvm/internal/Intrinsics;->checkNotNull(Ljava/lang/Object;)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method private final writeFooter()V
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lokio/GzipSink;->sink:Lokio/RealBufferedSink;
|
|
|
|
iget-object v1, p0, Lokio/GzipSink;->crc:Ljava/util/zip/CRC32;
|
|
|
|
.line 123
|
|
invoke-virtual {v1}, Ljava/util/zip/CRC32;->getValue()J
|
|
|
|
move-result-wide v1
|
|
|
|
long-to-int v1, v1
|
|
|
|
invoke-virtual {v0, v1}, Lokio/RealBufferedSink;->writeIntLe(I)Lokio/BufferedSink;
|
|
|
|
iget-object v0, p0, Lokio/GzipSink;->sink:Lokio/RealBufferedSink;
|
|
|
|
iget-object p0, p0, Lokio/GzipSink;->deflater:Ljava/util/zip/Deflater;
|
|
|
|
.line 124
|
|
invoke-virtual {p0}, Ljava/util/zip/Deflater;->getBytesRead()J
|
|
|
|
move-result-wide v1
|
|
|
|
long-to-int p0, v1
|
|
|
|
invoke-virtual {v0, p0}, Lokio/RealBufferedSink;->writeIntLe(I)Lokio/BufferedSink;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final -deprecated_deflater()Ljava/util/zip/Deflater;
|
|
.locals 0
|
|
.annotation runtime Lkotlin/Deprecated;
|
|
level = .enum Lkotlin/DeprecationLevel;->ERROR:Lkotlin/DeprecationLevel;
|
|
message = "moved to val"
|
|
replaceWith = .subannotation Lkotlin/ReplaceWith;
|
|
expression = "deflater"
|
|
imports = {}
|
|
.end subannotation
|
|
.end annotation
|
|
|
|
iget-object p0, p0, Lokio/GzipSink;->deflater:Ljava/util/zip/Deflater;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public close()V
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
iget-boolean v0, p0, Lokio/GzipSink;->closed:Z
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
.line 97
|
|
move-object v1, v0
|
|
|
|
check-cast v1, Ljava/lang/Throwable;
|
|
|
|
:try_start_0
|
|
iget-object v1, p0, Lokio/GzipSink;->deflaterSink:Lokio/DeflaterSink;
|
|
|
|
.line 99
|
|
invoke-virtual {v1}, Lokio/DeflaterSink;->finishDeflate$okio()V
|
|
|
|
.line 100
|
|
invoke-direct {p0}, Lokio/GzipSink;->writeFooter()V
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
goto :goto_0
|
|
|
|
:catchall_0
|
|
move-exception v0
|
|
|
|
:goto_0
|
|
:try_start_1
|
|
iget-object v1, p0, Lokio/GzipSink;->deflater:Ljava/util/zip/Deflater;
|
|
|
|
.line 106
|
|
invoke-virtual {v1}, Ljava/util/zip/Deflater;->end()V
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_1
|
|
|
|
goto :goto_1
|
|
|
|
:catchall_1
|
|
move-exception v1
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
move-object v0, v1
|
|
|
|
:cond_1
|
|
:goto_1
|
|
:try_start_2
|
|
iget-object v1, p0, Lokio/GzipSink;->sink:Lokio/RealBufferedSink;
|
|
|
|
.line 112
|
|
invoke-virtual {v1}, Lokio/RealBufferedSink;->close()V
|
|
:try_end_2
|
|
.catchall {:try_start_2 .. :try_end_2} :catchall_2
|
|
|
|
goto :goto_2
|
|
|
|
:catchall_2
|
|
move-exception v1
|
|
|
|
if-nez v0, :cond_2
|
|
|
|
move-object v0, v1
|
|
|
|
:cond_2
|
|
:goto_2
|
|
const/4 v1, 0x1
|
|
|
|
iput-boolean v1, p0, Lokio/GzipSink;->closed:Z
|
|
|
|
if-nez v0, :cond_3
|
|
|
|
return-void
|
|
|
|
.line 119
|
|
:cond_3
|
|
throw v0
|
|
.end method
|
|
|
|
.method public final deflater()Ljava/util/zip/Deflater;
|
|
.locals 0
|
|
|
|
iget-object p0, p0, Lokio/GzipSink;->deflater:Ljava/util/zip/Deflater;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public flush()V
|
|
.locals 0
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
iget-object p0, p0, Lokio/GzipSink;->deflaterSink:Lokio/DeflaterSink;
|
|
|
|
.line 84
|
|
invoke-virtual {p0}, Lokio/DeflaterSink;->flush()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public timeout()Lokio/Timeout;
|
|
.locals 0
|
|
|
|
iget-object p0, p0, Lokio/GzipSink;->sink:Lokio/RealBufferedSink;
|
|
|
|
.line 86
|
|
invoke-virtual {p0}, Lokio/RealBufferedSink;->timeout()Lokio/Timeout;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public write(Lokio/Buffer;J)V
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
const-string v0, "source"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-wide/16 v0, 0x0
|
|
|
|
cmp-long v0, p2, v0
|
|
|
|
if-ltz v0, :cond_0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v1, 0x0
|
|
|
|
:goto_0
|
|
if-eqz v1, :cond_2
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
return-void
|
|
|
|
.line 79
|
|
:cond_1
|
|
invoke-direct {p0, p1, p2, p3}, Lokio/GzipSink;->updateCrc(Lokio/Buffer;J)V
|
|
|
|
iget-object p0, p0, Lokio/GzipSink;->deflaterSink:Lokio/DeflaterSink;
|
|
|
|
.line 80
|
|
invoke-virtual {p0, p1, p2, p3}, Lokio/DeflaterSink;->write(Lokio/Buffer;J)V
|
|
|
|
return-void
|
|
|
|
.line 76
|
|
:cond_2
|
|
new-instance p0, Ljava/lang/StringBuilder;
|
|
|
|
const-string p1, "byteCount < 0: "
|
|
|
|
invoke-direct {p0, p1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-virtual {p0, p2, p3}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
new-instance p1, Ljava/lang/IllegalArgumentException;
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Object;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-direct {p1, p0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
check-cast p1, Ljava/lang/Throwable;
|
|
|
|
throw p1
|
|
.end method
|