func decodeUnsignedLEB()

in Sources/TwitterApacheThrift/ThriftCompactBinary.swift [197:206]


    func decodeUnsignedLEB<T: BinaryInteger>(from bytes: Data) -> T {
        var result: T = 0
        var shift: T = 0

        for byte in bytes {
            result |= ((T(byte) & 0x7F) << shift)
            shift += 7
        }
        return result
    }