如何在Google驱动器上拆分.bak文件?

发布于 2025-01-29 18:28:50 字数 68 浏览 3 评论 0原文

我正在尝试从Google Drive下载一个非常大的.bak文件,该文件超过600 GB。在下载之前,是否有任何要分开的?

I'm trying to download a really large .bak file from Google Drive that is over 600 GB. Is there anyway to split it before downloading?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

只怪假的太真实 2025-02-05 18:28:50

您不需要拆分它,您可以下载一个很大的文件。

也就是说,您可以使用 partial download 部分下载只有文件的指定部分。您可以使用范围标头使用字节范围来指定要下载的文件的部分。

例如:

Range: bytes=500-999

尚不清楚所有Google客户端库是否真的支持它。您可能需要以艰难的方式执行此操作。

url = "https://www.googleapis.com/drive/v3/files/" + file_id + "?alt=media"
headers = {"Authorization": "Bearer ###accessToken###", "Range": "bytes={}-{}".format(start, start+length)}
res = requests.get(url, headers=headers)
fh = io.BytesIO(res.content)
return fh.getvalue()

You dont need to split it you can download a file that large.

That being said you can use Partial download Partial download involves downloading only a specified portion of a file. You can specify the portion of the file you want to download by using a byte range with the Range header.

For example:

Range: bytes=500-999

It is not clear if all of the Google client libraries actually support it though. You may need to do this the hard way.

url = "https://www.googleapis.com/drive/v3/files/" + file_id + "?alt=media"
headers = {"Authorization": "Bearer ###accessToken###", "Range": "bytes={}-{}".format(start, start+length)}
res = requests.get(url, headers=headers)
fh = io.BytesIO(res.content)
return fh.getvalue()
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文