-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[release/7.0] Backport tar bug fixes and improvements #74449
Commits on Aug 23, 2022
-
Improve performance of Tar library (dotnet#74281)
* Avoid unnecessary byte[] allocations * Remove unnecessary use of FileStreamOptions * Clean up Dispose{Async} implementations * Clean up unnecessary consts Not a perf thing, just readability. * Remove MemoryStream/Encoding.UTF8.GetBytes allocations, unnecessary async variants, and overhaul GenerateExtendedAttributesDataStream * Avoid string allocations in ReadMagicAttribute * Avoid allocation in WriteAsOctal * Improve handling of octal * Avoid allocation for version string * Removing boxing and char string allocation in GenerateExtendedAttributeName * Fix a couple unnecessary dictionary lookups * Replace Enum.HasFlag usage * Remove allocations from Write{Posix}Name * Replace ArrayPool use with string.Create * Replace more superfluous ArrayPool usage * Remove ArrayPool use from System.IO.Compression.ZipFile * Fix inverted condition * Use generic math to parse octal * Remove allocations from StringReader and string.Split * Remove magic string allocation for Ustar when not V7 * Remove file name and directory name allocation in GenerateExtendedAttributeName
Configuration menu - View commit details
-
Copy full SHA for 987d39f - Browse repository at this point
Copy the full SHA 987d39fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2a3bb36 - Browse repository at this point
Copy the full SHA 2a3bb36View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2427e68 - Browse repository at this point
Copy the full SHA 2427e68View commit details -
Fix a few Tar issues post perf improvements (dotnet#74338)
* Fix a few Tar issues post perf improvements * Update src/libraries/System.Formats.Tar/src/System/Formats/Tar/TarHeader.Write.cs
Configuration menu - View commit details
-
Copy full SHA for c3ad6b6 - Browse repository at this point
Copy the full SHA c3ad6b6View commit details -
Skip directory symlink recursion on TarFile archive creation (dotnet#…
…74376) * Skip directory symlink recursion on TarFile archive creation * Add symlink verification * Address suggestions by danmoseley Co-authored-by: carlossanlop <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for cfc40ca - Browse repository at this point
Copy the full SHA cfc40caView commit details -
Configuration menu - View commit details
-
Copy full SHA for ce05de7 - Browse repository at this point
Copy the full SHA ce05de7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 149337c - Browse repository at this point
Copy the full SHA 149337cView commit details -
Add tests for exotic external tar asset archives, fix some more corne…
…r case bugs (dotnet#74412) * Remove unused _readFirstEntry. Remnant from before we created PaxGlobalExtendedAttributesEntry. * Set the position of the freshly copied data stream to 0, so the first user access of the DataStream property gives them a stream ready to read from the beginning. * Process a PAX actual entry's data block only after the extended attributes are analyzed, in case the size is found as an extended attribute and needs to be overriden. * Add tests to verify the entries of the new external tar assets can be read. Verify their DataStream if available. * Add copyData argument to recent alignment padding tests. * Throw an exception sooner and with a clearer message when a data section is unexpected for the entry type. * Allow trailing nulls and spaces in octal fields. Co-authored-by: @am11 Adeel Mujahid <[email protected]> * Throw a clearer exception if the unsupported sparse file entry type is encountered. These entries have additional data that indicates the locations of sparse bytes, which cannot be read with just the size field. So to avoid accidentally offseting the reader, we throw. * Tests. * Rename to TrimLeadingNullsAndSpaces Co-authored-by: carlossanlop <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for d370161 - Browse repository at this point
Copy the full SHA d370161View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6945d4e - Browse repository at this point
Copy the full SHA 6945d4eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 550c0ae - Browse repository at this point
Copy the full SHA 550c0aeView commit details