def SetDecryptedStreamSize(self, decrypted_stream_size):
    """Sets the decrypted stream size.

    This function is used to set the decrypted stream size if it can be
    determined separately.

    Args:
      decrypted_stream_size (int): size of the decrypted stream in bytes.

    Raises:
      IOError: if the file-like object is already open.
      OSError: if the file-like object is already open.
      ValueError: if the decrypted stream size is invalid.
    """
    if self._is_open:
      raise IOError('Already open.')

    if decrypted_stream_size < 0:
      raise ValueError((
          'Invalid decrypted stream size: {0:d} value out of '
          'bounds.').format(decrypted_stream_size))

    self._decrypted_stream_size = decrypted_stream_size
Sets the decrypted stream size.

    This function is used to set the decrypted stream size if it can be
    determined separately.

    Args:
      decrypted_stream_size (int): size of the decrypted stream in bytes.

    Raises:
      IOError: if the file-like object is already open.
      OSError: if the file-like object is already open.
      ValueError: if the decrypted stream size is invalid.