summaryrefslogtreecommitdiff
path: root/src/node_zlib.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/node_zlib.cc')
-rw-r--r--src/node_zlib.cc14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/node_zlib.cc b/src/node_zlib.cc
index 4c65ede612..639d7f87c5 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) \