DocWire SDK
DocWire SDK: Award-winning modern data processing in C++20. SourceForge Community Choice & Microsoft support. AI-driven processing. Supports nearly 100 data formats, including email boxes and OCR. Boost efficiency in text extraction, web data extraction, data mining, document analysis. Offline processing possible for security and confidentiality
zip_reader.h
1 /*********************************************************************************************************************************************/
2 /* DocWire SDK: Award-winning modern data processing in C++20. SourceForge Community Choice & Microsoft support. AI-driven processing. */
3 /* Supports nearly 100 data formats, including email boxes and OCR. Boost efficiency in text extraction, web data extraction, data mining, */
4 /* document analysis. Offline processing possible for security and confidentiality */
5 /* */
6 /* Copyright (c) SILVERCODERS Ltd, http://silvercoders.com */
7 /* Project homepage: https://github.com/docwire/docwire */
8 /* */
9 /* SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-DocWire-Commercial */
10 /*********************************************************************************************************************************************/
11 
12 #ifndef DOCWIRE_ZIP_READER_H
13 #define DOCWIRE_ZIP_READER_H
14 
15 #include "core_export.h"
16 #include "data_source.h"
17 #include <string>
18 #include "pimpl.h"
19 
20 namespace docwire
21 {
22 
23 class DOCWIRE_CORE_EXPORT zip_reader : public with_pimpl<zip_reader>
24 {
25  public:
26  zip_reader(const data_source& data);
27  ~zip_reader();
28  void open();
29  bool exists(const std::string& file_name) const;
30  bool read(const std::string& file_name, std::string* contents, int num_of_chars = 0);
31  bool getFileSize(const std::string& file_name, unsigned long& file_size);
32  bool readChunk(const std::string& file_name, std::string* contents, int num_of_chars);
33  bool readChunk(const std::string& file_name, char* contents, int num_of_chars, int& readed, bool add_null_terminator = true);
34  void closeReadingFileForChunks();
38  bool loadDirectory();
39 };
40 
41 }; // namespace docwire
42 
43 #endif
The main namespace for the DocWire SDK.
Definition: ai_elements.h:19