docs: def compute_allocated_size(size, is_encrypted):
          # type: (int, bool) -> int
          """Compute allocated size on disk
          :param int size: size (content length)
          :param bool is_ecrypted: if entity is encrypted
          :rtype: int
          :return: required size on disk
          """
          # compute size
          if size > 0:
              if is_encrypted:
                  # cipher_len_without_iv = (clear_len / aes_bs + 1) * aes_bs
                  allocatesize = (
                      size //
                      blobxfer.models.download.Descriptor._AES_BLOCKSIZE - 1
                  ) * blobxfer.models.download.Descriptor._AES_BLOCKSIZE
                  if allocatesize < 0:
                      raise RuntimeError('allocatesize is negative')
              else:
                  allocatesize = size
          else:
              allocatesize = 0
          return allocatesize