Huffman.smali 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960
  1. .class Lokhttp3/internal/http2/Huffman;
  2. .super Ljava/lang/Object;
  3. .source ""
  4. # annotations
  5. .annotation system Ldalvik/annotation/MemberClasses;
  6. value = {
  7. Lokhttp3/internal/http2/Huffman$Node;
  8. }
  9. .end annotation
  10. # static fields
  11. .field private static final CODES:[I
  12. .field private static final CODE_LENGTHS:[B
  13. .field private static final INSTANCE:Lokhttp3/internal/http2/Huffman;
  14. # instance fields
  15. .field private final root:Lokhttp3/internal/http2/Huffman$Node;
  16. # direct methods
  17. .method static constructor <clinit>()V
  18. .locals 2
  19. const/16 v0, 0x100
  20. new-array v1, v0, [I
  21. fill-array-data v1, :array_0
  22. sput-object v1, Lokhttp3/internal/http2/Huffman;->CODES:[I
  23. new-array v0, v0, [B
  24. fill-array-data v0, :array_1
  25. sput-object v0, Lokhttp3/internal/http2/Huffman;->CODE_LENGTHS:[B
  26. new-instance v0, Lokhttp3/internal/http2/Huffman;
  27. invoke-direct {v0}, Lokhttp3/internal/http2/Huffman;-><init>()V
  28. sput-object v0, Lokhttp3/internal/http2/Huffman;->INSTANCE:Lokhttp3/internal/http2/Huffman;
  29. return-void
  30. :array_0
  31. .array-data 4
  32. 0x1ff8
  33. 0x7fffd8
  34. 0xfffffe2
  35. 0xfffffe3
  36. 0xfffffe4
  37. 0xfffffe5
  38. 0xfffffe6
  39. 0xfffffe7
  40. 0xfffffe8
  41. 0xffffea
  42. 0x3ffffffc # 1.9999995f
  43. 0xfffffe9
  44. 0xfffffea
  45. 0x3ffffffd # 1.9999996f
  46. 0xfffffeb
  47. 0xfffffec
  48. 0xfffffed
  49. 0xfffffee
  50. 0xfffffef
  51. 0xffffff0
  52. 0xffffff1
  53. 0xffffff2
  54. 0x3ffffffe # 1.9999998f
  55. 0xffffff3
  56. 0xffffff4
  57. 0xffffff5
  58. 0xffffff6
  59. 0xffffff7
  60. 0xffffff8
  61. 0xffffff9
  62. 0xffffffa
  63. 0xffffffb
  64. 0x14
  65. 0x3f8
  66. 0x3f9
  67. 0xffa
  68. 0x1ff9
  69. 0x15
  70. 0xf8
  71. 0x7fa
  72. 0x3fa
  73. 0x3fb
  74. 0xf9
  75. 0x7fb
  76. 0xfa
  77. 0x16
  78. 0x17
  79. 0x18
  80. 0x0
  81. 0x1
  82. 0x2
  83. 0x19
  84. 0x1a
  85. 0x1b
  86. 0x1c
  87. 0x1d
  88. 0x1e
  89. 0x1f
  90. 0x5c
  91. 0xfb
  92. 0x7ffc
  93. 0x20
  94. 0xffb
  95. 0x3fc
  96. 0x1ffa
  97. 0x21
  98. 0x5d
  99. 0x5e
  100. 0x5f
  101. 0x60
  102. 0x61
  103. 0x62
  104. 0x63
  105. 0x64
  106. 0x65
  107. 0x66
  108. 0x67
  109. 0x68
  110. 0x69
  111. 0x6a
  112. 0x6b
  113. 0x6c
  114. 0x6d
  115. 0x6e
  116. 0x6f
  117. 0x70
  118. 0x71
  119. 0x72
  120. 0xfc
  121. 0x73
  122. 0xfd
  123. 0x1ffb
  124. 0x7fff0
  125. 0x1ffc
  126. 0x3ffc
  127. 0x22
  128. 0x7ffd
  129. 0x3
  130. 0x23
  131. 0x4
  132. 0x24
  133. 0x5
  134. 0x25
  135. 0x26
  136. 0x27
  137. 0x6
  138. 0x74
  139. 0x75
  140. 0x28
  141. 0x29
  142. 0x2a
  143. 0x7
  144. 0x2b
  145. 0x76
  146. 0x2c
  147. 0x8
  148. 0x9
  149. 0x2d
  150. 0x77
  151. 0x78
  152. 0x79
  153. 0x7a
  154. 0x7b
  155. 0x7ffe
  156. 0x7fc
  157. 0x3ffd
  158. 0x1ffd
  159. 0xffffffc
  160. 0xfffe6
  161. 0x3fffd2
  162. 0xfffe7
  163. 0xfffe8
  164. 0x3fffd3
  165. 0x3fffd4
  166. 0x3fffd5
  167. 0x7fffd9
  168. 0x3fffd6
  169. 0x7fffda
  170. 0x7fffdb
  171. 0x7fffdc
  172. 0x7fffdd
  173. 0x7fffde
  174. 0xffffeb
  175. 0x7fffdf
  176. 0xffffec
  177. 0xffffed
  178. 0x3fffd7
  179. 0x7fffe0
  180. 0xffffee
  181. 0x7fffe1
  182. 0x7fffe2
  183. 0x7fffe3
  184. 0x7fffe4
  185. 0x1fffdc
  186. 0x3fffd8
  187. 0x7fffe5
  188. 0x3fffd9
  189. 0x7fffe6
  190. 0x7fffe7
  191. 0xffffef
  192. 0x3fffda
  193. 0x1fffdd
  194. 0xfffe9
  195. 0x3fffdb
  196. 0x3fffdc
  197. 0x7fffe8
  198. 0x7fffe9
  199. 0x1fffde
  200. 0x7fffea
  201. 0x3fffdd
  202. 0x3fffde
  203. 0xfffff0
  204. 0x1fffdf
  205. 0x3fffdf
  206. 0x7fffeb
  207. 0x7fffec
  208. 0x1fffe0
  209. 0x1fffe1
  210. 0x3fffe0
  211. 0x1fffe2
  212. 0x7fffed
  213. 0x3fffe1
  214. 0x7fffee
  215. 0x7fffef
  216. 0xfffea
  217. 0x3fffe2
  218. 0x3fffe3
  219. 0x3fffe4
  220. 0x7ffff0
  221. 0x3fffe5
  222. 0x3fffe6
  223. 0x7ffff1
  224. 0x3ffffe0
  225. 0x3ffffe1
  226. 0xfffeb
  227. 0x7fff1
  228. 0x3fffe7
  229. 0x7ffff2
  230. 0x3fffe8
  231. 0x1ffffec
  232. 0x3ffffe2
  233. 0x3ffffe3
  234. 0x3ffffe4
  235. 0x7ffffde
  236. 0x7ffffdf
  237. 0x3ffffe5
  238. 0xfffff1
  239. 0x1ffffed
  240. 0x7fff2
  241. 0x1fffe3
  242. 0x3ffffe6
  243. 0x7ffffe0
  244. 0x7ffffe1
  245. 0x3ffffe7
  246. 0x7ffffe2
  247. 0xfffff2
  248. 0x1fffe4
  249. 0x1fffe5
  250. 0x3ffffe8
  251. 0x3ffffe9
  252. 0xffffffd
  253. 0x7ffffe3
  254. 0x7ffffe4
  255. 0x7ffffe5
  256. 0xfffec
  257. 0xfffff3
  258. 0xfffed
  259. 0x1fffe6
  260. 0x3fffe9
  261. 0x1fffe7
  262. 0x1fffe8
  263. 0x7ffff3
  264. 0x3fffea
  265. 0x3fffeb
  266. 0x1ffffee
  267. 0x1ffffef
  268. 0xfffff4
  269. 0xfffff5
  270. 0x3ffffea
  271. 0x7ffff4
  272. 0x3ffffeb
  273. 0x7ffffe6
  274. 0x3ffffec
  275. 0x3ffffed
  276. 0x7ffffe7
  277. 0x7ffffe8
  278. 0x7ffffe9
  279. 0x7ffffea
  280. 0x7ffffeb
  281. 0xffffffe
  282. 0x7ffffec
  283. 0x7ffffed
  284. 0x7ffffee
  285. 0x7ffffef
  286. 0x7fffff0
  287. 0x3ffffee
  288. .end array-data
  289. :array_1
  290. .array-data 1
  291. 0xdt
  292. 0x17t
  293. 0x1ct
  294. 0x1ct
  295. 0x1ct
  296. 0x1ct
  297. 0x1ct
  298. 0x1ct
  299. 0x1ct
  300. 0x18t
  301. 0x1et
  302. 0x1ct
  303. 0x1ct
  304. 0x1et
  305. 0x1ct
  306. 0x1ct
  307. 0x1ct
  308. 0x1ct
  309. 0x1ct
  310. 0x1ct
  311. 0x1ct
  312. 0x1ct
  313. 0x1et
  314. 0x1ct
  315. 0x1ct
  316. 0x1ct
  317. 0x1ct
  318. 0x1ct
  319. 0x1ct
  320. 0x1ct
  321. 0x1ct
  322. 0x1ct
  323. 0x6t
  324. 0xat
  325. 0xat
  326. 0xct
  327. 0xdt
  328. 0x6t
  329. 0x8t
  330. 0xbt
  331. 0xat
  332. 0xat
  333. 0x8t
  334. 0xbt
  335. 0x8t
  336. 0x6t
  337. 0x6t
  338. 0x6t
  339. 0x5t
  340. 0x5t
  341. 0x5t
  342. 0x6t
  343. 0x6t
  344. 0x6t
  345. 0x6t
  346. 0x6t
  347. 0x6t
  348. 0x6t
  349. 0x7t
  350. 0x8t
  351. 0xft
  352. 0x6t
  353. 0xct
  354. 0xat
  355. 0xdt
  356. 0x6t
  357. 0x7t
  358. 0x7t
  359. 0x7t
  360. 0x7t
  361. 0x7t
  362. 0x7t
  363. 0x7t
  364. 0x7t
  365. 0x7t
  366. 0x7t
  367. 0x7t
  368. 0x7t
  369. 0x7t
  370. 0x7t
  371. 0x7t
  372. 0x7t
  373. 0x7t
  374. 0x7t
  375. 0x7t
  376. 0x7t
  377. 0x7t
  378. 0x7t
  379. 0x8t
  380. 0x7t
  381. 0x8t
  382. 0xdt
  383. 0x13t
  384. 0xdt
  385. 0xet
  386. 0x6t
  387. 0xft
  388. 0x5t
  389. 0x6t
  390. 0x5t
  391. 0x6t
  392. 0x5t
  393. 0x6t
  394. 0x6t
  395. 0x6t
  396. 0x5t
  397. 0x7t
  398. 0x7t
  399. 0x6t
  400. 0x6t
  401. 0x6t
  402. 0x5t
  403. 0x6t
  404. 0x7t
  405. 0x6t
  406. 0x5t
  407. 0x5t
  408. 0x6t
  409. 0x7t
  410. 0x7t
  411. 0x7t
  412. 0x7t
  413. 0x7t
  414. 0xft
  415. 0xbt
  416. 0xet
  417. 0xdt
  418. 0x1ct
  419. 0x14t
  420. 0x16t
  421. 0x14t
  422. 0x14t
  423. 0x16t
  424. 0x16t
  425. 0x16t
  426. 0x17t
  427. 0x16t
  428. 0x17t
  429. 0x17t
  430. 0x17t
  431. 0x17t
  432. 0x17t
  433. 0x18t
  434. 0x17t
  435. 0x18t
  436. 0x18t
  437. 0x16t
  438. 0x17t
  439. 0x18t
  440. 0x17t
  441. 0x17t
  442. 0x17t
  443. 0x17t
  444. 0x15t
  445. 0x16t
  446. 0x17t
  447. 0x16t
  448. 0x17t
  449. 0x17t
  450. 0x18t
  451. 0x16t
  452. 0x15t
  453. 0x14t
  454. 0x16t
  455. 0x16t
  456. 0x17t
  457. 0x17t
  458. 0x15t
  459. 0x17t
  460. 0x16t
  461. 0x16t
  462. 0x18t
  463. 0x15t
  464. 0x16t
  465. 0x17t
  466. 0x17t
  467. 0x15t
  468. 0x15t
  469. 0x16t
  470. 0x15t
  471. 0x17t
  472. 0x16t
  473. 0x17t
  474. 0x17t
  475. 0x14t
  476. 0x16t
  477. 0x16t
  478. 0x16t
  479. 0x17t
  480. 0x16t
  481. 0x16t
  482. 0x17t
  483. 0x1at
  484. 0x1at
  485. 0x14t
  486. 0x13t
  487. 0x16t
  488. 0x17t
  489. 0x16t
  490. 0x19t
  491. 0x1at
  492. 0x1at
  493. 0x1at
  494. 0x1bt
  495. 0x1bt
  496. 0x1at
  497. 0x18t
  498. 0x19t
  499. 0x13t
  500. 0x15t
  501. 0x1at
  502. 0x1bt
  503. 0x1bt
  504. 0x1at
  505. 0x1bt
  506. 0x18t
  507. 0x15t
  508. 0x15t
  509. 0x1at
  510. 0x1at
  511. 0x1ct
  512. 0x1bt
  513. 0x1bt
  514. 0x1bt
  515. 0x14t
  516. 0x18t
  517. 0x14t
  518. 0x15t
  519. 0x16t
  520. 0x15t
  521. 0x15t
  522. 0x17t
  523. 0x16t
  524. 0x16t
  525. 0x19t
  526. 0x19t
  527. 0x18t
  528. 0x18t
  529. 0x1at
  530. 0x17t
  531. 0x1at
  532. 0x1bt
  533. 0x1at
  534. 0x1at
  535. 0x1bt
  536. 0x1bt
  537. 0x1bt
  538. 0x1bt
  539. 0x1bt
  540. 0x1ct
  541. 0x1bt
  542. 0x1bt
  543. 0x1bt
  544. 0x1bt
  545. 0x1bt
  546. 0x1at
  547. .end array-data
  548. .end method
  549. .method private constructor <init>()V
  550. .locals 1
  551. invoke-direct {p0}, Ljava/lang/Object;-><init>()V
  552. new-instance v0, Lokhttp3/internal/http2/Huffman$Node;
  553. invoke-direct {v0}, Lokhttp3/internal/http2/Huffman$Node;-><init>()V
  554. iput-object v0, p0, Lokhttp3/internal/http2/Huffman;->root:Lokhttp3/internal/http2/Huffman$Node;
  555. invoke-direct {p0}, Lokhttp3/internal/http2/Huffman;->buildTree()V
  556. return-void
  557. .end method
  558. .method private addCode(IIB)V
  559. .locals 4
  560. new-instance v0, Lokhttp3/internal/http2/Huffman$Node;
  561. invoke-direct {v0, p1, p3}, Lokhttp3/internal/http2/Huffman$Node;-><init>(II)V
  562. iget-object p1, p0, Lokhttp3/internal/http2/Huffman;->root:Lokhttp3/internal/http2/Huffman$Node;
  563. :goto_0
  564. const/16 v1, 0x8
  565. if-le p3, v1, :cond_2
  566. add-int/lit8 p3, p3, -0x8
  567. int-to-byte p3, p3
  568. ushr-int v1, p2, p3
  569. and-int/lit16 v1, v1, 0xff
  570. iget-object v2, p1, Lokhttp3/internal/http2/Huffman$Node;->children:[Lokhttp3/internal/http2/Huffman$Node;
  571. if-eqz v2, :cond_1
  572. aget-object v3, v2, v1
  573. if-nez v3, :cond_0
  574. new-instance v3, Lokhttp3/internal/http2/Huffman$Node;
  575. invoke-direct {v3}, Lokhttp3/internal/http2/Huffman$Node;-><init>()V
  576. aput-object v3, v2, v1
  577. :cond_0
  578. iget-object p1, p1, Lokhttp3/internal/http2/Huffman$Node;->children:[Lokhttp3/internal/http2/Huffman$Node;
  579. aget-object p1, p1, v1
  580. goto :goto_0
  581. :cond_1
  582. new-instance p1, Ljava/lang/IllegalStateException;
  583. const-string p2, "invalid dictionary: prefix not unique"
  584. invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
  585. throw p1
  586. :cond_2
  587. sub-int/2addr v1, p3
  588. shl-int/2addr p2, v1
  589. and-int/lit16 p2, p2, 0xff
  590. const/4 p3, 0x1
  591. shl-int/2addr p3, v1
  592. move v1, p2
  593. :goto_1
  594. add-int v2, p2, p3
  595. if-ge v1, v2, :cond_3
  596. iget-object v2, p1, Lokhttp3/internal/http2/Huffman$Node;->children:[Lokhttp3/internal/http2/Huffman$Node;
  597. aput-object v0, v2, v1
  598. add-int/lit8 v1, v1, 0x1
  599. goto :goto_1
  600. :cond_3
  601. return-void
  602. .end method
  603. .method private buildTree()V
  604. .locals 3
  605. const/4 v0, 0x0
  606. :goto_0
  607. sget-object v1, Lokhttp3/internal/http2/Huffman;->CODE_LENGTHS:[B
  608. array-length v2, v1
  609. if-ge v0, v2, :cond_0
  610. sget-object v2, Lokhttp3/internal/http2/Huffman;->CODES:[I
  611. aget v2, v2, v0
  612. aget-byte v1, v1, v0
  613. invoke-direct {p0, v0, v2, v1}, Lokhttp3/internal/http2/Huffman;->addCode(IIB)V
  614. add-int/lit8 v0, v0, 0x1
  615. goto :goto_0
  616. :cond_0
  617. return-void
  618. .end method
  619. .method public static get()Lokhttp3/internal/http2/Huffman;
  620. .locals 1
  621. sget-object v0, Lokhttp3/internal/http2/Huffman;->INSTANCE:Lokhttp3/internal/http2/Huffman;
  622. return-object v0
  623. .end method
  624. # virtual methods
  625. .method decode([B)[B
  626. .locals 7
  627. new-instance v0, Ljava/io/ByteArrayOutputStream;
  628. invoke-direct {v0}, Ljava/io/ByteArrayOutputStream;-><init>()V
  629. iget-object v1, p0, Lokhttp3/internal/http2/Huffman;->root:Lokhttp3/internal/http2/Huffman$Node;
  630. const/4 v2, 0x0
  631. move-object v4, v1
  632. const/4 v1, 0x0
  633. const/4 v3, 0x0
  634. :goto_0
  635. array-length v5, p1
  636. const/16 v6, 0x8
  637. if-ge v2, v5, :cond_2
  638. aget-byte v5, p1, v2
  639. and-int/lit16 v5, v5, 0xff
  640. shl-int/lit8 v1, v1, 0x8
  641. or-int/2addr v1, v5
  642. add-int/lit8 v3, v3, 0x8
  643. :goto_1
  644. if-lt v3, v6, :cond_1
  645. add-int/lit8 v5, v3, -0x8
  646. ushr-int v5, v1, v5
  647. and-int/lit16 v5, v5, 0xff
  648. iget-object v4, v4, Lokhttp3/internal/http2/Huffman$Node;->children:[Lokhttp3/internal/http2/Huffman$Node;
  649. aget-object v4, v4, v5
  650. iget-object v5, v4, Lokhttp3/internal/http2/Huffman$Node;->children:[Lokhttp3/internal/http2/Huffman$Node;
  651. if-nez v5, :cond_0
  652. iget v5, v4, Lokhttp3/internal/http2/Huffman$Node;->symbol:I
  653. invoke-virtual {v0, v5}, Ljava/io/ByteArrayOutputStream;->write(I)V
  654. iget v4, v4, Lokhttp3/internal/http2/Huffman$Node;->terminalBits:I
  655. sub-int/2addr v3, v4
  656. iget-object v4, p0, Lokhttp3/internal/http2/Huffman;->root:Lokhttp3/internal/http2/Huffman$Node;
  657. goto :goto_1
  658. :cond_0
  659. add-int/lit8 v3, v3, -0x8
  660. goto :goto_1
  661. :cond_1
  662. add-int/lit8 v2, v2, 0x1
  663. goto :goto_0
  664. :cond_2
  665. :goto_2
  666. if-lez v3, :cond_4
  667. rsub-int/lit8 p1, v3, 0x8
  668. shl-int p1, v1, p1
  669. and-int/lit16 p1, p1, 0xff
  670. iget-object v2, v4, Lokhttp3/internal/http2/Huffman$Node;->children:[Lokhttp3/internal/http2/Huffman$Node;
  671. aget-object p1, v2, p1
  672. iget-object v2, p1, Lokhttp3/internal/http2/Huffman$Node;->children:[Lokhttp3/internal/http2/Huffman$Node;
  673. if-nez v2, :cond_4
  674. iget v2, p1, Lokhttp3/internal/http2/Huffman$Node;->terminalBits:I
  675. if-le v2, v3, :cond_3
  676. goto :goto_3
  677. :cond_3
  678. iget v2, p1, Lokhttp3/internal/http2/Huffman$Node;->symbol:I
  679. invoke-virtual {v0, v2}, Ljava/io/ByteArrayOutputStream;->write(I)V
  680. iget p1, p1, Lokhttp3/internal/http2/Huffman$Node;->terminalBits:I
  681. sub-int/2addr v3, p1
  682. iget-object v4, p0, Lokhttp3/internal/http2/Huffman;->root:Lokhttp3/internal/http2/Huffman$Node;
  683. goto :goto_2
  684. :cond_4
  685. :goto_3
  686. invoke-virtual {v0}, Ljava/io/ByteArrayOutputStream;->toByteArray()[B
  687. move-result-object p1
  688. return-object p1
  689. .end method
  690. .method encode(Lokio/ByteString;Lokio/BufferedSink;)V
  691. .locals 8
  692. .annotation system Ldalvik/annotation/Throws;
  693. value = {
  694. Ljava/io/IOException;
  695. }
  696. .end annotation
  697. const/4 v0, 0x0
  698. const-wide/16 v1, 0x0
  699. move-wide v2, v1
  700. const/4 v1, 0x0
  701. :goto_0
  702. invoke-virtual {p1}, Lokio/ByteString;->size()I
  703. move-result v4
  704. const/16 v5, 0x8
  705. const/16 v6, 0xff
  706. if-ge v0, v4, :cond_1
  707. invoke-virtual {p1, v0}, Lokio/ByteString;->getByte(I)B
  708. move-result v4
  709. and-int/2addr v4, v6
  710. sget-object v6, Lokhttp3/internal/http2/Huffman;->CODES:[I
  711. aget v6, v6, v4
  712. sget-object v7, Lokhttp3/internal/http2/Huffman;->CODE_LENGTHS:[B
  713. aget-byte v4, v7, v4
  714. shl-long/2addr v2, v4
  715. int-to-long v6, v6
  716. or-long/2addr v2, v6
  717. add-int/2addr v1, v4
  718. :goto_1
  719. if-lt v1, v5, :cond_0
  720. add-int/lit8 v1, v1, -0x8
  721. shr-long v6, v2, v1
  722. long-to-int v4, v6
  723. invoke-interface {p2, v4}, Lokio/BufferedSink;->writeByte(I)Lokio/BufferedSink;
  724. goto :goto_1
  725. :cond_0
  726. add-int/lit8 v0, v0, 0x1
  727. goto :goto_0
  728. :cond_1
  729. if-lez v1, :cond_2
  730. sub-int/2addr v5, v1
  731. shl-long/2addr v2, v5
  732. ushr-int p1, v6, v1
  733. int-to-long v0, p1
  734. or-long/2addr v0, v2
  735. long-to-int p1, v0
  736. invoke-interface {p2, p1}, Lokio/BufferedSink;->writeByte(I)Lokio/BufferedSink;
  737. :cond_2
  738. return-void
  739. .end method
  740. .method encodedLength(Lokio/ByteString;)I
  741. .locals 5
  742. const-wide/16 v0, 0x0
  743. const/4 v2, 0x0
  744. :goto_0
  745. invoke-virtual {p1}, Lokio/ByteString;->size()I
  746. move-result v3
  747. if-ge v2, v3, :cond_0
  748. invoke-virtual {p1, v2}, Lokio/ByteString;->getByte(I)B
  749. move-result v3
  750. and-int/lit16 v3, v3, 0xff
  751. sget-object v4, Lokhttp3/internal/http2/Huffman;->CODE_LENGTHS:[B
  752. aget-byte v3, v4, v3
  753. int-to-long v3, v3
  754. add-long/2addr v0, v3
  755. add-int/lit8 v2, v2, 0x1
  756. goto :goto_0
  757. :cond_0
  758. const-wide/16 v2, 0x7
  759. add-long/2addr v0, v2
  760. const/4 p1, 0x3
  761. shr-long/2addr v0, p1
  762. long-to-int p1, v0
  763. return p1
  764. .end method