This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-compress.git
The following commit(s) were added to refs/heads/master by this push: new 6c297c1 Documentation nits (#217) 6c297c1 is described below commit 6c297c1117e7fc1a4cbcd3dcae079101b71e01b1 Author: Helder Magalhães <helder.magalh...@gmail.com> AuthorDate: Sun Dec 26 16:12:30 2021 +0000 Documentation nits (#217) * whitespace improvement tabs to spaces and reduce padding for consistency with other structures documentation. * site minor improvements formatting (CDATA vs. entities for consistency; few keywords as code); move Git to top as it's the most up-to-date; fix Git case as it's not an acronym * spelling and grammar check typos, grammar and a missing reference to version 1.21 * site spelling check overall spelling check on the site-specific files. * address review comment by PeterAlfredLee --- .../compress/archivers/tar/TarArchiveEntry.java | 40 +++++++++++----------- src/site/site.xml | 2 +- src/site/xdoc/examples.xml | 16 ++++----- src/site/xdoc/index.xml | 12 +++---- src/site/xdoc/limitations.xml | 2 +- src/site/xdoc/mail-lists.xml | 2 +- src/site/xdoc/security-reports.xml | 2 +- src/site/xdoc/tar.xml | 8 ++--- src/site/xdoc/zip.xml | 8 ++--- 9 files changed, 46 insertions(+), 46 deletions(-) diff --git a/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveEntry.java b/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveEntry.java index b547e30..6b7c47d 100644 --- a/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveEntry.java +++ b/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveEntry.java @@ -134,26 +134,26 @@ import org.apache.commons.compress.utils.IOUtils; * The C structure for a xstar (Jörg Schilling star) Tar Entry's header is: * <pre> * struct star_header { - * char name[100]; // offset 0 - * char mode[8]; // offset 100 - * char uid[8]; // offset 108 - * char gid[8]; // offset 116 - * char size[12]; // offset 124 - * char mtime[12]; // offset 136 - * char chksum[8]; // offset 148 - * char typeflag; // offset 156 - * char linkname[100]; // offset 157 - * char magic[6]; // offset 257 - * char version[2]; // offset 263 - * char uname[32]; // offset 265 - * char gname[32]; // offset 297 - * char devmajor[8]; // offset 329 - * char devminor[8]; // offset 337 - * char prefix[131]; // offset 345 - * char atime[12]; // offset 476 - * char ctime[12]; // offset 488 - * char mfill[8]; // offset 500 - * char xmagic[4]; // offset 508 "tar" + * char name[100]; // offset 0 + * char mode[8]; // offset 100 + * char uid[8]; // offset 108 + * char gid[8]; // offset 116 + * char size[12]; // offset 124 + * char mtime[12]; // offset 136 + * char chksum[8]; // offset 148 + * char typeflag; // offset 156 + * char linkname[100]; // offset 157 + * char magic[6]; // offset 257 + * char version[2]; // offset 263 + * char uname[32]; // offset 265 + * char gname[32]; // offset 297 + * char devmajor[8]; // offset 329 + * char devminor[8]; // offset 337 + * char prefix[131]; // offset 345 + * char atime[12]; // offset 476 + * char ctime[12]; // offset 488 + * char mfill[8]; // offset 500 + * char xmagic[4]; // offset 508 "tar" * }; * </pre> * <p>which is identical to new-style POSIX up to the first 130 bytes of the prefix.</p> diff --git a/src/site/site.xml b/src/site/site.xml index d76013b..ec1fbd7 100644 --- a/src/site/site.xml +++ b/src/site/site.xml @@ -37,6 +37,7 @@ <item name="Wiki" href="https://wiki.apache.org/commons/Compress"/> </menu> <menu name="API Docs"> + <item name="Git latest" href="apidocs/index.html"/> <item name="Latest release" href="javadocs/api-release/index.html"/> <item name="1.21" href="javadocs/api-1.21/index.html"/> <item name="1.20" href="javadocs/api-1.20/index.html"/> @@ -56,7 +57,6 @@ <item name="1.8" href="javadocs/api-1.8/index.html"/> <item name="1.7" href="javadocs/api-1.7/index.html"/> <item name="1.6" href="javadocs/api-1.6/index.html"/> - <item name="GIT latest" href="apidocs/index.html"/> </menu> </body> diff --git a/src/site/xdoc/examples.xml b/src/site/xdoc/examples.xml index be9df24..187036b 100644 --- a/src/site/xdoc/examples.xml +++ b/src/site/xdoc/examples.xml @@ -99,7 +99,7 @@ CompressorInputStream input = new CompressorStreamFactory() XZ and LZMA compressed streams.</p> <p>Since Compress 1.19 <code>SevenZFile</code> also has an optional constructor to pass an upper memory limit which is supported - are LZMA compressed streams. Since Compress 1.21 this setting + in LZMA compressed streams. Since Compress 1.21 this setting also is taken into account when reading the metadata of an archive.</p> <p>For the Snappy and LZ4 formats the amount of memory used during compression is directly proportional to the window @@ -331,7 +331,7 @@ try (OutputStream fo = Files.newOutputStream(Paths.get("my.tar.gz")); only the dictionary size used for LZMA2 can be read.</p> <p>Currently solid compression - compressing multiple files - as a single block to benefit from patterns repeating accross + as a single block to benefit from patterns repeating across files - is only supported when reading archives. This also means compression ratio will likely be worse when using Commons Compress compared to the native 7z executable.</p> @@ -347,7 +347,7 @@ try (OutputStream fo = Files.newOutputStream(Paths.get("my.tar.gz")); entries. The native 7zip tools derive a default name from the name of the archive itself for such entries. Starting with Compress 1.19 <code>SevenZFile</code> has an option to mimic - this behavior, but by default unnanmed archive entries will + this behavior, but by default unnamed archive entries will return <code>null</code> from <code>SevenZArchiveEntry#getName</code>.</p> @@ -563,7 +563,7 @@ LOOP UNTIL entry.getSize() HAS BEEN READ { <p>Traditionally CPIO archives are written in blocks of 512 bytes - the block size is a configuration parameter of the - <code>Cpio*Stream</code>'s constuctors. Starting with version + <code>Cpio*Stream</code>'s constructors. Starting with version 1.5 <code>CpioArchiveInputStream</code> will consume the padding written to fill the current block when the end of the archive is reached. Unfortunately many CPIO implementations @@ -727,7 +727,7 @@ inputStream.read() // read data from the input stream A simple implementation to create a zip file might look like this: -<source> +<source><![CDATA[ public class ScatterSample { ParallelScatterZipCreator scatterZipCreator = new ParallelScatterZipCreator(); @@ -737,7 +737,7 @@ public class ScatterSample { } public void addEntry(ZipArchiveEntry zipArchiveEntry, InputStreamSupplier streamSupplier) throws IOException { - if (zipArchiveEntry.isDirectory() && !zipArchiveEntry.isUnixSymlink()) + if (zipArchiveEntry.isDirectory() && !zipArchiveEntry.isUnixSymlink()) dirs.addArchiveEntry(ZipArchiveEntryRequest.createZipArchiveEntryRequest(zipArchiveEntry, streamSupplier)); else scatterZipCreator.addArchiveEntry( zipArchiveEntry, streamSupplier); @@ -750,7 +750,7 @@ public class ScatterSample { scatterZipCreator.writeTo(zipArchiveOutputStream); } } -</source> +]]></source> </subsection> </section> @@ -1139,7 +1139,7 @@ in.close(); check whether the XZ for Java library is available. Starting with Compress 1.9 the result of this check will be cached unless Compress finds OSGi classes in its classpath. You can - use <code>XZUtils#setCacheXZAvailability</code> to overrride + use <code>XZUtils#setCacheXZAvailability</code> to override this default behavior.</p> <p>Uncompressing a given XZ compressed file (you would diff --git a/src/site/xdoc/index.xml b/src/site/xdoc/index.xml index 0beaa0d..539a991 100644 --- a/src/site/xdoc/index.xml +++ b/src/site/xdoc/index.xml @@ -99,10 +99,10 @@ <subsection name="What's new in 1.18?"> <ul> <li>The CPIO package now properly handles file names - using a mult-byte encoding.</li> + using a multi-byte encoding.</li> <li>ZipArchiveInputStream can now deal with APK files containing an APK signing block.</li> - <li>It is no possible to specifiy various parameters + <li>It is no possible to specify various parameters for Zstd output.</li> </ul> </subsection> @@ -124,7 +124,7 @@ <ul> <li>Support for Zstandard compression.</li> <li>Read-only support for DEFLATE64 compression as - stand-alone CompressorInputStream and as method used in + stand-alone <code>CompressorInputStream</code> and as method used in ZIP and 7z archives.</li> </ul> </subsection> @@ -150,13 +150,13 @@ <li>The 7z package as well as <code>ZipArchiveOutputStream</code> and <code>ZipFile</code> can now use - <code>SeekableByteChannel</code> when random acces is + <code>SeekableByteChannel</code> when random access is needed. This allows archives to be read from inputs and written to outputs that are seekable but are not represented by <code>File</code>s.</li> <li>It is now possible to add Compressor- and - ArchiverStream implementations using the JDK's - ServiceLoader mechanism. Please see + <code>ArchiverStream</code> implementations using the JDK's + <code>ServiceLoader</code> mechanism. Please see <a href="examples.html#Extending_Commons_Compress">Extending Commons Compress</a>.</li> <li>Added support for writing the legacy LZMA format as compressor stream and inside 7z archives - this requires diff --git a/src/site/xdoc/limitations.xml b/src/site/xdoc/limitations.xml index c92a195..92d40ca 100644 --- a/src/site/xdoc/limitations.xml +++ b/src/site/xdoc/limitations.xml @@ -161,7 +161,7 @@ </section> <section name="PACK200"> <ul> - <li><p>Pack200 support in Commons Comppress prior to 1.21 relies on the + <li><p>Pack200 support in Commons Compress prior to 1.21 relies on the <code>Pack200</code> class of the Java classlib. Java 14 removed support and thus Pack200 will not work at all when running on Java 14 or later.</p> diff --git a/src/site/xdoc/mail-lists.xml b/src/site/xdoc/mail-lists.xml index 8ac21a8..a249a09 100644 --- a/src/site/xdoc/mail-lists.xml +++ b/src/site/xdoc/mail-lists.xml @@ -152,7 +152,7 @@ limitations under the License. <td> <strong>Commons Commits List</strong> <br /><br /> - Only for e-mails automatically generated by the <a href="source-repository.html">source control</a> sytem. + Only for e-mails automatically generated by the <a href="source-repository.html">source control</a> system. <br /><br /> </td> <td><a href="mailto:commits-subscr...@commons.apache.org">Subscribe</a></td> diff --git a/src/site/xdoc/security-reports.xml b/src/site/xdoc/security-reports.xml index 0689ff4..95dd590 100644 --- a/src/site/xdoc/security-reports.xml +++ b/src/site/xdoc/security-reports.xml @@ -245,7 +245,7 @@ </subsection> </section> - <section name="Errors and Ommissions"> + <section name="Errors and Omissions"> <p>Please report any errors or omissions to <a href="mail-lists.html">the dev mailing list</a>.</p> </section> diff --git a/src/site/xdoc/tar.xml b/src/site/xdoc/tar.xml index 79a6943..3a3210d 100644 --- a/src/site/xdoc/tar.xml +++ b/src/site/xdoc/tar.xml @@ -56,7 +56,7 @@ file is added. This is the default.</li> <li><code>LONGFILE_TRUNCATE</code>: truncate such names.</li> <li><code>LONGFILE_GNU</code>: use a GNU tar variant now - refered to as "oldgnu" of storing such names. If you choose + referred to as "oldgnu" of storing such names. If you choose the GNU tar option, the archive can not be extracted using many other tar implementations like the ones of OpenBSD, Solaris or MacOS X.</li> @@ -129,14 +129,14 @@ <p>Prior to Commons Compress 1.20 <code>TarArchiveInputStream</code> would recognize sparse file entries stored using the "oldgnu" format (<code>--sparse-version=0.0</code> in GNU tar) but not - able to extract them correctly. Starting with Commons Compress + able to extract them correctly. Starting with Commons Compress 1.20 all GNU and POSIX variants of sparse files are recognized and - can be raed.</p> + can be read.</p> </subsection> <subsection name="Consuming Archives Completely"> - <p>The end of a tar archive is signalled by two consecutive + <p>The end of a tar archive is signaled by two consecutive records of all zeros. Unfortunately not all tar implementations adhere to this and some only write one record to end the archive. Commons Compress will always write two diff --git a/src/site/xdoc/zip.xml b/src/site/xdoc/zip.xml index 1fd80ac..71f4340 100644 --- a/src/site/xdoc/zip.xml +++ b/src/site/xdoc/zip.xml @@ -129,7 +129,7 @@ <p>The constructor accepting a <code>File</code> and a size is used exclusively for creating a split ZIP archive and is - described in th next section. For the remainder of this + described in the next section. For the remainder of this section this constructor is equivalent to the one using the <code>OutputStream</code> argument and thus it is not possible to add uncompressed entries of unknown size.</p> @@ -174,7 +174,7 @@ accepts a <code>File</code> argument and a size. The size determines the maximum size of a split segment - the size must be between 64kB and 4GB. While creating the archive, this will - create several files fillowing the naming convention described + create several files following the naming convention described above. The name of the <code>File</code> argument used inside of the constructor must use the extension <code>zip</code>.</p> @@ -268,7 +268,7 @@ an option <code>createUnicodeExtraFields</code> which makes it write these extra fields either for all entries ("always") or only those whose name cannot be encoded using - the specified encoding (not-encodeable), it defaults to + the specified encoding (not-encodable), it defaults to "never" since the extra fields create bigger archives.</p> <p>The fallbackToUTF8 attribute @@ -455,7 +455,7 @@ <p>If <code>ZipArchiveOutputStream</code> is writing to a non-seekable stream it has to decide whether to use Zip64 - extensions or not before it starts wrtiting the entry data. + extensions or not before it starts writing the entry data. This means that if the size of the entry is unknown when <code>putArchiveEntry</code> is called it doesn't have anything to base the decision on. By default it will not