The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
compression.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2014 - 2016 by David White <[email protected]>
3  Part of the Battle for Wesnoth Project http://www.wesnoth.org/
4 
5  This program is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation; either version 2 of the License, or
8  (at your option) any later version.
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY.
11 
12  See the COPYING file for more details.
13 */
14 
15 #ifndef COMPRESSION_HPP_INCLUDED
16 #define COMPRESSION_HPP_INCLUDED
17 
18 #include <string>
19 
20 namespace compression {
21  enum format {
25  };
26 
27  inline std::string format_extension(format compression_format)
28  {
29  switch(compression_format) {
30  case GZIP:
31  return ".gz";
32  case BZIP2:
33  return ".bz2";
34  case NONE:
35  return "";
36  }
37  return "";
38  }
39 }
40 
41 #endif
std::string format_extension(format compression_format)
Definition: compression.hpp:27
GLsizei const GLcharARB ** string
Definition: glew.h:4503