mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-09-24 16:05:27 +00:00
Add ZStandard frame and dictionary types
Co-authored-by: adamhathcock <527620+adamhathcock@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
namespace SharpCompress.Compressors.ZStandard.Unsafe;
|
||||
|
||||
public enum ZSTD_ResetDirective
|
||||
{
|
||||
ZSTD_reset_session_only = 1,
|
||||
ZSTD_reset_parameters = 2,
|
||||
ZSTD_reset_session_and_parameters = 3,
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
namespace SharpCompress.Compressors.ZStandard.Unsafe;
|
||||
|
||||
public enum ZSTD_dictContentType_e
|
||||
{
|
||||
/// <summary>dictionary is "full" when starting with ZSTD_MAGIC_DICTIONARY, otherwise it is "rawContent"</summary>
|
||||
ZSTD_dct_auto = 0,
|
||||
|
||||
/// <summary>ensures dictionary is always loaded as rawContent, even if it starts with ZSTD_MAGIC_DICTIONARY</summary>
|
||||
ZSTD_dct_rawContent = 1,
|
||||
|
||||
/// <summary>refuses to load a dictionary if it does not respect Zstandard's specification</summary>
|
||||
ZSTD_dct_fullDict = 2,
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace SharpCompress.Compressors.ZStandard.Unsafe;
|
||||
|
||||
public enum ZSTD_dictLoadMethod_e
|
||||
{
|
||||
/// <summary>Copy dictionary content internally</summary>
|
||||
ZSTD_dlm_byCopy = 0,
|
||||
|
||||
/// <summary>Reference dictionary content -- the dictionary buffer must outlive its users</summary>
|
||||
ZSTD_dlm_byRef = 1,
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
namespace SharpCompress.Compressors.ZStandard.Unsafe;
|
||||
|
||||
public struct ZSTD_frameHeader
|
||||
{
|
||||
/// <summary>if == ZSTD_CONTENTSIZE_UNKNOWN, it means this field is not available. 0 means "empty"</summary>
|
||||
public ulong frameContentSize;
|
||||
|
||||
/// <summary>can be very large, up to frameContentSize</summary>
|
||||
public ulong windowSize;
|
||||
public uint blockSizeMax;
|
||||
|
||||
/// <summary>if == ZSTD_skippableFrame, frameContentSize is the size of skippable content</summary>
|
||||
public ZSTD_frameType_e frameType;
|
||||
public uint headerSize;
|
||||
|
||||
/// <summary>for ZSTD_skippableFrame, contains the skippable magic variant [0-15]</summary>
|
||||
public uint dictID;
|
||||
public uint checksumFlag;
|
||||
public uint _reserved1;
|
||||
public uint _reserved2;
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace SharpCompress.Compressors.ZStandard.Unsafe;
|
||||
|
||||
public enum ZSTD_frameType_e
|
||||
{
|
||||
ZSTD_frame,
|
||||
ZSTD_skippableFrame,
|
||||
}
|
||||
Reference in New Issue
Block a user