source: tags/ms_ra2q56/CORE/arb_zfile.h

Last change on this file was 14582, checked in by westram, 8 years ago
  • remove now-unneeded parameter 'filename' from ARB_zfclose
File size: 1.4 KB
Line 
1// ================================================================ //
2//                                                                  //
3//   File      : arb_zfile.h                                        //
4//   Purpose   : Compressed file I/O                                //
5//                                                                  //
6//   Coded by Ralf Westram (coder@reallysoft.de) in November 2015   //
7//   http://www.arb-home.de/                                        //
8//                                                                  //
9// ================================================================ //
10
11#ifndef ARB_ZFILE_H
12#define ARB_ZFILE_H
13
14#ifndef ARB_CORE_H
15#include "arb_core.h"
16#endif
17
18#if defined(UNIT_TESTS)
19#define USE_BROKEN_COMPRESSION
20#endif
21
22enum FileCompressionMode {
23    ZFILE_AUTODETECT,
24
25    ZFILE_UNCOMPRESSED,
26
27    // -------------------- [real compressions]
28    ZFILE_GZIP,
29    ZFILE_BZIP2,
30    ZFILE_XZ,
31    // -------------------- [real compressions]
32
33    ZFILE_UNDEFINED,
34#if defined(USE_BROKEN_COMPRESSION)
35    ZFILE_BROKEN, // a broken pipe
36#endif
37    ZFILE_REAL_CMODES = ZFILE_UNDEFINED-ZFILE_UNCOMPRESSED-1, // number of supported modes
38};
39
40FILE     *ARB_zfopen(const char *name, const char *mode, FileCompressionMode cmode, GB_ERROR& error, bool hideStderr);
41GB_ERROR  ARB_zfclose(FILE *fp);
42
43#else
44#error arb_zfile.h included twice
45#endif // ARB_ZFILE_H
Note: See TracBrowser for help on using the repository browser.