mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-04 05:25:00 +00:00
[PR #610] [MERGED] Bugfix for TarWriter - too much padding in large files #1123
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/adamhathcock/sharpcompress/pull/610
Author: @cyr
Created: 8/27/2021
Status: ✅ Merged
Merged: 9/12/2021
Merged by: @adamhathcock
Base:
master← Head:master📝 Commits (2)
1b661c9Fixed bug where large (int32+ file size) adds an additional 512 bytes of padding in tar files.61802eaMerge branch 'adamhathcock:master' into master📊 Changes
1 file changed (+6 additions, -10 deletions)
View changed files
📝
src/SharpCompress/Writers/Tar/TarWriter.cs(+6 -10)📄 Description
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!).
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.