mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-10 22:07:08 -06:00
Update to 7-Zip 17.00 Beta
This commit is contained in:
@@ -5,10 +5,9 @@
|
||||
#ifndef __COMPRESS_RAR5_DECODER_H
|
||||
#define __COMPRESS_RAR5_DECODER_H
|
||||
|
||||
#include "../../../C/Alloc.h"
|
||||
#include "../../../C/CpuArch.h"
|
||||
|
||||
#include "../../Common/MyBuffer.h"
|
||||
#include "../../Common/MyBuffer2.h"
|
||||
#include "../../Common/MyCom.h"
|
||||
#include "../../Common/MyException.h"
|
||||
#include "../../Common/MyVector.h"
|
||||
@@ -20,35 +19,6 @@
|
||||
namespace NCompress {
|
||||
namespace NRar5 {
|
||||
|
||||
class CMidBuffer
|
||||
{
|
||||
Byte *_data;
|
||||
size_t _size;
|
||||
|
||||
CLASS_NO_COPY(CMidBuffer)
|
||||
|
||||
public:
|
||||
CMidBuffer(): _data(NULL), _size(0) {};
|
||||
~CMidBuffer() { ::MidFree(_data); }
|
||||
|
||||
bool IsAllocated() const { return _data != NULL; }
|
||||
operator Byte *() { return _data; }
|
||||
operator const Byte *() const { return _data; }
|
||||
size_t Size() const { return _size; }
|
||||
|
||||
void AllocAtLeast(size_t size)
|
||||
{
|
||||
if (size > _size)
|
||||
{
|
||||
const size_t kMinSize = (1 << 16);
|
||||
if (size < kMinSize)
|
||||
size = kMinSize;
|
||||
::MidFree(_data);
|
||||
_data = (Byte *)::MidAlloc(size);
|
||||
_size = size;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
struct CInBufferException: public CSystemException
|
||||
|
||||
Reference in New Issue
Block a user