Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/kornelski/7z.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '7zip/Archive/Zip/ZipOut.h')
-rwxr-xr-x7zip/Archive/Zip/ZipOut.h41
1 files changed, 19 insertions, 22 deletions
diff --git a/7zip/Archive/Zip/ZipOut.h b/7zip/Archive/Zip/ZipOut.h
index 8f9d98e5..79401243 100755
--- a/7zip/Archive/Zip/ZipOut.h
+++ b/7zip/Archive/Zip/ZipOut.h
@@ -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 WriteCentralHeader(const CItem &item);
- void WriteEndOfCentralDir(const COutArchiveInfo &archiveInfo);
+ 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 WriteCentralDir(const CObjectVector<CItem> &items, const CByteBuffer &comment);
void CreateStreamForCompressing(IOutStream **outStream);
void CreateStreamForCopying(ISequentialOutStream **outStream);