Closed beckend closed 3 months ago
Any others? Aka, Currently plugin support custom algorithm
import { compress } from '@mongodb-js/zstd'
import { compression } from 'vite-plugin-compression2'
compression<{ level: number }>({
algorithm(buf, opt) {
return compress(buf, opt)
},
compressionOptions: {
level: 9
}
})
Here is a simple usage. Can you have a try?
I get .gz extensions, not sure if that is expected, the files are compressed.
And also type errors.
Oh, you should set filename option :)
Then it works ok, the types are a bit misleading.
Hi @nonzzz , @beckend . Could you share a complete example of zstd integration for this plugin? It would also be great if someone would immediately give examples of compression integration for this library )
@cheeeasy2501 I'll move this issue to discussion
Feature request 🚀
Chromium