mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
[ARC] Added structures.
This commit is contained in:
@@ -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>
|
||||
7
Aaru.Archives/Arc/Consts.cs
Normal file
7
Aaru.Archives/Arc/Consts.cs
Normal file
@@ -0,0 +1,7 @@
|
||||
namespace Aaru.Archives;
|
||||
|
||||
public partial class Arc
|
||||
{
|
||||
const byte MARKER = 0x1A;
|
||||
const byte FNLEN = 13;
|
||||
}
|
||||
52
Aaru.Archives/Arc/Enums.cs
Normal file
52
Aaru.Archives/Arc/Enums.cs
Normal 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
|
||||
}
|
||||
24
Aaru.Archives/Arc/Structs.cs
Normal file
24
Aaru.Archives/Arc/Structs.cs
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user