Lhaz
公開型 | 公開メンバ関数 | 非公開メンバ関数 | 非公開変数類 | 静的非公開変数類 | 全メンバ一覧
CLZH クラス

#include <lzh.h>

公開型

enum  METHOD {
  LZHUFF0_METHOD_NUM1, LZHUFF1_METHOD_NUM1, LZHUFF2_METHOD_NUM1, LZHUFF3_METHOD_NUM1,
  LZHUFF4_METHOD_NUM1, LZHUFF5_METHOD_NUM1, LZHUFF6_METHOD_NUM1, LZHUFF7_METHOD_NUM1,
  LARC_METHOD_NUM1, LARC5_METHOD_NUM1, LARC4_METHOD_NUM1, LZHDIRS_METHOD_NUM1
}
 

公開メンバ関数

 CLZH (int arctype=0)
 
 CLZH (const MYSTR &name, struct _stat *v_stat)
 
 ‾CLZH (void)
 
bool Match (char *p, char *s, int f)
 
bool ReadHeader (MYFILE &)
 
bool Extract (MYFILE &fp, bool &force, bool &skip, bool test=false)
 
bool Add (MYFILE &fp, MYFILE &nafp, int method, uchar level)
 
void WriteHeader (MYFILE &nafp)
 
const MYSTR & GetName (void)
 
const MYSTR & GetFname (void)
 
void SetName (const MYSTR &name)
 
void SetFname (const MYSTR &name, bool dir=false)
 
const MYSTR & GetDir (void)
 
void SetDir (const MYSTR &dir)
 
uchar GetHeaderSize (void)
 
LONGLONG GetTotalSize (void)
 
LONGLONG GetSize (void)
 
void SetOriginalSize (LONGLONG size)
 
LONGLONG GetPackedSize (void)
 
void SetPackedSize (ulong size)
 
float GetRatio (void)
 
void SetRatio (void)
 
int GetMethod (void)
 
void SetMethod (int method)
 
const MYSTR & GetMethodText (void)
 
void SetMethodText (const MYSTR &method)
 
time_t GetTime (void)
 
void SetUnix_last_modified_stamp (time_t t)
 
ushort GetUnix_mode (void)
 
const MYSTR & GetType (void)
 
void SetType (const MYSTR &type)
 
int GetImage (void)
 
void SetImage (int image)
 
fpos_t GetFpos (void)
 
void SetFpos (fpos_t fpos)
 
bool GetEncrypt (void)
 
void SetEncrypt (bool f)
 
uchar GetHeaderLevel (void)
 
int GetTreeFolder (void) const
 
void SetTreeFolder (int f)
 
ushort GetAttribute (void) const
 

非公開メンバ関数

void clzh (void)
 
ushort get_word (void)
 
void put_word (unsigned int)
 
ulong get_longword (void)
 
void put_longword (long)
 
void generic_to_unix_filename (char *, int)
 
void unix_to_generic_filename (MYSTR &)
 
void macos_to_unix_filename (char *, int)
 
long unix_to_generic_stamp (time_t)
 
long gettz (void) const
 
void adjust_info (const MYSTR &name)
 
int inquire_extract (const MYSTR &name, bool &force, bool &skip)
 
bool open_with_make_path (const MYSTR &name, MYFILE **fp)
 
bool make_parent_path (const MYSTR &name)
 
ushort decode_lzhuf (MYFILE &infp, MYFILE &outfp, LONGLONG original_size, LONGLONG packed_size, const MYSTR &name, int method)
 
ushort encode_lzhuf (MYFILE &infp, MYFILE &outfp, LONGLONG *original_size_var, LONGLONG *packed_size_var)
 
ushort encode_stored_crc (MYFILE &ifp, MYFILE &ofp, LONGLONG size, LONGLONG *original_size_var, LONGLONG *write_size_var)
 
void fatal_error (const MYSTR &msg)
 
bool ReadLevel0Header (MYFILE &)
 
