mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-08 16:07:04 -06:00
4.20
This commit is contained in:
committed by
Kornel Lesiński
parent
8c1b5c7b7e
commit
3c510ba80b
@@ -1,7 +1,5 @@
|
||||
// ZipOut.h
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __ZIP_OUT_H
|
||||
#define __ZIP_OUT_H
|
||||
|
||||
@@ -9,39 +7,38 @@
|
||||
|
||||
#include "../../IStream.h"
|
||||
|
||||
#include "ZipHeader.h"
|
||||
#include "ZipItem.h"
|
||||
|
||||
namespace NArchive {
|
||||
namespace NZip {
|
||||
|
||||
class COutArchiveInfo
|
||||
{
|
||||
public:
|
||||
UINT16 NumEntriesInCentaralDirectory;
|
||||
UINT32 CentralDirectorySize;
|
||||
UINT32 CentralDirectoryStartOffset;
|
||||
UINT16 CommentSize;
|
||||
};
|
||||
|
||||
class COutArchive
|
||||
{
|
||||
CMyComPtr<IOutStream> m_Stream;
|
||||
|
||||
UINT32 m_BasePosition;
|
||||
UINT32 m_LocalFileHeaderSize;
|
||||
UInt64 m_BasePosition;
|
||||
UInt32 m_LocalFileHeaderSize;
|
||||
UInt32 m_ExtraSize;
|
||||
bool m_IsZip64;
|
||||
|
||||
void WriteBytes(const void *buffer, UINT32 size);
|
||||
void WriteBytes(const void *buffer, UInt32 size);
|
||||
void WriteByte(Byte b);
|
||||
void WriteUInt16(UInt16 value);
|
||||
void WriteUInt32(UInt32 value);
|
||||
void WriteUInt64(UInt64 value);
|
||||
|
||||
void WriteExtraHeader(const CItem &item);
|
||||
void WriteCentralHeader(const CItem &item);
|
||||
public:
|
||||
void Create(IOutStream *outStream);
|
||||
void MoveBasePosition(UINT32 distanceToMove);
|
||||
UINT32 GetCurrentPosition() const { return m_BasePosition; };
|
||||
void PrepareWriteCompressedData(UINT16 fileNameLength);
|
||||
void WriteLocalHeader(const CItem &item);
|
||||
void MoveBasePosition(UInt64 distanceToMove);
|
||||
UInt64 GetCurrentPosition() const { return m_BasePosition; };
|
||||
void PrepareWriteCompressedDataZip64(UInt16 fileNameLength, bool isZip64);
|
||||
void PrepareWriteCompressedData(UInt16 fileNameLength, UInt64 unPackSize);
|
||||
void PrepareWriteCompressedData2(UInt16 fileNameLength, UInt64 unPackSize, UInt64 packSize);
|
||||
HRESULT WriteLocalHeader(const CItem &item);
|
||||
|
||||
void WriteCentralHeader(const CItem &item);
|
||||
void WriteEndOfCentralDir(const COutArchiveInfo &archiveInfo);
|
||||
void WriteCentralDir(const CObjectVector<CItem> &items, const CByteBuffer &comment);
|
||||
|
||||
void CreateStreamForCompressing(IOutStream **outStream);
|
||||
void CreateStreamForCopying(ISequentialOutStream **outStream);
|
||||
|
||||
Reference in New Issue
Block a user