[ARC] Added structures.

This commit is contained in:
2025-09-01 03:52:46 +01:00
parent 28f6643870
commit 01e1a5605a
4 changed files with 85 additions and 1 deletions

View File

@@ -2,6 +2,7 @@
xmlns:s="clr-namespace:System;assembly=mscorlib"
xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xml:space="preserve">
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=localization/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=arc/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=localization/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=symbian/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=zoo/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>

View File

@@ -0,0 +1,7 @@
namespace Aaru.Archives;
public partial class Arc
{
const byte MARKER = 0x1A;
const byte FNLEN = 13;
}

View File

@@ -0,0 +1,52 @@
namespace Aaru.Archives;
public partial class Arc
{
#region ArchiveInformationType enum
public enum ArchiveInformationType : byte
{
Description = 0,
Creator = 1,
Modifier = 2
}
#endregion
#region FileInformationType enum
public enum FileInformationType : byte
{
Description = 0,
LongName = 1,
ExtendedDates = 2,
Icon = 3,
Attributes = 4
}
#endregion
#region Method enum
public enum Method : byte
{
EndOfArchive = 0,
UnpackedOld = 1,
Unpacked = 2,
Pack = 3,
Squeeze = 4,
CrunchOld = 5,
Crunch = 6,
CrunchFastHash = 7,
CrunchDynamic = 8,
Squash = 9,
Crush = 10,
Distill = 11,
ArchiveInformation = 20,
FileInformation = 21,
Subdirectory = 30,
SubdirectoryEnd = 31
}
#endregion
}

View File

@@ -0,0 +1,24 @@
using System.Runtime.InteropServices;
namespace Aaru.Archives;
public partial class Arc
{
#region Nested type: Header
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
readonly struct Header
{
public readonly byte marker;
public readonly byte method;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = FNLEN)]
public readonly byte[] filename;
public readonly int compressed;
public readonly ushort date;
public readonly ushort time;
public readonly ushort crc;
public readonly int uncompressed;
}
#endregion
}