bool ReadLevel1Header (MYFILE &)
 
bool ReadLevel2Header (MYFILE &)
 
bool ReadLevel3Header (MYFILE &)
 
void WriteLevel0Header (MYFILE &nafp)
 
void WriteLevel1Header (MYFILE &nafp)
 
void WriteLevel2Header (MYFILE &nafp)
 
void WriteLevel3Header (MYFILE &nafp)
 

非公開変数類

uchar HeaderSize
 
int MethodNum
 
char Method [METHOD_TYPE_STRAGE]
 
MYSTR MethodText
 
LONGLONG PackedSize
 
LONGLONG OriginalSize
 
long Last_modified_stamp
 
time_t Unix_last_modified_stamp
 
ushort Attribute
 
uchar HeaderLevel
 
MYSTR Dir
 
MYSTR Fname
 
MYSTR Name
 
ushort Crc
 
bool HasCrc
 
uchar ExtendType
 
uchar Minor_version
 
ushort Unix_mode
 
ushort Unix_uid
 
ushort Unix_gid
 
MYSTR Type
 
int Image
 
fpos_t Fpos
 
float Ratio
 
int ArcType
 
bool Encrypt
 
unsigned char * get_ptr
 
int TreeFolder
 
FILETIME CreationTime
 
FILETIME LastAccessTime
 
FILETIME LastWriteTime
 
bool TimeStampExist
 

静的非公開変数類

static const int FILENAME_LENGTH = 1024
 
static const int LZHEADER_STRAGE = 4096
 
static const ushort UNIX_FILE_REGULAR = 0100000
 
static const ushort UNIX_RW_RW_RW = 0000666
 
static char * Methods []
 

列挙型メンバ詳解

◆ METHOD

列挙値
LZHUFF0_METHOD_NUM1 
LZHUFF1_METHOD_NUM1 
LZHUFF2_METHOD_NUM1 
LZHUFF3_METHOD_NUM1 
LZHUFF4_METHOD_NUM1 
LZHUFF5_METHOD_NUM1 
LZHUFF6_METHOD_NUM1 
LZHUFF7_METHOD_NUM1 
LARC_METHOD_NUM1 
LARC5_METHOD_NUM1 
LARC4_METHOD_NUM1 
LZHDIRS_METHOD_NUM1 

構築子と解体子

◆ CLZH() [1/2]

CLZH::CLZH ( int  arctype = 0)

◆ CLZH() [2/2]

CLZH::CLZH ( const MYSTR &  name,
struct _stat *  v_stat 
)

関数詳解

◆ Add()

bool CLZH::Add ( MYFILE &  fp,
MYFILE &  nafp,
int  method,
uchar  level 
)

◆ adjust_info()

void CLZH::adjust_info ( const MYSTR &  name)
private

◆ clzh()

void CLZH::clzh ( void  )
private

◆ decode_lzhuf()

ushort CLZH::decode_lzhuf ( MYFILE &  infp,
MYFILE &  outfp,
LONGLONG  original_size,
LONGLONG  packed_size,
const MYSTR &  name,
int  method 
)
private

◆ encode_lzhuf()

ushort CLZH::encode_lzhuf ( MYFILE &  infp,
MYFILE &  outfp,
LONGLONG *  original_size_var,
LONGLONG *  packed_size_var 
)
private

◆ encode_stored_crc()

ushort CLZH::encode_stored_crc ( MYFILE &  ifp,
MYFILE &  ofp,
LONGLONG  size,
LONGLONG *  original_size_var,
LONGLONG *  write_size_var 
)
private

◆ Extract()

bool CLZH::Extract ( MYFILE &  fp,
bool force,
bool skip,
bool  test = false 
)

◆ fatal_error()

void CLZH::fatal_error ( const MYSTR &  msg)
private

◆ generic_to_unix_filename()

void CLZH::generic_to_unix_filename ( char *  name,
int  len 
)
private

◆ get_longword()

ulong CLZH::get_longword ( void  )
private

