Skip to content

Commit

Permalink
Merge pull request #565 from calibreapp/brotli-reports
Browse files Browse the repository at this point in the history
🏋️ Brotli compression
  • Loading branch information
benschwarz authored May 31, 2023
2 parents 9c72279 + fb0a2dd commit 2d3da6a
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node-version: [14.x, 15.x, 16.x, 17.x, 18.x]
node-version: [14.x, 15.x, 16.x, 17.x, 18.x, 20.x]
os: [ubuntu-latest, windows-latest, macos-latest]
timeout-minutes: 5
steps:
Expand Down
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
nodejs 18.0.0
nodejs 20.2.0
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# 5.0.4 (2023-05-31)

## 🛠 Core

- Add Brotli decompression support for report JSON downloads

# 5.0.3 (2022-08-25)

## 🛠 Core
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "calibre",
"version": "5.0.3",
"version": "5.0.4",
"engines": {
"node": ">= 14.18"
},
Expand Down Expand Up @@ -72,4 +72,4 @@
"trailingComma": "none",
"arrowParens": "avoid"
}
}
}
2 changes: 2 additions & 0 deletions src/utils/download.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ const download = (url, destination) => {
https.get(url, response => {
if (response.headers['content-encoding'] == 'gzip') {
response.pipe(zlib.createGunzip()).pipe(file)
} else if (response.headers['content-encoding'] == 'br') {
response.pipe(zlib.createBrotliDecompress()).pipe(file)
} else {
response.pipe(file)
}
Expand Down

0 comments on commit 2d3da6a

Please sign in to comment.