Files
geant4/source/visualization/HepRep/include/cheprep/ZipOutputStreamBuffer.h
T
2018-12-07 15:15:39 +01:00

58 lines
1.4 KiB
C++
Executable File

// Copyright FreeHEP, 2005.
#ifndef CHEPREP_ZIPOUTPUTSTREAMBUFFER_H
#define CHEPREP_ZIPOUTPUTSTREAMBUFFER_H
#include <string>
#include <iostream>
#include <vector>
#include "cheprep/DeflateOutputStreamBuffer.h"
/**
* @author Mark Donszelmann
*/
namespace cheprep {
class ZipEntry;
class ZipOutputStreamBuffer : public DeflateOutputStreamBuffer {
public:
ZipOutputStreamBuffer(std::streambuf* buffer);
int overflow(int c);
void closeEntry();
void close();
void putNextEntry(const std::string& name, bool compress);
void setMethod(int method);
void setComment(const std::string& comment);
virtual ~ZipOutputStreamBuffer();
private:
std::string comment;
bool closed;
ZipEntry* entry;
std::vector<ZipEntry*>* entries;
static const unsigned int LOCSIG = 0x04034b50;
static const unsigned int EXTSIG = 0x08074b50;
static const unsigned int CENSIG = 0x02014b50;
static const unsigned int ENDSIG = 0x06054b50;
static const unsigned int VERSIONMADE = 0x0014;
static const unsigned int VERSIONEXTRACT = 0x0014;
static const unsigned int GENFLAG = 0x0008;
};
} // cheprep
#endif // CHEPREP_ZIPOUTPUTSTREAMBUFFER_H