◆ get_word()

ushort CLZH::get_word ( void  )
private

◆ GetAttribute()

ushort CLZH::GetAttribute ( void  ) const
inline

◆ GetDir()

const MYSTR& CLZH::GetDir ( void  )
inline

◆ GetEncrypt()

bool CLZH::GetEncrypt ( void  )
inline

◆ GetFname()

const MYSTR& CLZH::GetFname ( void  )
inline

◆ GetFpos()

fpos_t CLZH::GetFpos ( void  )
inline

◆ GetHeaderLevel()

uchar CLZH::GetHeaderLevel ( void  )
inline

◆ GetHeaderSize()

uchar CLZH::GetHeaderSize ( void  )
inline

◆ GetImage()

int CLZH::GetImage ( void  )
inline

◆ GetMethod()

int CLZH::GetMethod ( void  )
inline

◆ GetMethodText()

const MYSTR& CLZH::GetMethodText ( void  )
inline

◆ GetName()

const MYSTR& CLZH::GetName ( void  )
inline

◆ GetPackedSize()

LONGLONG CLZH::GetPackedSize ( void  )
inline

◆ GetRatio()

float CLZH::GetRatio ( void  )
inline

◆ GetSize()

LONGLONG CLZH::GetSize ( void  )
inline

◆ GetTime()

time_t CLZH::GetTime ( void  )
inline

◆ GetTotalSize()

LONGLONG CLZH::GetTotalSize ( void  )

◆ GetTreeFolder()

int CLZH::GetTreeFolder ( void  ) const
inline

◆ GetType()

const MYSTR& CLZH::GetType ( void  )
inline

◆ gettz()

long CLZH::gettz ( void  ) const
private

◆ GetUnix_mode()

ushort CLZH::GetUnix_mode ( void  )
inline

◆ inquire_extract()

int CLZH::inquire_extract ( const MYSTR &  name,
bool force,
bool skip 
)
private

◆ macos_to_unix_filename()

void CLZH::macos_to_unix_filename ( char *  name,
int  len 
)
private

◆ make_parent_path()

bool CLZH::make_parent_path ( const MYSTR &  name)
private

◆ Match()

bool CLZH::Match ( char *  p,
char *  s,
int  f 
)

◆ open_with_make_path()

bool CLZH::open_with_make_path ( const MYSTR &  name,
MYFILE **  fp 
)
private

◆ put_longword()

void CLZH::put_longword ( long  v)
private

◆ put_word()

void CLZH::put_word ( unsigned int  v)
private

◆ ReadHeader()

bool CLZH::ReadHeader ( MYFILE &  fp)

◆ ReadLevel0Header()

bool CLZH::ReadLevel0Header ( MYFILE &  fp)
private

◆ ReadLevel1Header()

bool CLZH::ReadLevel1Header ( MYFILE &  fp)
private

◆ ReadLevel2Header()

bool CLZH::ReadLevel2Header ( MYFILE &  fp)
private

◆ ReadLevel3Header()

bool CLZH::ReadLevel3Header ( MYFILE &  )
private

◆ SetDir()

void CLZH::SetDir ( const MYSTR &  dir)

◆ SetEncrypt()

void CLZH::SetEncrypt ( bool  f)
inline

◆ SetFname()

void CLZH::SetFname ( const MYSTR &  name,
bool  dir = false 
)

◆ SetFpos()

void CLZH::SetFpos ( fpos_t  fpos)
inline

◆ SetImage()

void CLZH::SetImage ( int  image)
inline

◆ SetMethod()

void CLZH::SetMethod ( int  method)
inline

◆ SetMethodText()

void CLZH::SetMethodText ( const MYSTR &  method)
inline

◆ SetName()

void CLZH::SetName ( const MYSTR &  name)

◆ SetOriginalSize()

void CLZH::SetOriginalSize ( LONGLONG  size)

◆ SetPackedSize()

void CLZH::SetPackedSize ( ulong  size)

