-
Notifications
You must be signed in to change notification settings - Fork 18.9k
archive/tar: document blocking factor of 1 #78037
Copy link
Copy link
Open
Labels
DocumentationIssues describing a change to documentation.Issues describing a change to documentation.NeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.
Description
The archive/tar package uses a blocking factor of 1 when generating a tar archive.
However, while, I believe, not standard, (almost) everything uses a blocking factor of 20 by default (tested on git bash for windows and ubuntu 22.04) by default, resulting in a quite big file size difference.
Using tape is outdated (and blocking factor is made for this only if I understand correctly), so using 1 is not a problem. However, it can lead to a lot of confusion while comparing tar generated via the tar command (for example) and via go for the following reasons:
- It is said in lot of places that default for most of tar tools is 20 for blocking factor (GNU doc, Wikipedia)
- Blocking factor is never mentionned in the archive/tar docs and (obvisouly) not configurable either
- One may not be familiar at first with the tar format
As a consequence, I propose that the archive/tar docs mention this somewhere, a simple phrase like:
Note that this package uses a blocking factor of 1 <link to blocking factor here ?>
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
DocumentationIssues describing a change to documentation.Issues describing a change to documentation.NeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.