docs: def end(self):
          """Finalise lz4 frame, outputting any remaining as return from this function or by writing to fp)"""
          with self.__lock:
              if self.__write:
                  self.__write(compress_end(self.__ctx))
              else:
                  return compress_end(self.__ctx)