Class: GunzipConditional
Gunzip a stream only if it is gzipped
Extends
Transform
Constructors
new GunzipConditional()
new GunzipConditional():
GunzipConditional
Returns
Overrides
Transform.constructor
Source
packages/core/src/utils/serializers.ts:73
Properties
allowHalfOpen
allowHalfOpen:
boolean
If false
then the stream will automatically end the writable side when the
readable side ends. Set initially by the allowHalfOpen
constructor option,
which defaults to false
.
This can be changed manually to change the half-open behavior of an existingDuplex
stream instance, but must be changed before the 'end'
event is
emitted.
Since
v0.9.4
Inherited from
Transform.allowHalfOpen
Source
packages/core/node_modules/@types/node/stream.d.ts:873
closed
readonly
closed:boolean
Inherited from
Transform.closed
Source
packages/core/node_modules/@types/node/stream.d.ts:862
destination
destination:
WritableStream
Source
packages/core/src/utils/serializers.ts:70
destroyed
destroyed:
boolean
Is true
after readable.destroy()
has been called.
Since
v8.0.0
Inherited from
Transform.destroyed
Source
packages/core/node_modules/@types/node/stream.d.ts:129
errored
readonly
errored:Error
Inherited from
Transform.errored
Source
packages/core/node_modules/@types/node/stream.d.ts:863
first
first:
boolean
=true
Source
packages/core/src/utils/serializers.ts:68
readable
readable:
boolean
Is true
if it is safe to call readable.read()
, which means
the stream has not been destroyed or emitted 'error'
or 'end'
.
Since
v11.4.0
Inherited from
Transform.readable
Source
packages/core/node_modules/@types/node/stream.d.ts:85
readableAborted
Experimental
readonly
readableAborted:boolean
Returns whether the stream was destroyed or errored before emitting 'end'
.
Since
v16.8.0
Inherited from
Transform.readableAborted
Source
packages/core/node_modules/@types/node/stream.d.ts:79
readableDidRead
Experimental
readonly
readableDidRead:boolean
Returns whether 'data'
has been emitted.
Since
v16.7.0, v14.18.0
Inherited from
Transform.readableDidRead
Source
packages/core/node_modules/@types/node/stream.d.ts:91
readableEncoding
readonly
readableEncoding:BufferEncoding
Getter for the property encoding
of a given Readable
stream. The encoding
property can be set using the readable.setEncoding()
method.
Since
v12.7.0
Inherited from
Transform.readableEncoding
Source
packages/core/node_modules/@types/node/stream.d.ts:96
readableEnded
readonly
readableEnded:boolean
Becomes true
when 'end'
event is emitted.
Since
v12.9.0
Inherited from
Transform.readableEnded
Source
packages/core/node_modules/@types/node/stream.d.ts:101
readableFlowing
readonly
readableFlowing:boolean
This property reflects the current state of a Readable
stream as described
in the Three states
section.
Since
v9.4.0
Inherited from
Transform.readableFlowing
Source
packages/core/node_modules/@types/node/stream.d.ts:107
readableHighWaterMark
readonly
readableHighWaterMark:number
Returns the value of highWaterMark
passed when creating this Readable
.
Since
v9.3.0
Inherited from
Transform.readableHighWaterMark
Source
packages/core/node_modules/@types/node/stream.d.ts:112
readableLength
readonly
readableLength:number
This property contains the number of bytes (or objects) in the queue
ready to be read. The value provides introspection data regarding
the status of the highWaterMark
.
Since
v9.4.0
Inherited from
Transform.readableLength
Source
packages/core/node_modules/@types/node/stream.d.ts:119
readableObjectMode
readonly
readableObjectMode:boolean
Getter for the property objectMode
of a given Readable
stream.
Since
v12.3.0
Inherited from
Transform.readableObjectMode
Source
packages/core/node_modules/@types/node/stream.d.ts:124
source
source:
any
Source
packages/core/src/utils/serializers.ts:71
writable
readonly
writable:boolean
Inherited from
Transform.writable
Source
packages/core/node_modules/@types/node/stream.d.ts:854
writableCorked
readonly
writableCorked:number
Inherited from
Transform.writableCorked
Source
packages/core/node_modules/@types/node/stream.d.ts:860
writableEnded
readonly
writableEnded:boolean
Inherited from
Transform.writableEnded
Source
packages/core/node_modules/@types/node/stream.d.ts:855
writableFinished
readonly
writableFinished:boolean
Inherited from
Transform.writableFinished
Source
packages/core/node_modules/@types/node/stream.d.ts:856
writableHighWaterMark
readonly
writableHighWaterMark:number
Inherited from
Transform.writableHighWaterMark
Source
packages/core/node_modules/@types/node/stream.d.ts:857
writableLength
readonly
writableLength:number
Inherited from
Transform.writableLength
Source
packages/core/node_modules/@types/node/stream.d.ts:858
writableNeedDrain
readonly
writableNeedDrain:boolean
Inherited from
Transform.writableNeedDrain
Source
packages/core/node_modules/@types/node/stream.d.ts:861
writableObjectMode
readonly
writableObjectMode:boolean
Inherited from
Transform.writableObjectMode
Source
packages/core/node_modules/@types/node/stream.d.ts:859
zlib
zlib:
Transform
Source
packages/core/src/utils/serializers.ts:69
captureRejectionSymbol
static
readonly
captureRejectionSymbol: typeofcaptureRejectionSymbol
Inherited from
Transform.captureRejectionSymbol
Source
packages/core/node_modules/@types/node/events.d.ts:328
captureRejections
static
captureRejections:boolean
Sets or gets the default captureRejection value for all emitters.
Inherited from
Transform.captureRejections
Source
packages/core/node_modules/@types/node/events.d.ts:333
defaultMaxListeners
static
defaultMaxListeners:number
Inherited from
Transform.defaultMaxListeners
Source
packages/core/node_modules/@types/node/events.d.ts:334
errorMonitor
static
readonly
errorMonitor: typeoferrorMonitor
This symbol shall be used to install a listener for only monitoring 'error'
events. Listeners installed using this symbol are called before the regular
'error'
listeners are called.
Installing a listener using this symbol does not change the behavior once an
'error'
event is emitted, therefore the process will still crash if no
regular 'error'
listener is installed.
Inherited from
Transform.errorMonitor
Source
packages/core/node_modules/@types/node/events.d.ts:327
Methods
[asyncIterator]
()
[asyncIterator]():
AsyncIterableIterator
<any
>
Returns
AsyncIterableIterator
<any
>
Inherited from
Transform.[asyncIterator]
Source
packages/core/node_modules/@types/node/stream.d.ts:503
_construct()?
optional
_construct(callback
):void
Parameters
• callback: (error
?) => void
Returns
void
Inherited from
Transform._construct
Source
packages/core/node_modules/@types/node/stream.d.ts:141
_destroy()
_destroy(
error
,callback
):void
Parameters
• error: Error
• callback: (error
) => void
Returns
void
Inherited from
Transform._destroy
Source
packages/core/node_modules/@types/node/stream.d.ts:905
_final()
_final(
callback
):void
Parameters
• callback: (error
?) => void
Returns
void
Inherited from
Transform._final
Source
packages/core/node_modules/@types/node/stream.d.ts:906
_flush()
_flush(
callback
):void
Parameters
• callback: TransformCallback
Returns
void
Inherited from
Transform._flush
Source
packages/core/node_modules/@types/node/stream.d.ts:948
_read()
_read(
size
):void
Parameters
• size: number
Returns
void
Inherited from
Transform._read
Source
packages/core/node_modules/@types/node/stream.d.ts:142
_transform()
_transform(
chunk
,encoding
,callback
):void
Parameters
• chunk: any
• encoding: BufferEncoding
• callback: TransformCallback
Returns
void
Overrides
Transform._transform
Source
packages/core/src/utils/serializers.ts:85
_write()
_write(
chunk
,encoding
,callback
):void
Parameters
• chunk: any
• encoding: BufferEncoding
• callback: (error
?) => void
Returns
void
Inherited from
Transform._write
Source
packages/core/node_modules/@types/node/stream.d.ts:897
_writev()?
optional
_writev(chunks
,callback
):void
Parameters
• chunks: Object
[]
• callback: (error
?) => void
Returns
void
Inherited from
Transform._writev
Source
packages/core/node_modules/@types/node/stream.d.ts:898
addListener()
addListener(event, listener)
addListener(
event
,listener
):this
Event emitter The defined events on documents including:
- close
- data
- end
- error
- pause
- readable
- resume
Parameters
• event: "close"
• listener: () => void
Returns
this
Inherited from
Transform.addListener
Source
packages/core/node_modules/@types/node/stream.d.ts:447
addListener(event, listener)
addListener(
event
,listener
):this
Parameters
• event: "data"
• listener: (chunk
) => void
Returns
this
Inherited from
Transform.addListener
Source
packages/core/node_modules/@types/node/stream.d.ts:448
addListener(event, listener)
addListener(
event
,listener
):this
Parameters
• event: "end"
• listener: () => void
Returns
this
Inherited from
Transform.addListener
Source
packages/core/node_modules/@types/node/stream.d.ts:449
addListener(event, listener)
addListener(
event
,listener
):this
Parameters
• event: "error"
• listener: (err
) => void
Returns
this
Inherited from
Transform.addListener
Source
packages/core/node_modules/@types/node/stream.d.ts:450
addListener(event, listener)
addListener(
event
,listener
):this
Parameters
• event: "pause"
• listener: () => void
Returns
this
Inherited from
Transform.addListener
Source
packages/core/node_modules/@types/node/stream.d.ts:451
addListener(event, listener)
addListener(
event
,listener
):this
Parameters
• event: "readable"
• listener: () => void
Returns
this
Inherited from
Transform.addListener
Source
packages/core/node_modules/@types/node/stream.d.ts:452
addListener(event, listener)
addListener(
event
,listener
):this
Parameters
• event: "resume"
• listener: () => void
Returns
this
Inherited from
Transform.addListener
Source
packages/core/node_modules/@types/node/stream.d.ts:453
addListener(event, listener)
addListener(
event
,listener
):this
Parameters
• event: string
| symbol
• listener: (...args
) => void
Returns
this
Inherited from
Transform.addListener
Source
packages/core/node_modules/@types/node/stream.d.ts:454
cork()
cork():
void
Returns
void
Inherited from
Transform.cork
Source
packages/core/node_modules/@types/node/stream.d.ts:913
destroy()
destroy(
error
?):this
Destroy the stream. Optionally emit an 'error'
event, and emit a 'close'
event (unless emitClose
is set to false
). After this call, the readable
stream will release any internal resources and subsequent calls to push()
will be ignored.
Once destroy()
has been called any further calls will be a no-op and no
further errors except from _destroy()
may be emitted as 'error'
.
Implementors should not override this method, but instead implement readable._destroy()
.
Parameters
• error?: Error
Error which will be passed as payload in 'error'
event
Returns
this
Inherited from
Transform.destroy