mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-12 09:10:00 -06:00
Update to 7-Zip Version 21.02
This commit is contained in:
@@ -3,30 +3,48 @@
|
||||
#ifndef __IN_OUT_TEMP_BUFFER_H
|
||||
#define __IN_OUT_TEMP_BUFFER_H
|
||||
|
||||
#include "../../Common/MyCom.h"
|
||||
#ifdef _WIN32
|
||||
// #define USE_InOutTempBuffer_FILE
|
||||
#endif
|
||||
|
||||
#ifdef USE_InOutTempBuffer_FILE
|
||||
#include "../../Windows/FileDir.h"
|
||||
#else
|
||||
#include "StreamObjects.h"
|
||||
#endif
|
||||
|
||||
#include "../IStream.h"
|
||||
|
||||
class CInOutTempBuffer
|
||||
{
|
||||
#ifdef USE_InOutTempBuffer_FILE
|
||||
|
||||
NWindows::NFile::NDir::CTempFile _tempFile;
|
||||
NWindows::NFile::NIO::COutFile _outFile;
|
||||
bool _tempFileCreated;
|
||||
Byte *_buf;
|
||||
size_t _bufPos;
|
||||
UInt64 _size;
|
||||
UInt32 _crc;
|
||||
bool _tempFileCreated;
|
||||
|
||||
bool WriteToFile(const void *data, UInt32 size);
|
||||
#else
|
||||
|
||||
CByteDynBuffer _dynBuffer;
|
||||
size_t _size;
|
||||
|
||||
#endif
|
||||
|
||||
CLASS_NO_COPY(CInOutTempBuffer);
|
||||
public:
|
||||
CInOutTempBuffer();
|
||||
~CInOutTempBuffer();
|
||||
void Create();
|
||||
|
||||
void InitWriting();
|
||||
bool Write(const void *data, UInt32 size);
|
||||
#ifdef USE_InOutTempBuffer_FILE
|
||||
~CInOutTempBuffer();
|
||||
#endif
|
||||
|
||||
void InitWriting();
|
||||
HRESULT Write_HRESULT(const void *data, UInt32 size);
|
||||
HRESULT WriteToStream(ISequentialOutStream *stream);
|
||||
UInt64 GetDataSize() const { return _size; }
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user