code: def prefix_encode_all(ls):
      """Compresses the given list of (unicode) strings by storing each string
      (except the first one) as an integer (encoded in a byte) representing
      the prefix it shares with its predecessor, followed by the suffix encoded
      as UTF-8.
      """
  
      last = u("")
      for w in ls:
          i = first_diff(last, w)
          yield chr(i) + w[i:].encode("utf-8")
          last = w
  
file_path: whoosh/src/whoosh/util/text.py
imports: import codecs, re
  from whoosh.compat import string_type, u, byte
label_desc: Use image node_id 3 for calling a global function with example usage: prefix_encode_all(ls) without return types