refactor: Revert compress utils deprecation (#29977)

This commit is contained in:
Sergei Zharinov 2024-07-02 01:48:09 -03:00 committed by GitHub
parent 0a7ce18f4b
commit 7868301dee
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -4,9 +4,6 @@ import zlib, { constants } from 'node:zlib';
const brotliCompress = promisify(zlib.brotliCompress); const brotliCompress = promisify(zlib.brotliCompress);
const brotliDecompress = promisify(zlib.brotliDecompress); const brotliDecompress = promisify(zlib.brotliDecompress);
/**
* @deprecated
*/
export async function compressToBase64(input: string): Promise<string> { export async function compressToBase64(input: string): Promise<string> {
const buf = await brotliCompress(input, { const buf = await brotliCompress(input, {
params: { params: {
@ -17,9 +14,6 @@ export async function compressToBase64(input: string): Promise<string> {
return buf.toString('base64'); return buf.toString('base64');
} }
/**
* @deprecated
*/
export async function decompressFromBase64(input: string): Promise<string> { export async function decompressFromBase64(input: string): Promise<string> {
const buf = Buffer.from(input, 'base64'); const buf = Buffer.from(input, 'base64');
const str = await brotliDecompress(buf); const str = await brotliDecompress(buf);