comparison Core/Compression/ZipWriter.cpp @ 249:5694365ecb96

fixes for windows
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 05 Dec 2012 09:28:06 +0100
parents fe180eae201d
children bdd72233b105
comparison
equal deleted inserted replaced
248:2442033911d6 249:5694365ecb96
134 } 134 }
135 135
136 compressionLevel_ = level; 136 compressionLevel_ = level;
137 } 137 }
138 138
139 void ZipWriter::CreateFileInZip(const char* path) 139 void ZipWriter::OpenFile(const char* path)
140 { 140 {
141 Open(); 141 Open();
142 142
143 zip_fileinfo zfi; 143 zip_fileinfo zfi;
144 PrepareFileInfo(zfi); 144 PrepareFileInfo(zfi);
169 169
170 void ZipWriter::Write(const char* data, size_t length) 170 void ZipWriter::Write(const char* data, size_t length)
171 { 171 {
172 if (!hasFileInZip_) 172 if (!hasFileInZip_)
173 { 173 {
174 throw OrthancException("Call first CreateFileInZip()"); 174 throw OrthancException("Call first OpenFile()");
175 } 175 }
176 176
177 const size_t maxBytesInAStep = std::numeric_limits<int32_t>::max(); 177 const size_t maxBytesInAStep = std::numeric_limits<int32_t>::max();
178 178
179 while (length > 0) 179 while (length > 0)