@@ -46,6 +46,10 @@ export type Deflate = any;
46
46
47
47
export type Inflate = any ;
48
48
49
+ export type BrotliCompress = any ;
50
+
51
+ export type BrotliDecompress = any ;
52
+
49
53
/**
50
54
* Creates a writable stream which compresses data using the DEFLATE algorithm.
51
55
*
@@ -66,6 +70,26 @@ export function createInflate(options?: any): Inflate {
66
70
return intrinsic ( ) . createInflate ( options ) ;
67
71
}
68
72
73
+ /**
74
+ * Creates a writable stream which compresses data using the Brotli algorithm.
75
+ *
76
+ * @param options Zlib options to apply to this stream. Optional.
77
+ * @returns Deflation stream
78
+ */
79
+ export function createBrotliCompress ( options ?: any ) : Deflate {
80
+ return intrinsic ( ) . createBrotliCompress ( options ) ;
81
+ }
82
+
83
+ /**
84
+ * Creates a readable stream which decompresses data using the Brotli algorithm.
85
+ *
86
+ * @param options Zlib options to apply to this stream. Optional.
87
+ * @returns Inflation stream
88
+ */
89
+ export function createBrotliDecompress ( options ?: any ) : Inflate {
90
+ return intrinsic ( ) . createBrotliDecompress ( options ) ;
91
+ }
92
+
69
93
/**
70
94
* Synchronously compresses the given data using the DEFLATE algorithm.
71
95
*
@@ -109,3 +133,36 @@ export function gzipSync(data: string | Buffer | DataView | any, options?: any):
109
133
export function gunzipSync ( data : string | Buffer | DataView | any , options ?: any ) : Buffer {
110
134
return intrinsic ( ) . gunzipSync ( data , options ) ;
111
135
}
136
+
137
+ /**
138
+ * Synchronously decompresses the given data using the zip algorithm.
139
+ *
140
+ * @param data The data to decompress
141
+ * @param options Zlib options to apply to this decompression. Optional.
142
+ * @returns The decompressed data
143
+ */
144
+ export function unzipSync ( data : string | Buffer | DataView | any , options ?: any ) : Buffer {
145
+ return intrinsic ( ) . unzipSync ( data , options ) ;
146
+ }
147
+
148
+ /**
149
+ * Synchronously compresses the given data using the Brotli algorithm.
150
+ *
151
+ * @param data The data to compress
152
+ * @param options Zlib options to apply to this compression. Optional.
153
+ * @returns The compressed data
154
+ */
155
+ export function brotliCompressSync ( data : string | Buffer | DataView | any , options ?: any ) : Buffer {
156
+ return intrinsic ( ) . brotliCompressSync ( data , options ) ;
157
+ }
158
+
159
+ /**
160
+ * Synchronously decompresses the given data using the Brotli algorithm.
161
+ *
162
+ * @param data The data to decompress
163
+ * @param options Zlib options to apply to this decompression. Optional.
164
+ * @returns The decompressed data
165
+ */
166
+ export function brotliDecompressSync ( data : string | Buffer | DataView | any , options ?: any ) : Buffer {
167
+ return intrinsic ( ) . brotliDecompressSync ( data , options ) ;
168
+ }
0 commit comments