]>
cygwin.com Git - cygwin-apps/setup.git/blob - compress_bz.h
2 * Copyright (c) 2001, Robert Collins.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * A copy of the GNU General Public License can be found at
12 * Written by Robert Collins <rbtcollins@hotmail.com>
16 #ifndef _COMPRESS_BZ_H_
17 #define _COMPRESS_BZ_H_
19 /* this is the bz2 class for all compressed IO operations.
30 class compress_bz
:public compress
33 /* assumes decompression */
34 compress_bz (io_stream
*);
35 /* allows comp/decomp but this implementation only handles comp */
36 compress_bz (io_stream
*, const char *);
37 /* read data (duh!) */
38 virtual ssize_t
read (void *buffer
, size_t len
);
39 /* provide data to (double duh!) */
40 virtual ssize_t
write (const void *buffer
, size_t len
);
41 /* read data without removing it from the class's internal buffer */
42 virtual ssize_t
peek (void *buffer
, size_t len
);
44 virtual int seek (long where
, io_stream_seek_t whence
);
45 /* try guessing this one */
47 /* Find out the next stream name -
48 * ie for foo.tar.bz, at offset 0, next_file_name = foo.tar
49 * for foobar that is an compress, next_file_name is the next
50 * extractable filename.
52 virtual const char *next_file_name ()
56 virtual int set_mtime (int);
57 /* Use seek EOF, then tell (). get_size won't do this incase you are sucking dow
59 virtual size_t get_size () {return 0;};
60 virtual int get_mtime ();
61 /* if you are still needing these hints... give up now! */
62 virtual ~ compress_bz ();
76 #endif /* _COMPRESS_BZ_H_ */
This page took 0.039087 seconds and 5 git commands to generate.