annotate src/console/Gzip_Reader.h @ 611:3f7a52adfe0e trunk

[svn] merge recent changes from yaz's branch. - stable shoutcast playback. - tag handling improvement. - view track detail on streaming won't crash. (disabled.) - filepopup for streaming is partially supported. filepopup displays track name and stream name, but not updated automatically.
author yaz
date Tue, 06 Feb 2007 12:11:42 -0800
parents 986f098da058
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
341
986f098da058 [svn] - merge in blargg's changes
nenolod
parents:
diff changeset
1 // Transparently decompresses gzip files, as well as uncompressed
986f098da058 [svn] - merge in blargg's changes
nenolod
parents:
diff changeset
2
986f098da058 [svn] - merge in blargg's changes
nenolod
parents:
diff changeset
3 // File_Extractor 0.4.0
986f098da058 [svn] - merge in blargg's changes
nenolod
parents:
diff changeset
4 #ifndef GZIP_READER_H
986f098da058 [svn] - merge in blargg's changes
nenolod
parents:
diff changeset
5 #define GZIP_READER_H
986f098da058 [svn] - merge in blargg's changes
nenolod
parents:
diff changeset
6
986f098da058 [svn] - merge in blargg's changes
nenolod
parents:
diff changeset
7 #include "Data_Reader.h"
986f098da058 [svn] - merge in blargg's changes
nenolod
parents:
diff changeset
8 #include "Zlib_Inflater.h"
986f098da058 [svn] - merge in blargg's changes
nenolod
parents:
diff changeset
9
986f098da058 [svn] - merge in blargg's changes
nenolod
parents:
diff changeset
10 class Gzip_Reader : public Data_Reader {
986f098da058 [svn] - merge in blargg's changes
nenolod
parents:
diff changeset
11 public:
986f098da058 [svn] - merge in blargg's changes
nenolod
parents:
diff changeset
12 error_t open( File_Reader* );
986f098da058 [svn] - merge in blargg's changes
nenolod
parents:
diff changeset
13 void close();
986f098da058 [svn] - merge in blargg's changes
nenolod
parents:
diff changeset
14
986f098da058 [svn] - merge in blargg's changes
nenolod
parents:
diff changeset
15 public:
986f098da058 [svn] - merge in blargg's changes
nenolod
parents:
diff changeset
16 Gzip_Reader();
986f098da058 [svn] - merge in blargg's changes
nenolod
parents:
diff changeset
17 ~Gzip_Reader();
986f098da058 [svn] - merge in blargg's changes
nenolod
parents:
diff changeset
18 long remain() const;
986f098da058 [svn] - merge in blargg's changes
nenolod
parents:
diff changeset
19 error_t read( void*, long );
986f098da058 [svn] - merge in blargg's changes
nenolod
parents:
diff changeset
20 long read_avail( void*, long );
986f098da058 [svn] - merge in blargg's changes
nenolod
parents:
diff changeset
21 private:
986f098da058 [svn] - merge in blargg's changes
nenolod
parents:
diff changeset
22 File_Reader* in;
986f098da058 [svn] - merge in blargg's changes
nenolod
parents:
diff changeset
23 long tell_;
986f098da058 [svn] - merge in blargg's changes
nenolod
parents:
diff changeset
24 long size_;
986f098da058 [svn] - merge in blargg's changes
nenolod
parents:
diff changeset
25 Zlib_Inflater inflater;
986f098da058 [svn] - merge in blargg's changes
nenolod
parents:
diff changeset
26
986f098da058 [svn] - merge in blargg's changes
nenolod
parents:
diff changeset
27 error_t calc_size();
986f098da058 [svn] - merge in blargg's changes
nenolod
parents:
diff changeset
28 blargg_err_t read_( void* out, long* count );
986f098da058 [svn] - merge in blargg's changes
nenolod
parents:
diff changeset
29 };
986f098da058 [svn] - merge in blargg's changes
nenolod
parents:
diff changeset
30
986f098da058 [svn] - merge in blargg's changes
nenolod
parents:
diff changeset
31 #endif