【发布时间】:2016-09-15 22:59:28
【问题描述】:
谷歌云存储 NodeJS 库 v0.33 https://googlecloudplatform.github.io/gcloud-node/#/docs/v0.33.0/storage/file?method=createWriteStream
谁能澄清createWriteStream 的gzip 选项到底有什么作用?文档对我来说有点不清楚。描述指出:
Automatically gzip the file. This will set options.metadata.contentEncoding to gzip.
它似乎可以做以下两件事之一:
- 实际上是gzip文件(需要用户手动解压文件)
- 自动压缩 http 响应,但传输完成后文件未压缩。 (即 HTTP 压缩)
由于设置了 contentEncoding,我假设情况实际上是#1。如果设置了 transferEncoding,那么我猜#2。 (参考:Transfer-Encoding: gzip vs. Content-Encoding: gzip)。但是,我担心 contentEncoding 实际上被用作传输层细节。
【问题讨论】:
标签: gcloud-node