Subversion Repositories freemyipod

Rev

Rev 445 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 445 Rev 447
Line 8... Line 8...
8
 */
8
 */
9
 
9
 
10
#ifndef __ELF2FLT_COMPRESS_H__
10
#ifndef __ELF2FLT_COMPRESS_H__
11
#define __ELF2FLT_COMPRESS_H__
11
#define __ELF2FLT_COMPRESS_H__
12
 
12
 
13
#include <zlib.h>
13
//#include <zlib.h>
14
 
14
 
15
typedef enum
15
typedef enum
16
{
16
{
17
  INVALID,
17
  INVALID,
18
  UNCOMPRESSED,
18
  UNCOMPRESSED,
Line 23... Line 23...
23
   handle.  */
23
   handle.  */
24
typedef struct
24
typedef struct
25
{
25
{
26
  stream_type type;
26
  stream_type type;
27
  const char *mode;
27
  const char *mode;
-
 
28
  FILE *filep;
-
 
29
  char* buffer;
-
 
30
  int bufsize;
-
 
31
  int bufused;
28
  union
32
//  union
29
    {
33
//    {
30
      FILE *filep;
34
//      FILE *filep;
31
      gzFile gzfilep;
35
//      gzFile gzfilep;
32
    } u;
36
//    } u;
33
} stream;
37
} stream;
34
 
38
 
35
int fopen_stream_u(stream *fp, const char *path, const char *mode);
39
int fopen_stream_u(stream *fp, const char *path, const char *mode);
36
size_t fread_stream(void *ptr, size_t size, size_t nmemb, stream *str);
40
size_t fread_stream(void *ptr, size_t size, size_t nmemb, stream *str);
37
size_t fwrite_stream(const void *ptr, size_t size, size_t nmemb, stream *str);
41
size_t fwrite_stream(const void *ptr, size_t size, size_t nmemb, stream *str);