Files
BinaryObjectScanner/BinaryObjectScanner.Compression/MSZIP/State.cs

56 lines
1.4 KiB
C#
Raw Normal View History

2023-03-07 16:59:14 -05:00
using static BinaryObjectScanner.Models.Compression.MSZIP.Constants;
2023-01-02 11:19:06 -08:00
2023-03-07 16:59:14 -05:00
namespace BinaryObjectScanner.Compression.MSZIP
2023-01-02 11:19:06 -08:00
{
/// <see href="https://github.com/wine-mirror/wine/blob/master/dlls/cabinet/cabinet.h"/>
2023-01-03 22:11:57 -08:00
public unsafe class State
2023-01-02 11:19:06 -08:00
{
/// <summary>
/// Current offset within the window
/// </summary>
2023-01-03 22:11:57 -08:00
public uint window_posn;
2023-01-02 11:19:06 -08:00
/// <summary>
/// Bit buffer
/// </summary>
2023-01-03 22:11:57 -08:00
public uint bb;
2023-01-02 11:19:06 -08:00
/// <summary>
/// Bits in bit buffer
/// </summary>
2023-01-03 22:11:57 -08:00
public uint bk;
2023-01-02 11:19:06 -08:00
/// <summary>
/// Literal/length and distance code lengths
/// </summary>
2023-01-03 22:11:57 -08:00
public uint[] ll = new uint[288 + 32];
2023-01-02 11:19:06 -08:00
/// <summary>
/// Bit length count table
/// </summary>
2023-01-03 22:11:57 -08:00
public uint[] c = new uint[ZIPBMAX + 1];
2023-01-02 11:19:06 -08:00
/// <summary>
/// Memory for l[-1..ZIPBMAX-1]
/// </summary>
2023-01-03 22:11:57 -08:00
public int[] lx = new int[ZIPBMAX + 1];
2023-01-02 11:19:06 -08:00
/// <summary>
/// Table stack
/// </summary>
2023-01-03 22:11:57 -08:00
public HuffmanNode*[] u = new HuffmanNode*[ZIPBMAX];
2023-01-02 11:19:06 -08:00
/// <summary>
/// Values in order of bit length
/// </summary>
2023-01-03 22:11:57 -08:00
public uint[] v = new uint[ZIPN_MAX];
2023-01-02 11:19:06 -08:00
/// <summary>
/// Bit offsets, then code stack
/// </summary>
2023-01-03 22:11:57 -08:00
public uint[] x = new uint[ZIPBMAX + 1];
2023-01-02 11:19:06 -08:00
/// <remarks>byte*</remarks>
2023-01-03 22:11:57 -08:00
public byte* inpos;
2023-01-02 11:19:06 -08:00
}
}