@@ -696,6 +696,60 @@ The `zlib.bytesWritten` property specifies the number of bytes written to
696
696
the engine, before the bytes are processed (compressed or decompressed,
697
697
as appropriate for the derived class).
698
698
699
+
700
+
701
+ ### ` zlib.close([callback]) `
702
+
703
+ <!-- YAML
704
+ added: v0.9.4
705
+ -->
706
+
707
+ * ` callback ` {Function}
708
+
709
+ Close the underlying handle.
710
+
711
+ ### ` zlib.flush([kind, ]callback) `
712
+
713
+ <!-- YAML
714
+ added: v0.5.8
715
+ -->
716
+
717
+ * ` kind ` ** Default:** ` zlib.constants.Z_FULL_FLUSH ` for zlib-based streams,
718
+ ` zlib.constants.BROTLI_OPERATION_FLUSH ` for Brotli-based streams.
719
+ * ` callback ` {Function}
720
+
721
+ Flush pending data. Don't call this frivolously, premature flushes negatively
722
+ impact the effectiveness of the compression algorithm.
723
+
724
+ Calling this only flushes data from the internal ` zlib ` state, and does not
725
+ perform flushing of any kind on the streams level. Rather, it behaves like a
726
+ normal call to ` .write() ` , i.e. it will be queued up behind other pending
727
+ writes and will only produce output when data is being read from the stream.
728
+
729
+ ### ` zlib.params(level, strategy, callback) `
730
+
731
+ <!-- YAML
732
+ added: v0.11.4
733
+ -->
734
+
735
+ * ` level ` {integer}
736
+ * ` strategy ` {integer}
737
+ * ` callback ` {Function}
738
+
739
+ This function is only available for zlib-based streams, i.e. not Brotli.
740
+
741
+ Dynamically update the compression level and compression strategy.
742
+ Only applicable to deflate algorithm.
743
+
744
+ ### ` zlib.reset() `
745
+
746
+ <!-- YAML
747
+ added: v0.7.0
748
+ -->
749
+
750
+ Reset the compressor/decompressor to factory defaults. Only applicable to
751
+ the inflate and deflate algorithms.
752
+
699
753
### ` zlib.crc32(data[, value]) `
700
754
701
755
<!-- YAML
@@ -759,58 +813,6 @@ crc = zlib.crc32(Buffer.from('hello', 'utf16le')); // 1427272415
759
813
crc = zlib .crc32 (Buffer .from (' world' , ' utf16le' ), crc); // 4150509955
760
814
```
761
815
762
- ### ` zlib.close([callback]) `
763
-
764
- <!-- YAML
765
- added: v0.9.4
766
- -->
767
-
768
- * ` callback ` {Function}
769
-
770
- Close the underlying handle.
771
-
772
- ### ` zlib.flush([kind, ]callback) `
773
-
774
- <!-- YAML
775
- added: v0.5.8
776
- -->
777
-
778
- * ` kind ` ** Default:** ` zlib.constants.Z_FULL_FLUSH ` for zlib-based streams,
779
- ` zlib.constants.BROTLI_OPERATION_FLUSH ` for Brotli-based streams.
780
- * ` callback ` {Function}
781
-
782
- Flush pending data. Don't call this frivolously, premature flushes negatively
783
- impact the effectiveness of the compression algorithm.
784
-
785
- Calling this only flushes data from the internal ` zlib ` state, and does not
786
- perform flushing of any kind on the streams level. Rather, it behaves like a
787
- normal call to ` .write() ` , i.e. it will be queued up behind other pending
788
- writes and will only produce output when data is being read from the stream.
789
-
790
- ### ` zlib.params(level, strategy, callback) `
791
-
792
- <!-- YAML
793
- added: v0.11.4
794
- -->
795
-
796
- * ` level ` {integer}
797
- * ` strategy ` {integer}
798
- * ` callback ` {Function}
799
-
800
- This function is only available for zlib-based streams, i.e. not Brotli.
801
-
802
- Dynamically update the compression level and compression strategy.
803
- Only applicable to deflate algorithm.
804
-
805
- ### ` zlib.reset() `
806
-
807
- <!-- YAML
808
- added: v0.7.0
809
- -->
810
-
811
- Reset the compressor/decompressor to factory defaults. Only applicable to
812
- the inflate and deflate algorithms.
813
-
814
816
## ` zlib.constants `
815
817
816
818
<!-- YAML
0 commit comments