Lhaz
slide.h
[詳解]
1 /****************************************************************************/
2 /* スライド辞書法クラス */
3 /****************************************************************************/
4 #ifndef _SLIDE_H
5 #define _SLIDE_H
6 
7 #include <windows.h>
8 #include <stdio.h>
9 #include "lhazdef.h"
10 #include "lha_macro.h"
11 
12 class MYFILE;
13 
14 #define HSHSIZ (1UL << 15)
15 #define LIMIT 0x100
16 
17 extern ULONGLONG lhaz_buf_size;
18 extern uchar* lhaz_buf;
19 extern ULONGLONG lhaz_p;
20 
21 class SLIDE {
22 public:
23  //
24  static LONGLONG Count;
25  //
26  SLIDE(HWND hwnd, MYFILE& infile, MYFILE& outfile, LONGLONG origsize, LONGLONG compsize, int dicbit, int method, bool verify);
27  ‾SLIDE(void);
28  //
29  LONGLONG GetCompsize(void) { return Compsize; };
30  LONGLONG GetOrigsize(void) { return Origsize; };
31  ushort Decode(void);
32  int Encode(void);
33 
34 private:
35  static const ULONGLONG LHAZ_BUF_SIZE;
36  static const LONGLONG NIL;
37  //
38  HWND LhazWnd;
40  MYFILE& Infile;
41  MYFILE& Outfile;
42  LONGLONG Origsize;
43  LONGLONG Compsize;
44  int Dicbit;
45  int Method;
47  bool Verify;
49  //
50  // デコード用
51  void get_init(ULONGLONG size);
52  void get_end(void);
53  void fwrite_crc(uchar* p, int n, MYFILE& fp);
54  void fatal_error(char* msg);
55  //
56  // エンコード用
57  LONGLONG* Hash;
60  LONGLONG* Prev;
61  LONGLONG Remainder;
62  LONGLONG Encoded_origsize;
63  LONGLONG Matchlen;
64  LONGLONG Pos;
66  LONGLONG Matchpos;
67  void init_slide(void);
68  int encode_alloc(int method);
69  void encode_free(void);
70  void insert(void);
71  void get_next(void);
72  void match_insert(void);
73  void update(void);
74 
75 private:
76  SLIDE& operator=(const SLIDE&);
77 
78 };
79 
80 #endif
‾SLIDE(void)
Definition: slide.cpp:47
void encode_free(void)
Definition: slide.cpp:293
static LONGLONG Count
Definition: slide.h:24
LONGLONG Encoded_origsize
Definition: slide.h:62
LONGLONG * Prev
Definition: slide.h:60
void match_insert(void)
Definition: slide.cpp:225
LONGLONG Pos
Definition: slide.h:64
int Method
Definition: slide.h:45
unsigned int uint
Definition: lhazdef.h:6
void insert(void)
Definition: slide.cpp:205
uchar * TooFlag
Definition: slide.h:58
uchar * Text
Definition: slide.h:46
int Dicbit
Definition: slide.h:44
unsigned long ulong
Definition: lhazdef.h:7
ushort Crc
Definition: slide.h:48
Definition: slide.h:21
and that you are informed that you can do these things To protect your we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it For if you distribute copies of the whether gratis or for a you must give the recipients all the rights that we gave you You must make sure that receive or can get the source code If you link other code with the you must provide complete object files to the so that they can relink them with the library after making changes to the library and recompiling it And you must show them these terms so they know their rights We protect your rights with a two step method
Definition: copying.txt:35
static const ULONGLONG LHAZ_BUF_SIZE
Definition: slide.h:35
unsigned short ushort
Definition: lhazdef.h:5
void get_end(void)
Definition: slide.cpp:83
MYFILE & Infile
Definition: slide.h:40
LONGLONG Matchpos
Definition: slide.h:66
LONGLONG Origsize
Definition: slide.h:42
int encode_alloc(int method)
Definition: slide.cpp:176
void get_init(ULONGLONG size)
Definition: slide.cpp:54
ulong Dicsiz
Definition: slide.h:39
uint Txtsiz
Definition: slide.h:59
ushort Decode(void)
Definition: slide.cpp:112
LONGLONG Compsize
Definition: slide.h:43
void init_slide(void)
Definition: slide.cpp:165
void get_next(void)
Definition: slide.cpp:214
LONGLONG GetOrigsize(void)
Definition: slide.h:30
uchar * lhaz_buf
Definition: crcio.cpp:24
void update(void)
Definition: slide.cpp:270
LONGLONG Remainder
Definition: slide.h:61
static const LONGLONG NIL
Definition: slide.h:36
void fatal_error(char *msg)
Definition: slide.cpp:91
void fwrite_crc(uchar *p, int n, MYFILE &fp)
Definition: slide.cpp:100
uint Hval
Definition: slide.h:65
HWND LhazWnd
Definition: slide.h:38
LONGLONG GetCompsize(void)
Definition: slide.h:29
SLIDE(HWND hwnd, MYFILE &infile, MYFILE &outfile, LONGLONG origsize, LONGLONG compsize, int dicbit, int method, bool verify)
Definition: slide.cpp:28
ULONGLONG lhaz_p
Definition: crcio.cpp:25
ULONGLONG lhaz_buf_size
Definition: crcio.cpp:26
int Encode(void)
Definition: slide.cpp:309
LONGLONG * Hash
Definition: slide.h:57
LONGLONG Matchlen
Definition: slide.h:63
unsigned char uchar
Definition: lhazdef.h:4
SLIDE & operator=(const SLIDE &)
MYFILE & Outfile
Definition: slide.h:41
bool Verify
Definition: slide.h:47