docs: def _setbytes_safe(self, data, length=None, offset=0):
          """Set the data from a string."""
          data = bytearray(data)
          if length is None:
              # Use to the end of the data
              length = len(data)*8 - offset
              self._datastore = ByteStore(data, length, offset)
          else:
              if length + offset > len(data) * 8:
                  msg = "Not enough data present. Need {0} bits, have {1}."
                  raise CreationError(msg, length + offset, len(data) * 8)
              if length == 0:
                  self._datastore = ByteStore(bytearray(0))
              else:
                  self._datastore = ByteStore(data, length, offset)