@@ -696,6 +696,58 @@ 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
+ ### ` zlib.close([callback]) `
700
+
701
+ <!-- YAML
702
+ added: v0.9.4
703
+ -->
704
+
705
+ * ` callback ` {Function}
706
+
707
+ Close the underlying handle.
708
+
709
+ ### ` zlib.flush([kind, ]callback) `
710
+
711
+ <!-- YAML
712
+ added: v0.5.8
713
+ -->
714
+
715
+ * ` kind ` ** Default:** ` zlib.constants.Z_FULL_FLUSH ` for zlib-based streams,
716
+ ` zlib.constants.BROTLI_OPERATION_FLUSH ` for Brotli-based streams.
717
+ * ` callback ` {Function}
718
+
719
+ Flush pending data. Don't call this frivolously, premature flushes negatively
720
+ impact the effectiveness of the compression algorithm.
721
+
722
+ Calling this only flushes data from the internal ` zlib ` state, and does not
723
+ perform flushing of any kind on the streams level. Rather, it behaves like a
724
+ normal call to ` .write() ` , i.e. it will be queued up behind other pending
725
+ writes and will only produce output when data is being read from the stream.
726
+
727
+ ### ` zlib.params(level, strategy, callback) `
728
+
729
+ <!-- YAML
730
+ added: v0.11.4
731
+ -->
732
+
733
+ * ` level ` {integer}
734
+ * ` strategy ` {integer}
735
+ * ` callback ` {Function}
736
+
737
+ This function is only available for zlib-based streams, i.e. not Brotli.
738
+
739
+ Dynamically update the compression level and compression strategy.
740
+ Only applicable to deflate algorithm.
741
+
742
+ ### ` zlib.reset() `
743
+
744
+ <!-- YAML
745
+ added: v0.7.0
746
+ -->
747
+
748
+ Reset the compressor/decompressor to factory defaults. Only applicable to
749
+ the inflate and deflate algorithms.
750
+
699
751
### ` zlib.crc32(data[, value]) `
700
752
701
753
<!-- YAML
@@ -759,58 +811,6 @@ crc = zlib.crc32(Buffer.from('hello', 'utf16le')); // 1427272415
759
811
crc = zlib .crc32 (Buffer .from (' world' , ' utf16le' ), crc); // 4150509955
760
812
```
761
813
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
814
## ` zlib.constants `
815
815
816
816
<!-- YAML
0 commit comments