I can't understand a single line of code in cPP.

    if (size > 0) {
        //Unicode
        auto slen = size == 127 ? read<uint32_t>() : size;
        byte * b = readBytes(slen * 2);
        std::string s = decryptUnicodeString(b, slen * 2);
        delete[]b;
        return s;
    }

recently, when I was studying the resource extraction of Adventure Island, I saw that other people"s cPP source code had a line

.
byte * b = readBytes(slen * 2);

I don"t know how to understand it. Please advise

CPP
Apr.01,2021

readBytes is a custom function, which is not seen in the built-in library. The input length slen*2 returns a binary stream b, which is then decoded by decryptUnicodeString into a string s

.
Menu