2019-03-16 17:40:39 +00:00
|
|
|
// /***************************************************************************
|
2020-03-01 19:50:12 +00:00
|
|
|
// Aaru Data Preservation Suite
|
2019-03-16 17:40:39 +00:00
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
//
|
|
|
|
|
// Filename : consts.h
|
|
|
|
|
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
|
|
|
|
//
|
2020-03-01 19:51:13 +00:00
|
|
|
// Component : libaaruformat.
|
2019-03-16 17:40:39 +00:00
|
|
|
//
|
|
|
|
|
// --[ Description ] ----------------------------------------------------------
|
|
|
|
|
//
|
2020-03-01 19:55:50 +00:00
|
|
|
// Contains constants for Aaru format disk images.
|
2019-03-16 17:40:39 +00:00
|
|
|
//
|
|
|
|
|
// --[ License ] --------------------------------------------------------------
|
|
|
|
|
//
|
|
|
|
|
// This library is free software; you can redistribute it and/or modify
|
|
|
|
|
// it under the terms of the GNU Lesser General Public License as
|
|
|
|
|
// published by the Free Software Foundation; either version 2.1 of the
|
|
|
|
|
// License, or (at your option) any later version.
|
|
|
|
|
//
|
|
|
|
|
// This library is distributed in the hope that it will be useful, but
|
|
|
|
|
// WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
|
// Lesser General Public License for more details.
|
|
|
|
|
//
|
|
|
|
|
// You should have received a copy of the GNU Lesser General Public
|
|
|
|
|
// License along with this library; if not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
//
|
|
|
|
|
// ----------------------------------------------------------------------------
|
2022-05-28 12:32:22 +01:00
|
|
|
// Copyright © 2011-2022 Natalia Portillo
|
2019-03-16 17:40:39 +00:00
|
|
|
// ****************************************************************************/
|
|
|
|
|
|
2019-03-16 18:18:38 +00:00
|
|
|
#pragma clang diagnostic push
|
2020-03-01 19:53:05 +00:00
|
|
|
#pragma ide diagnostic ignored "OCUnusedMacroInspection"
|
|
|
|
|
#ifndef LIBAARUFORMAT_CONSTS_H
|
|
|
|
|
#define LIBAARUFORMAT_CONSTS_H
|
2019-03-16 17:40:39 +00:00
|
|
|
|
2020-03-01 19:58:09 +00:00
|
|
|
/** Magic identidier = "DICMFRMT". */
|
2019-03-17 18:37:45 +00:00
|
|
|
#define DIC_MAGIC 0x544D52464D434944
|
2020-03-01 19:58:09 +00:00
|
|
|
/** Magic identidier = "AARUFRMT". */
|
|
|
|
|
#define AARU_MAGIC 0x544D524655524141
|
2019-03-31 20:52:06 +01:00
|
|
|
/** Image format version. A change in this number indicates an incompatible change to the format that prevents older
|
|
|
|
|
* implementations from reading it correctly, if at all. */
|
2020-03-01 19:53:05 +00:00
|
|
|
#define AARUF_VERSION 1
|
2019-03-16 17:51:33 +00:00
|
|
|
/** Maximum read cache size, 256MiB. */
|
2019-03-17 18:37:45 +00:00
|
|
|
#define MAX_CACHE_SIZE 256 * 1024 * 1024
|
2019-03-16 17:51:33 +00:00
|
|
|
/** Size in bytes of LZMA properties. */
|
2019-03-17 18:37:45 +00:00
|
|
|
#define LZMA_PROPERTIES_LENGTH 5
|
2019-03-16 17:51:33 +00:00
|
|
|
/** Maximum number of entries for the DDT cache. */
|
2019-03-17 18:37:45 +00:00
|
|
|
#define MAX_DDT_ENTRY_CACHE 16000000
|
2019-03-16 17:51:33 +00:00
|
|
|
/** How many samples are contained in a RedBook sector. */
|
2019-03-17 18:37:45 +00:00
|
|
|
#define SAMPLES_PER_SECTOR 588
|
2019-03-16 17:51:33 +00:00
|
|
|
/** Maximum number of samples for a FLAC block. Bigger than 4608 gives no benefit. */
|
2019-03-17 18:37:45 +00:00
|
|
|
#define MAX_FLAKE_BLOCK 4608
|
2019-03-16 17:51:33 +00:00
|
|
|
/** Minimum number of samples for a FLAC block. CUETools.Codecs.FLAKE does not support it to be smaller than 256. */
|
2019-03-17 18:37:45 +00:00
|
|
|
#define MIN_FLAKE_BLOCK 256
|
2019-03-16 17:51:33 +00:00
|
|
|
/** This mask is to check for flags in CompactDisc suffix/prefix DDT */
|
2019-03-17 18:37:45 +00:00
|
|
|
#define CD_XFIX_MASK 0xFF000000
|
2019-03-16 17:51:33 +00:00
|
|
|
/** This mask is to check for position in CompactDisc suffix/prefix deduplicated block */
|
2019-03-17 18:37:45 +00:00
|
|
|
#define CD_DFIX_MASK 0x00FFFFFF
|
2019-03-16 17:51:33 +00:00
|
|
|
|
2019-03-20 23:41:16 +00:00
|
|
|
#define CRC64_ECMA_POLY 0xC96C5795D7870F42
|
|
|
|
|
#define CRC64_ECMA_SEED 0xFFFFFFFFFFFFFFFF
|
|
|
|
|
|
2020-03-01 19:53:05 +00:00
|
|
|
#endif // LIBAARUFORMAT_CONSTS_H
|
2019-03-16 18:18:38 +00:00
|
|
|
|
|
|
|
|
#pragma clang diagnostic pop
|