download Depot Chunk
Downloads the specified depot chunk, and optionally processes the chunk and verifies the checksum if the depot decryption key has been provided. This function will also validate the length of the downloaded chunk with the value of ChunkData.compressedLength, if it has been assigned a value.
Return
The total number of bytes written to destination.
Parameters
The id of the depot being accessed.
A ChunkData instance that represents the chunk to download. This value should come from a manifest downloaded with downloadManifest.
The content server to connect to.
The buffer to receive the chunk data. If depotKey is provided, this will be the decompressed buffer. Allocate or rent a buffer that is equal or longer than ChunkData.uncompressedLength
The depot decryption key for the depot that will be downloaded. This is used to process the chunk data.
Optional content server marked as UseAsProxy which transforms the request.
CDN auth token for CDN content server endpoints if necessary. Get one with SteamContent.getCDNAuthToken.
Throws
Thrown if the chunk's ChunkData.chunkID was null or if the destination buffer is too small.
Thrown if the downloaded data does not match the expected length.
A network error occurred when performing the request.