Lhaz
lhazzip.h
[詳解]
1 /*==========================================================================*/
2 /* Lhaz ZIP/UNZIPインタフェース lhaz@chitora.jp */
3 /*==========================================================================*/
4 #ifndef _LHAZZIP_H
5 #define _LHAZZIP_H
6 
7 #include <windows.h>
8 #include <stdio.h>
9 #include <vector>
10 #include "lhazarc.h"
11 
12 class LHAZPROCFILE;
13 class MYFILE;
14 class PATH;
15 
16 namespace gui {
17 
18 class LHAZTREEVIEW;
19 
20 } // namespace gui
21 
22 class ARCZIP : public ARCHIVE {
23 public:
24  // 圧縮・解凍用コンストラクタ
25  ARCZIP(HWND hwnd, const WSTR& name, TYPE type);
26  // 閲覧用コンストラクタ
27  ARCZIP(HWND hwnd, const WSTR& name, TYPE type, const WSTR& filter, gui::LHAZTREEVIEW* treeview);
28  // デストラクタ
29  ‾ARCZIP(void);
30  // 全解凍
31  bool Extract(bool verify, const WSTR& temp, const WSTR& password);
32  // 個別解凍
33  bool Extract(const WSTR& temp);
34  // 圧縮
35  bool Compress(int method, int header, const WSTR& pass, const PATH& temp, const std::vector<LHAZPROCFILE>& v);
36  // 個別削除
37  bool Delete(const std::vector<LHAZFILE*>& v);
38  // 書庫判定
39  static bool IsArchiveZip(int size, char* buf);
40  static bool IsArchiveZip(const WSTR& name, bool& enc);
41  //
42  static const char HEADER[4];
43  static const char EOA[4];
44  static const char ENT[4];
45  static const char EN2[4];
46 
47 private:
48  static const TCHAR* METHODS[];
49  static const int EOA_RECORD_SIZE_MAX;
50  //
51  static bool SearchDirEnt(MYFILE& fp, TYPE type, unsigned long& dir_size, int& files);
52 
53 };
54 
56 public:
57  ZIP_DIR_ENTRY(void);
58  ‾ZIP_DIR_ENTRY(void);
59  //
60  bool Get(unsigned char**);
61  bool Get(MYFILE& fp);
62  unsigned short GetFlag(void) { return Flag; }
63  unsigned short GetMethod(void) { return Method; }
64  unsigned long GetDate(void) { return Date; }
65  unsigned long GetCsize(void) { return Csize; }
66  unsigned long GetSize(void) { return Size; }
67  const char* GetName(void) { return Name; }
68  unsigned char GetAtrib(void) { return Atrib; }
69  bool IsUTF8(void) const { return ((Flag & 0x0800) != 0); }
70 
71 private:
72  unsigned short Flag; // 汎用ビットフラグ
73  unsigned short Method; // 形式
74  unsigned long Date; // 日付
75  unsigned long Csize; // 圧縮サイズ
76  unsigned long Size; // サイズ
77  char* Name; // ファイル名
78  unsigned char Atrib; // アトリビュート
79 
80 };
81 
82 #endif // _LHAZZIP_H
XZ Utils and lzmadec command line tools are in the public domain unless GNU getopt_long had to be compiled and linked in from the lib directory The getopt_long code is under GNU LGPLv2 The scripts to and view compressed files have been adapted from gzip These scripts and their documentation are under GNU GPLv2 All the documentation in the doc directory and most of the XZ Utils specific documentation files in other directories are in the public domain Translated messages are in the public domain The build system contains public domain files
Definition: COPYING.txt:3
unsigned short Flag
Definition: lhazzip.h:72
Archive.
TYPE
Definition: lhazarc.h:28
unsigned short GetMethod(void)
Definition: lhazzip.h:63
char * Name
Definition: lhazzip.h:77
unsigned char GetAtrib(void)
Definition: lhazzip.h:68
unsigned long GetDate(void)
Definition: lhazzip.h:64
Definition: lhazarc.h:25
unsigned long Date
Definition: lhazzip.h:74
Definition: lhazbz2.h:17
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
const char * GetName(void)
Definition: lhazzip.h:67
bool IsUTF8(void) const
Definition: lhazzip.h:69
Definition: lhaztreeview.h:18
unsigned long GetSize(void)
Definition: lhazzip.h:66
unsigned char Atrib
Definition: lhazzip.h:78
Definition: lhazzip.h:22
unsigned long Csize
Definition: lhazzip.h:75
機能テストを実施するためのディレクトリです. *概要 Git Bash上で一部またはすべてのテストを自動的に実行することができます. *実行方法 call_test shを実行すると,配下に存在する全てのテストを順次実行します. 各テストケースのtest shを実行すると,そのテストだけが実行されます. call_test sh[-v 2][-a 86][-k][-r][types...] test sh[-v 2][-a 86][-k][types...] v
Definition: README.txt:18
unsigned short Method
Definition: lhazzip.h:73
Definition: lhazprocfile.h:11
static const int EOA_RECORD_SIZE_MAX
Definition: lhazzip.h:49
Definition: lhazzip.h:55
unsigned long Size
Definition: lhazzip.h:76
unsigned short GetFlag(void)
Definition: lhazzip.h:62
unsigned long GetCsize(void)
Definition: lhazzip.h:65