Objets/Documentation
longueur22.py
Transporter la longueur d’un flux · longueur22.py
Télécharger ↓"""Byte-aligned self-delimiting length prefix, followed by the global21 payload."""
import json
from math import comb
from global21 import study as payload,unpack,unrank
def header(n):
if n<1:raise ValueError('positive count required')
out=bytearray()
while n>=128:
out.append(128+(n%128));n//=128
return bytes(out)+bytes([n])
def decode(wire):
n=0