pub struct BundleLoadOptions {
pub load_assets: bool,
pub decompress_blocks: bool,
pub validate: bool,
pub max_memory: Option<usize>,
pub max_unityfs_block_cache_memory: Option<usize>,
pub max_compressed_blocks_info_size: Option<usize>,
pub max_blocks_info_size: Option<usize>,
pub max_legacy_directory_compressed_size: Option<usize>,
pub max_compressed_block_size: Option<usize>,
pub max_blocks: usize,
pub max_nodes: usize,
}Expand description
Bundle loading options
Fields§
§load_assets: boolWhether to load all assets immediately
decompress_blocks: boolWhether to decompress all blocks immediately
validate: boolWhether to validate the bundle structure
max_memory: Option<usize>Maximum memory usage for decompression (in bytes)
max_unityfs_block_cache_memory: Option<usize>Maximum memory for caching UnityFS decompressed blocks during lazy range extraction.
This controls peak memory when AssetBundle::extract_node_data reads only a few nodes from
a large UnityFS without fully decompressing the entire bundle.
If None, block cache growth is unbounded (not recommended for untrusted inputs).
max_compressed_blocks_info_size: Option<usize>Maximum size of compressed blocks info (metadata) in bytes.
This is a cap on the compressed bytes read from the input stream before decompression.
max_blocks_info_size: Option<usize>Maximum size of decompressed blocks info (metadata) in bytes.
max_legacy_directory_compressed_size: Option<usize>Maximum size of the legacy (UnityWeb/UnityRaw) directory compressed section in bytes.
This is a cap on the raw bytes read from the input stream before decompression.
max_compressed_block_size: Option<usize>Maximum size of a single UnityFS compressed data block (in bytes).
This is a cap on the raw bytes read for each block before decompression. It helps protect against malicious headers that declare multi-GB compressed blocks.
max_blocks: usizeMaximum number of compression blocks allowed in metadata.
max_nodes: usizeMaximum number of directory nodes / file entries allowed in metadata.
Implementations§
Trait Implementations§
Source§impl Clone for BundleLoadOptions
impl Clone for BundleLoadOptions
Source§fn clone(&self) -> BundleLoadOptions
fn clone(&self) -> BundleLoadOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more