51 lines
1.3 KiB
C++
51 lines
1.3 KiB
C++
//-----------------------------------------------------------------------------+
|
|
// Copyright (C), 1998-2007, SH Software Co. Ltd.
|
|
// = FileName : XStreamFile Àà
|
|
// = Version : ver2.0
|
|
// = Author : zjq
|
|
// = CreateDate : 2002-09-09
|
|
// = Description: XStreamFile ÉùÃ÷
|
|
// = Maintainers:
|
|
//
|
|
//-----------------------------------------------------------------------------+
|
|
#ifndef _XStreamFile_H_
|
|
#define _XStreamFile_H_
|
|
|
|
#include <stdio.h>
|
|
#include <io.h>
|
|
|
|
#if (ARX > 15)
|
|
#include <istream>
|
|
#else
|
|
#include <iostream.h>
|
|
#endif
|
|
|
|
class GEOAPI XStreamFile
|
|
{
|
|
public:
|
|
XStreamFile();
|
|
virtual ~XStreamFile();
|
|
|
|
int Pack(const TCHAR *dwgFile, const TCHAR *lzwFile);
|
|
int UnPack(const TCHAR *lzwFile, const TCHAR *dwgFile);
|
|
|
|
#if (ARX > 15)
|
|
void StreamCopy(std::istream & _libfile, std::ostream &sld_out, long sld_fsize);
|
|
#else
|
|
void StreamCopy(istream & _libfile, ostream &sld_out, long sld_fsize);
|
|
#endif
|
|
|
|
private:
|
|
void initvalue(void);
|
|
|
|
int Read(INT_PTR h,void *buf,INT_PTR num,bool bProtect = false);
|
|
int Write(INT_PTR h,void *buf,INT_PTR num,bool bProtect = false);
|
|
|
|
void writebit(short,short,short, unsigned char *,int);
|
|
int readbit(short,short, unsigned char *,int);
|
|
int pack(short size,int h1,int h2);
|
|
int unpack(short size,int h1,int h2);
|
|
|
|
};
|
|
#endif
|