def encode_single_vb(n):
    byts = []
    while True:
        byts.append(n % 128)
        if n < 128:
            break
        n //= 128
    byts = byts[::-1]
    byts[-1] += 128
    return [bin(n)[2:] for n in byts]


def encode_vb(numbers):
    bytestream = []
    for n in numbers:
        bytestream.extend(encode_single_vb(n))
    return bytestream

@@ -350,8 +350,377 @@
 estream%0A
+%0A%0Adef decode_vb(bytestream):%0A    byts = utils.split_bytes(bytestream)%0A%0A    lst = %5B%5D%0A    aux = ''%0A    for byte in byts:%0A        if byte%5B0%5D == '0':%0A            print byte%0A            aux += byte%5B1:%5D%0A        else:%0A            print byte%0A            aux += byte%5B1:%5D%0A            number = utils.integer(aux)%0A            lst.append(number)%0A            aux = ''%0A    return lst%0A

Update cod_variable.py