| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 4ee7f29 commit ade6614
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1416,9 +1416,13 @@ changes: | |||
| 1416 | 1416 | ||
| 1417 | 1417 | <!-- YAML | |
| 1418 | 1418 | added: v17.0.0 | |
| 1419 | + changes: | ||
| 1420 | + - version: REPLACEME | ||
| 1421 | + pr-url: https://github.com/nodejs/node/pull/50097 | ||
| 1422 | + description: format now accepts `deflate-raw` value. | ||
| 1419 | 1423 | --> | |
| 1420 | 1424 | ||
| 1421 | - * `format` {string} One of either `'deflate'` or `'gzip'`. | ||
| 1425 | + * `format` {string} One of `'deflate'`, `'deflate-raw'`, or `'gzip'`. | ||
| 1422 | 1426 | ||
| 1423 | 1427 | #### `compressionStream.readable` | |
| 1424 | 1428 | ||
@@ -1450,9 +1454,13 @@ changes: | |||
| 1450 | 1454 | ||
| 1451 | 1455 | <!-- YAML | |
| 1452 | 1456 | added: v17.0.0 | |
| 1457 | + changes: | ||
| 1458 | + - version: REPLACEME | ||
| 1459 | + pr-url: https://github.com/nodejs/node/pull/50097 | ||
| 1460 | + description: format now accepts `deflate-raw` value. | ||
| 1453 | 1461 | --> | |
| 1454 | 1462 | ||
| 1455 | - * `format` {string} One of either `'deflate'` or `'gzip'`. | ||
| 1463 | + * `format` {string} One of `'deflate'`, `'deflate-raw'`, or `'gzip'`. | ||
| 1456 | 1464 | ||
| 1457 | 1465 | #### `decompressionStream.readable` | |
| 1458 | 1466 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -51,14 +51,17 @@ function isDecompressionStream(value) { | |||
| 51 | 51 | ||
| 52 | 52 | class CompressionStream { | |
| 53 | 53 | /** | |
| 54 | - * @param {'deflate'|'gzip'} format | ||
| 54 | + * @param {'deflate'|'deflate-raw'|'gzip'} format | ||
| 55 | 55 | */ | |
| 56 | 56 | constructor(format) { | |
| 57 | 57 | this[kType] = 'CompressionStream'; | |
| 58 | 58 | switch (format) { | |
| 59 | 59 | case 'deflate': | |
| 60 | 60 | this[kHandle] = lazyZlib().createDeflate(); | |
| 61 | 61 | break; | |
| 62 | + case 'deflate-raw': | ||
| 63 | + this[kHandle] = lazyZlib().createDeflateRaw(); | ||
| 64 | + break; | ||
| 62 | 65 | case 'gzip': | |
| 63 | 66 | this[kHandle] = lazyZlib().createGzip(); | |
| 64 | 67 | break; | |
@@ -100,14 +103,17 @@ class CompressionStream { | |||
| 100 | 103 | ||
| 101 | 104 | class DecompressionStream { | |
| 102 | 105 | /** | |
| 103 | - * @param {'deflate'|'gzip'} format | ||
| 106 | + * @param {'deflate'|'deflate-raw'|'gzip'} format | ||
| 104 | 107 | */ | |
| 105 | 108 | constructor(format) { | |
| 106 | 109 | this[kType] = 'DecompressionStream'; | |
| 107 | 110 | switch (format) { | |
| 108 | 111 | case 'deflate': | |
| 109 | 112 | this[kHandle] = lazyZlib().createInflate(); | |
| 110 | 113 | break; | |
| 114 | + case 'deflate-raw': | ||
| 115 | + this[kHandle] = lazyZlib().createInflateRaw(); | ||
| 116 | + break; | ||
| 111 | 117 | case 'gzip': | |
| 112 | 118 | this[kHandle] = lazyZlib().createGunzip(); | |
| 113 | 119 | break; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -41,7 +41,7 @@ async function test(format) { | |||
| 41 | 41 | ]); | |
| 42 | 42 | } | |
| 43 | 43 | ||
| 44 | - Promise.all(['gzip', 'deflate'].map((i) => test(i))).then(common.mustCall()); | ||
| 44 | + Promise.all(['gzip', 'deflate', 'deflate-raw'].map((i) => test(i))).then(common.mustCall()); | ||
| 45 | 45 | ||
| 46 | 46 | [1, 'hello', false, {}].forEach((i) => { | |
| 47 | 47 | assert.throws(() => new CompressionStream(i), { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments