MCPcopy Index your code
hub / github.com/nodejs/node / validateChunkSize

Function validateChunkSize

lib/internal/streams/iter/transform.js:86–95  ·  view source on GitHub ↗
(options)

Source from the content-addressed store, hash-verified

84const kEmpty = Buffer.alloc(0);
85
86function validateChunkSize(options) {
87 let chunkSize = options.chunkSize;
88 if (!validateFiniteNumber(chunkSize, 'options.chunkSize')) {
89 chunkSize = DEFAULT_OUTPUT_SIZE;
90 } else if (chunkSize < Z_MIN_CHUNK) {
91 throw new ERR_OUT_OF_RANGE('options.chunkSize',
92 `>= ${Z_MIN_CHUNK}`, chunkSize);
93 }
94 return chunkSize;
95}
96
97function validateDictionary(dictionary) {
98 if (dictionary === undefined) return undefined;

Callers 3

createZlibHandleFunction · 0.85
createBrotliHandleFunction · 0.85
createZstdHandleFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…