[PR #610] Bugfix for TarWriter - too much padding in large files #1125

Open
opened 2026-01-29 22:19:06 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/adamhathcock/sharpcompress/pull/610

State: closed
Merged: Yes


For large files, due to how the padding was calculated an additional 512 bytes was added. I noticed this while archiving a file (size 11721453867 bytes, i.e. 11gb, roughly) and 725 null bytes were added as padding, instead of 213. This new method calculates large sizes correctly (and is faster!).

**Original Pull Request:** https://github.com/adamhathcock/sharpcompress/pull/610 **State:** closed **Merged:** Yes --- For large files, due to how the padding was calculated an additional 512 bytes was added. I noticed this while archiving a file (size 11721453867 bytes, i.e. 11gb, roughly) and 725 null bytes were added as padding, instead of 213. This new method calculates large sizes correctly (and is faster!).
claunia added the pull-request label 2026-01-29 22:19:06 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/sharpcompress#1125