Skip to content

Add support for large CAB files#36

Open
rmzone wants to merge 1 commit intomdsteele:masterfrom
rmzone:large-cab
Open

Add support for large CAB files#36
rmzone wants to merge 1 commit intomdsteele:masterfrom
rmzone:large-cab

Conversation

@rmzone
Copy link
Copy Markdown

@rmzone rmzone commented Aug 8, 2025

Adding decompress support for mszip compresion.

Comment thread src/cabinet.rs
/// The actual maximum supported is 0x1ffff blocks, or 4gb of uncompressed data.
fn recalculate_block_size(compression_type: CompressionType, uncompressed_size: u32, block_size: u32) -> u32 {
match compression_type {
CompressionType::MsZip => {
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does this recalculation not apply to other compression types?

Comment thread src/cabinet.rs

/// Re-calculate the real number of blocks. Since the cabinet header num_data_blocks is limited to 0xffff
/// The actual maximum supported is 0x1ffff blocks, or 4gb of uncompressed data.
fn recalculate_block_size(compression_type: CompressionType, uncompressed_size: u32, block_size: u32) -> u32 {
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a little confused by the naming here. Does this function calculate the size of each block, or the number of blocks?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants