diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-04-27 10:00:41 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-05-02 08:31:32 -0400 |
commit | 1bc21111d82579b6472357d43f07a85142b6614a (patch) | |
tree | 5a88e50435ae01a87947535267e9a0d80b25cb44 /src/common/compress_none.h | |
parent | 49deb1e1b810e348bfa9fb27a0f0ef54f3694cc9 (diff) | |
download | tor-1bc21111d82579b6472357d43f07a85142b6614a.tar.gz tor-1bc21111d82579b6472357d43f07a85142b6614a.zip |
Treat the identity transformation as another kind of compression.
This will allow us to treat NO_METHOD as a real compression method,
and to simplify code that currently does
if (compressing) {
compress
} else {
copy
}
Diffstat (limited to 'src/common/compress_none.h')
-rw-r--r-- | src/common/compress_none.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/common/compress_none.h b/src/common/compress_none.h new file mode 100644 index 0000000000..d1ebb4b625 --- /dev/null +++ b/src/common/compress_none.h @@ -0,0 +1,20 @@ +/* Copyright (c) 2003, Roger Dingledine + * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson. + * Copyright (c) 2007-2017, The Tor Project, Inc. */ +/* See LICENSE for licensing information */ + +/** + * \file compress_none.h + * \brief Header for compress_none.c + **/ + +#ifndef TOR_COMPRESS_NONE_H +#define TOR_COMPRESS_NONE_H + +tor_compress_output_t +tor_cnone_compress_process(char **out, size_t *out_len, + const char **in, size_t *in_len, + int finish); + +#endif // TOR_COMPRESS_NONE_H. + |