| 1 | // SPDX-License-Identifier: 0BSD |
| 2 | // SPDX-FileCopyrightText: The XZ for Java authors and contributors |
| 3 | // SPDX-FileContributor: Lasse Collin <[email protected]> |
| 4 | |
| 5 | package org.tukaani.xz; |
| 6 | |
| 7 | /** |
| 8 | * XZ constants. |
| 9 | */ |
| 10 | public class XZ { |
| 11 | /** |
| 12 | * XZ Header Magic Bytes begin a XZ file. |
| 13 | * This can be useful to detect XZ compressed data. |
| 14 | */ |
| 15 | public static final byte[] HEADER_MAGIC = { |
| 16 | (byte)0xFD, '7', 'z', 'X', 'Z', '\0' }; |
| 17 | |
| 18 | /** |
| 19 | * XZ Footer Magic Bytes are the last bytes of a XZ Stream. |
| 20 | */ |
| 21 | public static final byte[] FOOTER_MAGIC = { 'Y', 'Z' }; |
| 22 | |
| 23 | /** |
| 24 | * Integrity check ID indicating that no integrity check is calculated. |
| 25 | * <p> |
| 26 | * Omitting the integrity check is strongly discouraged except when |
| 27 | * the integrity of the data will be verified by other means anyway, |
| 28 | * and calculating the check twice would be useless. |
| 29 | */ |
| 30 | public static final int CHECK_NONE = 0; |
| 31 | |
| 32 | /** |
| 33 | * Integrity check ID for CRC32. |
| 34 | */ |
| 35 | public static final int CHECK_CRC32 = 1; |
| 36 | |
| 37 | /** |
| 38 | * Integrity check ID for CRC64. |
| 39 | */ |
| 40 | public static final int CHECK_CRC64 = 4; |
| 41 | |
| 42 | /** |
| 43 | * Integrity check ID for SHA-256. |
| 44 | */ |
| 45 | public static final int CHECK_SHA256 = 10; |
| 46 | |
| 47 | private XZ() {} |
| 48 | } |