We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
readable.from()
1 parent 3fb2422 commit b29231eCopy full SHA for b29231e
src/mdx.ts
@@ -72,14 +72,15 @@ async function readCacheFile<T>(file: string): Promise<T> {
72
}
73
74
async function writeCacheFile(file: string, data: string) {
75
+ const bufferData = Buffer.from(data);
76
await pipeline(
- Readable.from(data),
77
+ Readable.from(bufferData),
78
createBrotliCompress({
79
chunkSize: 32 * 1024,
80
params: {
81
[zlibConstants.BROTLI_PARAM_MODE]: zlibConstants.BROTLI_MODE_TEXT,
82
[zlibConstants.BROTLI_PARAM_QUALITY]: CACHE_COMPRESS_LEVEL,
- [zlibConstants.BROTLI_PARAM_SIZE_HINT]: data.length,
83
+ [zlibConstants.BROTLI_PARAM_SIZE_HINT]: bufferData.length,
84
},
85
}),
86
createWriteStream(file)
0 commit comments