Skip to content

Commit 2aa5e6f

Browse files
authored
repo sync
2 parents 541cc52 + 3c243ba commit 2aa5e6f

53 files changed

Lines changed: 237 additions & 8 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

javascripts/search.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ function tmplSearchResult ({ url, breadcrumbs, heading, title, content }) {
287287
)
288288
}
289289

290-
// Convert em to mark tags in search responses
290+
// Convert mark tags in search responses
291291
function markify (text) {
292292
const { mark } = tags
293293
return text

lib/search/compress.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
const { promisify } = require('util')
2+
const zlib = require('zlib')
3+
const brotliCompress = promisify(zlib.brotliCompress)
4+
const brotliDecompress = promisify(zlib.brotliDecompress)
5+
6+
const options = {
7+
params: {
8+
[zlib.constants.BROTLI_PARAM_MODE]: zlib.constants.BROTLI_MODE_TEXT,
9+
[zlib.constants.BROTLI_PARAM_QUALITY]: 6
10+
}
11+
}
12+
13+
module.exports = {
14+
async compress (data) {
15+
return brotliCompress(data, options)
16+
},
17+
18+
async decompress (data) {
19+
return brotliDecompress(data, options)
20+
}
21+
}
487 KB
Binary file not shown.
1.1 MB
Binary file not shown.
565 KB
Binary file not shown.
2.63 MB
Binary file not shown.
527 KB
Binary file not shown.
3.42 MB
Binary file not shown.
494 KB
Binary file not shown.
1.11 MB
Binary file not shown.

0 commit comments

Comments
 (0)