◆ SetRatio()

void CLZH::SetRatio ( void  )

◆ SetTreeFolder()

void CLZH::SetTreeFolder ( int  f)
inline

◆ SetType()

void CLZH::SetType ( const MYSTR &  type)
inline

◆ SetUnix_last_modified_stamp()

void CLZH::SetUnix_last_modified_stamp ( time_t  t)

◆ unix_to_generic_filename()

void CLZH::unix_to_generic_filename ( MYSTR &  name)
private

◆ unix_to_generic_stamp()

long CLZH::unix_to_generic_stamp ( time_t  t)
private

◆ WriteHeader()

void CLZH::WriteHeader ( MYFILE &  nafp)

◆ WriteLevel0Header()

void CLZH::WriteLevel0Header ( MYFILE &  nafp)
private

◆ WriteLevel1Header()

void CLZH::WriteLevel1Header ( MYFILE &  nafp)
private

◆ WriteLevel2Header()

void CLZH::WriteLevel2Header ( MYFILE &  nafp)
private

◆ WriteLevel3Header()

void CLZH::WriteLevel3Header ( MYFILE &  nafp)
private

◆ ‾CLZH()

CLZH::‾CLZH ( void  )

メンバ詳解

◆ ArcType

int CLZH::ArcType
private

◆ Attribute

ushort CLZH::Attribute
private

◆ Crc

ushort CLZH::Crc
private

◆ CreationTime

FILETIME CLZH::CreationTime
private

◆ Dir

MYSTR CLZH::Dir
private

◆ Encrypt

bool CLZH::Encrypt
private

◆ ExtendType

uchar CLZH::ExtendType
private

◆ FILENAME_LENGTH

const int CLZH::FILENAME_LENGTH = 1024
staticprivate

◆ Fname

MYSTR CLZH::Fname
private

◆ Fpos

fpos_t CLZH::Fpos
private

◆ get_ptr

unsigned char* CLZH::get_ptr
private

◆ HasCrc

bool CLZH::HasCrc
private

◆ HeaderLevel

uchar CLZH::HeaderLevel
private

◆ HeaderSize

uchar CLZH::HeaderSize
private

◆ Image

int CLZH::Image
private

◆ Last_modified_stamp

long CLZH::Last_modified_stamp
private

◆ LastAccessTime

FILETIME CLZH::LastAccessTime
private

◆ LastWriteTime

FILETIME CLZH::LastWriteTime
private

◆ LZHEADER_STRAGE

const int CLZH::LZHEADER_STRAGE = 4096
staticprivate

◆ Method

char CLZH::Method[METHOD_TYPE_STRAGE]
private

◆ MethodNum

int CLZH::MethodNum
private

◆ Methods

char * CLZH::Methods
staticprivate

◆ MethodText

MYSTR CLZH::MethodText
private

◆ Minor_version

uchar CLZH::Minor_version
private

◆ Name

MYSTR CLZH::Name
private

◆ OriginalSize

LONGLONG CLZH::OriginalSize
private

◆ PackedSize

LONGLONG CLZH::PackedSize
private

◆ Ratio

float CLZH::Ratio
private

◆ TimeStampExist

bool CLZH::TimeStampExist
private

◆ TreeFolder

int CLZH::TreeFolder
private

◆ Type

MYSTR CLZH::Type
private

◆ UNIX_FILE_REGULAR

const ushort CLZH::UNIX_FILE_REGULAR = 0100000
staticprivate

◆ Unix_gid

ushort CLZH::Unix_gid
private

◆ Unix_last_modified_stamp

time_t CLZH::Unix_last_modified_stamp
private

◆ Unix_mode

ushort CLZH::Unix_mode
private

◆ UNIX_RW_RW_RW

const ushort CLZH::UNIX_RW_RW_RW = 0000666
staticprivate

◆ Unix_uid

ushort CLZH::Unix_uid
private

このクラス詳解は次のファイルから抽出されました: