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