All files / output zcl_abapgit_git_pack.clas.mjs

73.66% Statements 537/729
64.64% Branches 64/99
20% Functions 12/60
73.66% Lines 537/729

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 7291x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x     1x     1x 1x 1x 1x 1x 1x         1x 1x     1x 1x             1x 1x             1x 1x         1x 1x     1x 1x             1x 1x             1x 1x                     1x       1x     1x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x     3x     3x 3x     3x 3x 3x 3x 3x 3x 3x 5x 5x 5x 5x 5x 5x       5x 5x     5x 5x 5x 5x     5x 5x   5x 5x 5x 5x     5x 5x 5x 5x     5x 5x 5x 5x 5x 5x 5x 5x 3x 3x 3x 3x 3x     3x 3x 3x 1x     1x 21x 21x 21x 21x 21x 21x 21x 21x 21x 21x 21x 21x 21x 21x 21x 21x 21x 21x 21x 21x 21x 21x 70x 70x 70x 70x 70x 70x 21x 70x 7x 6x 7x 1x 1x 49x 21x 21x 21x 21x 21x     70x 21x 21x 1x 1x 1x 1x 1x 1x 1x 21x 21x     21x 21x 1x     1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 6x 6x 6x 6x 1x 6x 1x 5x 1x 4x 1x 1x 3x 1x 1x 1x 1x 1x           1x 6x 1x 1x 1x     1x 9x 9x 9x 9x 9x 9x 9x 9x 9x 9x 9x 9x 9x 9x 9x 9x 9x 9x 9x 9x 9x 9x 9x 9x 9x 9x 13x 13x 13x 9x 9x 4x 4x 4x 4x 4x 13x     4x 4x 4x 4x 4x 4x 4x 9x 9x 9x 1x     1x 3x 3x 3x 3x           3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 5x 5x 5x 5x 5x 5x 5x 5x 5x     5x 5x 3x 3x 3x 3x 1x     1x 18x 18x 18x 18x               18x 18x 18x 18x 18x 18x 18x 18x 18x 18x 4x 4x 4x 4x 4x 18x           18x 18x 18x 18x 18x 1x 1x 1x 18x 18x 18x 18x 1x     1x                                     1x     1x 28x 28x 28x 28x       28x 28x 28x 28x 28x 28x 28x 28x 28x 28x 28x 28x 28x 28x 28x 25x 25x 25x 25x 25x 25x 25x 25x 25x 28x 28x 1x     1x 10x 10x 10x 10x 10x 10x 10x 10x 10x 10x 10x 10x 10x 6x 6x 6x 6x 6x 6x 10x 10x 10x 1x     1x 5x 5x 5x 5x 5x 5x 5x 5x 1x 5x 1x 4x 3x 3x             5x 5x 1x     1x 30x 30x 30x 30x 30x 30x 30x       30x 30x 30x 30x 30x 30x 30x 30x 30x 30x 30x 30x 30x 30x 30x 30x 30x 29x 29x 29x 11x 29x 18x 18x 29x 29x 30x 30x 29x 29x 29x 30x 30x 1x     1x 17x 17x 17x 17x 17x 17x 17x 17x 17x 17x 17x 17x 12x 17x 1x 5x 4x 4x             17x 17x 11x 11x 17x 17x 17x 17x 17x 17x 4x 4x 4x 4x 4x 17x 17x 11x 11x 11x 17x 17x 1x     1x                                                       1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x
const {cx_root} = await import("./cx_root.clas.mjs");
// zcl_abapgit_git_pack.clas.abap
class zcl_abapgit_git_pack {
  static INTERNAL_TYPE = 'CLAS';
  static INTERNAL_NAME = 'ZCL_ABAPGIT_GIT_PACK';
  static IMPLEMENTED_INTERFACES = [];
  static ATTRIBUTES = {"C_PACK_START": {"type": () => {return new abap.types.Hex({length: 4});}, "visibility": "I", "is_constant": "X", "is_class": "X"},
  "C_ZLIB": {"type": () => {return new abap.types.Hex({length: 2});}, "visibility": "I", "is_constant": "X", "is_class": "X"},
  "C_ZLIB_HMM": {"type": () => {return new abap.types.Hex({length: 2});}, "visibility": "I", "is_constant": "X", "is_class": "X"},
  "C_VERSION": {"type": () => {return new abap.types.Hex({length: 4});}, "visibility": "I", "is_constant": "X", "is_class": "X"}};
  static METHODS = {"SORT_TREE": {"visibility": "I", "parameters": {"RT_NODES": {"type": () => {return abap.types.TableFactory.construct(new abap.types.Structure({
  "chmod": new abap.types.Character(6, {"qualifiedName":"zif_abapgit_git_definitions=>ty_chmod"}),
  "name": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GIT_PACK=>TY_NODE-NAME"}),
  "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"})}, "zcl_abapgit_git_pack=>ty_node", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zcl_abapgit_git_pack=>ty_nodes_tt");}, "is_optional": " "}, "IT_NODES": {"type": () => {return abap.types.TableFactory.construct(new abap.types.Structure({
  "chmod": new abap.types.Character(6, {"qualifiedName":"zif_abapgit_git_definitions=>ty_chmod"}),
  "name": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GIT_PACK=>TY_NODE-NAME"}),
  "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"})}, "zcl_abapgit_git_pack=>ty_node", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zcl_abapgit_git_pack=>ty_nodes_tt");}, "is_optional": " "}}},
  "GET_TYPE": {"visibility": "I", "parameters": {"RV_TYPE": {"type": () => {return new abap.types.Character(6, {"qualifiedName":"zif_abapgit_git_definitions=>ty_type"});}, "is_optional": " "}, "IV_X": {"type": () => {return new abap.types.Hex();}, "is_optional": " "}}},
  "GET_LENGTH": {"visibility": "I", "parameters": {"EV_LENGTH": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "is_optional": " "}, "CV_DATA": {"type": () => {return new abap.types.XString({qualifiedName: "XSTRING"});}, "is_optional": " "}}},
  "TYPE_AND_LENGTH": {"visibility": "I", "parameters": {"RV_XSTRING": {"type": () => {return new abap.types.XString({qualifiedName: "XSTRING"});}, "is_optional": " "}, "IV_TYPE": {"type": () => {return new abap.types.Character(6, {"qualifiedName":"zif_abapgit_git_definitions=>ty_type"});}, "is_optional": " "}, "IV_LENGTH": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "is_optional": " "}}},
  "ZLIB_DECOMPRESS": {"visibility": "I", "parameters": {"CV_DATA": {"type": () => {return new abap.types.XString({qualifiedName: "XSTRING"});}, "is_optional": " "}, "CV_DECOMPRESSED": {"type": () => {return new abap.types.XString({qualifiedName: "XSTRING"});}, "is_optional": " "}}},
  "DECODE": {"visibility": "U", "parameters": {"RT_OBJECTS": {"type": () => {return abap.types.TableFactory.construct(new abap.types.Structure({
  "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}),
  "type": new abap.types.Character(6, {"qualifiedName":"zif_abapgit_git_definitions=>ty_type"}),
  "data": new abap.types.XString({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_OBJECT-DATA"}),
  "adler32": new abap.types.Hex({length: 4}),
  "index": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_OBJECT-INDEX"})}, "zif_abapgit_definitions=>ty_object", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[{"name":"sha","type":"SORTED","isUnique":false,"keyFields":["SHA1"]},{"name":"type","type":"SORTED","isUnique":false,"keyFields":["TYPE","SHA1"]}]}, "zif_abapgit_definitions=>ty_objects_tt");}, "is_optional": " "}, "IV_DATA": {"type": () => {return new abap.types.XString({qualifiedName: "XSTRING"});}, "is_optional": " "}}},
  "DECODE_TREE": {"visibility": "U", "parameters": {"RT_NODES": {"type": () => {return abap.types.TableFactory.construct(new abap.types.Structure({
  "chmod": new abap.types.Character(6, {"qualifiedName":"zif_abapgit_git_definitions=>ty_chmod"}),
  "name": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GIT_PACK=>TY_NODE-NAME"}),
  "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"})}, "zcl_abapgit_git_pack=>ty_node", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zcl_abapgit_git_pack=>ty_nodes_tt");}, "is_optional": " "}, "IV_DATA": {"type": () => {return new abap.types.XString({qualifiedName: "XSTRING"});}, "is_optional": " "}}},
  "DECODE_COMMIT": {"visibility": "U", "parameters": {"RS_COMMIT": {"type": () => {return new abap.types.Structure({
  "tree": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}),
  "parent": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}),
  "parent2": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}),
  "author": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GIT_PACK=>TY_COMMIT-AUTHOR"}),
  "committer": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GIT_PACK=>TY_COMMIT-COMMITTER"}),
  "gpgsig": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GIT_PACK=>TY_COMMIT-GPGSIG"}),
  "body": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GIT_PACK=>TY_COMMIT-BODY"})}, "zcl_abapgit_git_pack=>ty_commit", undefined, {}, {});}, "is_optional": " "}, "IV_DATA": {"type": () => {return new abap.types.XString({qualifiedName: "XSTRING"});}, "is_optional": " "}}},
  "DECODE_TAG": {"visibility": "U", "parameters": {"RS_TAG": {"type": () => {return new abap.types.Structure({
  "object": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GIT_PACK=>TY_TAG-OBJECT"}),
  "type": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GIT_PACK=>TY_TAG-TYPE"}),
  "tag": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GIT_PACK=>TY_TAG-TAG"}),
  "tagger_name": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GIT_PACK=>TY_TAG-TAGGER_NAME"}),
  "tagger_email": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GIT_PACK=>TY_TAG-TAGGER_EMAIL"}),
  "message": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GIT_PACK=>TY_TAG-MESSAGE"}),
  "body": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GIT_PACK=>TY_TAG-BODY"})}, "zcl_abapgit_git_pack=>ty_tag", undefined, {}, {});}, "is_optional": " "}, "IV_DATA": {"type": () => {return new abap.types.XString({qualifiedName: "XSTRING"});}, "is_optional": " "}}},
  "ENCODE": {"visibility": "U", "parameters": {"RV_DATA": {"type": () => {return new abap.types.XString({qualifiedName: "XSTRING"});}, "is_optional": " "}, "IT_OBJECTS": {"type": () => {return abap.types.TableFactory.construct(new abap.types.Structure({
  "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}),
  "type": new abap.types.Character(6, {"qualifiedName":"zif_abapgit_git_definitions=>ty_type"}),
  "data": new abap.types.XString({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_OBJECT-DATA"}),
  "adler32": new abap.types.Hex({length: 4}),
  "index": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_OBJECT-INDEX"})}, "zif_abapgit_definitions=>ty_object", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[{"name":"sha","type":"SORTED","isUnique":false,"keyFields":["SHA1"]},{"name":"type","type":"SORTED","isUnique":false,"keyFields":["TYPE","SHA1"]}]}, "zif_abapgit_definitions=>ty_objects_tt");}, "is_optional": " "}}},
  "ENCODE_TREE": {"visibility": "U", "parameters": {"RV_DATA": {"type": () => {return new abap.types.XString({qualifiedName: "XSTRING"});}, "is_optional": " "}, "IT_NODES": {"type": () => {return abap.types.TableFactory.construct(new abap.types.Structure({
  "chmod": new abap.types.Character(6, {"qualifiedName":"zif_abapgit_git_definitions=>ty_chmod"}),
  "name": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GIT_PACK=>TY_NODE-NAME"}),
  "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"})}, "zcl_abapgit_git_pack=>ty_node", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zcl_abapgit_git_pack=>ty_nodes_tt");}, "is_optional": " "}}},
  "ENCODE_COMMIT": {"visibility": "U", "parameters": {"RV_DATA": {"type": () => {return new abap.types.XString({qualifiedName: "XSTRING"});}, "is_optional": " "}, "IS_COMMIT": {"type": () => {return new abap.types.Structure({
  "tree": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}),
  "parent": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}),
  "parent2": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}),
  "author": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GIT_PACK=>TY_COMMIT-AUTHOR"}),
  "committer": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GIT_PACK=>TY_COMMIT-COMMITTER"}),
  "gpgsig": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GIT_PACK=>TY_COMMIT-GPGSIG"}),
  "body": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GIT_PACK=>TY_COMMIT-BODY"})}, "zcl_abapgit_git_pack=>ty_commit", undefined, {}, {});}, "is_optional": " "}}},
  "ENCODE_TAG": {"visibility": "U", "parameters": {"RV_DATA": {"type": () => {return new abap.types.XString({qualifiedName: "XSTRING"});}, "is_optional": " "}, "IS_TAG": {"type": () => {return new abap.types.Structure({
  "object": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GIT_PACK=>TY_TAG-OBJECT"}),
  "type": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GIT_PACK=>TY_TAG-TYPE"}),
  "tag": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GIT_PACK=>TY_TAG-TAG"}),
  "tagger_name": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GIT_PACK=>TY_TAG-TAGGER_NAME"}),
  "tagger_email": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GIT_PACK=>TY_TAG-TAGGER_EMAIL"}),
  "message": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GIT_PACK=>TY_TAG-MESSAGE"}),
  "body": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GIT_PACK=>TY_TAG-BODY"})}, "zcl_abapgit_git_pack=>ty_tag", undefined, {}, {});}, "is_optional": " "}}}};
  constructor() {
    this.me = new abap.types.ABAPObject();
    this.me.set(this);
    this.INTERNAL_ID = abap.internalIdCounter++;
    this.FRIENDS_ACCESS_INSTANCE = {
    };
    this.c_pack_start = zcl_abapgit_git_pack.c_pack_start;
    this.c_zlib = zcl_abapgit_git_pack.c_zlib;
    this.c_zlib_hmm = zcl_abapgit_git_pack.c_zlib_hmm;
    this.c_version = zcl_abapgit_git_pack.c_version;
  }
  async constructor_(INPUT) {
    if (super.constructor_) { await super.constructor_(INPUT); }
    return this;
  }
  async decode(INPUT) {
    return zcl_abapgit_git_pack.decode(INPUT);
  }
  static async decode(INPUT) {
    let rt_objects = abap.types.TableFactory.construct(new abap.types.Structure({
    "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}),
    "type": new abap.types.Character(6, {"qualifiedName":"zif_abapgit_git_definitions=>ty_type"}),
    "data": new abap.types.XString({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_OBJECT-DATA"}),
    "adler32": new abap.types.Hex({length: 4}),
    "index": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_OBJECT-INDEX"})}, "zif_abapgit_definitions=>ty_object", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[{"name":"sha","type":"SORTED","isUnique":false,"keyFields":["SHA1"]},{"name":"type","type":"SORTED","isUnique":false,"keyFields":["TYPE","SHA1"]}]}, "zif_abapgit_definitions=>ty_objects_tt");
    let iv_data = INPUT?.iv_data;
    if (iv_data?.getQualifiedName === undefined || iv_data.getQualifiedName() !== "XSTRING") { iv_data = undefined; }
    if (iv_data === undefined) { iv_data = new abap.types.XString({qualifiedName: "XSTRING"}).set(INPUT.iv_data); }
    let lv_x = new abap.types.Hex();
    let lv_data = new abap.types.XString({qualifiedName: "XSTRING"});
    let lv_type = new abap.types.Character(6, {});
    let lv_zlib = new abap.types.Hex({length: 2});
    let lv_objects = new abap.types.Integer({qualifiedName: "I"});
    let lv_len = new abap.types.Integer({qualifiedName: "I"});
    let lv_sha1 = new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"});
    let lv_ref_delta = new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"});
    let lv_compressed_len = new abap.types.Integer({qualifiedName: "I"});
    let lv_compressed = new abap.types.XString({qualifiedName: "XSTRING"});
    let lv_decompressed = new abap.types.XString({qualifiedName: "XSTRING"});
    let lv_decompress_len = new abap.types.Integer({qualifiedName: "I"});
    let lv_xstring = new abap.types.XString({qualifiedName: "XSTRING"});
    let lv_expected = new abap.types.Integer({qualifiedName: "I"});
    let ls_object = new abap.types.Structure({
    "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}),
    "type": new abap.types.Character(6, {"qualifiedName":"zif_abapgit_git_definitions=>ty_type"}),
    "data": new abap.types.XString({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_OBJECT-DATA"}),
    "adler32": new abap.types.Hex({length: 4}),
    "index": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_OBJECT-INDEX"})}, "zif_abapgit_definitions=>ty_object", undefined, {}, {});
    let lv_uindex = new abap.types.Integer({qualifiedName: "I"});
    lv_data.set(iv_data);
    if (abap.compare.lt(abap.builtin.xstrlen({val: lv_data}), abap.IntegerFactory.get(4))) {
      await abap.Classes['ZCX_ABAPGIT_EXCEPTION'].raise({iv_text: new abap.types.String().set(`Unexpected pack header, short reply`)});
    }
    if (abap.compare.ne(lv_data.getOffset({length: 4}), zcl_abapgit_git_pack.c_pack_start)) {
      await abap.Classes['ZCX_ABAPGIT_EXCEPTION'].raise({iv_text: new abap.types.String().set(`Unexpected pack header, ${abap.templateFormatting(lv_data.getOffset({length: 4}))}`)});
    }
    lv_data.set(lv_data.getOffset({offset: 4}));
    if (abap.compare.ne(lv_data.getOffset({length: 4}), zcl_abapgit_git_pack.c_version)) {
      await abap.Classes['ZCX_ABAPGIT_EXCEPTION'].raise({iv_text: new abap.types.String().set(`Version not supported, ${abap.templateFormatting(lv_data.getOffset({length: 4}))}`)});
    }
    lv_data.set(lv_data.getOffset({offset: 4}));
    lv_xstring.set(lv_data.getOffset({length: 4}));
    lv_objects.set((await abap.Classes['ZCL_ABAPGIT_CONVERT'].xstring_to_int({iv_xstring: lv_xstring})));
    lv_data.set(lv_data.getOffset({offset: 4}));
    const indexBackup1 = abap.builtin.sy.get().index.get();
    const unique137 = lv_objects.get();
    for (let unique138 = 0; unique138 < unique137; unique138++) {
      abap.builtin.sy.get().index.set(unique138 + 1);
      lv_uindex.set(abap.builtin.sy.get().index);
      lv_x.set(lv_data.getOffset({length: 1}));
      lv_type.set((await this.get_type({iv_x: lv_x})));
      await this.get_length({ev_length: lv_expected, cv_data: lv_data});
      if (abap.compare.eq(lv_type, abap.Classes['ZIF_ABAPGIT_GIT_DEFINITIONS'].zif_abapgit_git_definitions$c_type.get().ref_d)) {
        lv_ref_delta.set(lv_data.getOffset({length: 20}));
        lv_data.set(lv_data.getOffset({offset: 20}));
      }
      lv_zlib.set(lv_data.getOffset({length: 2}));
      if (abap.compare.ne(lv_zlib, zcl_abapgit_git_pack.c_zlib) && abap.compare.ne(lv_zlib, zcl_abapgit_git_pack.c_zlib_hmm)) {
        await abap.Classes['ZCX_ABAPGIT_EXCEPTION'].raise({iv_text: new abap.types.String().set(`Unexpected zlib header`)});
      }
      lv_data.set(lv_data.getOffset({offset: 2}));
      if (abap.compare.eq(lv_zlib, zcl_abapgit_git_pack.c_zlib)) {
        await abap.Classes['CL_ABAP_GZIP'].decompress_binary({gzip_in: lv_data, raw_out: lv_decompressed, raw_out_len: lv_decompress_len});
        if (abap.compare.ne(lv_expected, lv_decompress_len)) {
          await abap.Classes['ZCX_ABAPGIT_EXCEPTION'].raise({iv_text: new abap.types.String().set(`Decompression failed`)});
        }
        await abap.Classes['CL_ABAP_GZIP'].compress_binary({raw_in: lv_decompressed, gzip_out: lv_compressed, gzip_out_len: lv_compressed_len});
        if (abap.compare.le(abap.builtin.xstrlen({val: lv_data}), lv_compressed_len) || abap.compare.ne(lv_compressed.getOffset({length: lv_compressed_len}), lv_data.getOffset({length: lv_compressed_len}))) {
          await this.zlib_decompress({cv_data: lv_data, cv_decompressed: lv_decompressed});
        } else {
          lv_data.set(lv_data.getOffset({offset: lv_compressed_len}));
        }
      } else if (abap.compare.eq(lv_zlib, zcl_abapgit_git_pack.c_zlib_hmm)) {
        await this.zlib_decompress({cv_data: lv_data, cv_decompressed: lv_decompressed});
      }
      ls_object.clear();
      ls_object.get().adler32.set(lv_data.getOffset({length: 4}));
      lv_data.set(lv_data.getOffset({offset: 4}));
      if (abap.compare.eq(lv_type, abap.Classes['ZIF_ABAPGIT_GIT_DEFINITIONS'].zif_abapgit_git_definitions$c_type.get().ref_d)) {
        ls_object.get().sha1.set(lv_ref_delta);
        abap.statements.translate(ls_object.get().sha1, "LOWER");
      } else {
        ls_object.get().sha1.set((await abap.Classes['ZCL_ABAPGIT_HASH'].sha1({iv_type: lv_type, iv_data: lv_decompressed})));
      }
      ls_object.get().type.set(lv_type);
      ls_object.get().data.set(lv_decompressed);
      ls_object.get().index.set(lv_uindex);
      abap.statements.append({source: ls_object, target: rt_objects});
    }
    abap.builtin.sy.get().index.set(indexBackup1);
    lv_len.set(abap.operators.minus(abap.builtin.xstrlen({val: iv_data}),abap.IntegerFactory.get(20)));
    lv_xstring.set(iv_data.getOffset({length: lv_len}));
    lv_sha1.set((await abap.Classes['ZCL_ABAPGIT_HASH'].sha1_raw({iv_data: lv_xstring})));
    if (abap.compare.ne(abap.builtin.to_upper({val: lv_sha1}), lv_data)) {
      await abap.Classes['ZCX_ABAPGIT_EXCEPTION'].raise({iv_text: new abap.types.String().set(`SHA1 at end of pack doesn't match`)});
    }
    await abap.Classes['ZCL_ABAPGIT_GIT_DELTA'].decode_deltas({ct_objects: rt_objects});
    return rt_objects;
  }
  async decode_commit(INPUT) {
    return zcl_abapgit_git_pack.decode_commit(INPUT);
  }
  static async decode_commit(INPUT) {
    let rs_commit = new abap.types.Structure({
    "tree": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}),
    "parent": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}),
    "parent2": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}),
    "author": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GIT_PACK=>TY_COMMIT-AUTHOR"}),
    "committer": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GIT_PACK=>TY_COMMIT-COMMITTER"}),
    "gpgsig": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GIT_PACK=>TY_COMMIT-GPGSIG"}),
    "body": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GIT_PACK=>TY_COMMIT-BODY"})}, "zcl_abapgit_git_pack=>ty_commit", undefined, {}, {});
    let iv_data = INPUT?.iv_data;
    if (iv_data?.getQualifiedName === undefined || iv_data.getQualifiedName() !== "XSTRING") { iv_data = undefined; }
    if (iv_data === undefined) { iv_data = new abap.types.XString({qualifiedName: "XSTRING"}).set(INPUT.iv_data); }
    let lv_string = new abap.types.String({qualifiedName: "STRING"});
    let lv_word = new abap.types.String({qualifiedName: "STRING"});
    let lv_offset = new abap.types.Integer({qualifiedName: "I"});
    let lv_length = new abap.types.Integer({qualifiedName: "I"});
    let lv_length_gpgsig = new abap.types.Integer({qualifiedName: "I"});
    let lv_trash = new abap.types.String({qualifiedName: "STRING"});
    let lt_string = abap.types.TableFactory.construct(new abap.types.String({qualifiedName: "STRING"}), {"withHeader":false,"keyType":"USER","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "");
    let fs_lv_string_ = new abap.types.FieldSymbol(new abap.types.String({qualifiedName: "STRING"}));
    lv_string.set((await abap.Classes['ZCL_ABAPGIT_CONVERT'].xstring_to_string_utf8({iv_data: iv_data})));
    abap.statements.split({source: lv_string, at: abap.Classes['CL_ABAP_CHAR_UTILITIES'].newline, table: lt_string});
    for await (const unique139 of abap.statements.loop(lt_string)) {
      fs_lv_string_.assign(unique139);
      lv_length.set(abap.operators.add(abap.builtin.strlen({val: fs_lv_string_}),abap.IntegerFactory.get(1)));
      lv_string.set(lv_string.getOffset({offset: lv_length}));
      abap.statements.split({source: fs_lv_string_, at: abap.builtin.space, targets: [lv_word,lv_trash]});
      let unique140 = lv_word;
      if (abap.compare.eq(unique140, abap.CharacterFactory.get(4, 'tree'))) {
        rs_commit.get().tree.set(fs_lv_string_.getOffset({offset: 5}));
      } else if (abap.compare.eq(unique140, abap.CharacterFactory.get(6, 'parent'))) {
        if (abap.compare.initial(rs_commit.get().parent)) {
          rs_commit.get().parent.set(fs_lv_string_.getOffset({offset: 7}));
        } else {
          rs_commit.get().parent2.set(fs_lv_string_.getOffset({offset: 7}));
        }
      } else if (abap.compare.eq(unique140, abap.CharacterFactory.get(6, 'author'))) {
        rs_commit.get().author.set(fs_lv_string_.getOffset({offset: 7}));
      } else if (abap.compare.eq(unique140, abap.CharacterFactory.get(9, 'committer'))) {
        rs_commit.get().committer.set(fs_lv_string_.getOffset({offset: 10}));
        break;
      } else {
        abap.statements.assert(abap.compare.eq(abap.IntegerFactory.get(1), abap.IntegerFactory.get(0)));
      }
    }
    lv_length.set(abap.builtin.strlen({val: lv_string}));
    if (abap.compare.ge(lv_length, abap.IntegerFactory.get(6)) && abap.compare.eq(lv_string.getOffset({offset: 0, length: 6}), abap.CharacterFactory.get(6, 'gpgsig'))) {
      abap.statements.find(lv_string, {regex: new abap.types.String().set(`-----END PGP SIGNATURE-----[[:space:]]+`), offset: lv_offset, length: lv_length});
      lv_length.set(abap.operators.minus(lv_length,abap.IntegerFactory.get(1)));
      lv_length_gpgsig.set(abap.operators.minus(abap.operators.add(lv_offset,lv_length),abap.IntegerFactory.get(7)));
      lv_length.set(abap.operators.add(lv_offset,lv_length));
      rs_commit.get().gpgsig.set(lv_string.getOffset({offset: 7, length: lv_length_gpgsig}));
      lv_string.set(lv_string.getOffset({offset: lv_length}));
    }
    rs_commit.get().body.set(lv_string.getOffset({offset: 1}));
    if (abap.compare.initial(rs_commit.get().author) || abap.compare.initial(rs_commit.get().committer) || abap.compare.initial(rs_commit.get().tree)) {
      await abap.Classes['ZCX_ABAPGIT_EXCEPTION'].raise({iv_text: new abap.types.String().set(`multiple parents? not supported`)});
    }
    return rs_commit;
  }
  async decode_tag(INPUT) {
    return zcl_abapgit_git_pack.decode_tag(INPUT);
  }
  static async decode_tag(INPUT) {
    let rs_tag = new abap.types.Structure({
    "object": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GIT_PACK=>TY_TAG-OBJECT"}),
    "type": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GIT_PACK=>TY_TAG-TYPE"}),
    "tag": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GIT_PACK=>TY_TAG-TAG"}),
    "tagger_name": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GIT_PACK=>TY_TAG-TAGGER_NAME"}),
    "tagger_email": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GIT_PACK=>TY_TAG-TAGGER_EMAIL"}),
    "message": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GIT_PACK=>TY_TAG-MESSAGE"}),
    "body": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GIT_PACK=>TY_TAG-BODY"})}, "zcl_abapgit_git_pack=>ty_tag", undefined, {}, {});
    let iv_data = INPUT?.iv_data;
    if (iv_data?.getQualifiedName === undefined || iv_data.getQualifiedName() !== "XSTRING") { iv_data = undefined; }
    if (iv_data === undefined) { iv_data = new abap.types.XString({qualifiedName: "XSTRING"}).set(INPUT.iv_data); }
    let lv_string = new abap.types.String({qualifiedName: "STRING"});
    let lv_word = new abap.types.String({qualifiedName: "STRING"});
    let lv_trash = new abap.types.String({qualifiedName: "STRING"});
    let lt_string = abap.types.TableFactory.construct(new abap.types.String({qualifiedName: "STRING"}), {"withHeader":false,"keyType":"USER","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "");
    let fs_lv_string_ = new abap.types.FieldSymbol(new abap.types.String({qualifiedName: "STRING"}));
    lv_string.set((await abap.Classes['ZCL_ABAPGIT_CONVERT'].xstring_to_string_utf8({iv_data: iv_data})));
    abap.statements.split({source: lv_string, at: abap.Classes['CL_ABAP_CHAR_UTILITIES'].newline, table: lt_string});
    for await (const unique141 of abap.statements.loop(lt_string)) {
      fs_lv_string_.assign(unique141);
      abap.statements.split({source: fs_lv_string_, at: abap.builtin.space, targets: [lv_word,lv_trash]});
      let unique142 = lv_word;
      if (abap.compare.eq(unique142, abap.CharacterFactory.get(6, 'object'))) {
        rs_tag.get().object.set(lv_trash);
      } else if (abap.compare.eq(unique142, abap.CharacterFactory.get(4, 'type'))) {
        rs_tag.get().type.set(lv_trash);
      } else if (abap.compare.eq(unique142, abap.CharacterFactory.get(3, 'tag'))) {
        rs_tag.get().tag.set(lv_trash);
      } else if (abap.compare.eq(unique142, abap.CharacterFactory.get(6, 'tagger'))) {
        abap.statements.find(lv_trash, {regex: new abap.types.String().set(`(.*)<(.*)>`), first: true, submatches: [rs_tag.get().tagger_name,rs_tag.get().tagger_email]});
        rs_tag.get().tagger_name.set(abap.builtin.condense({val: rs_tag.get().tagger_name}));
      } else if (abap.compare.eq(unique142, abap.CharacterFactory.get(1, ''))) {
        continue;
      } else {
        if (abap.compare.initial(rs_tag.get().message)) {
          rs_tag.get().message.set(fs_lv_string_);
        } else {
          if (abap.compare.initial(rs_tag.get().body) === false) {
            rs_tag.get().body.set(abap.operators.concat(rs_tag.get().body,abap.Classes['CL_ABAP_CHAR_UTILITIES'].newline));
          }
          rs_tag.get().body.set(abap.operators.concat(rs_tag.get().body,fs_lv_string_));
        }
      }
    }
    return rs_tag;
  }
  async decode_tree(INPUT) {
    return zcl_abapgit_git_pack.decode_tree(INPUT);
  }
  static async decode_tree(INPUT) {
    let rt_nodes = abap.types.TableFactory.construct(new abap.types.Structure({
    "chmod": new abap.types.Character(6, {"qualifiedName":"zif_abapgit_git_definitions=>ty_chmod"}),
    "name": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GIT_PACK=>TY_NODE-NAME"}),
    "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"})}, "zcl_abapgit_git_pack=>ty_node", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zcl_abapgit_git_pack=>ty_nodes_tt");
    let iv_data = INPUT?.iv_data;
    if (iv_data?.getQualifiedName === undefined || iv_data.getQualifiedName() !== "XSTRING") { iv_data = undefined; }
    if (iv_data === undefined) { iv_data = new abap.types.XString({qualifiedName: "XSTRING"}).set(INPUT.iv_data); }
    let lc_sha_length = new abap.types.Integer({qualifiedName: "I"});
    lc_sha_length.set(20);
    let lc_null = new abap.types.Hex();
    lc_null.set('00');
    let lv_xstring = new abap.types.XString({qualifiedName: "XSTRING"});
    let lv_chmod = new abap.types.Character(6, {"qualifiedName":"zif_abapgit_git_definitions=>ty_chmod"});
    let lv_name = new abap.types.String({qualifiedName: "STRING"});
    let lv_string = new abap.types.String({qualifiedName: "STRING"});
    let lv_len = new abap.types.Integer({qualifiedName: "I"});
    let lv_offset = new abap.types.Integer({qualifiedName: "I"});
    let lv_cursor = new abap.types.Integer({qualifiedName: "I"});
    let lv_match = new abap.types.Integer({qualifiedName: "I"});
    let ls_node = new abap.types.Structure({
    "chmod": new abap.types.Character(6, {"qualifiedName":"zif_abapgit_git_definitions=>ty_chmod"}),
    "name": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GIT_PACK=>TY_NODE-NAME"}),
    "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"})}, "zcl_abapgit_git_pack=>ty_node", undefined, {}, {});
    const indexBackup1 = abap.builtin.sy.get().index.get();
    let unique143 = 1;
    while (true) {
      abap.builtin.sy.get().index.set(unique143++);
      abap.statements.find(iv_data, {find: lc_null, first: true, byteMode: true, sectionOffset: lv_cursor, offset: lv_match});
      if (abap.compare.ne(abap.builtin.sy.get().subrc, abap.IntegerFactory.get(0))) {
        break;
      }
      lv_len.set(abap.operators.minus(lv_match,lv_cursor));
      lv_xstring.set(iv_data.getOffset({offset: lv_cursor, length: lv_len}));
      lv_string.set((await abap.Classes['ZCL_ABAPGIT_CONVERT'].xstring_to_string_utf8({iv_data: lv_xstring})));
      abap.statements.split({source: lv_string, at: abap.builtin.space, targets: [lv_chmod,lv_name]});
      ls_node.get().chmod.set(lv_chmod);
      if (abap.compare.ne(ls_node.get().chmod, abap.Classes['ZIF_ABAPGIT_GIT_DEFINITIONS'].zif_abapgit_git_definitions$c_chmod.get().dir) && abap.compare.ne(ls_node.get().chmod, abap.Classes['ZIF_ABAPGIT_GIT_DEFINITIONS'].zif_abapgit_git_definitions$c_chmod.get().file) && abap.compare.ne(ls_node.get().chmod, abap.Classes['ZIF_ABAPGIT_GIT_DEFINITIONS'].zif_abapgit_git_definitions$c_chmod.get().symbolic_link) && abap.compare.ne(ls_node.get().chmod, abap.Classes['ZIF_ABAPGIT_GIT_DEFINITIONS'].zif_abapgit_git_definitions$c_chmod.get().executable) && abap.compare.ne(ls_node.get().chmod, abap.Classes['ZIF_ABAPGIT_GIT_DEFINITIONS'].zif_abapgit_git_definitions$c_chmod.get().submodule)) {
        await abap.Classes['ZCX_ABAPGIT_EXCEPTION'].raise({iv_text: new abap.types.String().set(`Unknown chmod ${abap.templateFormatting(ls_node.get().chmod)}`)});
      }
      lv_offset.set(abap.operators.add(lv_match,abap.IntegerFactory.get(1)));
      ls_node.get().name.set(lv_name);
      ls_node.get().sha1.set(iv_data.getOffset({offset: lv_offset, length: lc_sha_length}));
      abap.statements.translate(ls_node.get().sha1, "LOWER");
      abap.statements.append({source: ls_node, target: rt_nodes});
      lv_cursor.set(abap.operators.add(abap.operators.add(lv_match,abap.IntegerFactory.get(1)),lc_sha_length));
    }
    abap.builtin.sy.get().index.set(indexBackup1);
    return rt_nodes;
  }
  async encode(INPUT) {
    return zcl_abapgit_git_pack.encode(INPUT);
  }
  static async encode(INPUT) {
    let rv_data = new abap.types.XString({qualifiedName: "XSTRING"});
    let it_objects = INPUT?.it_objects;
    if (it_objects?.getQualifiedName === undefined || it_objects.getQualifiedName() !== "ZIF_ABAPGIT_DEFINITIONS=>TY_OBJECTS_TT") { it_objects = undefined; }
    if (it_objects === undefined) { it_objects = abap.types.TableFactory.construct(new abap.types.Structure({
    "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}),
    "type": new abap.types.Character(6, {"qualifiedName":"zif_abapgit_git_definitions=>ty_type"}),
    "data": new abap.types.XString({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_OBJECT-DATA"}),
    "adler32": new abap.types.Hex({length: 4}),
    "index": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_OBJECT-INDEX"})}, "zif_abapgit_definitions=>ty_object", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[{"name":"sha","type":"SORTED","isUnique":false,"keyFields":["SHA1"]},{"name":"type","type":"SORTED","isUnique":false,"keyFields":["TYPE","SHA1"]}]}, "zif_abapgit_definitions=>ty_objects_tt").set(INPUT.it_objects); }
    let lv_sha1 = new abap.types.Hex({length: 20});
    let lv_adler32 = new abap.types.Hex({length: 4});
    let lv_compressed = new abap.types.XString({qualifiedName: "XSTRING"});
    let lv_xstring = new abap.types.XString({qualifiedName: "XSTRING"});
    let li_progress = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_PROGRESS", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_PROGRESS"});
    let lv_objects_total = new abap.types.Integer({qualifiedName: "I"});
    let fs_ls_object_ = new abap.types.FieldSymbol(new abap.types.Structure({
    "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}),
    "type": new abap.types.Character(6, {"qualifiedName":"zif_abapgit_git_definitions=>ty_type"}),
    "data": new abap.types.XString({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_OBJECT-DATA"}),
    "adler32": new abap.types.Hex({length: 4}),
    "index": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_OBJECT-INDEX"})}, "zif_abapgit_definitions=>ty_object", undefined, {}, {}));
    rv_data.set(zcl_abapgit_git_pack.c_pack_start);
    abap.statements.concatenate({source: [rv_data, zcl_abapgit_git_pack.c_version], target: rv_data});
    lv_xstring.set((await abap.Classes['ZCL_ABAPGIT_CONVERT'].int_to_xstring4({iv_i: abap.builtin.lines({val: it_objects})})));
    abap.statements.concatenate({source: [rv_data, lv_xstring], target: rv_data});
    lv_objects_total.set(abap.builtin.lines({val: it_objects}));
    li_progress.set((await abap.Classes['ZCL_ABAPGIT_PROGRESS'].get_instance({iv_total: lv_objects_total})));
    for await (const unique144 of abap.statements.loop(it_objects)) {
      fs_ls_object_.assign(unique144);
      await li_progress.get().zif_abapgit_progress$show({iv_current: abap.builtin.sy.get().tabix, iv_text: new abap.types.String().set(`Encoding objects ( ${abap.templateFormatting(abap.builtin.sy.get().tabix)} of ${abap.templateFormatting(lv_objects_total)} )`)});
      lv_xstring.set((await this.type_and_length({iv_type: fs_ls_object_.get().type, iv_length: abap.builtin.xstrlen({val: fs_ls_object_.get().data})})));
      abap.statements.concatenate({source: [rv_data, lv_xstring], target: rv_data});
      await abap.Classes['CL_ABAP_GZIP'].compress_binary({raw_in: fs_ls_object_.get().data, gzip_out: lv_compressed});
      abap.statements.concatenate({source: [rv_data, zcl_abapgit_git_pack.c_zlib, lv_compressed], target: rv_data});
      if (abap.compare.initial(fs_ls_object_.get().adler32) === false) {
        lv_adler32.set(fs_ls_object_.get().adler32);
      } else {
        lv_adler32.set((await abap.Classes['ZCL_ABAPGIT_HASH'].adler32({iv_xstring: fs_ls_object_.get().data})));
      }
      abap.statements.concatenate({source: [rv_data, lv_adler32], target: rv_data});
    }
    lv_sha1.set((abap.builtin.to_upper({val: (await abap.Classes['ZCL_ABAPGIT_HASH'].sha1_raw({iv_data: rv_data}))})));
    abap.statements.concatenate({source: [rv_data, lv_sha1], target: rv_data});
    return rv_data;
  }
  async encode_commit(INPUT) {
    return zcl_abapgit_git_pack.encode_commit(INPUT);
  }
  static async encode_commit(INPUT) {
    let rv_data = new abap.types.XString({qualifiedName: "XSTRING"});
    let is_commit = INPUT?.is_commit;
    if (is_commit?.getQualifiedName === undefined || is_commit.getQualifiedName() !== "ZCL_ABAPGIT_GIT_PACK=>TY_COMMIT") { is_commit = undefined; }
    if (is_commit === undefined) { is_commit = new abap.types.Structure({
    "tree": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}),
    "parent": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}),
    "parent2": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}),
    "author": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GIT_PACK=>TY_COMMIT-AUTHOR"}),
    "committer": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GIT_PACK=>TY_COMMIT-COMMITTER"}),
    "gpgsig": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GIT_PACK=>TY_COMMIT-GPGSIG"}),
    "body": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GIT_PACK=>TY_COMMIT-BODY"})}, "zcl_abapgit_git_pack=>ty_commit", undefined, {}, {}).set(INPUT.is_commit); }
    let lv_string = new abap.types.String({qualifiedName: "STRING"});
    let lv_tmp = new abap.types.String({qualifiedName: "STRING"});
    let lv_tree_lower = new abap.types.String({qualifiedName: "STRING"});
    let lv_parent_lower = new abap.types.String({qualifiedName: "STRING"});
    lv_tree_lower.set(is_commit.get().tree);
    abap.statements.translate(lv_tree_lower, "LOWER");
    lv_string.set(abap.CharacterFactory.get(1, ''));
    abap.statements.concatenate({source: [abap.CharacterFactory.get(4, 'tree'), lv_tree_lower], target: lv_tmp, separatedBy: abap.builtin.space});
    abap.statements.concatenate({source: [lv_string, lv_tmp, abap.Classes['CL_ABAP_CHAR_UTILITIES'].newline], target: lv_string});
    if (abap.compare.initial(is_commit.get().parent) === false) {
      lv_parent_lower.set(is_commit.get().parent);
      abap.statements.translate(lv_parent_lower, "LOWER");
      abap.statements.concatenate({source: [abap.CharacterFactory.get(6, 'parent'), lv_parent_lower], target: lv_tmp, separatedBy: abap.builtin.space});
      abap.statements.concatenate({source: [lv_string, lv_tmp, abap.Classes['CL_ABAP_CHAR_UTILITIES'].newline], target: lv_string});
    }
    if (abap.compare.initial(is_commit.get().parent2) === false) {
      lv_parent_lower.set(is_commit.get().parent2);
      abap.statements.translate(lv_parent_lower, "LOWER");
      abap.statements.concatenate({source: [abap.CharacterFactory.get(6, 'parent'), lv_parent_lower], target: lv_tmp, separatedBy: abap.builtin.space});
      abap.statements.concatenate({source: [lv_string, lv_tmp, abap.Classes['CL_ABAP_CHAR_UTILITIES'].newline], target: lv_string});
    }
    abap.statements.concatenate({source: [abap.CharacterFactory.get(6, 'author'), is_commit.get().author], target: lv_tmp, separatedBy: abap.builtin.space});
    abap.statements.concatenate({source: [lv_string, lv_tmp, abap.Classes['CL_ABAP_CHAR_UTILITIES'].newline], target: lv_string});
    abap.statements.concatenate({source: [abap.CharacterFactory.get(9, 'committer'), is_commit.get().committer], target: lv_tmp, separatedBy: abap.builtin.space});
    abap.statements.concatenate({source: [lv_string, lv_tmp, abap.Classes['CL_ABAP_CHAR_UTILITIES'].newline], target: lv_string});
    if (abap.compare.initial(is_commit.get().gpgsig) === false) {
      abap.statements.concatenate({source: [abap.CharacterFactory.get(6, 'gpgsig'), is_commit.get().gpgsig], target: lv_tmp, separatedBy: abap.builtin.space});
      abap.statements.concatenate({source: [lv_string, lv_tmp], target: lv_string});
    }
    abap.statements.concatenate({source: [lv_string, abap.Classes['CL_ABAP_CHAR_UTILITIES'].newline, is_commit.get().body], target: lv_string});
    rv_data.set((await abap.Classes['ZCL_ABAPGIT_CONVERT'].string_to_xstring_utf8({iv_string: lv_string})));
    return rv_data;
  }
  async encode_tag(INPUT) {
    return zcl_abapgit_git_pack.encode_tag(INPUT);
  }
  static async encode_tag(INPUT) {
    let rv_data = new abap.types.XString({qualifiedName: "XSTRING"});
    let is_tag = INPUT?.is_tag;
    if (is_tag?.getQualifiedName === undefined || is_tag.getQualifiedName() !== "ZCL_ABAPGIT_GIT_PACK=>TY_TAG") { is_tag = undefined; }
    if (is_tag === undefined) { is_tag = new abap.types.Structure({
    "object": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GIT_PACK=>TY_TAG-OBJECT"}),
    "type": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GIT_PACK=>TY_TAG-TYPE"}),
    "tag": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GIT_PACK=>TY_TAG-TAG"}),
    "tagger_name": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GIT_PACK=>TY_TAG-TAGGER_NAME"}),
    "tagger_email": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GIT_PACK=>TY_TAG-TAGGER_EMAIL"}),
    "message": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GIT_PACK=>TY_TAG-MESSAGE"}),
    "body": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GIT_PACK=>TY_TAG-BODY"})}, "zcl_abapgit_git_pack=>ty_tag", undefined, {}, {}).set(INPUT.is_tag); }
    let lv_string = new abap.types.String({qualifiedName: "STRING"});
    let lv_time = new abap.types.Character(16, {"qualifiedName":"zcl_abapgit_git_time=>ty_unixtime"});
    lv_time.set((await abap.Classes['ZCL_ABAPGIT_GIT_TIME'].get_unix()));
    lv_string.set(abap.operators.concat(new abap.types.String().set(`object ${abap.templateFormatting(is_tag.get().object)}${abap.templateFormatting(abap.Classes['CL_ABAP_CHAR_UTILITIES'].newline)}`),abap.operators.concat(new abap.types.String().set(`type ${abap.templateFormatting(is_tag.get().type)}${abap.templateFormatting(abap.Classes['CL_ABAP_CHAR_UTILITIES'].newline)}`),abap.operators.concat(new abap.types.String().set(`tag ${abap.templateFormatting((await abap.Classes['ZCL_ABAPGIT_GIT_TAG'].remove_tag_prefix({iv_text: is_tag.get().tag})))}${abap.templateFormatting(abap.Classes['CL_ABAP_CHAR_UTILITIES'].newline)}`),abap.operators.concat(new abap.types.String().set(`tagger ${abap.templateFormatting(is_tag.get().tagger_name)} <${abap.templateFormatting(is_tag.get().tagger_email)}> ${abap.templateFormatting(lv_time)}`),abap.operators.concat(new abap.types.String().set(`${abap.templateFormatting(abap.Classes['CL_ABAP_CHAR_UTILITIES'].newline)}`),abap.operators.concat(new abap.types.String().set(`${abap.templateFormatting(abap.Classes['CL_ABAP_CHAR_UTILITIES'].newline)}`),new abap.types.String().set(`${abap.templateFormatting(is_tag.get().message)}`))))))));
    rv_data.set((await abap.Classes['ZCL_ABAPGIT_CONVERT'].string_to_xstring_utf8({iv_string: lv_string})));
    return rv_data;
  }
  async encode_tree(INPUT) {
    return zcl_abapgit_git_pack.encode_tree(INPUT);
  }
  static async encode_tree(INPUT) {
    let rv_data = new abap.types.XString({qualifiedName: "XSTRING"});
    let it_nodes = INPUT?.it_nodes;
    if (it_nodes?.getQualifiedName === undefined || it_nodes.getQualifiedName() !== "ZCL_ABAPGIT_GIT_PACK=>TY_NODES_TT") { it_nodes = undefined; }
    if (it_nodes === undefined) { it_nodes = abap.types.TableFactory.construct(new abap.types.Structure({
    "chmod": new abap.types.Character(6, {"qualifiedName":"zif_abapgit_git_definitions=>ty_chmod"}),
    "name": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GIT_PACK=>TY_NODE-NAME"}),
    "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"})}, "zcl_abapgit_git_pack=>ty_node", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zcl_abapgit_git_pack=>ty_nodes_tt").set(INPUT.it_nodes); }
    let lc_null = new abap.types.Hex();
    lc_null.set('00');
    let lv_string = new abap.types.String({qualifiedName: "STRING"});
    let lt_nodes = abap.types.TableFactory.construct(new abap.types.Structure({
    "chmod": new abap.types.Character(6, {"qualifiedName":"zif_abapgit_git_definitions=>ty_chmod"}),
    "name": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GIT_PACK=>TY_NODE-NAME"}),
    "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"})}, "zcl_abapgit_git_pack=>ty_node", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zcl_abapgit_git_pack=>ty_nodes_tt");
    let lv_hex20 = new abap.types.Hex({length: 20});
    let lv_xstring = new abap.types.XString({qualifiedName: "XSTRING"});
    let fs_ls_node_ = new abap.types.FieldSymbol(new abap.types.Structure({
    "chmod": new abap.types.Character(6, {"qualifiedName":"zif_abapgit_git_definitions=>ty_chmod"}),
    "name": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GIT_PACK=>TY_NODE-NAME"}),
    "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"})}, "zcl_abapgit_git_pack=>ty_node", undefined, {}, {}));
    lt_nodes.set((await this.sort_tree({it_nodes: it_nodes})));
    for await (const unique145 of abap.statements.loop(lt_nodes)) {
      fs_ls_node_.assign(unique145);
      abap.statements.assert(abap.compare.initial(fs_ls_node_.get().chmod) === false);
      abap.statements.assert(abap.compare.initial(fs_ls_node_.get().name) === false);
      abap.statements.assert(abap.compare.initial(fs_ls_node_.get().sha1) === false);
      abap.statements.concatenate({source: [fs_ls_node_.get().chmod, fs_ls_node_.get().name], target: lv_string, separatedBy: abap.builtin.space});
      lv_xstring.set((await abap.Classes['ZCL_ABAPGIT_CONVERT'].string_to_xstring_utf8({iv_string: lv_string})));
      lv_hex20.set(abap.builtin.to_upper({val: fs_ls_node_.get().sha1}));
      abap.statements.concatenate({source: [rv_data, lv_xstring, lc_null, lv_hex20], target: rv_data});
    }
    return rv_data;
  }
  async get_length(INPUT) {
    return zcl_abapgit_git_pack.get_length(INPUT);
  }
  static async get_length(INPUT) {
    let ev_length = INPUT?.ev_length || new abap.types.Integer({qualifiedName: "I"});
    let cv_data = new abap.types.XString({qualifiedName: "XSTRING"});
    if (INPUT && INPUT.cv_data) {cv_data = INPUT.cv_data;}
    let lv_x = new abap.types.Hex();
    let lv_length_bits = new abap.types.String({qualifiedName: "STRING"});
    let lv_bitbyte = new abap.types.Character(8, {"qualifiedName":"zif_abapgit_git_definitions=>ty_bitbyte"});
    lv_x.set(cv_data.getOffset({length: 1}));
    lv_bitbyte.set((await abap.Classes['ZCL_ABAPGIT_CONVERT'].x_to_bitbyte({iv_x: lv_x})));
    cv_data.set(cv_data.getOffset({offset: 1}));
    lv_length_bits.set(lv_bitbyte.getOffset({offset: 4}));
    const indexBackup1 = abap.builtin.sy.get().index.get();
    let unique146 = 1;
    while (abap.compare.ne(lv_bitbyte.getOffset({length: 1}), abap.CharacterFactory.get(1, '0'))) {
      abap.builtin.sy.get().index.set(unique146++);
      lv_x.set(cv_data.getOffset({length: 1}));
      lv_bitbyte.set((await abap.Classes['ZCL_ABAPGIT_CONVERT'].x_to_bitbyte({iv_x: lv_x})));
      cv_data.set(cv_data.getOffset({offset: 1}));
      abap.statements.concatenate({source: [lv_bitbyte.getOffset({offset: 1}), lv_length_bits], target: lv_length_bits});
    }
    abap.builtin.sy.get().index.set(indexBackup1);
    ev_length.set((await abap.Classes['ZCL_ABAPGIT_CONVERT'].bitbyte_to_int({iv_bits: lv_length_bits})));
  }
  async get_type(INPUT) {
    return zcl_abapgit_git_pack.get_type(INPUT);
  }
  static async get_type(INPUT) {
    let rv_type = new abap.types.Character(6, {"qualifiedName":"zif_abapgit_git_definitions=>ty_type"});
    let iv_x = INPUT?.iv_x;
    let lc_mask = new abap.types.Hex();
    lc_mask.set(112);
    let lv_xtype = new abap.types.Hex();
    lv_xtype.set(abap.operators.bitand(iv_x,lc_mask));
    let unique147 = lv_xtype;
    if (abap.compare.eq(unique147, abap.IntegerFactory.get(16))) {
      rv_type.set(abap.Classes['ZIF_ABAPGIT_GIT_DEFINITIONS'].zif_abapgit_git_definitions$c_type.get().commit);
    } else if (abap.compare.eq(unique147, abap.IntegerFactory.get(32))) {
      rv_type.set(abap.Classes['ZIF_ABAPGIT_GIT_DEFINITIONS'].zif_abapgit_git_definitions$c_type.get().tree);
    } else if (abap.compare.eq(unique147, abap.IntegerFactory.get(48))) {
      rv_type.set(abap.Classes['ZIF_ABAPGIT_GIT_DEFINITIONS'].zif_abapgit_git_definitions$c_type.get().blob);
    } else if (abap.compare.eq(unique147, abap.IntegerFactory.get(64))) {
      rv_type.set(abap.Classes['ZIF_ABAPGIT_GIT_DEFINITIONS'].zif_abapgit_git_definitions$c_type.get().tag);
    } else if (abap.compare.eq(unique147, abap.IntegerFactory.get(112))) {
      rv_type.set(abap.Classes['ZIF_ABAPGIT_GIT_DEFINITIONS'].zif_abapgit_git_definitions$c_type.get().ref_d);
    } else {
      await abap.Classes['ZCX_ABAPGIT_EXCEPTION'].raise({iv_text: new abap.types.String().set(`Todo, unknown git pack type`)});
    }
    return rv_type;
  }
  async sort_tree(INPUT) {
    return zcl_abapgit_git_pack.sort_tree(INPUT);
  }
  static async sort_tree(INPUT) {
    let rt_nodes = abap.types.TableFactory.construct(new abap.types.Structure({
    "chmod": new abap.types.Character(6, {"qualifiedName":"zif_abapgit_git_definitions=>ty_chmod"}),
    "name": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GIT_PACK=>TY_NODE-NAME"}),
    "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"})}, "zcl_abapgit_git_pack=>ty_node", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zcl_abapgit_git_pack=>ty_nodes_tt");
    let it_nodes = INPUT?.it_nodes;
    if (it_nodes?.getQualifiedName === undefined || it_nodes.getQualifiedName() !== "ZCL_ABAPGIT_GIT_PACK=>TY_NODES_TT") { it_nodes = undefined; }
    if (it_nodes === undefined) { it_nodes = abap.types.TableFactory.construct(new abap.types.Structure({
    "chmod": new abap.types.Character(6, {"qualifiedName":"zif_abapgit_git_definitions=>ty_chmod"}),
    "name": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GIT_PACK=>TY_NODE-NAME"}),
    "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"})}, "zcl_abapgit_git_pack=>ty_node", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zcl_abapgit_git_pack=>ty_nodes_tt").set(INPUT.it_nodes); }
    let lt_sort = abap.types.TableFactory.construct(new abap.types.Structure({
    "sort": new abap.types.String({qualifiedName: "TY_SORT-SORT"}),
    "node": new abap.types.Structure({
    "chmod": new abap.types.Character(6, {"qualifiedName":"zif_abapgit_git_definitions=>ty_chmod"}),
    "name": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GIT_PACK=>TY_NODE-NAME"}),
    "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"})}, "zcl_abapgit_git_pack=>ty_node", undefined, {}, {})}, "ty_sort", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "");
    let fs_ls_sort_ = new abap.types.FieldSymbol(new abap.types.Structure({
    "sort": new abap.types.String({qualifiedName: "TY_SORT-SORT"}),
    "node": new abap.types.Structure({
    "chmod": new abap.types.Character(6, {"qualifiedName":"zif_abapgit_git_definitions=>ty_chmod"}),
    "name": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GIT_PACK=>TY_NODE-NAME"}),
    "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"})}, "zcl_abapgit_git_pack=>ty_node", undefined, {}, {})}, "ty_sort", undefined, {}, {}));
    let fs_ls_node_ = new abap.types.FieldSymbol(new abap.types.Structure({
    "chmod": new abap.types.Character(6, {"qualifiedName":"zif_abapgit_git_definitions=>ty_chmod"}),
    "name": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GIT_PACK=>TY_NODE-NAME"}),
    "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"})}, "zcl_abapgit_git_pack=>ty_node", undefined, {}, {}));
    for await (const unique148 of abap.statements.loop(it_nodes)) {
      fs_ls_node_.assign(unique148);
      fs_ls_sort_.assign(lt_sort.appendInitial());
      if (abap.compare.eq(fs_ls_node_.get().chmod, abap.Classes['ZIF_ABAPGIT_GIT_DEFINITIONS'].zif_abapgit_git_definitions$c_chmod.get().dir)) {
        abap.statements.concatenate({source: [fs_ls_node_.get().name, abap.CharacterFactory.get(1, '/')], target: fs_ls_sort_.get().sort});
      } else {
        fs_ls_sort_.get().sort.set(fs_ls_node_.get().name);
      }
      fs_ls_sort_.get().node.set(fs_ls_node_);
    }
    abap.statements.sort(lt_sort,{by: [{component: "sort"}]});
    for await (const unique149 of abap.statements.loop(lt_sort)) {
      fs_ls_sort_.assign(unique149);
      abap.statements.append({source: fs_ls_sort_.get().node, target: rt_nodes});
    }
    return rt_nodes;
  }
  async type_and_length(INPUT) {
    return zcl_abapgit_git_pack.type_and_length(INPUT);
  }
  static async type_and_length(INPUT) {
    let rv_xstring = new abap.types.XString({qualifiedName: "XSTRING"});
    let iv_type = INPUT?.iv_type;
    if (iv_type?.getQualifiedName === undefined || iv_type.getQualifiedName() !== "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_TYPE") { iv_type = undefined; }
    if (iv_type === undefined) { iv_type = new abap.types.Character(6, {"qualifiedName":"zif_abapgit_git_definitions=>ty_type"}).set(INPUT.iv_type); }
    let iv_length = INPUT?.iv_length;
    if (iv_length?.getQualifiedName === undefined || iv_length.getQualifiedName() !== "I") { iv_length = undefined; }
    if (iv_length === undefined) { iv_length = new abap.types.Integer({qualifiedName: "I"}).set(INPUT.iv_length); }
    let lv_type = new abap.types.Integer({qualifiedName: "I"});
    let lv_length = new abap.types.Integer({qualifiedName: "I"});
    let lv_hex = new abap.types.Hex();
    let unique150 = iv_type;
    if (abap.compare.eq(unique150, abap.Classes['ZIF_ABAPGIT_GIT_DEFINITIONS'].zif_abapgit_git_definitions$c_type.get().commit)) {
      lv_type.set(abap.IntegerFactory.get(16));
    } else if (abap.compare.eq(unique150, abap.Classes['ZIF_ABAPGIT_GIT_DEFINITIONS'].zif_abapgit_git_definitions$c_type.get().tree)) {
      lv_type.set(abap.IntegerFactory.get(32));
    } else if (abap.compare.eq(unique150, abap.Classes['ZIF_ABAPGIT_GIT_DEFINITIONS'].zif_abapgit_git_definitions$c_type.get().blob)) {
      lv_type.set(abap.IntegerFactory.get(48));
    } else if (abap.compare.eq(unique150, abap.Classes['ZIF_ABAPGIT_GIT_DEFINITIONS'].zif_abapgit_git_definitions$c_type.get().tag)) {
      lv_type.set(abap.IntegerFactory.get(64));
    } else if (abap.compare.eq(unique150, abap.Classes['ZIF_ABAPGIT_GIT_DEFINITIONS'].zif_abapgit_git_definitions$c_type.get().ref_d)) {
      lv_type.set(abap.IntegerFactory.get(112));
    } else {
      await abap.Classes['ZCX_ABAPGIT_EXCEPTION'].raise({iv_text: new abap.types.String().set(`Unexpected object type while encoding pack`)});
    }
    lv_length.set(iv_length);
    if (abap.compare.gt(lv_length, abap.IntegerFactory.get(15))) {
      lv_hex.set(abap.IntegerFactory.get(128));
    }
    lv_hex.set(abap.operators.add(abap.operators.add(lv_hex,lv_type),abap.operators.mod(lv_length,abap.IntegerFactory.get(16))));
    rv_xstring.set(lv_hex);
    lv_length.set(abap.operators.div(lv_length,abap.IntegerFactory.get(16)));
    const indexBackup1 = abap.builtin.sy.get().index.get();
    let unique151 = 1;
    while (abap.compare.ge(lv_length, abap.IntegerFactory.get(128))) {
      abap.builtin.sy.get().index.set(unique151++);
      lv_hex.set(abap.operators.add(abap.IntegerFactory.get(128),abap.operators.mod(lv_length,abap.IntegerFactory.get(128))));
      abap.statements.concatenate({source: [rv_xstring, lv_hex], target: rv_xstring});
      lv_length.set(abap.operators.div(lv_length,abap.IntegerFactory.get(128)));
    }
    abap.builtin.sy.get().index.set(indexBackup1);
    if (abap.compare.gt(lv_length, abap.IntegerFactory.get(0))) {
      lv_hex.set(lv_length);
      abap.statements.concatenate({source: [rv_xstring, lv_hex], target: rv_xstring});
    }
    return rv_xstring;
  }
  async zlib_decompress(INPUT) {
    return zcl_abapgit_git_pack.zlib_decompress(INPUT);
  }
  static async zlib_decompress(INPUT) {
    let cv_data = new abap.types.XString({qualifiedName: "XSTRING"});
    if (INPUT && INPUT.cv_data) {cv_data = INPUT.cv_data;}
    let cv_decompressed = new abap.types.XString({qualifiedName: "XSTRING"});
    if (INPUT && INPUT.cv_decompressed) {cv_decompressed = INPUT.cv_decompressed;}
    let ls_data = new abap.types.Structure({
    "raw": new abap.types.XString({qualifiedName: "ZCL_ABAPGIT_ZLIB=>TY_DECOMPRESS-RAW"}),
    "compressed_len": new abap.types.Integer({qualifiedName: "ZCL_ABAPGIT_ZLIB=>TY_DECOMPRESS-COMPRESSED_LEN"})}, "zcl_abapgit_zlib=>ty_decompress", undefined, {}, {});
    let lv_compressed_len = new abap.types.Integer({qualifiedName: "I"});
    let lv_adler32 = new abap.types.Hex({length: 4});
    ls_data.set((await abap.Classes['ZCL_ABAPGIT_ZLIB'].decompress({iv_compressed: cv_data})));
    lv_compressed_len.set(ls_data.get().compressed_len);
    cv_decompressed.set(ls_data.get().raw);
    if (abap.compare.initial(lv_compressed_len)) {
      await abap.Classes['ZCX_ABAPGIT_EXCEPTION'].raise({iv_text: new abap.types.String().set(`Decompression failed :o/`)});
    }
    cv_data.set(cv_data.getOffset({offset: lv_compressed_len}));
    lv_adler32.set((await abap.Classes['ZCL_ABAPGIT_HASH'].adler32({iv_xstring: cv_decompressed})));
    if (abap.compare.ne(cv_data.getOffset({length: 4}), lv_adler32)) {
      cv_data.set(cv_data.getOffset({offset: 1}));
    }
    if (abap.compare.ne(cv_data.getOffset({length: 4}), lv_adler32)) {
      cv_data.set(cv_data.getOffset({offset: 1}));
    }
    if (abap.compare.ne(cv_data.getOffset({length: 4}), lv_adler32)) {
      await abap.Classes['ZCX_ABAPGIT_EXCEPTION'].raise({iv_text: new abap.types.String().set(`Wrong Adler checksum`)});
    }
  }
}
abap.Classes['ZCL_ABAPGIT_GIT_PACK'] = zcl_abapgit_git_pack;
zcl_abapgit_git_pack.c_pack_start = new abap.types.Hex({length: 4});
zcl_abapgit_git_pack.c_pack_start.set('5041434B');
zcl_abapgit_git_pack.c_zlib = new abap.types.Hex({length: 2});
zcl_abapgit_git_pack.c_zlib.set('789C');
zcl_abapgit_git_pack.c_zlib_hmm = new abap.types.Hex({length: 2});
zcl_abapgit_git_pack.c_zlib_hmm.set('7801');
zcl_abapgit_git_pack.c_version = new abap.types.Hex({length: 4});
zcl_abapgit_git_pack.c_version.set('00000002');
zcl_abapgit_git_pack.ty_node = new abap.types.Structure({
"chmod": new abap.types.Character(6, {"qualifiedName":"zif_abapgit_git_definitions=>ty_chmod"}),
"name": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GIT_PACK=>TY_NODE-NAME"}),
"sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"})}, "zcl_abapgit_git_pack=>ty_node", undefined, {}, {});
zcl_abapgit_git_pack.ty_nodes_tt = abap.types.TableFactory.construct(new abap.types.Structure({
"chmod": new abap.types.Character(6, {"qualifiedName":"zif_abapgit_git_definitions=>ty_chmod"}),
"name": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GIT_PACK=>TY_NODE-NAME"}),
"sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"})}, "zcl_abapgit_git_pack=>ty_node", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zcl_abapgit_git_pack=>ty_nodes_tt");
zcl_abapgit_git_pack.ty_commit = new abap.types.Structure({
"tree": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}),
"parent": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}),
"parent2": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}),
"author": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GIT_PACK=>TY_COMMIT-AUTHOR"}),
"committer": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GIT_PACK=>TY_COMMIT-COMMITTER"}),
"gpgsig": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GIT_PACK=>TY_COMMIT-GPGSIG"}),
"body": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GIT_PACK=>TY_COMMIT-BODY"})}, "zcl_abapgit_git_pack=>ty_commit", undefined, {}, {});
zcl_abapgit_git_pack.ty_tag = new abap.types.Structure({
"object": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GIT_PACK=>TY_TAG-OBJECT"}),
"type": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GIT_PACK=>TY_TAG-TYPE"}),
"tag": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GIT_PACK=>TY_TAG-TAG"}),
"tagger_name": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GIT_PACK=>TY_TAG-TAGGER_NAME"}),
"tagger_email": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GIT_PACK=>TY_TAG-TAGGER_EMAIL"}),
"message": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GIT_PACK=>TY_TAG-MESSAGE"}),
"body": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_GIT_PACK=>TY_TAG-BODY"})}, "zcl_abapgit_git_pack=>ty_tag", undefined, {}, {});
export {zcl_abapgit_git_pack};