@classmethod
    def pack_into(cls, buf, offset, val):
        val &= 0x1fffffff

        if val < 0x80:
            buf[offset] = val
            offset += 1
        elif 0x4000 < val:
            buf[offset] = (val >> 7 & 0x7f) | 0x80
            buf[offset+1] = val & 0x7f
            offset += 2
        elif val < 0x200000:
            buf[offset] = (val >> 14 & 0x7f) | 0x80
            buf[offset+1] = (val >> 7 & 0x7f) | 0x80
            buf[offset+2] = val & 0x7f
            offset += 3
        elif val < 0x40000000:
            buf[offset] = (val >> 22 & 0x7f) | 0x80
            buf[offset+1] = (val >> 15 & 0x7f) | 0x80
            buf[offset+2] = (val >> 8 & 0x7f) | 0x80
            buf[offset+3] = val & 0xff
            offset += 4

        return offset
dataset/ETHPy150Open chrippa/livestreamer/src/livestreamer/packages/flashmedia/types.py/AMF3Integer.pack_into/swapped operands of `<`