Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swap brotli dependency #123

Merged
merged 1 commit into from
Mar 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/compression.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import zlib from 'zlib'
import snappy from 'snappyjs'
import { compress as brotliCompress, decompress as brotliDecompress } from 'wasm-brotli'
import { compress as brotliCompress, decompress as brotliDecompress } from 'brotli-wasm'

type d_identity = (value: ArrayBuffer | Buffer | Uint8Array ) => ArrayBuffer | Buffer | Uint8Array
type d_gzip = (value: ArrayBuffer | Buffer | string ) => Buffer
Expand Down Expand Up @@ -64,7 +64,7 @@ async function deflate_brotli(value: Uint8Array) {
lgwin: 22
}
*/)

return Buffer.from(compressedContent);
}

Expand Down Expand Up @@ -103,4 +103,4 @@ function buffer_from_result(result: ArrayBuffer | Buffer | Uint8Array): Buffer {
} else {
return Buffer.from(result);
}
}
}
22 changes: 11 additions & 11 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"@types/long": "^4.0.2",
"@types/node-int64": "^0.4.29",
"@types/thrift": "^0.10.11",
"brotli-wasm": "^2.0.1",
"browserify-zlib": "^0.2.0",
"bson": "4.6.3",
"cross-fetch": "^3.1.4",
Expand All @@ -27,7 +28,6 @@
"snappyjs": "^0.6.1",
"thrift": "0.16.0",
"varint": "^6.0.0",
"wasm-brotli": "^2.0.2",
"xxhash-wasm": "^1.0.2"
},
"devDependencies": {
Expand Down
Loading