- Imported from https://github.com/supermegamestre/Project-Real-Resurrection-3 - APKTool decompilation (Smali bytecode) for modding and rebuilding APK - Supports both 32-bit (armeabi-v7a) and 64-bit (arm64-v8a) architectures - Includes full Smali source, resources, and native libraries - Ready to rebuild APK after modifications with apktool b command - Added comprehensive README-apktool.md with modding guide This branch complements the JADX branches: - Use JADX (main/discord-community) to UNDERSTAND code (readable Java) - Use APKTool (this branch) to MODIFY and REBUILD APK (editable Smali) Total: 44,417 files, 538.51 MB Smali source code
792 lines
18 KiB
Smali
792 lines
18 KiB
Smali
.class public final Lokhttp3/internal/http2/Hpack$Writer;
|
|
.super Ljava/lang/Object;
|
|
.source "SourceFile"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Lokhttp3/internal/http2/Hpack;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x19
|
|
name = "Writer"
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field public dynamicTable:[Lokhttp3/internal/http2/Header;
|
|
|
|
.field public dynamicTableByteCount:I
|
|
|
|
.field public emitDynamicTableSizeUpdate:Z
|
|
|
|
.field public headerCount:I
|
|
|
|
.field public headerTableSizeSetting:I
|
|
|
|
.field public maxDynamicTableByteCount:I
|
|
|
|
.field public nextHeaderIndex:I
|
|
|
|
.field public final out:Lokio/Buffer;
|
|
|
|
.field public smallestHeaderTableSizeSetting:I
|
|
|
|
.field public final useCompression:Z
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(IZLokio/Buffer;)V
|
|
.locals 1
|
|
|
|
.line 400
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
const v0, 0x7fffffff
|
|
|
|
iput v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->smallestHeaderTableSizeSetting:I
|
|
|
|
const/16 v0, 0x8
|
|
|
|
new-array v0, v0, [Lokhttp3/internal/http2/Header;
|
|
|
|
iput-object v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTable:[Lokhttp3/internal/http2/Header;
|
|
|
|
array-length v0, v0
|
|
|
|
add-int/lit8 v0, v0, -0x1
|
|
|
|
iput v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->nextHeaderIndex:I
|
|
|
|
const/4 v0, 0x0
|
|
|
|
iput v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->headerCount:I
|
|
|
|
iput v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTableByteCount:I
|
|
|
|
iput p1, p0, Lokhttp3/internal/http2/Hpack$Writer;->headerTableSizeSetting:I
|
|
|
|
iput p1, p0, Lokhttp3/internal/http2/Hpack$Writer;->maxDynamicTableByteCount:I
|
|
|
|
iput-boolean p2, p0, Lokhttp3/internal/http2/Hpack$Writer;->useCompression:Z
|
|
|
|
iput-object p3, p0, Lokhttp3/internal/http2/Hpack$Writer;->out:Lokio/Buffer;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Lokio/Buffer;)V
|
|
.locals 2
|
|
|
|
const/16 v0, 0x1000
|
|
|
|
const/4 v1, 0x1
|
|
|
|
.line 397
|
|
invoke-direct {p0, v0, v1, p1}, Lokhttp3/internal/http2/Hpack$Writer;-><init>(IZLokio/Buffer;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final adjustDynamicTableByteCount()V
|
|
.locals 2
|
|
|
|
iget v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->maxDynamicTableByteCount:I
|
|
|
|
iget v1, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTableByteCount:I
|
|
|
|
if-ge v0, v1, :cond_1
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
.line 583
|
|
invoke-virtual {p0}, Lokhttp3/internal/http2/Hpack$Writer;->clearDynamicTable()V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
sub-int/2addr v1, v0
|
|
|
|
.line 585
|
|
invoke-virtual {p0, v1}, Lokhttp3/internal/http2/Hpack$Writer;->evictToRecoverBytes(I)I
|
|
|
|
:cond_1
|
|
:goto_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public final clearDynamicTable()V
|
|
.locals 2
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTable:[Lokhttp3/internal/http2/Header;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
.line 408
|
|
invoke-static {v0, v1}, Ljava/util/Arrays;->fill([Ljava/lang/Object;Ljava/lang/Object;)V
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTable:[Lokhttp3/internal/http2/Header;
|
|
|
|
.line 409
|
|
array-length v0, v0
|
|
|
|
add-int/lit8 v0, v0, -0x1
|
|
|
|
iput v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->nextHeaderIndex:I
|
|
|
|
const/4 v0, 0x0
|
|
|
|
iput v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->headerCount:I
|
|
|
|
iput v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTableByteCount:I
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final evictToRecoverBytes(I)I
|
|
.locals 4
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-lez p1, :cond_1
|
|
|
|
iget-object v1, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTable:[Lokhttp3/internal/http2/Header;
|
|
|
|
.line 419
|
|
array-length v1, v1
|
|
|
|
add-int/lit8 v1, v1, -0x1
|
|
|
|
:goto_0
|
|
iget v2, p0, Lokhttp3/internal/http2/Hpack$Writer;->nextHeaderIndex:I
|
|
|
|
if-lt v1, v2, :cond_0
|
|
|
|
if-lez p1, :cond_0
|
|
|
|
iget-object v2, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTable:[Lokhttp3/internal/http2/Header;
|
|
|
|
.line 420
|
|
aget-object v2, v2, v1
|
|
|
|
iget v2, v2, Lokhttp3/internal/http2/Header;->hpackSize:I
|
|
|
|
sub-int/2addr p1, v2
|
|
|
|
iget v3, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTableByteCount:I
|
|
|
|
sub-int/2addr v3, v2
|
|
|
|
iput v3, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTableByteCount:I
|
|
|
|
iget v2, p0, Lokhttp3/internal/http2/Hpack$Writer;->headerCount:I
|
|
|
|
add-int/lit8 v2, v2, -0x1
|
|
|
|
iput v2, p0, Lokhttp3/internal/http2/Hpack$Writer;->headerCount:I
|
|
|
|
add-int/lit8 v0, v0, 0x1
|
|
|
|
add-int/lit8 v1, v1, -0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
iget-object p1, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTable:[Lokhttp3/internal/http2/Header;
|
|
|
|
add-int/lit8 v1, v2, 0x1
|
|
|
|
add-int/lit8 v2, v2, 0x1
|
|
|
|
add-int/2addr v2, v0
|
|
|
|
iget v3, p0, Lokhttp3/internal/http2/Hpack$Writer;->headerCount:I
|
|
|
|
.line 425
|
|
invoke-static {p1, v1, p1, v2, v3}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
|
|
|
|
iget-object p1, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTable:[Lokhttp3/internal/http2/Header;
|
|
|
|
iget v1, p0, Lokhttp3/internal/http2/Hpack$Writer;->nextHeaderIndex:I
|
|
|
|
add-int/lit8 v2, v1, 0x1
|
|
|
|
add-int/lit8 v1, v1, 0x1
|
|
|
|
add-int/2addr v1, v0
|
|
|
|
const/4 v3, 0x0
|
|
|
|
.line 427
|
|
invoke-static {p1, v2, v1, v3}, Ljava/util/Arrays;->fill([Ljava/lang/Object;IILjava/lang/Object;)V
|
|
|
|
iget p1, p0, Lokhttp3/internal/http2/Hpack$Writer;->nextHeaderIndex:I
|
|
|
|
add-int/2addr p1, v0
|
|
|
|
iput p1, p0, Lokhttp3/internal/http2/Hpack$Writer;->nextHeaderIndex:I
|
|
|
|
:cond_1
|
|
return v0
|
|
.end method
|
|
|
|
.method public final insertIntoDynamicTable(Lokhttp3/internal/http2/Header;)V
|
|
.locals 6
|
|
|
|
.line 434
|
|
iget v0, p1, Lokhttp3/internal/http2/Header;->hpackSize:I
|
|
|
|
iget v1, p0, Lokhttp3/internal/http2/Hpack$Writer;->maxDynamicTableByteCount:I
|
|
|
|
if-le v0, v1, :cond_0
|
|
|
|
.line 438
|
|
invoke-virtual {p0}, Lokhttp3/internal/http2/Hpack$Writer;->clearDynamicTable()V
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
iget v2, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTableByteCount:I
|
|
|
|
add-int/2addr v2, v0
|
|
|
|
sub-int/2addr v2, v1
|
|
|
|
.line 444
|
|
invoke-virtual {p0, v2}, Lokhttp3/internal/http2/Hpack$Writer;->evictToRecoverBytes(I)I
|
|
|
|
iget v1, p0, Lokhttp3/internal/http2/Hpack$Writer;->headerCount:I
|
|
|
|
add-int/lit8 v1, v1, 0x1
|
|
|
|
iget-object v2, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTable:[Lokhttp3/internal/http2/Header;
|
|
|
|
.line 446
|
|
array-length v3, v2
|
|
|
|
if-le v1, v3, :cond_1
|
|
|
|
.line 447
|
|
array-length v1, v2
|
|
|
|
mul-int/lit8 v1, v1, 0x2
|
|
|
|
new-array v1, v1, [Lokhttp3/internal/http2/Header;
|
|
|
|
.line 448
|
|
array-length v3, v2
|
|
|
|
array-length v4, v2
|
|
|
|
const/4 v5, 0x0
|
|
|
|
invoke-static {v2, v5, v1, v3, v4}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
|
|
|
|
iget-object v2, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTable:[Lokhttp3/internal/http2/Header;
|
|
|
|
.line 449
|
|
array-length v2, v2
|
|
|
|
add-int/lit8 v2, v2, -0x1
|
|
|
|
iput v2, p0, Lokhttp3/internal/http2/Hpack$Writer;->nextHeaderIndex:I
|
|
|
|
iput-object v1, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTable:[Lokhttp3/internal/http2/Header;
|
|
|
|
:cond_1
|
|
iget v1, p0, Lokhttp3/internal/http2/Hpack$Writer;->nextHeaderIndex:I
|
|
|
|
add-int/lit8 v2, v1, -0x1
|
|
|
|
iput v2, p0, Lokhttp3/internal/http2/Hpack$Writer;->nextHeaderIndex:I
|
|
|
|
iget-object v2, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTable:[Lokhttp3/internal/http2/Header;
|
|
|
|
.line 453
|
|
aput-object p1, v2, v1
|
|
|
|
iget p1, p0, Lokhttp3/internal/http2/Hpack$Writer;->headerCount:I
|
|
|
|
add-int/lit8 p1, p1, 0x1
|
|
|
|
iput p1, p0, Lokhttp3/internal/http2/Hpack$Writer;->headerCount:I
|
|
|
|
iget p1, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTableByteCount:I
|
|
|
|
add-int/2addr p1, v0
|
|
|
|
iput p1, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTableByteCount:I
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setHeaderTableSizeSetting(I)V
|
|
.locals 1
|
|
|
|
iput p1, p0, Lokhttp3/internal/http2/Hpack$Writer;->headerTableSizeSetting:I
|
|
|
|
const/16 v0, 0x4000
|
|
|
|
.line 566
|
|
invoke-static {p1, v0}, Ljava/lang/Math;->min(II)I
|
|
|
|
move-result p1
|
|
|
|
iget v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->maxDynamicTableByteCount:I
|
|
|
|
if-ne v0, p1, :cond_0
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
if-ge p1, v0, :cond_1
|
|
|
|
iget v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->smallestHeaderTableSizeSetting:I
|
|
|
|
.line 572
|
|
invoke-static {v0, p1}, Ljava/lang/Math;->min(II)I
|
|
|
|
move-result v0
|
|
|
|
iput v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->smallestHeaderTableSizeSetting:I
|
|
|
|
:cond_1
|
|
const/4 v0, 0x1
|
|
|
|
iput-boolean v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->emitDynamicTableSizeUpdate:Z
|
|
|
|
iput p1, p0, Lokhttp3/internal/http2/Hpack$Writer;->maxDynamicTableByteCount:I
|
|
|
|
.line 577
|
|
invoke-virtual {p0}, Lokhttp3/internal/http2/Hpack$Writer;->adjustDynamicTableByteCount()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public writeByteString(Lokio/ByteString;)V
|
|
.locals 3
|
|
|
|
iget-boolean v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->useCompression:Z
|
|
|
|
const/16 v1, 0x7f
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 552
|
|
invoke-static {}, Lokhttp3/internal/http2/Huffman;->get()Lokhttp3/internal/http2/Huffman;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, p1}, Lokhttp3/internal/http2/Huffman;->encodedLength(Lokio/ByteString;)I
|
|
|
|
move-result v0
|
|
|
|
invoke-virtual {p1}, Lokio/ByteString;->size()I
|
|
|
|
move-result v2
|
|
|
|
if-ge v0, v2, :cond_0
|
|
|
|
.line 553
|
|
new-instance v0, Lokio/Buffer;
|
|
|
|
invoke-direct {v0}, Lokio/Buffer;-><init>()V
|
|
|
|
.line 554
|
|
invoke-static {}, Lokhttp3/internal/http2/Huffman;->get()Lokhttp3/internal/http2/Huffman;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2, p1, v0}, Lokhttp3/internal/http2/Huffman;->encode(Lokio/ByteString;Lokio/BufferedSink;)V
|
|
|
|
.line 555
|
|
invoke-virtual {v0}, Lokio/Buffer;->readByteString()Lokio/ByteString;
|
|
|
|
move-result-object p1
|
|
|
|
.line 556
|
|
invoke-virtual {p1}, Lokio/ByteString;->size()I
|
|
|
|
move-result v0
|
|
|
|
const/16 v2, 0x80
|
|
|
|
invoke-virtual {p0, v0, v1, v2}, Lokhttp3/internal/http2/Hpack$Writer;->writeInt(III)V
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->out:Lokio/Buffer;
|
|
|
|
.line 557
|
|
invoke-virtual {v0, p1}, Lokio/Buffer;->write(Lokio/ByteString;)Lokio/Buffer;
|
|
|
|
goto :goto_0
|
|
|
|
.line 559
|
|
:cond_0
|
|
invoke-virtual {p1}, Lokio/ByteString;->size()I
|
|
|
|
move-result v0
|
|
|
|
const/4 v2, 0x0
|
|
|
|
invoke-virtual {p0, v0, v1, v2}, Lokhttp3/internal/http2/Hpack$Writer;->writeInt(III)V
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->out:Lokio/Buffer;
|
|
|
|
.line 560
|
|
invoke-virtual {v0, p1}, Lokio/Buffer;->write(Lokio/ByteString;)Lokio/Buffer;
|
|
|
|
:goto_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public writeHeaders(Ljava/util/List;)V
|
|
.locals 13
|
|
|
|
iget-boolean v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->emitDynamicTableSizeUpdate:Z
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
iget v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->smallestHeaderTableSizeSetting:I
|
|
|
|
iget v2, p0, Lokhttp3/internal/http2/Hpack$Writer;->maxDynamicTableByteCount:I
|
|
|
|
const/16 v3, 0x20
|
|
|
|
const/16 v4, 0x1f
|
|
|
|
if-ge v0, v2, :cond_0
|
|
|
|
.line 464
|
|
invoke-virtual {p0, v0, v4, v3}, Lokhttp3/internal/http2/Hpack$Writer;->writeInt(III)V
|
|
|
|
:cond_0
|
|
iput-boolean v1, p0, Lokhttp3/internal/http2/Hpack$Writer;->emitDynamicTableSizeUpdate:Z
|
|
|
|
const v0, 0x7fffffff
|
|
|
|
iput v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->smallestHeaderTableSizeSetting:I
|
|
|
|
iget v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->maxDynamicTableByteCount:I
|
|
|
|
.line 468
|
|
invoke-virtual {p0, v0, v4, v3}, Lokhttp3/internal/http2/Hpack$Writer;->writeInt(III)V
|
|
|
|
.line 471
|
|
:cond_1
|
|
invoke-interface {p1}, Ljava/util/List;->size()I
|
|
|
|
move-result v0
|
|
|
|
move v2, v1
|
|
|
|
:goto_0
|
|
if-ge v2, v0, :cond_b
|
|
|
|
.line 472
|
|
invoke-interface {p1, v2}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object v3
|
|
|
|
check-cast v3, Lokhttp3/internal/http2/Header;
|
|
|
|
.line 473
|
|
iget-object v4, v3, Lokhttp3/internal/http2/Header;->name:Lokio/ByteString;
|
|
|
|
invoke-virtual {v4}, Lokio/ByteString;->toAsciiLowercase()Lokio/ByteString;
|
|
|
|
move-result-object v4
|
|
|
|
.line 474
|
|
iget-object v5, v3, Lokhttp3/internal/http2/Header;->value:Lokio/ByteString;
|
|
|
|
.line 478
|
|
sget-object v6, Lokhttp3/internal/http2/Hpack;->NAME_TO_FIRST_INDEX:Ljava/util/Map;
|
|
|
|
invoke-interface {v6, v4}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v6
|
|
|
|
check-cast v6, Ljava/lang/Integer;
|
|
|
|
const/4 v7, 0x1
|
|
|
|
const/4 v8, -0x1
|
|
|
|
if-eqz v6, :cond_4
|
|
|
|
.line 480
|
|
invoke-virtual {v6}, Ljava/lang/Integer;->intValue()I
|
|
|
|
move-result v6
|
|
|
|
add-int/lit8 v9, v6, 0x1
|
|
|
|
if-le v9, v7, :cond_3
|
|
|
|
const/16 v10, 0x8
|
|
|
|
if-ge v9, v10, :cond_3
|
|
|
|
.line 486
|
|
sget-object v10, Lokhttp3/internal/http2/Hpack;->STATIC_HEADER_TABLE:[Lokhttp3/internal/http2/Header;
|
|
|
|
aget-object v11, v10, v6
|
|
|
|
iget-object v11, v11, Lokhttp3/internal/http2/Header;->value:Lokio/ByteString;
|
|
|
|
invoke-static {v11, v5}, Ljava/util/Objects;->equals(Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result v11
|
|
|
|
if-eqz v11, :cond_2
|
|
|
|
move v6, v9
|
|
|
|
goto :goto_1
|
|
|
|
.line 488
|
|
:cond_2
|
|
aget-object v10, v10, v9
|
|
|
|
iget-object v10, v10, Lokhttp3/internal/http2/Header;->value:Lokio/ByteString;
|
|
|
|
invoke-static {v10, v5}, Ljava/util/Objects;->equals(Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result v10
|
|
|
|
if-eqz v10, :cond_3
|
|
|
|
add-int/lit8 v6, v6, 0x2
|
|
|
|
move v12, v9
|
|
|
|
move v9, v6
|
|
|
|
move v6, v12
|
|
|
|
goto :goto_1
|
|
|
|
:cond_3
|
|
move v6, v9
|
|
|
|
move v9, v8
|
|
|
|
goto :goto_1
|
|
|
|
:cond_4
|
|
move v6, v8
|
|
|
|
move v9, v6
|
|
|
|
:goto_1
|
|
if-ne v9, v8, :cond_7
|
|
|
|
iget v10, p0, Lokhttp3/internal/http2/Hpack$Writer;->nextHeaderIndex:I
|
|
|
|
add-int/2addr v10, v7
|
|
|
|
iget-object v7, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTable:[Lokhttp3/internal/http2/Header;
|
|
|
|
.line 495
|
|
array-length v7, v7
|
|
|
|
:goto_2
|
|
if-ge v10, v7, :cond_7
|
|
|
|
iget-object v11, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTable:[Lokhttp3/internal/http2/Header;
|
|
|
|
.line 496
|
|
aget-object v11, v11, v10
|
|
|
|
iget-object v11, v11, Lokhttp3/internal/http2/Header;->name:Lokio/ByteString;
|
|
|
|
invoke-static {v11, v4}, Ljava/util/Objects;->equals(Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result v11
|
|
|
|
if-eqz v11, :cond_6
|
|
|
|
iget-object v11, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTable:[Lokhttp3/internal/http2/Header;
|
|
|
|
.line 497
|
|
aget-object v11, v11, v10
|
|
|
|
iget-object v11, v11, Lokhttp3/internal/http2/Header;->value:Lokio/ByteString;
|
|
|
|
invoke-static {v11, v5}, Ljava/util/Objects;->equals(Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result v11
|
|
|
|
if-eqz v11, :cond_5
|
|
|
|
iget v7, p0, Lokhttp3/internal/http2/Hpack$Writer;->nextHeaderIndex:I
|
|
|
|
sub-int/2addr v10, v7
|
|
|
|
.line 498
|
|
sget-object v7, Lokhttp3/internal/http2/Hpack;->STATIC_HEADER_TABLE:[Lokhttp3/internal/http2/Header;
|
|
|
|
array-length v7, v7
|
|
|
|
add-int v9, v10, v7
|
|
|
|
goto :goto_3
|
|
|
|
:cond_5
|
|
if-ne v6, v8, :cond_6
|
|
|
|
iget v6, p0, Lokhttp3/internal/http2/Hpack$Writer;->nextHeaderIndex:I
|
|
|
|
sub-int v6, v10, v6
|
|
|
|
.line 501
|
|
sget-object v11, Lokhttp3/internal/http2/Hpack;->STATIC_HEADER_TABLE:[Lokhttp3/internal/http2/Header;
|
|
|
|
array-length v11, v11
|
|
|
|
add-int/2addr v6, v11
|
|
|
|
:cond_6
|
|
add-int/lit8 v10, v10, 0x1
|
|
|
|
goto :goto_2
|
|
|
|
:cond_7
|
|
:goto_3
|
|
if-eq v9, v8, :cond_8
|
|
|
|
const/16 v3, 0x7f
|
|
|
|
const/16 v4, 0x80
|
|
|
|
.line 509
|
|
invoke-virtual {p0, v9, v3, v4}, Lokhttp3/internal/http2/Hpack$Writer;->writeInt(III)V
|
|
|
|
goto :goto_4
|
|
|
|
:cond_8
|
|
const/16 v7, 0x40
|
|
|
|
if-ne v6, v8, :cond_9
|
|
|
|
iget-object v6, p0, Lokhttp3/internal/http2/Hpack$Writer;->out:Lokio/Buffer;
|
|
|
|
.line 512
|
|
invoke-virtual {v6, v7}, Lokio/Buffer;->writeByte(I)Lokio/Buffer;
|
|
|
|
.line 513
|
|
invoke-virtual {p0, v4}, Lokhttp3/internal/http2/Hpack$Writer;->writeByteString(Lokio/ByteString;)V
|
|
|
|
.line 514
|
|
invoke-virtual {p0, v5}, Lokhttp3/internal/http2/Hpack$Writer;->writeByteString(Lokio/ByteString;)V
|
|
|
|
.line 515
|
|
invoke-virtual {p0, v3}, Lokhttp3/internal/http2/Hpack$Writer;->insertIntoDynamicTable(Lokhttp3/internal/http2/Header;)V
|
|
|
|
goto :goto_4
|
|
|
|
.line 516
|
|
:cond_9
|
|
sget-object v8, Lokhttp3/internal/http2/Header;->PSEUDO_PREFIX:Lokio/ByteString;
|
|
|
|
invoke-virtual {v4, v8}, Lokio/ByteString;->startsWith(Lokio/ByteString;)Z
|
|
|
|
move-result v8
|
|
|
|
if-eqz v8, :cond_a
|
|
|
|
sget-object v8, Lokhttp3/internal/http2/Header;->TARGET_AUTHORITY:Lokio/ByteString;
|
|
|
|
invoke-virtual {v8, v4}, Lokio/ByteString;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v4
|
|
|
|
if-nez v4, :cond_a
|
|
|
|
const/16 v3, 0xf
|
|
|
|
.line 519
|
|
invoke-virtual {p0, v6, v3, v1}, Lokhttp3/internal/http2/Hpack$Writer;->writeInt(III)V
|
|
|
|
.line 520
|
|
invoke-virtual {p0, v5}, Lokhttp3/internal/http2/Hpack$Writer;->writeByteString(Lokio/ByteString;)V
|
|
|
|
goto :goto_4
|
|
|
|
:cond_a
|
|
const/16 v4, 0x3f
|
|
|
|
.line 523
|
|
invoke-virtual {p0, v6, v4, v7}, Lokhttp3/internal/http2/Hpack$Writer;->writeInt(III)V
|
|
|
|
.line 524
|
|
invoke-virtual {p0, v5}, Lokhttp3/internal/http2/Hpack$Writer;->writeByteString(Lokio/ByteString;)V
|
|
|
|
.line 525
|
|
invoke-virtual {p0, v3}, Lokhttp3/internal/http2/Hpack$Writer;->insertIntoDynamicTable(Lokhttp3/internal/http2/Header;)V
|
|
|
|
:goto_4
|
|
add-int/lit8 v2, v2, 0x1
|
|
|
|
goto/16 :goto_0
|
|
|
|
:cond_b
|
|
return-void
|
|
.end method
|
|
|
|
.method public writeInt(III)V
|
|
.locals 1
|
|
|
|
if-ge p1, p2, :cond_0
|
|
|
|
iget-object p2, p0, Lokhttp3/internal/http2/Hpack$Writer;->out:Lokio/Buffer;
|
|
|
|
or-int/2addr p1, p3
|
|
|
|
.line 534
|
|
invoke-virtual {p2, p1}, Lokio/Buffer;->writeByte(I)Lokio/Buffer;
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
iget-object v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->out:Lokio/Buffer;
|
|
|
|
or-int/2addr p3, p2
|
|
|
|
.line 539
|
|
invoke-virtual {v0, p3}, Lokio/Buffer;->writeByte(I)Lokio/Buffer;
|
|
|
|
sub-int/2addr p1, p2
|
|
|
|
:goto_0
|
|
const/16 p2, 0x80
|
|
|
|
if-lt p1, p2, :cond_1
|
|
|
|
and-int/lit8 p3, p1, 0x7f
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->out:Lokio/Buffer;
|
|
|
|
or-int/2addr p2, p3
|
|
|
|
.line 545
|
|
invoke-virtual {v0, p2}, Lokio/Buffer;->writeByte(I)Lokio/Buffer;
|
|
|
|
ushr-int/lit8 p1, p1, 0x7
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
iget-object p2, p0, Lokhttp3/internal/http2/Hpack$Writer;->out:Lokio/Buffer;
|
|
|
|
.line 548
|
|
invoke-virtual {p2, p1}, Lokio/Buffer;->writeByte(I)Lokio/Buffer;
|
|
|
|
return-void
|
|
.end method
|