diff options
author | Joyee Cheung <joyeec9h3@gmail.com> | 2019-01-13 12:17:26 +0300 |
---|---|---|
committer | Daniel Bevenius <daniel.bevenius@gmail.com> | 2019-01-21 09:54:42 +0300 |
commit | 1838d00eba30708dd8468a5707489d1ff6bb8a9d (patch) | |
tree | b757b6c004602f22bab5063a38a9e2cdde1f7fa1 /src/node_zlib.cc | |
parent | 8b2e861da1da827cf8c581efbfd126907df9b593 (diff) |
src: reduce includes of node_internals.h
PR-URL: https://github.com/nodejs/node/pull/25507
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/node_zlib.cc')
-rw-r--r-- | src/node_zlib.cc | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/node_zlib.cc b/src/node_zlib.cc index 4c65ede612c..639d7f87c5a 100644 --- a/src/node_zlib.cc +++ b/src/node_zlib.cc @@ -21,7 +21,6 @@ #include "node.h" #include "node_buffer.h" -#include "node_internals.h" #include "async_wrap-inl.h" #include "env-inl.h" @@ -59,6 +58,19 @@ using v8::Value; namespace { +// Fewer than 64 bytes per chunk is not recommended. +// Technically it could work with as few as 8, but even 64 bytes +// is low. Usually a MB or more is best. +#define Z_MIN_CHUNK 64 +#define Z_MAX_CHUNK std::numeric_limits<double>::infinity() +#define Z_DEFAULT_CHUNK (16 * 1024) +#define Z_MIN_MEMLEVEL 1 +#define Z_MAX_MEMLEVEL 9 +#define Z_DEFAULT_MEMLEVEL 8 +#define Z_MIN_LEVEL -1 +#define Z_MAX_LEVEL 9 +#define Z_DEFAULT_LEVEL Z_DEFAULT_COMPRESSION + #define ZLIB_ERROR_CODES(V) \ V(Z_OK) \ V(Z_STREAM_END) \ |