def prefix_decode_all(ls):
 last = u('')
 for w in ls:
  i = ord(w[0])
  decoded = (last[:i] + w[1:].decode('utf8'))
  (yield decoded)
  last = decoded

def prefix_decode_all ( ls ) : last = u ( '' ) for w in ls : i = ord ( w [ 0 ] ) decoded = ( last [ : i ] + w [ 1 : ] . decode ( 'utf8' ) ) ( yield decoded ) last = decoded
decompresses a list of strings compressed by prefix_encode() .