@@ -18,6 +18,8 @@ import {
18
18
SNAPPY_COMPRESSED_VALUE_1 ,
19
19
BROTLI_COMPRESSED_VALUE_1 ,
20
20
BROTLI_COMPRESSED_VALUE_2 ,
21
+ PHPGZCOMPRESS_COMPRESSED_VALUE_1 ,
22
+ PHPGZCOMPRESS_COMPRESSED_VALUE_2 ,
21
23
} from './constants'
22
24
23
25
const defaultValues = [
@@ -129,6 +131,22 @@ const defaultValues = [
129
131
outputStr : DECOMPRESSED_VALUE_STR_2 ,
130
132
isCompressed : true ,
131
133
} ,
134
+ {
135
+ input : PHPGZCOMPRESS_COMPRESSED_VALUE_1 ,
136
+ compressor : KeyValueCompressor . PHPGZCompress ,
137
+ compressorInit : KeyValueCompressor . PHPGZCompress ,
138
+ output : DECOMPRESSED_VALUE_1 ,
139
+ outputStr : DECOMPRESSED_VALUE_STR_1 ,
140
+ isCompressed : true ,
141
+ } ,
142
+ {
143
+ input : PHPGZCOMPRESS_COMPRESSED_VALUE_2 ,
144
+ compressor : KeyValueCompressor . PHPGZCompress ,
145
+ compressorInit : KeyValueCompressor . PHPGZCompress ,
146
+ output : DECOMPRESSED_VALUE_2 ,
147
+ outputStr : DECOMPRESSED_VALUE_STR_2 ,
148
+ isCompressed : true ,
149
+ } ,
132
150
] . map ( ( value ) => ( {
133
151
...value ,
134
152
input : anyToBuffer ( value . input )
@@ -139,7 +157,10 @@ describe('getCompressor', () => {
139
157
let expected = compressorByValue || compressor
140
158
141
159
// SNAPPY doesn't have magic symbols
142
- if ( compressor === KeyValueCompressor . SNAPPY || compressor === KeyValueCompressor . Brotli ) {
160
+ if ( compressor === KeyValueCompressor . SNAPPY
161
+ || compressor === KeyValueCompressor . Brotli
162
+ || compressor === KeyValueCompressor . PHPGZCompress
163
+ ) {
143
164
expected = null
144
165
}
145
166
0 commit comments