2025-09-26 13:06:18 -04:00
|
|
|
namespace SabreTools.Data.Models.PKZIP
|
2025-09-26 10:57:15 -04:00
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// PKZIP local file
|
|
|
|
|
/// </summary>
|
2025-10-30 20:44:16 -04:00
|
|
|
/// <see href="https://petlibrary.tripod.com/ZIP.HTM"/>
|
|
|
|
|
/// <see href="https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT"/>
|
2025-09-26 10:57:15 -04:00
|
|
|
public class LocalFile
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Local file header
|
|
|
|
|
/// </summary>
|
2025-10-31 13:59:28 -04:00
|
|
|
public LocalFileHeader LocalFileHeader { get; set; } = new();
|
2025-09-26 10:57:15 -04:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Encryption header
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// TODO: Determine the model for the encryption headers
|
2025-10-31 13:59:28 -04:00
|
|
|
public byte[] EncryptionHeaders { get; set; } = [];
|
2025-09-26 10:57:15 -04:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// File data, appears after the encryption header
|
|
|
|
|
/// if it exists or after the local file header otherwise
|
|
|
|
|
/// </summary>
|
2025-10-31 13:59:28 -04:00
|
|
|
public byte[] FileData { get; set; } = [];
|
2025-09-26 10:57:15 -04:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Data descriptors, appears after the file data
|
|
|
|
|
/// </summary>
|
2025-10-30 20:44:16 -04:00
|
|
|
/// <remarks>Cannot exist if <see cref="ZIP64DataDescriptor"/> is populated</remarks>
|
2025-09-26 10:57:15 -04:00
|
|
|
public DataDescriptor? DataDescriptor { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// ZIP64 Data descriptors, appears after the file data
|
|
|
|
|
/// </summary>
|
2025-10-30 20:44:16 -04:00
|
|
|
/// <remarks>Cannot exist if <see cref="DataDescriptor"/> is populated</remarks>
|
2025-09-26 10:57:15 -04:00
|
|
|
public DataDescriptor64? ZIP64DataDescriptor { get; set; }
|
|
|
|
|
}
|
|
|
|
|
}
|