mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Added support for ziso extensions to ISO9660.
This commit is contained in:
@@ -59,6 +59,10 @@ namespace DiscImageChef.Filesystems.ISO9660
|
||||
const ushort RRIP_RelocatedDir = 0x5245; // "RE"
|
||||
const ushort RRIP_Timestamps = 0x5446; // "TF"
|
||||
const ushort RRIP_Sparse = 0x5346; // "SF"
|
||||
const ulong ziso_header_magic = 0x37E45396C9DBD607;
|
||||
const ulong ziso_header_cigam = 0x07D6DBC99653E437;
|
||||
const ushort ziso_Magic = 0x5A46; // "ZF"
|
||||
const ushort ziso_PagedZlib = 0x707A; // "pz"
|
||||
|
||||
[Flags]
|
||||
enum FileFlags : byte
|
||||
|
||||
@@ -257,6 +257,7 @@ namespace DiscImageChef.Filesystems.ISO9660
|
||||
bool Apple = false;
|
||||
bool SUSP = false;
|
||||
bool RRIP = false;
|
||||
bool ziso = false;
|
||||
List<ContinuationArea> contareas = new List<ContinuationArea>();
|
||||
List<byte[]> refareas = new List<byte[]>();
|
||||
StringBuilder suspInformation = new StringBuilder();
|
||||
@@ -375,7 +376,9 @@ namespace DiscImageChef.Filesystems.ISO9660
|
||||
nextSignature == RRIP_Name || nextSignature == RRIP_Childlink ||
|
||||
nextSignature == RRIP_Parentlink || nextSignature == RRIP_RelocatedDir ||
|
||||
nextSignature == RRIP_Timestamps || nextSignature == RRIP_Sparse;
|
||||
|
||||
|
||||
ziso |= nextSignature == ziso_Magic;
|
||||
|
||||
sa_off += sa[sa_off + 2];
|
||||
|
||||
if(nextSignature == SUSP_Terminator)
|
||||
@@ -431,6 +434,8 @@ namespace DiscImageChef.Filesystems.ISO9660
|
||||
nextSignature == RRIP_Parentlink || nextSignature == RRIP_RelocatedDir ||
|
||||
nextSignature == RRIP_Timestamps || nextSignature == RRIP_Sparse;
|
||||
|
||||
ziso |= nextSignature == ziso_Magic;
|
||||
|
||||
ca_off += ca_data[ca_off + 2];
|
||||
}
|
||||
}
|
||||
@@ -472,6 +477,8 @@ namespace DiscImageChef.Filesystems.ISO9660
|
||||
ISOMetadata.AppendLine("System Use Sharing Protocol present.");
|
||||
if(RRIP)
|
||||
ISOMetadata.AppendLine("Rock Ridge Interchange Protocol present.");
|
||||
if(ziso)
|
||||
ISOMetadata.AppendLine("zisofs compression present.");
|
||||
if(bvd != null)
|
||||
ISOMetadata.AppendFormat("Disc bootable following {0} specifications.", BootSpec).AppendLine();
|
||||
if(SegaCD != null)
|
||||
|
||||
@@ -609,6 +609,29 @@ namespace DiscImageChef.Filesystems.ISO9660
|
||||
public byte table_depth;
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
struct ZisofsHeader
|
||||
{
|
||||
public ulong magic;
|
||||
public uint uncomp_len;
|
||||
public uint uncomp_len_be;
|
||||
public byte header_size; // Shifted >> 2
|
||||
public byte block_size_log; // log2(block_size)
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
struct ZisofsEntry
|
||||
{
|
||||
public ushort signature;
|
||||
public byte length;
|
||||
public byte version;
|
||||
public ushort alogirhtm;
|
||||
public byte header_size; // Shifted >> 2
|
||||
public byte block_size_log; // log2(block_size)
|
||||
public uint uncomp_len;
|
||||
public uint uncomp_len_be;
|
||||
}
|
||||
|
||||
struct DecodedVolumeDescriptor
|
||||
{
|
||||
public string SystemIdentifier;
|
||||
|
||||
Reference in New Issue
Block a user