> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# XBTCArchive::GetResourceCompressedSize

> 取得紋理之資料流的壓縮大小總計。

取得紋理之資料流的壓縮大小總計。

<a id="syntaxSection" />

## 語法

```cpp theme={null}
int32_t GetResourceCompressedSize(  
         uint32_t ResourceIdx  
)  
```

<a id="parametersSection" />

### 參數

*ResourceIdx*   \
類型: uint32\_t

紋理的以零為起始索引。

<a id="retvalSection" />

### 傳回值

類型: int32\_t

指定紋理之資料流的壓縮大小總計 (以位元組為單位)；否則為 -1。

<a id="remarksSection" />

## 備註

此方法會傳回 XBTC 封存中與指定紋理相關聯之資料流的壓縮大小總計。如果 `ResourceIdx` 設為封存中某個紋理的索引，則此方法會傳回與指定紋理相關聯之最後一個資料流的 [XBTC\_STREAM\_INFO](/zh-TW/reference/graphics/xbtc/structs/xbtc_stream_info) 結構中 `RelativeOffset` 與 `CompressedSize` 值的總和。如果 `ResourceIdx` 設為等於或大於封存中紋理數目的值，則此方法會傳回 -1。如需 XBTC 封存內容與結構的詳細資訊，請參閱 [XBOX 紋理壓縮器 (XBTC) 封存檔案規格](https://learn.microsoft.com/en-us/gaming/gdk/_content/gc/graphics/newfeatures/xbtc/xbtc-archive-format)。

<a id="requirementsSection" />

## 需求

**標頭:** XBTC.h

**支援的平台**: XBOX One 系列主機與 XBOX Series 主機

<a id="seealsoSection" />

## 另請參閱

[GetStreamInfo](/zh-TW/reference/graphics/xbtc/interfaces/XBTCArchive/methods/xbtcarchive_getstreaminfo)\
[XBTCArchive](/zh-TW/reference/graphics/xbtc/interfaces/XBTCArchive/xbtcarchive)\
[XBTC](/zh-TW/reference/graphics/xbtc/xbtc_members)


## Related topics

- [NDA 主題目錄 - Microsoft Learn 線上連結](/zh-TW/nda/nda-topic-directory.md)
- [GetRequiredParameterResourceSize](/zh-TW/reference/graphics/d3d12/interfaces/id3d12metacommand/methods/id3d12metacommand_getrequiredparameterresourcesize_public.md)
- [HCHttpCallResponseSetGzipCompressed](/zh-TW/reference/live/httpclient/httpclient/functions/hchttpcallresponsesetgzipcompressed.md)
- [GetResourceAllocationInfo](/zh-TW/reference/graphics/d3d12/interfaces/id3d12device/methods/id3d12device_getresourceallocationinfo_public.md)
- [List Archived Multiplayer Servers](/api-reference/multiplayerserver/list-archived-multiplayer-servers.md)
