Files
SabreTools.Models/PKZIP/OpenVMSExtraField.cs
2024-04-28 01:11:27 -04:00

50 lines
1.6 KiB
C#

namespace SabreTools.Models.PKZIP
{
/// <summary>
/// The following is the layout of the OpenVMS attributes
/// "extra" block.
///
/// OpenVMS Extra Field Rules:
///
/// - There will be one or more attributes present, which
/// will each be preceded by the above TagX & SizeX values.
/// These values are identical to the ATR$C_XXXX and ATR$S_XXXX
/// constants which are defined in ATR.H under OpenVMS C. Neither
/// of these values will ever be zero.
///
/// - No word alignment or padding is performed.
///
/// - A well-behaved PKZIP/OpenVMS program SHOULD NOT produce
/// more than one sub-block with the same TagX value. Also, there MUST
/// NOT be more than one "extra" block of type 0x000c in a particular
/// directory record.
/// </summary>
/// <remarks>Header ID = 0x000C</remarks>
/// <see href="https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT"/>
public class OpenVMSExtraField : ExtensibleDataField
{
/// <summary>
/// 32-bit CRC for remainder of the block
/// </summary>
public uint CRC { get; set; }
#region Tags, Interleaved
/// <summary>
/// OpenVMS attribute tag values
/// </summary>
public ushort[]? Tags { get; set; }
/// <summary>
/// Size of attributes, in bytes
/// </summary>
public ushort[]? Size { get; set; }
/// <summary>
/// Attribute data
/// </summary>
public byte[]? Vars { get; set; }
#endregion
}
}