Welcome to mirror list, hosted at ThFree Co, Russian Federation.

LzhCRC.h « Lzh « Archive « 7zip « CPP - github.com/kornelski/7z.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: be2a45698fa76531d9e636384193dc8235cf6887 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// LzhCRC.h

#ifndef __LZH_CRC_H
#define __LZH_CRC_H

#include <stddef.h>
#include "Common/Types.h"

namespace NArchive {
namespace NLzh {

class CCRC
{
  UInt16 _value;
public:
  static UInt16 Table[256];
  static void InitTable();
  
  CCRC():  _value(0){};
  void Init() { _value = 0; }
  void Update(const void *data, size_t size);
  UInt16 GetDigest() const { return _value; }
};

}}

#endif