File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -193,6 +193,10 @@ class Zlib extends Transform {
193193 opts . windowBits > constants . Z_MAX_WINDOWBITS ) {
194194 throw new RangeError ( 'Invalid windowBits: ' + opts . windowBits ) ;
195195 }
196+ if ( mode === constants . DEFLATERAW &&
197+ opts . windowBits === 8 ) {
198+ throw new RangeError ( 'Unsupported windowBits for DeflateRaw: 8' ) ;
199+ }
196200 }
197201
198202 if ( opts . level ) {
Original file line number Diff line number Diff line change @@ -10,4 +10,4 @@ const zlib = require('zlib');
1010// (http://zlib.net/manual.html#Advanced)
1111assert . throws ( ( ) => {
1212 zlib . createDeflateRaw ( { windowBits : 8 } ) ;
13- } , / ^ E r r o r : I n i t e r r o r $ / ) ;
13+ } , / ^ R a n g e E r r o r : U n s u p p o r t e d w i n d o w B i t s f o r D e f l a t e R a w : 8 $ / ) ;
You can’t perform that action at this time.
0 commit comments