Skip to content

Commit

Permalink
Change default compression level
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewdalpino committed Aug 25, 2021
1 parent 567428f commit fd669fe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ Apply the Gzip compression algorithm to the request body.
#### Parameters
| # | Param | Default | Type | Description |
|---|---|---|---|---|
| 1 | level | 1 | int | The compression level between 0 and 9 with 0 meaning no compression. |
| 1 | level | 5 | int | The compression level between 0 and 9 with 0 meaning no compression. |
| 2 | threshold | 65535 | int | The minimum size of the request body in bytes in order to be compressed. |

**Example**
Expand Down
2 changes: 1 addition & 1 deletion src/HTTP/Middleware/CompressRequestBody.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class CompressRequestBody implements Middleware
* @param int $threshold
* @throws \Rubix\Client\Exceptions\InvalidArgumentException
*/
public function __construct(int $level = 1, int $threshold = self::MAX_MTU)
public function __construct(int $level = 5, int $threshold = self::MAX_MTU)
{
if ($level < 0 or $level > 9) {
throw new InvalidArgumentException('Level must be'
Expand Down

0 comments on commit fd669fe

Please sign in to comment.