Max array, typed-array, buffer and collection entry count. Default 1,048,576.
maxDepth?
number
Max structured-data and structured-clone nesting depth. Default 32.
maxInflatedBytes?
number
Max total bytes inflated across all layers. Default 16 MiB. Each byte is counted once: nested layers are charged only for growth beyond their encoded input, which was already charged as part of the parent layer. Transient gross allocation while decoding is bounded by roughly maxDepth × maxInflatedBytes.