Skip to content

fix: the alignment value should be inside the data alignment - #929

Merged
Its-Just-Nans merged 1 commit into
masterfrom
fix-data-alignment
Aug 13, 2026
Merged

fix: the alignment value should be inside the data alignment#929
Its-Just-Nans merged 1 commit into
masterfrom
fix-data-alignment

Conversation

@Its-Just-Nans

@Its-Just-Nans Its-Just-Nans commented Aug 13, 2026

Copy link
Copy Markdown
Member

Little mistake in github.com//pull/879

It was previously like this (line 1223)

zip2/src/write.rs

Lines 1221 to 1229 in 98d6d23

let mut pad_body = vec![0; pad_length - 4];
debug_assert!(pad_body.len() >= 2);
[pad_body[0], pad_body[1]] = options.alignment.to_le_bytes();
ExtendedFileOptions::add_extra_data_unchecked(
&mut extra_data,
UsedExtraField::DataStreamAlignment.as_u16(),
&pad_body,
)?;
debug_assert_eq!((extra_data.len() as u64 + header_end) % align, 0);

But the alignment is not written to

@amazon-q-developer amazon-q-developer Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The changes correctly implement storage of the alignment value in the DataStreamAlignment extra field. The implementation properly validates padding length requirements, stores the alignment value, and writes it according to the ZIP specification format.


You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.

@Its-Just-Nans Its-Just-Nans changed the title fix data alignement fix: the alignment value should be inside the data alignement Aug 13, 2026
@Its-Just-Nans
Its-Just-Nans added this pull request to the merge queue Aug 13, 2026
Merged via the queue into master with commit fea5a58 Aug 13, 2026
135 checks passed
@Its-Just-Nans
Its-Just-Nans deleted the fix-data-alignment branch August 13, 2026 14:31
@Its-Just-Nans Its-Just-Nans changed the title fix: the alignment value should be inside the data alignement fix: the alignment value should be inside the data alignment Aug 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant