diff --git a/src/library/base/man/connections.Rd b/src/library/base/man/connections.Rd index 6375d19878d..32db4770354 100644 --- a/src/library/base/man/connections.Rd +++ b/src/library/base/man/connections.Rd @@ -121,7 +121,7 @@ socketTimeout(socket, timeout = -1) requests. It is ignored for non-HTTP URLs. The \code{User-Agent} header, coming from the \code{HTTPUserAgent} option (see \code{\link{options}}) is used as the first header, automatically.} - \item{compression}{integer in 0--9 (1--19 for \code{zstdfile}). The + \item{compression}{integer in 0--9 (1--22 for \code{zstdfile}). The amount of compression to be applied when writing, from minimal to maximal available. For \code{xzfile} and \code{zstdfile} can also be negative: see the \sQuote{Compression} section.} diff --git a/src/main/connections.c b/src/main/connections.c index b34d1282ddc..e83dda6935e 100644 --- a/src/main/connections.c +++ b/src/main/connections.c @@ -2761,7 +2761,7 @@ attribute_hidden SEXP do_gzfile(SEXP call, SEXP op, SEXP args, SEXP env) } if(type == 3) { compress = asInteger(CADDDR(args)); - if(compress == NA_LOGICAL || abs(compress) > 19) + if(compress == NA_LOGICAL || abs(compress) > 22) error(_("invalid '%s' argument"), "compress"); } open = CHAR(STRING_ELT(sopen, 0)); /* ASCII */