1 | /* |
---|
2 | |
---|
3 | compress.h |
---|
4 | |
---|
5 | Author: Tatu Ylonen <ylo@cs.hut.fi> |
---|
6 | |
---|
7 | Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
---|
8 | All rights reserved |
---|
9 | |
---|
10 | Created: Wed Oct 25 22:12:46 1995 ylo |
---|
11 | |
---|
12 | Interface to packet compression for ssh. |
---|
13 | |
---|
14 | */ |
---|
15 | |
---|
16 | /* |
---|
17 | * $Id: compress.h,v 1.1.1.2 1999-03-08 17:43:34 danw Exp $ |
---|
18 | * $Log: not supported by cvs2svn $ |
---|
19 | * Revision 1.2 1997/03/26 07:11:32 kivinen |
---|
20 | * Fixed prototypes. |
---|
21 | * |
---|
22 | * Revision 1.1.1.1 1996/02/18 21:38:11 ylo |
---|
23 | * Imported ssh-1.2.13. |
---|
24 | * |
---|
25 | * $EndLog$ |
---|
26 | */ |
---|
27 | |
---|
28 | #ifndef COMPRESS_H |
---|
29 | #define COMPRESS_H |
---|
30 | |
---|
31 | /* Initializes compression; level is compression level from 1 to 9 (as in |
---|
32 | gzip). */ |
---|
33 | void buffer_compress_init(int level); |
---|
34 | |
---|
35 | /* Frees any data structures allocated by buffer_compress_init. */ |
---|
36 | void buffer_compress_uninit(void); |
---|
37 | |
---|
38 | /* Compresses the contents of input_buffer into output_buffer. All |
---|
39 | packets compressed using this function will form a single |
---|
40 | compressed data stream; however, data will be flushed at the end of |
---|
41 | every call so that each output_buffer can be decompressed |
---|
42 | independently (but in the appropriate order since they together |
---|
43 | form a single compression stream) by the receiver. This appends |
---|
44 | the compressed data to the output buffer. */ |
---|
45 | void buffer_compress(Buffer *input_buffer, Buffer *output_buffer); |
---|
46 | |
---|
47 | /* Uncompresses the contents of input_buffer into output_buffer. All |
---|
48 | packets uncompressed using this function will form a single |
---|
49 | compressed data stream; however, data will be flushed at the end of |
---|
50 | every call so that each output_buffer. This must be called for the |
---|
51 | same size units that the buffer_compress was called, and in the |
---|
52 | same order that buffers compressed with that. This appends the |
---|
53 | uncompressed data to the output buffer. */ |
---|
54 | void buffer_uncompress(Buffer *input_buffer, Buffer *output_buffer); |
---|
55 | |
---|
56 | #endif /* COMPRESS_H */ |
---|