Mercurial > audlegacy-plugins
comparison src/Input/console/Gzip_File.h @ 0:13389e613d67 trunk
[svn] - initial import of audacious-plugins tree (lots to do)
| author | nenolod |
|---|---|
| date | Mon, 18 Sep 2006 01:11:49 -0700 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:13389e613d67 |
|---|---|
| 1 | |
| 2 // Gzip file access | |
| 3 | |
| 4 #ifndef GZIP_FILE_H | |
| 5 #define GZIP_FILE_H | |
| 6 | |
| 7 #include "abstract_file.h" | |
| 8 | |
| 9 // Get size of gzipped file data (or size of file if not gzipped). NULL | |
| 10 // on success, otherwise error string. | |
| 11 const char* get_gzip_eof( const char* path, long* eof_out ); | |
| 12 | |
| 13 class Gzip_File_Reader : public File_Reader { | |
| 14 void* file_; | |
| 15 long size_; | |
| 16 public: | |
| 17 Gzip_File_Reader(); | |
| 18 ~Gzip_File_Reader(); | |
| 19 | |
| 20 error_t open( const char* ); | |
| 21 | |
| 22 long size() const; | |
| 23 long read_avail( void*, long ); | |
| 24 | |
| 25 long tell() const; | |
| 26 error_t seek( long ); | |
| 27 | |
| 28 void close(); | |
| 29 }; | |
| 30 | |
| 31 class Gzip_File_Writer : public Data_Writer { | |
| 32 void* file_; | |
| 33 public: | |
| 34 Gzip_File_Writer(); | |
| 35 ~Gzip_File_Writer(); | |
| 36 | |
| 37 error_t open( const char* ); | |
| 38 error_t write( const void*, long ); | |
| 39 void close(); | |
| 40 }; | |
| 41 | |
| 42 #endif | |
| 43 |
