gzip_reader.h
Go to the documentation of this file.
1// LIC// ====================================================================
2// LIC// This file forms part of oomph-lib, the object-oriented,
3// LIC// multi-physics finite-element library, available
4// LIC// at http://www.oomph-lib.org.
5// LIC//
6// LIC// Copyright (C) 2006-2025 Matthias Heil and Andrew Hazel
7// LIC//
8// LIC// This library is free software; you can redistribute it and/or
9// LIC// modify it under the terms of the GNU Lesser General Public
10// LIC// License as published by the Free Software Foundation; either
11// LIC// version 2.1 of the License, or (at your option) any later version.
12// LIC//
13// LIC// This library is distributed in the hope that it will be useful,
14// LIC// but WITHOUT ANY WARRANTY; without even the implied warranty of
15// LIC// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16// LIC// Lesser General Public License for more details.
17// LIC//
18// LIC// You should have received a copy of the GNU Lesser General Public
19// LIC// License along with this library; if not, write to the Free Software
20// LIC// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21// LIC// 02110-1301 USA.
22// LIC//
23// LIC// The authors may be contacted at oomph-lib@maths.man.ac.uk.
24// LIC//
25// LIC//====================================================================
26
27#ifndef OOMPH_GZIP_READER_HEADER
28#define OOMPH_GZIP_READER_HEADER
29
30#include "oomph_zlib/zlib.h"
31
32#include <string>
33#include <memory>
34#include <vector>
35
36namespace oomph
37{
38 /************************************************************************************
39 * @brief
40 *
41 ************************************************************************************/
42 struct Packet
43 {
44 std::string data;
45 bool found;
46 };
47
48 /************************************************************************************
49 * @brief
50 *
51 * @tparam _CharT
52 * @tparam _Traits
53 ************************************************************************************/
55 {
56 public:
57 GZipReader();
58 GZipReader(const std::string& filename, const unsigned& chunk_size = 256);
60 void open(const std::string& filename);
61 void close();
62 bool is_open() const;
64 std::vector<std::string> read_all();
65
66 private:
68 unsigned Chunk_size;
69 };
70
71} // namespace oomph
72
73#endif
std::vector< std::string > read_all()
void open(const std::string &filename)
bool is_open() const
unsigned Chunk_size
Definition gzip_reader.h:68
TAdvectionDiffusionReactionElement<NREAGENT,DIM,NNODE_1D> elements are isoparametric triangular DIM-d...
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).
std::string data
Definition gzip_reader.h:44