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 | 1x 1x 6x 6x 6x 6x 6x 6x 6x 6x 6x 1x 1x 1x 1x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 1x 1x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 7343x 7343x 7343x 7343x 7343x 7343x 7343x 7343x 7343x 7343x 7343x 7311x 7311x 1063x 1063x 1063x 1063x 8504x 8504x 8504x 8504x 1063x 1063x 1063x 7311x 7311x 1058x 1058x 7311x 6253x 6253x 6253x 6253x 7311x 7343x 7343x 7343x 6x 2x 2x 2x 2x 2x 2x 2x 2x 6x 503x 503x 503x 503x 503x 503x 503x 503x 503x 503x 503x 1631x 1631x 1631x 1631x 1631x 503x 503x 503x 6x 1x 1x | const {cx_root} = await import("./cx_root.clas.mjs");
// zcl_abapgit_zlib_stream.clas.abap
class zcl_abapgit_zlib_stream {
static STATIC_SUPER = undefined;
static INTERNAL_TYPE = 'CLAS';
static INTERNAL_NAME = 'ZCL_ABAPGIT_ZLIB_STREAM';
static IMPLEMENTED_INTERFACES = [];
static ATTRIBUTES = {"MV_BITS": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "visibility": "I", "is_constant": " ", "is_class": " "},
"MV_COMPRESSED": {"type": () => {return new abap.types.XString({qualifiedName: "XSTRING"});}, "visibility": "I", "is_constant": " ", "is_class": " "},
"MV_OFFSET": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "visibility": "I", "is_constant": " ", "is_class": " "}};
static METHODS = {"CONSTRUCTOR": {"visibility": "U", "parameters": {"IV_DATA": {"type": () => {return new abap.types.XString({qualifiedName: "XSTRING"});}, "is_optional": " ", "parm_kind": "I", "type_name": "XStringType"}}},
"TAKE_BITS": {"visibility": "U", "parameters": {"RV_BITS": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "is_optional": " ", "parm_kind": "R", "type_name": "StringType"}, "IV_LENGTH": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "is_optional": " ", "parm_kind": "I", "type_name": "IntegerType"}}},
"TAKE_INT": {"visibility": "U", "parameters": {"RV_INT": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "is_optional": " ", "parm_kind": "R", "type_name": "IntegerType"}, "IV_LENGTH": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "is_optional": " ", "parm_kind": "I", "type_name": "IntegerType"}}},
"REMAINING": {"visibility": "U", "parameters": {"RV_LENGTH": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "is_optional": " ", "parm_kind": "R", "type_name": "IntegerType"}}},
"TAKE_BYTES": {"visibility": "U", "parameters": {"RV_BYTES": {"type": () => {return new abap.types.XString({qualifiedName: "XSTRING"});}, "is_optional": " ", "parm_kind": "R", "type_name": "XStringType"}, "IV_LENGTH": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "is_optional": " ", "parm_kind": "I", "type_name": "IntegerType"}}},
"CLEAR_BITS": {"visibility": "U", "parameters": {}}};
#mv_bits;
#mv_compressed;
#mv_offset;
constructor() {
this.me = new abap.types.ABAPObject();
this.me.set(this);
this.INTERNAL_ID = abap.internalIdCounter++;
this.FRIENDS_ACCESS_INSTANCE = {
"take_bits": this.take_bits.bind(this),
"take_int": this.take_int.bind(this),
"remaining": this.remaining.bind(this),
"take_bytes": this.take_bytes.bind(this),
"clear_bits": this.clear_bits.bind(this),
};
this.#mv_bits = new abap.types.String({qualifiedName: "STRING"});
this.FRIENDS_ACCESS_INSTANCE["mv_bits"] = this.#mv_bits;
this.#mv_compressed = new abap.types.XString({qualifiedName: "XSTRING"});
this.FRIENDS_ACCESS_INSTANCE["mv_compressed"] = this.#mv_compressed;
this.#mv_offset = new abap.types.Integer({qualifiedName: "I"});
this.FRIENDS_ACCESS_INSTANCE["mv_offset"] = this.#mv_offset;
}
async clear_bits() {
this.#mv_bits.clear();
}
async constructor_(INPUT) {
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); }
this.#mv_compressed.set(iv_data);
this.#mv_offset.set(abap.IntegerFactory.get(0));
return this;
}
async remaining() {
let rv_length = new abap.types.Integer({qualifiedName: "I"});
rv_length.set(abap.operators.minus(abap.operators.add(abap.builtin.xstrlen({val: this.#mv_compressed}),abap.IntegerFactory.get(1)),this.#mv_offset));
return rv_length;
}
async take_bits(INPUT) {
let rv_bits = new abap.types.String({qualifiedName: "STRING"});
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_left = new abap.types.Integer({qualifiedName: "I"});
let lv_index = new abap.types.Integer({qualifiedName: "I"});
let lv_c = new abap.types.Character(1, {});
let lv_x = new abap.types.Hex();
const indexBackup1 = abap.builtin.sy.get().index.get();
let unique489 = 1;
while (abap.compare.lt(abap.builtin.strlen({val: rv_bits}), iv_length)) {
abap.builtin.sy.get().index.set(unique489++);
if (abap.compare.initial(this.#mv_bits)) {
lv_x.set(this.#mv_compressed.getOffset({offset: this.#mv_offset, length: 1}));
const indexBackup2 = abap.builtin.sy.get().index.get();
const unique490 = abap.IntegerFactory.get(8).get();
for (let unique491 = 0; unique491 < unique490; unique491++) {
abap.builtin.sy.get().index.set(unique491 + 1);
abap.statements.getBit(abap.builtin.sy.get().index, lv_x, lv_c);
abap.statements.concatenate({source: [this.#mv_bits, lv_c], target: this.#mv_bits});
}
abap.builtin.sy.get().index.set(indexBackup2);
this.#mv_offset.set(abap.operators.add(this.#mv_offset,abap.IntegerFactory.get(1)));
}
lv_left.set(abap.operators.minus(iv_length,abap.builtin.strlen({val: rv_bits})));
if (abap.compare.ge(lv_left, abap.builtin.strlen({val: this.#mv_bits}))) {
abap.statements.concatenate({source: [this.#mv_bits, rv_bits], target: rv_bits});
this.#mv_bits.clear();
} else {
lv_index.set(abap.operators.minus(abap.builtin.strlen({val: this.#mv_bits}),lv_left));
abap.statements.concatenate({source: [this.#mv_bits.getOffset({offset: lv_index, length: lv_left}), rv_bits], target: rv_bits});
this.#mv_bits.set(this.#mv_bits.getOffset({length: lv_index}));
}
}
abap.builtin.sy.get().index.set(indexBackup1);
return rv_bits;
}
async take_bytes(INPUT) {
let rv_bytes = new abap.types.XString({qualifiedName: "XSTRING"});
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); }
rv_bytes.set(this.#mv_compressed.getOffset({offset: this.#mv_offset, length: iv_length}));
this.#mv_offset.set(abap.operators.add(this.#mv_offset,iv_length));
return rv_bytes;
}
async take_int(INPUT) {
let rv_int = new abap.types.Integer({qualifiedName: "I"});
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_bits = new abap.types.String({qualifiedName: "STRING"});
let lv_i = new abap.types.Integer({qualifiedName: "I"});
let lv_offset = new abap.types.Integer({qualifiedName: "I"});
lv_bits.set((await this.take_bits({iv_length: iv_length})));
const indexBackup1 = abap.builtin.sy.get().index.get();
const unique492 = abap.builtin.strlen({val: lv_bits}).get();
for (let unique493 = 0; unique493 < unique492; unique493++) {
abap.builtin.sy.get().index.set(unique493 + 1);
lv_i.set(lv_bits.getOffset({offset: lv_offset, length: 1}));
rv_int.set(abap.operators.add(abap.operators.multiply(rv_int,abap.IntegerFactory.get(2)),lv_i));
lv_offset.set(abap.operators.add(lv_offset,abap.IntegerFactory.get(1)));
}
abap.builtin.sy.get().index.set(indexBackup1);
return rv_int;
}
}
abap.Classes['ZCL_ABAPGIT_ZLIB_STREAM'] = zcl_abapgit_zlib_stream;
export {zcl_abapgit_zlib_stream}; |