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
commit 44dcc3332b9ca31725fc4ac0f16e718a7eebd3fd Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Tue Jan 16 08:34:51 2024 -0500 Javadoc Format --- .../compress/archivers/sevenz/SevenZMethod.java | 44 ++++++++++++++-------- 1 file changed, 28 insertions(+), 16 deletions(-) diff --git a/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZMethod.java b/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZMethod.java index 29cc56b96..9f901142d 100644 --- a/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZMethod.java +++ b/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZMethod.java @@ -20,74 +20,86 @@ import java.util.Arrays; /** * The (partially) supported compression/encryption methods used in 7z archives. - * * <p> - * All methods with a _FILTER suffix are used as preprocessors with the goal of creating a better compression ratio with the compressor that comes next in the - * chain of methods. 7z will in general only allow them to be used together with a "real" compression method but Commons Compress doesn't enforce this. + * All methods with a {@code _FILTER} suffix are used as preprocessors with the goal of creating a better compression ratio with the compressor that comes next + * in the chain of methods. 7z will in general only allow them to be used together with a "real" compression method but Commons Compress doesn't enforce this. * </p> - * * <p> - * The BCJ_ filters work on executable files for the given platform and convert relative addresses to absolute addresses in CALL instructions. This means they - * are only useful when applied to executables of the chosen platform. + * The {@code BCJ_} filters work on executable files for the given platform and convert relative addresses to absolute addresses in CALL instructions. This + * means they are only useful when applied to executables of the chosen platform. * </p> */ public enum SevenZMethod { - /** No compression at all */ + + /** No compression at all. */ COPY(new byte[] { (byte) 0x00 }), - /** LZMA - only supported when reading */ + + /** LZMA - only supported when reading. */ LZMA(new byte[] { (byte) 0x03, (byte) 0x01, (byte) 0x01 }), - /** LZMA2 */ + + /** LZMA2. */ LZMA2(new byte[] { (byte) 0x21 }), - /** Deflate */ + + /** Deflate. */ DEFLATE(new byte[] { (byte) 0x04, (byte) 0x01, (byte) 0x08 }), + /** - * Deflate64 + * Deflate64. * * @since 1.16 */ DEFLATE64(new byte[] { (byte) 0x04, (byte) 0x01, (byte) 0x09 }), - /** BZIP2 */ + + /** BZIP2. */ BZIP2(new byte[] { (byte) 0x04, (byte) 0x02, (byte) 0x02 }), + /** - * AES encryption with a key length of 256 bit using SHA256 for hashes - only supported when reading + * AES encryption with a key length of 256 bit using SHA256 for hashes - only supported when reading. */ AES256SHA256(new byte[] { (byte) 0x06, (byte) 0xf1, (byte) 0x07, (byte) 0x01 }), + /** * BCJ x86 platform version 1. * * @since 1.8 */ BCJ_X86_FILTER(new byte[] { 0x03, 0x03, 0x01, 0x03 }), + /** * BCJ PowerPC platform. * * @since 1.8 */ BCJ_PPC_FILTER(new byte[] { 0x03, 0x03, 0x02, 0x05 }), + /** * BCJ I64 platform. * * @since 1.8 */ BCJ_IA64_FILTER(new byte[] { 0x03, 0x03, 0x04, 0x01 }), + /** * BCJ ARM platform. * * @since 1.8 */ BCJ_ARM_FILTER(new byte[] { 0x03, 0x03, 0x05, 0x01 }), + /** * BCJ ARM Thumb platform. * * @since 1.8 */ BCJ_ARM_THUMB_FILTER(new byte[] { 0x03, 0x03, 0x07, 0x01 }), + /** * BCJ Sparc platform. * * @since 1.8 */ BCJ_SPARC_FILTER(new byte[] { 0x03, 0x03, 0x08, 0x05 }), + /** * Delta filter. * @@ -96,9 +108,9 @@ public enum SevenZMethod { DELTA_FILTER(new byte[] { 0x03 }); static SevenZMethod byId(final byte[] id) { - for (final SevenZMethod m : SevenZMethod.class.getEnumConstants()) { - if (Arrays.equals(m.id, id)) { - return m; + for (final SevenZMethod method : SevenZMethod.class.getEnumConstants()) { + if (Arrays.equals(method.id, id)) { + return method; } } return null;