mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-03-22 06:38:37 -05:00
Remove the 'bool compress' parameter to lz77_compress.
It stopped being useful in commit 20a9bd564, where I removed the only code that called it. I've only just noticed that this part of the mechanism is still lying around.
This commit is contained in:
parent
6329890046
commit
1586a41656
@ -94,7 +94,7 @@ static int lz77_init(struct LZ77Context *ctx);
|
|||||||
* instead call literal() for everything.
|
* instead call literal() for everything.
|
||||||
*/
|
*/
|
||||||
static void lz77_compress(struct LZ77Context *ctx,
|
static void lz77_compress(struct LZ77Context *ctx,
|
||||||
const unsigned char *data, int len, bool compress);
|
const unsigned char *data, int len);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Modifiable parameters.
|
* Modifiable parameters.
|
||||||
@ -199,7 +199,7 @@ static void lz77_advance(struct LZ77InternalContext *st,
|
|||||||
#define CHARAT(k) ( (k)<0 ? st->data[(st->winpos+k)&(WINSIZE-1)] : data[k] )
|
#define CHARAT(k) ( (k)<0 ? st->data[(st->winpos+k)&(WINSIZE-1)] : data[k] )
|
||||||
|
|
||||||
static void lz77_compress(struct LZ77Context *ctx,
|
static void lz77_compress(struct LZ77Context *ctx,
|
||||||
const unsigned char *data, int len, bool compress)
|
const unsigned char *data, int len)
|
||||||
{
|
{
|
||||||
struct LZ77InternalContext *st = ctx->ictx;
|
struct LZ77InternalContext *st = ctx->ictx;
|
||||||
int i, distance, off, nmatch, matchlen, advance;
|
int i, distance, off, nmatch, matchlen, advance;
|
||||||
@ -238,8 +238,7 @@ static void lz77_compress(struct LZ77Context *ctx,
|
|||||||
deferchr = '\0';
|
deferchr = '\0';
|
||||||
while (len > 0) {
|
while (len > 0) {
|
||||||
|
|
||||||
/* Don't even look for a match, if we're not compressing. */
|
if (len >= HASHCHARS) {
|
||||||
if (compress && len >= HASHCHARS) {
|
|
||||||
/*
|
/*
|
||||||
* Hash the next few characters.
|
* Hash the next few characters.
|
||||||
*/
|
*/
|
||||||
@ -668,7 +667,7 @@ void zlib_compress_block(ssh_compressor *sc,
|
|||||||
/*
|
/*
|
||||||
* Do the compression.
|
* Do the compression.
|
||||||
*/
|
*/
|
||||||
lz77_compress(&comp->ectx, block, len, true);
|
lz77_compress(&comp->ectx, block, len);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* End the block (by transmitting code 256, which is
|
* End the block (by transmitting code 256, which is
|
||||||
|
Loading…
x
Reference in New Issue
Block a user