刷新操作


以下值是基于 Brotli 的流的有效刷新操作:

  • zlib.constants.BROTLI_OPERATION_PROCESS(所有操作的默认值)
  • zlib.constants.BROTLI_OPERATION_FLUSH(调用 .flush() 时的默认值)
  • zlib.constants.BROTLI_OPERATION_FINISH(最后一个块的默认值)
  • zlib.constants.BROTLI_OPERATION_EMIT_METADATA
    • 这个特定的操作可能很难在 Node.js 上下文中使用,因为流层很难知道哪些数据会在这个帧中结束。 此外,目前无法通过 Node.js API 使用这些数据。

The following values are valid flush operations for Brotli-based streams:

  • zlib.constants.BROTLI_OPERATION_PROCESS (default for all operations)
  • zlib.constants.BROTLI_OPERATION_FLUSH (default when calling .flush())
  • zlib.constants.BROTLI_OPERATION_FINISH (default for the last chunk)
  • zlib.constants.BROTLI_OPERATION_EMIT_METADATA
    • This particular operation may be hard to use in a Node.js context, as the streaming layer makes it hard to know which data will end up in this frame. Also, there is currently no way to consume this data through the Node.js API.