41 lines
933 B
C
Raw Normal View History

2022-05-21 19:58:09 +02:00
#pragma once
#include <cstdint>
#include "StringBase.h"
namespace Compression
{
// Compression method enumeration
enum class ZipCompressionMethod : uint16_t
{
// Uncompressed storage
Store = 0,
// Deflate compression method
Deflate = 8
};
// Represents an entry in the ZipArchive
struct ZipEntry
{
// Compression method
ZipCompressionMethod Method;
// Full path and filename as stored in ZipArchive
String FileNameInZip;
2022-05-21 19:58:09 +02:00
// Original file size
uint64_t FileSize;
// Compressed file size
uint64_t CompressedSize;
// Offset of header information in the ZipArchive
uint64_t HeaderOffset;
// Offset of file inside the ZipArchive
uint64_t FileOffset;
// Size of the header information
uint32_t HeaderSize;
// The CRC32 checksum of the entire file
uint32_t Crc32;
// User comment for the file
String Comment;
2022-05-21 19:58:09 +02:00
// True if UTF8 encoding for filename and comments
bool EncodeUTF8;
};
}