]> andersk Git - openssh.git/blame - compress.h
- markus@cvs.openbsd.org 2001/06/26 17:25:34
[openssh.git] / compress.h
CommitLineData
8efc0c15 1/*
5260325f 2 * Author: Tatu Ylonen <ylo@cs.hut.fi>
5260325f 3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
4 * All rights reserved
5260325f 5 * Interface to packet compression for ssh.
6ae2364d 6 *
bcbf86ec 7 * As far as I am concerned, the code I have written for this software
8 * can be used freely for any purpose. Any derived versions of this
9 * software must be clearly marked as such, and if the derived work is
10 * incompatible with the protocol description in the RFC file, it must be
11 * called by a name other than "ssh" or "Secure Shell".
5260325f 12 */
8efc0c15 13
2a1e4639 14/* RCSID("$OpenBSD: compress.h,v 1.9 2001/06/26 06:32:50 itojun Exp $"); */
8efc0c15 15
16#ifndef COMPRESS_H
17#define COMPRESS_H
18
aa3378df 19/*
20 * Initializes compression; level is compression level from 1 to 9 (as in
21 * gzip).
22 */
2a1e4639 23void buffer_compress_init_send(int);
6ba22c93 24void buffer_compress_init_recv(void);
8efc0c15 25
26/* Frees any data structures allocated by buffer_compress_init. */
c52c7082 27void buffer_compress_uninit(void);
8efc0c15 28
aa3378df 29/*
30 * Compresses the contents of input_buffer into output_buffer. All packets
31 * compressed using this function will form a single compressed data stream;
32 * however, data will be flushed at the end of every call so that each
33 * output_buffer can be decompressed independently (but in the appropriate
34 * order since they together form a single compression stream) by the
35 * receiver. This appends the compressed data to the output buffer.
36 */
2a1e4639 37void buffer_compress(Buffer *, Buffer *);
8efc0c15 38
aa3378df 39/*
40 * Uncompresses the contents of input_buffer into output_buffer. All packets
41 * uncompressed using this function will form a single compressed data
42 * stream; however, data will be flushed at the end of every call so that
43 * each output_buffer. This must be called for the same size units that the
44 * buffer_compress was called, and in the same order that buffers compressed
45 * with that. This appends the uncompressed data to the output buffer.
46 */
2a1e4639 47void buffer_uncompress(Buffer *, Buffer *);
8efc0c15 48
5260325f 49#endif /* COMPRESS_H */
This page took 0.117025 seconds and 5 git commands to generate.