Atelier des rouesLab FR
Objects/Documentation

prefixes24.py

When the gamma prefix loses a byte · prefixes24.py

Download ↓
"""First strict byte loss for two deterministic positive-length streams."""
import json
from math import comb
from gamma23 import decode as gamma
from longueur22 import header,decode as aligned
from global21 import study as payload, pack, unrank

def study():
    rows=[]
    for profile in (0,1):
        n=0;wins=ties=0
        while True:
            n+=1
            # Alternation permits typed runs of length one only. For weight four,
            # even one word saves 16 payload bits for at most 13 overhead bits.
            bits=1+(min(32*n,16*n+13*((n+63)//64)) if profile else 32*n)

Read in context

Comments

Comments from both language editions appear here.

The discussion is open for reading. I’ll enable submissions once spam protection is configured.